diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index a4cb600a164d21eed7b624eef68e9f282dcdf196..02dca1d90c4037180bbe6016b8a16ef26b52f609 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -419,15 +419,6 @@ void QMakeStep::setLinkQmlDebuggingLibrary(bool enable) qt4BuildConfiguration()->emitQMakeBuildConfigurationChanged(); qt4BuildConfiguration()->emitProFileEvaluateNeeded(); - - Core::ICore * const core = Core::ICore::instance(); - QMessageBox *question = new QMessageBox(core->mainWindow()); - question->setWindowTitle(tr("QML Debugging")); - question->setText(tr("The option will only take effect if the project is recompiled. Do you want to recompile now?")); - question->setStandardButtons(QMessageBox::Yes | QMessageBox::No); - question->setModal(true); - connect(question, SIGNAL(finished(int)), this, SLOT(recompileMessageBoxFinished(int))); - question->show(); } QStringList QMakeStep::parserArguments() @@ -495,20 +486,6 @@ bool QMakeStep::fromMap(const QVariantMap &map) return BuildStep::fromMap(map); } -void QMakeStep::recompileMessageBoxFinished(int button) -{ - if (button == QMessageBox::Yes) { - Qt4BuildConfiguration *bc = qt4BuildConfiguration(); - if (!bc) - return; - - QList<ProjectExplorer::BuildStepList *> stepLists; - stepLists << bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN); - stepLists << bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD); - ProjectExplorerPlugin::instance()->buildManager()->buildLists(stepLists); - } -} - //// // QMakeStepConfigWidget //// @@ -651,6 +628,16 @@ void QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked(bool checked) updateSummaryLabel(); updateEffectiveQMakeCall(); updateQmlDebuggingOption(); + + + Core::ICore * const core = Core::ICore::instance(); + QMessageBox *question = new QMessageBox(core->mainWindow()); + question->setWindowTitle(tr("QML Debugging")); + question->setText(tr("The option will only take effect if the project is recompiled. Do you want to recompile now?")); + question->setStandardButtons(QMessageBox::Yes | QMessageBox::No); + question->setModal(true); + connect(question, SIGNAL(finished(int)), this, SLOT(recompileMessageBoxFinished(int))); + question->show(); } void QMakeStepConfigWidget::buildQmlDebuggingHelper() @@ -722,6 +709,20 @@ void QMakeStepConfigWidget::updateEffectiveQMakeCall() m_ui->qmakeArgumentsEdit->setPlainText(program + QLatin1Char(' ') + m_step->allArguments()); } +void QMakeStepConfigWidget::recompileMessageBoxFinished(int button) +{ + if (button == QMessageBox::Yes) { + Qt4BuildConfiguration *bc = m_step->qt4BuildConfiguration(); + if (!bc) + return; + + QList<ProjectExplorer::BuildStepList *> stepLists; + stepLists << bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN); + stepLists << bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD); + ProjectExplorerPlugin::instance()->buildManager()->buildLists(stepLists); + } +} + //// // QMakeStepFactory //// diff --git a/src/plugins/qt4projectmanager/qmakestep.h b/src/plugins/qt4projectmanager/qmakestep.h index ea4fab08ad9ddca32be1ea6c0813eceb5c3e1de0..2a23acbb2e7cc8f7abf53cbab87bf43a1b76936a 100644 --- a/src/plugins/qt4projectmanager/qmakestep.h +++ b/src/plugins/qt4projectmanager/qmakestep.h @@ -114,9 +114,6 @@ signals: void userArgumentsChanged(); void linkQmlDebuggingLibraryChanged(); -private slots: - void recompileMessageBoxFinished(int button); - protected: QMakeStep(ProjectExplorer::BuildStepList *parent, QMakeStep *source); QMakeStep(ProjectExplorer::BuildStepList *parent, const QString &id); @@ -163,6 +160,9 @@ private slots: // other void buildQmlDebuggingHelper(); +private slots: + void recompileMessageBoxFinished(int button); + private: void updateSummaryLabel(); void updateQmlDebuggingOption();