forked from qt-creator/qt-creator
QMakeStep: Move recompilation dialog to QMakeStepConfigWidget
Change-Id: I20576fa99d9a1d04c24f9615317663e943619200 Reviewed-on: http://codereview.qt-project.org/4089 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -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
|
||||
////
|
||||
|
||||
Reference in New Issue
Block a user