From 5cdbaa67c68e8c595ae1e1894eead76d465fe73c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 8 Jul 2016 09:12:29 +0200 Subject: gui, api: plugin-support needs to remain header-only Move "opentrack_library_path" to the gui module. --- opentrack/library-path.cpp | 4 ---- opentrack/library-path.hpp | 2 -- opentrack/plugin-support.hpp | 12 ++++++------ 3 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 opentrack/library-path.cpp delete mode 100644 opentrack/library-path.hpp (limited to 'opentrack') diff --git a/opentrack/library-path.cpp b/opentrack/library-path.cpp deleted file mode 100644 index 683dc346..00000000 --- a/opentrack/library-path.cpp +++ /dev/null @@ -1,4 +0,0 @@ -#include "library-path.hpp" -#include "opentrack-library-path.h" - -const char* opentrack_library_path = OPENTRACK_LIBRARY_PATH; diff --git a/opentrack/library-path.hpp b/opentrack/library-path.hpp deleted file mode 100644 index 49a3adb4..00000000 --- a/opentrack/library-path.hpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "export.hpp" -extern "C" OPENTRACK_API_EXPORT const char* opentrack_library_path; diff --git a/opentrack/plugin-support.hpp b/opentrack/plugin-support.hpp index dbb985dc..a55526a9 100644 --- a/opentrack/plugin-support.hpp +++ b/opentrack/plugin-support.hpp @@ -9,7 +9,6 @@ #include "plugin-api.hpp" #include "opentrack-compat/options.hpp" -#include "library-path.hpp" #include #include @@ -106,7 +105,7 @@ struct dylib final { delete handle; } - static QList> enum_libraries() + static QList> enum_libraries(const QString& library_path) { const char* filters_n[] = { OPENTRACK_SOLIB_PREFIX "opentrack-filter-*." OPENTRACK_SOLIB_EXT, OPENTRACK_SOLIB_PREFIX "opentrack-tracker-*." OPENTRACK_SOLIB_EXT, @@ -114,7 +113,7 @@ struct dylib final { }; const Type filters_t[] = { Filter, Tracker, Protocol }; - static const QString libexec_path(QStringLiteral("./") + opentrack_library_path); + static const QString libexec_path(QStringLiteral("./") + library_path); QDir settingsDir(libexec_path); @@ -174,9 +173,10 @@ private: } }; -struct Modules { - Modules() : - module_list(dylib::enum_libraries()), +struct Modules +{ + Modules(const QString& library_path) : + module_list(dylib::enum_libraries(library_path)), filter_modules(filter(dylib::Filter)), tracker_modules(filter(dylib::Tracker)), protocol_modules(filter(dylib::Protocol)) -- cgit v1.2.3