forked from qt-creator/qt-creator
QmlDesigner: fix that we have too many updateActiveQtVersion() connections
Change-Id: I3d9a9ba76d0da4def215541ccff02afc26e5e5f1 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -650,10 +650,9 @@ static inline ProjectExplorer::Kit *getActiveKit(DesignDocument *designDocument)
|
||||
if (!isFileInProject(designDocument, currentProject))
|
||||
return 0;
|
||||
|
||||
designDocument->disconnect(designDocument, SLOT(updateActiveQtVersion()));
|
||||
designDocument->connect(projectExplorer, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)), designDocument, SLOT(updateActiveQtVersion()));
|
||||
designDocument->connect(projectExplorer, SIGNAL(currentProjectChanged(ProjectExplorer::Project*)), designDocument, SLOT(updateActiveQtVersion()), Qt::UniqueConnection);
|
||||
|
||||
designDocument->connect(currentProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)), designDocument, SLOT(updateActiveQtVersion()));
|
||||
designDocument->connect(currentProject, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)), designDocument, SLOT(updateActiveQtVersion()), Qt::UniqueConnection);
|
||||
|
||||
|
||||
ProjectExplorer::Target *target = currentProject->activeTarget();
|
||||
@@ -661,7 +660,7 @@ static inline ProjectExplorer::Kit *getActiveKit(DesignDocument *designDocument)
|
||||
if (!target)
|
||||
return 0;
|
||||
|
||||
designDocument->connect(target, SIGNAL(kitChanged()), designDocument, SLOT(updateActiveQtVersion()));
|
||||
designDocument->connect(target, SIGNAL(kitChanged()), designDocument, SLOT(updateActiveQtVersion()), Qt::UniqueConnection);
|
||||
|
||||
return target->kit();
|
||||
}
|
||||
|
Reference in New Issue
Block a user