forked from qt-creator/qt-creator
DebuggingHelpers: Update after built for newly added versions
One can already build debugging helpers for Qt Versions not yet registered to QtVersionManager - which resulted in a QTC_ASSERT + the changes after the built were not picked up. Change-Id: I12a769df6e18a05b0d1677fd913f4064efed3429 Reviewed-on: http://codereview.qt.nokia.com/2168 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -101,8 +101,8 @@ DebuggingHelperBuildTask::DebuggingHelperBuildTask(const BaseQtVersion *version,
|
||||
m_mkspec = version->mkspec();
|
||||
|
||||
// Make sure QtVersion cache is invalidated
|
||||
connect(this, SIGNAL(finished(int,QString,DebuggingHelperBuildTask::Tools)),
|
||||
QtVersionManager::instance(), SLOT(updateQtVersion(int)),
|
||||
connect(this, SIGNAL(updateQtVersions(QString)),
|
||||
QtVersionManager::instance(), SLOT(updateDumpFor(QString)),
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@ void DebuggingHelperBuildTask::run(QFutureInterface<void> &future)
|
||||
log(result, QString());
|
||||
}
|
||||
|
||||
emit updateQtVersions(m_qmakeCommand);
|
||||
emit finished(m_qtId, m_log, m_tools);
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
@@ -68,9 +68,11 @@ public:
|
||||
static Tools availableTools(const BaseQtVersion *version);
|
||||
|
||||
signals:
|
||||
void finished(int qtVersionId, const QString &output, DebuggingHelperBuildTask::Tools tools);
|
||||
|
||||
// used internally
|
||||
void logOutput(const QString &output, bool bringToForeground);
|
||||
void finished(int qtVersionId, const QString &output, DebuggingHelperBuildTask::Tools tools);
|
||||
void updateQtVersions(const QString &qmakeCommand);
|
||||
|
||||
private:
|
||||
bool buildDebuggingHelper(QFutureInterface<void> &future);
|
||||
|
||||
@@ -288,11 +288,6 @@ void QtOptionsPageWidget::debuggingHelperBuildFinished(int qtVersionId, const QS
|
||||
if (tools & DebuggingHelperBuildTask::QmlObserver)
|
||||
success &= version->hasQmlObserver();
|
||||
|
||||
// Update bottom control if the selection is still the same
|
||||
if (index == currentIndex()) {
|
||||
updateDebuggingHelperUi();
|
||||
}
|
||||
|
||||
if (!success)
|
||||
showDebuggingBuildLog(item);
|
||||
}
|
||||
|
||||
@@ -498,13 +498,8 @@ void QtVersionManager::updateDocumentation()
|
||||
helpManager->registerDocumentation(files);
|
||||
}
|
||||
|
||||
void QtVersionManager::updateQtVersion(int id)
|
||||
void QtVersionManager::updateDumpFor(const QString &qmakeCommand)
|
||||
{
|
||||
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();
|
||||
|
||||
@@ -124,7 +124,7 @@ signals:
|
||||
void updateExamples(QString, QString, QString);
|
||||
|
||||
public slots:
|
||||
void updateQtVersion(int id);
|
||||
void updateDumpFor(const QString &qmakeCommand);
|
||||
|
||||
private slots:
|
||||
void updateSettings();
|
||||
|
||||
Reference in New Issue
Block a user