summaryrefslogtreecommitdiff
path: root/src/plugins/qnx/qnxrunconfiguration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qnx/qnxrunconfiguration.cpp')
-rw-r--r--src/plugins/qnx/qnxrunconfiguration.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/plugins/qnx/qnxrunconfiguration.cpp b/src/plugins/qnx/qnxrunconfiguration.cpp
index c8735c177b..02f61894b7 100644
--- a/src/plugins/qnx/qnxrunconfiguration.cpp
+++ b/src/plugins/qnx/qnxrunconfiguration.cpp
@@ -64,7 +64,7 @@ QnxRunConfiguration::QnxRunConfiguration(Target *target, Utils::Id id)
addAspect<TerminalAspect>();
addAspect<RemoteLinuxEnvironmentAspect>(target);
- auto libAspect = addAspect<QtLibPathAspect>();
+ auto libAspect = addAspect<StringAspect>();
libAspect->setSettingsKey("Qt4ProjectManager.QnxRunConfiguration.QtLibPath");
libAspect->setLabelText(tr("Path to Qt libraries on device"));
libAspect->setDisplayStyle(StringAspect::LineEditDisplay);
@@ -78,21 +78,18 @@ QnxRunConfiguration::QnxRunConfiguration(Target *target, Utils::Id id)
symbolsAspect->setFilePath(localExecutable);
});
- connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
-}
+ setRunnableModifier([libAspect](Runnable &r) {
+ QString libPath = libAspect->value();
+ if (!libPath.isEmpty()) {
+ r.environment.appendOrSet("LD_LIBRARY_PATH", libPath + "/lib:$LD_LIBRARY_PATH");
+ r.environment.appendOrSet("QML_IMPORT_PATH", libPath + "/imports:$QML_IMPORT_PATH");
+ r.environment.appendOrSet("QML2_IMPORT_PATH", libPath + "/qml:$QML2_IMPORT_PATH");
+ r.environment.appendOrSet("QT_PLUGIN_PATH", libPath + "/plugins:$QT_PLUGIN_PATH");
+ r.environment.set("QT_QPA_FONTDIR", libPath + "/lib/fonts");
+ }
+ });
-Runnable QnxRunConfiguration::runnable() const
-{
- Runnable r = RunConfiguration::runnable();
- QString libPath = aspect<QtLibPathAspect>()->value();
- if (!libPath.isEmpty()) {
- r.environment.appendOrSet("LD_LIBRARY_PATH", libPath + "/lib:$LD_LIBRARY_PATH");
- r.environment.appendOrSet("QML_IMPORT_PATH", libPath + "/imports:$QML_IMPORT_PATH");
- r.environment.appendOrSet("QML2_IMPORT_PATH", libPath + "/qml:$QML2_IMPORT_PATH");
- r.environment.appendOrSet("QT_PLUGIN_PATH", libPath + "/plugins:$QT_PLUGIN_PATH");
- r.environment.set("QT_QPA_FONTDIR", libPath + "/lib/fonts");
- }
- return r;
+ connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
}
// QnxRunConfigurationFactory