Commit fbe85512 authored by Kai Koehne's avatar Kai Koehne

QmlProject: Update current file name if file gets renamed

Task-number: QTCREATORBUG-10630
Change-Id: I7901b1204a389e6b9349e059186d0e89f7437740
Reviewed-by: default avatarDaniel Teske <>
parent 686e523f
......@@ -92,6 +92,8 @@ void QmlProjectRunConfiguration::ctor()
// reset default settings in constructor
connect(EditorManager::instance(), SIGNAL(currentEditorChanged(Core::IEditor*)),
this, SLOT(changeCurrentFile(Core::IEditor*)));
connect(EditorManager::instance(), SIGNAL(currentDocumentStateChanged()),
this, SLOT(changeCurrentFile()));
connect(target(), SIGNAL(kitChanged()),
this, SLOT(updateEnabled()));
......@@ -263,6 +265,9 @@ bool QmlProjectRunConfiguration::fromMap(const QVariantMap &map)
void QmlProjectRunConfiguration::changeCurrentFile(IEditor *editor)
if (!editor)
editor = EditorManager::currentEditor();
if (editor)
m_currentFileFilename = editor->document()->filePath();
......@@ -91,7 +91,7 @@ public:
ProjectExplorer::Abi abi() const;
private slots:
void changeCurrentFile(Core::IEditor*);
void changeCurrentFile(Core::IEditor* = 0);
void updateEnabled();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment