Fix a crash on "Switch to Text Diff Editor"

Task-number: QTCREATORBUG-11448

Change-Id: Id0239d5cf71ff857ac384e18136348df92a98b74
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
jkobus
2014-02-10 16:38:55 +01:00
committed by Jarek Kobus
parent 25e206f59a
commit 7267c95acf

View File

@@ -122,7 +122,9 @@ public:
QAction *switchAction = new QAction(actionIcon, actionToolTip, parentEditor);
parentEditor->toolBar()->addAction(switchAction);
connect(switchAction, SIGNAL(triggered()), this, SLOT(execute()));
// must be queued connection because execute() removes the editor & tool bar that the action was added to
connect(switchAction, SIGNAL(triggered()), this, SLOT(execute()), Qt::QueuedConnection);
}
void setWorkingDirectory(const QString &workingDir) { m_workingDirectory = workingDir; }