forked from qt-creator/qt-creator
DebuggingHelper: Always invalidate cached QtVersion information after run
Moving this to DebuggingHelperBuildTask / QtVersionManager makes sure the version information is also updated if e.g. the QtOptionsPage has been closed in between. Also, update all Qt versions that share the same qmake path. Change-Id: Idc23f6d9fa609e2a36f1d6d4cb09c6483afd4cc4
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
#include "qmlobservertool.h"
|
#include "qmlobservertool.h"
|
||||||
#include "qmldebugginglibrary.h"
|
#include "qmldebugginglibrary.h"
|
||||||
#include <qt4projectmanager/baseqtversion.h>
|
#include <qt4projectmanager/baseqtversion.h>
|
||||||
|
#include <qt4projectmanager/qtversionmanager.h>
|
||||||
#include <qt4projectmanager/qt4projectmanagerconstants.h>
|
#include <qt4projectmanager/qt4projectmanagerconstants.h>
|
||||||
#include <projectexplorer/toolchainmanager.h>
|
#include <projectexplorer/toolchainmanager.h>
|
||||||
#include <projectexplorer/debugginghelper.h>
|
#include <projectexplorer/debugginghelper.h>
|
||||||
@@ -91,6 +92,11 @@ DebuggingHelperBuildTask::DebuggingHelperBuildTask(const BaseQtVersion *version,
|
|||||||
m_qmakeCommand = version->qmakeCommand();
|
m_qmakeCommand = version->qmakeCommand();
|
||||||
m_makeCommand = tc->makeCommand();
|
m_makeCommand = tc->makeCommand();
|
||||||
m_mkspec = version->mkspec();
|
m_mkspec = version->mkspec();
|
||||||
|
|
||||||
|
// Make sure QtVersion cache is invalidated
|
||||||
|
connect(this, SIGNAL(finished(int,QString,DebuggingHelperBuildTask::Tools)),
|
||||||
|
QtVersionManager::instance(), SLOT(updateQtVersion(int)),
|
||||||
|
Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
DebuggingHelperBuildTask::~DebuggingHelperBuildTask()
|
DebuggingHelperBuildTask::~DebuggingHelperBuildTask()
|
||||||
|
|||||||
@@ -591,7 +591,6 @@ void QMakeStepConfigWidget::debuggingHelperBuildFinished(int qtVersionId, const
|
|||||||
BaseQtVersion *version = QtVersionManager::instance()->version(qtVersionId);
|
BaseQtVersion *version = QtVersionManager::instance()->version(qtVersionId);
|
||||||
if (!version) // qt version got deleted in between
|
if (!version) // qt version got deleted in between
|
||||||
return;
|
return;
|
||||||
version->recheckDumper();
|
|
||||||
|
|
||||||
if (version == m_step->qt4BuildConfiguration()->qtVersion()) {
|
if (version == m_step->qt4BuildConfiguration()->qtVersion()) {
|
||||||
m_ui.qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
m_ui.qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
||||||
|
|||||||
@@ -112,8 +112,6 @@ private slots:
|
|||||||
m_failed = true;
|
m_failed = true;
|
||||||
errorMessage = QString::fromLatin1("Qt version became invalid");
|
errorMessage = QString::fromLatin1("Qt version became invalid");
|
||||||
} else {
|
} else {
|
||||||
version->recheckDumper();
|
|
||||||
|
|
||||||
if (!version->hasQmlDump()) {
|
if (!version->hasQmlDump()) {
|
||||||
m_failed = true;
|
m_failed = true;
|
||||||
errorMessage = QString::fromLatin1("Could not build QML plugin dumping helper for %1\n"
|
errorMessage = QString::fromLatin1("Could not build QML plugin dumping helper for %1\n"
|
||||||
|
|||||||
@@ -246,7 +246,6 @@ void QtOptionsPageWidget::debuggingHelperBuildFinished(int qtVersionId, const QS
|
|||||||
return; // Oops, somebody managed to delete the version
|
return; // Oops, somebody managed to delete the version
|
||||||
|
|
||||||
BaseQtVersion *version = m_versions.at(index);
|
BaseQtVersion *version = m_versions.at(index);
|
||||||
version->recheckDumper();
|
|
||||||
|
|
||||||
// Update item view
|
// Update item view
|
||||||
QTreeWidgetItem *item = treeItemForIndex(index);
|
QTreeWidgetItem *item = treeItemForIndex(index);
|
||||||
|
|||||||
@@ -370,6 +370,19 @@ void QtVersionManager::updateDocumentation()
|
|||||||
helpManager->registerDocumentation(files);
|
helpManager->registerDocumentation(files);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QtVersionManager::updateQtVersion(int id)
|
||||||
|
{
|
||||||
|
BaseQtVersion *qtVersion = version(id);
|
||||||
|
QTC_ASSERT(qtVersion, return);
|
||||||
|
|
||||||
|
// update actually all Qt versions with the same qmake command
|
||||||
|
const QString qmakeCommand = qtVersion->qmakeCommand();
|
||||||
|
foreach (BaseQtVersion *v, versions()) {
|
||||||
|
if (v->qmakeCommand() == qmakeCommand)
|
||||||
|
v->recheckDumper();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void QtVersionManager::updateSettings()
|
void QtVersionManager::updateSettings()
|
||||||
{
|
{
|
||||||
updateDocumentation();
|
updateDocumentation();
|
||||||
|
|||||||
@@ -121,8 +121,12 @@ signals:
|
|||||||
void qtVersionsChanged(const QList<int> &uniqueIds);
|
void qtVersionsChanged(const QList<int> &uniqueIds);
|
||||||
void updateExamples(QString, QString, QString);
|
void updateExamples(QString, QString, QString);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void updateQtVersion(int id);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateSettings();
|
void updateSettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// This function is really simplistic...
|
// This function is really simplistic...
|
||||||
static bool equals(BaseQtVersion *a, BaseQtVersion *b);
|
static bool equals(BaseQtVersion *a, BaseQtVersion *b);
|
||||||
|
|||||||
Reference in New Issue
Block a user