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()->emitQMakeBuildConfigurationChanged();
|
||||||
qt4BuildConfiguration()->emitProFileEvaluateNeeded();
|
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()
|
QStringList QMakeStep::parserArguments()
|
||||||
@@ -495,20 +486,6 @@ bool QMakeStep::fromMap(const QVariantMap &map)
|
|||||||
return BuildStep::fromMap(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
|
// QMakeStepConfigWidget
|
||||||
////
|
////
|
||||||
@@ -651,6 +628,16 @@ void QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked(bool checked)
|
|||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
updateQmlDebuggingOption();
|
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()
|
void QMakeStepConfigWidget::buildQmlDebuggingHelper()
|
||||||
@@ -722,6 +709,20 @@ void QMakeStepConfigWidget::updateEffectiveQMakeCall()
|
|||||||
m_ui->qmakeArgumentsEdit->setPlainText(program + QLatin1Char(' ') + m_step->allArguments());
|
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
|
// QMakeStepFactory
|
||||||
////
|
////
|
||||||
|
|||||||
@@ -114,9 +114,6 @@ signals:
|
|||||||
void userArgumentsChanged();
|
void userArgumentsChanged();
|
||||||
void linkQmlDebuggingLibraryChanged();
|
void linkQmlDebuggingLibraryChanged();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void recompileMessageBoxFinished(int button);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QMakeStep(ProjectExplorer::BuildStepList *parent, QMakeStep *source);
|
QMakeStep(ProjectExplorer::BuildStepList *parent, QMakeStep *source);
|
||||||
QMakeStep(ProjectExplorer::BuildStepList *parent, const QString &id);
|
QMakeStep(ProjectExplorer::BuildStepList *parent, const QString &id);
|
||||||
@@ -163,6 +160,9 @@ private slots:
|
|||||||
// other
|
// other
|
||||||
void buildQmlDebuggingHelper();
|
void buildQmlDebuggingHelper();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void recompileMessageBoxFinished(int button);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateSummaryLabel();
|
void updateSummaryLabel();
|
||||||
void updateQmlDebuggingOption();
|
void updateQmlDebuggingOption();
|
||||||
|
|||||||
Reference in New Issue
Block a user