summaryrefslogtreecommitdiff
path: root/src/plugins/pythoneditor/pythoneditorplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditorplugin.cpp')
-rw-r--r--src/plugins/pythoneditor/pythoneditorplugin.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp
index e760c25031..e99f83205a 100644
--- a/src/plugins/pythoneditor/pythoneditorplugin.cpp
+++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp
@@ -189,9 +189,16 @@ QVariantMap PythonRunConfiguration::toMap() const
bool PythonRunConfiguration::fromMap(const QVariantMap &map)
{
+ if (!RunConfiguration::fromMap(map))
+ return false;
m_mainScript = map.value(MainScriptKey).toString();
m_interpreter = map.value(InterpreterKey).toString();
- return RunConfiguration::fromMap(map);
+ // FIXME: The following three lines can be removed once there is no id mangling anymore.
+ if (m_mainScript.isEmpty()) {
+ m_mainScript = ProjectExplorer::idFromMap(map).suffixAfter(id());
+ setDefaultDisplayName(defaultDisplayName());
+ }
+ return true;
}
QString PythonRunConfiguration::defaultDisplayName() const
@@ -270,7 +277,6 @@ public:
return Utils::transform(parent->project()->files(Project::AllFiles), [](const FileName &fn) {
BuildTargetInfo bti;
bti.targetName = fn.toString();
- bti.displayName = fn.toString();
return bti;
});
}