aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-09-04 14:11:07 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-09-04 14:38:05 -0300
commit879ca025fc24bb79c5744557fc4a14e186e9f61c (patch)
treec7baff3f83db9b17557ba2203ed6e5d6ec87bb92 /main.cpp
parent74ad15b93b2c3816850acb702c669be8ce0fc4ab (diff)
When the user passes an absolute path as the plugin name,
generator runner will load the desired file instead of doing a mess with the absolute path and the GENERATORRUNNER_PLUGIN_DIR variable. This is usefull to test generators plugins without installing them. Reviewed by Renato Araújo
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index bb852dbae..350fdaa4b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -120,7 +120,12 @@ int main(int argc, char *argv[])
// Try to load a generator
QString generatorSet = args.value("generatorSet");
if (!generatorSet.isEmpty()) {
- QString generatorFile = QString(GENERATORRUNNER_PUGIN_DIR) + "/lib" + generatorSet + "_generator";
+ QString generatorFile;
+ if (generatorSet.contains(QDir::separator()))
+ generatorFile = generatorSet;
+ else
+ generatorFile = QString(GENERATORRUNNER_PUGIN_DIR) + "/lib" + generatorSet + "_generator";
+
QLibrary plugin(generatorFile);
getGeneratorsFunc getGenerators = reinterpret_cast<getGeneratorsFunc>(plugin.resolve("getGenerators"));
if (getGenerators)