summaryrefslogtreecommitdiff
blob: a2d02cde3c7f8170e4caeac5e10b34e0d57d4fca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Allow installation of plugins not only in ~/.config

Used by app-misc/openrgb-plugin-* packages

diff --git a/PluginManager.cpp b/PluginManager.cpp
index 6ccad72c..7b12f32e 100644
--- a/PluginManager.cpp
+++ b/PluginManager.cpp
@@ -41,7 +41,8 @@ void PluginManager::ScanAndLoadPlugins()
     | The plugins directory is a directory named "plugins" in   |
     | the configuration directory                               |
     \*---------------------------------------------------------*/
-    const QDir plugins_dir = QString(ResourceManager::get()->GetConfigurationDirectory().c_str()).append(plugins_path);
+    for (const QDir plugins_dir : {QString(ResourceManager::get()->GetConfigurationDirectory().c_str()).append(plugins_path),
+                                QString().fromStdString(GENTOO_PLUGINS_DIR)}) {
     LOG_INFO("[PluginManager] Scanning plugin directory: %s", plugins_dir.absolutePath().toStdString().c_str());
 
     /*---------------------------------------------------------*\
@@ -64,6 +65,7 @@ void PluginManager::ScanAndLoadPlugins()
 
         AddPlugin(plugin_path);
     }
+    }
 }
 
 void PluginManager::AddPlugin(std::string path)