Discussion:
Custom plugin search path?
Guido Seifert
2013-06-24 12:58:31 UTC
Permalink
Hi,
is there a way to make the qtcreator use a custom plugin search path?
The PluginManager has a function 'setPluginPath', I don't think I can
use it from within a plugin to add another plugin search path. When a
plugin is loaded, all the search paths are already evaluated.

There does not seem to be a commandline argument and I did not find
anything in the qtcreator configs. Am I stuck with either system wide
or the default user locations?

Guido
Ziller Eike
2013-06-24 14:56:44 UTC
Permalink
Post by Guido Seifert
Hi,
is there a way to make the qtcreator use a custom plugin search path?
The PluginManager has a function 'setPluginPath', I don't think I can
use it from within a plugin to add another plugin search path. When a
plugin is loaded, all the search paths are already evaluated.
There does not seem to be a commandline argument and I did not find
anything in the qtcreator configs.
Am I stuck with either system wide
or the default user locations?
Yes.
Extending the plugin path from a plugin doesn't work for obvious reasons as you already point out (plugin path and list of plugins being collected before resolving & running any plugin), but I don't see a reason to disallow adding plugin paths through a setting & command line parameter, if that helps.
(Settings can also be provided "installation wide" btw, see the initialization of globalSettings in main.cpp)

Br, Eike
--
Eike Ziller, Senior Software Engineer - Digia, Qt

Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Guido Seifert
2013-06-24 18:58:21 UTC
Permalink
This would help:
http://pastebin.com/wnkYbrec

Do you see any problem with this patch?

Guido
Post by Ziller Eike
but I don't see a reason to disallow adding plugin paths through a
setting & command line parameter, if that helps.
Ziller Eike
2013-06-25 07:34:43 UTC
Permalink
Post by Guido Seifert
http://pastebin.com/wnkYbrec
Do you see any problem with this patch?
PluginManager::setPluginPaths already searches the directories for plugins, so it would be preferable to only call that once with all plugin paths.
Otherwise fine.

Br, Eike
--
Eike Ziller, Senior Software Engineer - Digia, Qt

Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Guido Seifert
2013-06-25 08:58:31 UTC
Permalink
Post by Ziller Eike
PluginManager::setPluginPaths already searches the directories for plugins, so it would be preferable to only call that once with all plugin paths.
Otherwise fine.
Ahhh, cowardly me. I just tried to change as little as possible. Adding stuff without
changing existing code. :-)

Do you like this one better:
http://pastebin.com/i8RkVTYf

Had to move the path evaluation code below the commandline evaluation code. And
QStringList pluginPaths isn't const anymore. But setPluginPaths is called only once.

Guido

Loading...