diff options
author | hjk <hjk@qt.io> | 2018-05-29 13:02:25 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-05-30 11:59:25 +0000 |
commit | 99631bcdb4f27a21cbc3ab2a84b6e72bb1c94e1c (patch) | |
tree | 1c701df7f295504753df0ccfd078bde56e7504fb /src/plugins/pythoneditor/pythoneditorplugin.cpp | |
parent | a91a270f8f075dd606a84eedcb8bfdf782f9fd49 (diff) | |
download | qt-creator-99631bcdb4f27a21cbc3ab2a84b6e72bb1c94e1c.tar.gz |
PythonEditor: Use new convenience function to set up run workers
Change-Id: I2c7b0c57a077794756643862c242c499d93295c9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditorplugin.cpp')
-rw-r--r-- | src/plugins/pythoneditor/pythoneditorplugin.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp index f3375a67c9..713416491f 100644 --- a/src/plugins/pythoneditor/pythoneditorplugin.cpp +++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp @@ -311,6 +311,7 @@ public: { registerRunConfiguration<PythonRunConfiguration>("PythonEditor.RunConfiguration."); addSupportedProjectType(PythonProjectId); + addRunWorkerFactory<SimpleTargetRunner>(ProjectExplorer::Constants::NORMAL_RUN_MODE); } }; @@ -623,12 +624,6 @@ bool PythonEditorPlugin::initialize(const QStringList &arguments, QString *error ProjectManager::registerProjectType<PythonProject>(PythonMimeType); - auto constraint = [](RunConfiguration *runConfiguration) { - auto aspect = runConfiguration->extraAspect<InterpreterAspect>(); - return aspect && !aspect->value().isEmpty(); - }; - RunControl::registerWorker<SimpleTargetRunner>(ProjectExplorer::Constants::NORMAL_RUN_MODE, constraint); - return true; } |