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();
|
m_mkspec = version->mkspec();
|
||||||
|
|
||||||
// Make sure QtVersion cache is invalidated
|
// Make sure QtVersion cache is invalidated
|
||||||
connect(this, SIGNAL(finished(int,QString,DebuggingHelperBuildTask::Tools)),
|
connect(this, SIGNAL(updateQtVersions(QString)),
|
||||||
QtVersionManager::instance(), SLOT(updateQtVersion(int)),
|
QtVersionManager::instance(), SLOT(updateDumpFor(QString)),
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,6 +156,7 @@ void DebuggingHelperBuildTask::run(QFutureInterface<void> &future)
|
|||||||
log(result, QString());
|
log(result, QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emit updateQtVersions(m_qmakeCommand);
|
||||||
emit finished(m_qtId, m_log, m_tools);
|
emit finished(m_qtId, m_log, m_tools);
|
||||||
deleteLater();
|
deleteLater();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,9 +68,11 @@ public:
|
|||||||
static Tools availableTools(const BaseQtVersion *version);
|
static Tools availableTools(const BaseQtVersion *version);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void finished(int qtVersionId, const QString &output, DebuggingHelperBuildTask::Tools tools);
|
||||||
|
|
||||||
// used internally
|
// used internally
|
||||||
void logOutput(const QString &output, bool bringToForeground);
|
void logOutput(const QString &output, bool bringToForeground);
|
||||||
void finished(int qtVersionId, const QString &output, DebuggingHelperBuildTask::Tools tools);
|
void updateQtVersions(const QString &qmakeCommand);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool buildDebuggingHelper(QFutureInterface<void> &future);
|
bool buildDebuggingHelper(QFutureInterface<void> &future);
|
||||||
|
|||||||
@@ -288,11 +288,6 @@ void QtOptionsPageWidget::debuggingHelperBuildFinished(int qtVersionId, const QS
|
|||||||
if (tools & DebuggingHelperBuildTask::QmlObserver)
|
if (tools & DebuggingHelperBuildTask::QmlObserver)
|
||||||
success &= version->hasQmlObserver();
|
success &= version->hasQmlObserver();
|
||||||
|
|
||||||
// Update bottom control if the selection is still the same
|
|
||||||
if (index == currentIndex()) {
|
|
||||||
updateDebuggingHelperUi();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
showDebuggingBuildLog(item);
|
showDebuggingBuildLog(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -498,13 +498,8 @@ void QtVersionManager::updateDocumentation()
|
|||||||
helpManager->registerDocumentation(files);
|
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()) {
|
foreach (BaseQtVersion *v, versions()) {
|
||||||
if (v->qmakeCommand() == qmakeCommand)
|
if (v->qmakeCommand() == qmakeCommand)
|
||||||
v->recheckDumper();
|
v->recheckDumper();
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ signals:
|
|||||||
void updateExamples(QString, QString, QString);
|
void updateExamples(QString, QString, QString);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateQtVersion(int id);
|
void updateDumpFor(const QString &qmakeCommand);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateSettings();
|
void updateSettings();
|
||||||
|
|||||||
Reference in New Issue
Block a user