forked from qt-creator/qt-creator
QmakeProject: Add a checkbox for use of the Qt Quick Compiler
Change-Id: Ibeb9fbf21e72d977b37616337595666aa9b59ccc Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This commit is contained in:
@@ -66,6 +66,7 @@ const char QMAKE_BS_ID[] = "QtProjectManager.QMakeBuildStep";
|
|||||||
|
|
||||||
const char QMAKE_ARGUMENTS_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeArguments";
|
const char QMAKE_ARGUMENTS_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeArguments";
|
||||||
const char QMAKE_FORCED_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeForced";
|
const char QMAKE_FORCED_KEY[] = "QtProjectManager.QMakeBuildStep.QMakeForced";
|
||||||
|
const char QMAKE_USE_qtQuickCompiler[] = "QtProjectManager.QMakeBuildStep.UseqtQuickCompiler";
|
||||||
const char QMAKE_QMLDEBUGLIBAUTO_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto";
|
const char QMAKE_QMLDEBUGLIBAUTO_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto";
|
||||||
const char QMAKE_QMLDEBUGLIB_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary";
|
const char QMAKE_QMLDEBUGLIB_KEY[] = "QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary";
|
||||||
}
|
}
|
||||||
@@ -74,7 +75,8 @@ QMakeStep::QMakeStep(BuildStepList *bsl) :
|
|||||||
AbstractProcessStep(bsl, Core::Id(QMAKE_BS_ID)),
|
AbstractProcessStep(bsl, Core::Id(QMAKE_BS_ID)),
|
||||||
m_forced(false),
|
m_forced(false),
|
||||||
m_needToRunQMake(false),
|
m_needToRunQMake(false),
|
||||||
m_linkQmlDebuggingLibrary(DebugLink)
|
m_linkQmlDebuggingLibrary(DebugLink),
|
||||||
|
m_useQtQuickCompiler(false)
|
||||||
{
|
{
|
||||||
ctor();
|
ctor();
|
||||||
}
|
}
|
||||||
@@ -82,7 +84,8 @@ QMakeStep::QMakeStep(BuildStepList *bsl) :
|
|||||||
QMakeStep::QMakeStep(BuildStepList *bsl, Core::Id id) :
|
QMakeStep::QMakeStep(BuildStepList *bsl, Core::Id id) :
|
||||||
AbstractProcessStep(bsl, id),
|
AbstractProcessStep(bsl, id),
|
||||||
m_forced(false),
|
m_forced(false),
|
||||||
m_linkQmlDebuggingLibrary(DebugLink)
|
m_linkQmlDebuggingLibrary(DebugLink),
|
||||||
|
m_useQtQuickCompiler(false)
|
||||||
{
|
{
|
||||||
ctor();
|
ctor();
|
||||||
}
|
}
|
||||||
@@ -91,7 +94,8 @@ QMakeStep::QMakeStep(BuildStepList *bsl, QMakeStep *bs) :
|
|||||||
AbstractProcessStep(bsl, bs),
|
AbstractProcessStep(bsl, bs),
|
||||||
m_forced(bs->m_forced),
|
m_forced(bs->m_forced),
|
||||||
m_userArgs(bs->m_userArgs),
|
m_userArgs(bs->m_userArgs),
|
||||||
m_linkQmlDebuggingLibrary(bs->m_linkQmlDebuggingLibrary)
|
m_linkQmlDebuggingLibrary(bs->m_linkQmlDebuggingLibrary),
|
||||||
|
m_useQtQuickCompiler(bs->m_useQtQuickCompiler)
|
||||||
{
|
{
|
||||||
ctor();
|
ctor();
|
||||||
}
|
}
|
||||||
@@ -180,6 +184,8 @@ QStringList QMakeStep::deducedArguments()
|
|||||||
arguments << QLatin1String(Constants::QMAKEVAR_QUICK2_DEBUG);
|
arguments << QLatin1String(Constants::QMAKEVAR_QUICK2_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (useQtQuickCompiler() && version)
|
||||||
|
arguments << QLatin1String("CONFIG+=qtquickcompiler");
|
||||||
|
|
||||||
return arguments;
|
return arguments;
|
||||||
}
|
}
|
||||||
@@ -369,6 +375,27 @@ void QMakeStep::setLinkQmlDebuggingLibrary(bool enable)
|
|||||||
qmakeBuildConfiguration()->emitProFileEvaluateNeeded();
|
qmakeBuildConfiguration()->emitProFileEvaluateNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QMakeStep::useQtQuickCompiler() const
|
||||||
|
{
|
||||||
|
const Core::Context languages = project()->projectLanguages();
|
||||||
|
if (!languages.contains(ProjectExplorer::Constants::LANG_QMLJS))
|
||||||
|
return false;
|
||||||
|
return m_useQtQuickCompiler;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QMakeStep::setUseQtQuickCompiler(bool enable)
|
||||||
|
{
|
||||||
|
if (enable == m_useQtQuickCompiler)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_useQtQuickCompiler = enable;
|
||||||
|
|
||||||
|
emit useQtQuickCompilerChanged();
|
||||||
|
|
||||||
|
qmakeBuildConfiguration()->emitQMakeBuildConfigurationChanged();
|
||||||
|
qmakeBuildConfiguration()->emitProFileEvaluateNeeded();
|
||||||
|
}
|
||||||
|
|
||||||
QStringList QMakeStep::parserArguments()
|
QStringList QMakeStep::parserArguments()
|
||||||
{
|
{
|
||||||
QStringList result;
|
QStringList result;
|
||||||
@@ -403,6 +430,7 @@ QVariantMap QMakeStep::toMap() const
|
|||||||
map.insert(QLatin1String(QMAKE_QMLDEBUGLIBAUTO_KEY), m_linkQmlDebuggingLibrary == DebugLink);
|
map.insert(QLatin1String(QMAKE_QMLDEBUGLIBAUTO_KEY), m_linkQmlDebuggingLibrary == DebugLink);
|
||||||
map.insert(QLatin1String(QMAKE_QMLDEBUGLIB_KEY), m_linkQmlDebuggingLibrary == DoLink);
|
map.insert(QLatin1String(QMAKE_QMLDEBUGLIB_KEY), m_linkQmlDebuggingLibrary == DoLink);
|
||||||
map.insert(QLatin1String(QMAKE_FORCED_KEY), m_forced);
|
map.insert(QLatin1String(QMAKE_FORCED_KEY), m_forced);
|
||||||
|
map.insert(QLatin1String(QMAKE_USE_qtQuickCompiler), m_useQtQuickCompiler);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,6 +438,7 @@ bool QMakeStep::fromMap(const QVariantMap &map)
|
|||||||
{
|
{
|
||||||
m_userArgs = map.value(QLatin1String(QMAKE_ARGUMENTS_KEY)).toString();
|
m_userArgs = map.value(QLatin1String(QMAKE_ARGUMENTS_KEY)).toString();
|
||||||
m_forced = map.value(QLatin1String(QMAKE_FORCED_KEY), false).toBool();
|
m_forced = map.value(QLatin1String(QMAKE_FORCED_KEY), false).toBool();
|
||||||
|
m_useQtQuickCompiler = map.value(QLatin1String(QMAKE_USE_qtQuickCompiler), false).toBool();
|
||||||
if (map.value(QLatin1String(QMAKE_QMLDEBUGLIBAUTO_KEY), false).toBool()) {
|
if (map.value(QLatin1String(QMAKE_QMLDEBUGLIBAUTO_KEY), false).toBool()) {
|
||||||
m_linkQmlDebuggingLibrary = DebugLink;
|
m_linkQmlDebuggingLibrary = DebugLink;
|
||||||
} else {
|
} else {
|
||||||
@@ -434,12 +463,14 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
|
|
||||||
m_ui->qmakeAdditonalArgumentsLineEdit->setText(m_step->userArguments());
|
m_ui->qmakeAdditonalArgumentsLineEdit->setText(m_step->userArguments());
|
||||||
m_ui->qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
m_ui->qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
||||||
|
m_ui->qtQuickCompilerCheckBox->setChecked(m_step->useQtQuickCompiler());
|
||||||
|
|
||||||
qmakeBuildConfigChanged();
|
qmakeBuildConfigChanged();
|
||||||
|
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
updateQmlDebuggingOption();
|
updateQmlDebuggingOption();
|
||||||
|
updateQtQuickCompilerOption();
|
||||||
|
|
||||||
connect(m_ui->qmakeAdditonalArgumentsLineEdit, SIGNAL(textEdited(QString)),
|
connect(m_ui->qmakeAdditonalArgumentsLineEdit, SIGNAL(textEdited(QString)),
|
||||||
this, SLOT(qmakeArgumentsLineEdited()));
|
this, SLOT(qmakeArgumentsLineEdited()));
|
||||||
@@ -447,10 +478,14 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
this, SLOT(buildConfigurationSelected()));
|
this, SLOT(buildConfigurationSelected()));
|
||||||
connect(m_ui->qmlDebuggingLibraryCheckBox, SIGNAL(toggled(bool)),
|
connect(m_ui->qmlDebuggingLibraryCheckBox, SIGNAL(toggled(bool)),
|
||||||
this, SLOT(linkQmlDebuggingLibraryChecked(bool)));
|
this, SLOT(linkQmlDebuggingLibraryChecked(bool)));
|
||||||
|
connect(m_ui->qtQuickCompilerCheckBox, &QAbstractButton::toggled,
|
||||||
|
this, &QMakeStepConfigWidget::useQtQuickCompilerChecked);
|
||||||
connect(step, SIGNAL(userArgumentsChanged()),
|
connect(step, SIGNAL(userArgumentsChanged()),
|
||||||
this, SLOT(userArgumentsChanged()));
|
this, SLOT(userArgumentsChanged()));
|
||||||
connect(step, SIGNAL(linkQmlDebuggingLibraryChanged()),
|
connect(step, SIGNAL(linkQmlDebuggingLibraryChanged()),
|
||||||
this, SLOT(linkQmlDebuggingLibraryChanged()));
|
this, SLOT(linkQmlDebuggingLibraryChanged()));
|
||||||
|
connect(step, &QMakeStep::useQtQuickCompilerChanged,
|
||||||
|
this, &QMakeStepConfigWidget::useQtQuickCompilerChanged);
|
||||||
connect(step->qmakeBuildConfiguration(), SIGNAL(qmakeBuildConfigurationChanged()),
|
connect(step->qmakeBuildConfiguration(), SIGNAL(qmakeBuildConfigurationChanged()),
|
||||||
this, SLOT(qmakeBuildConfigChanged()));
|
this, SLOT(qmakeBuildConfigChanged()));
|
||||||
connect(step->target(), SIGNAL(kitChanged()), this, SLOT(qtVersionChanged()));
|
connect(step->target(), SIGNAL(kitChanged()), this, SLOT(qtVersionChanged()));
|
||||||
@@ -516,6 +551,17 @@ void QMakeStepConfigWidget::linkQmlDebuggingLibraryChanged()
|
|||||||
updateQmlDebuggingOption();
|
updateQmlDebuggingOption();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QMakeStepConfigWidget::useQtQuickCompilerChanged()
|
||||||
|
{
|
||||||
|
if (m_ignoreChange)
|
||||||
|
return;
|
||||||
|
// m_ui->qtQuickCompilerCheckBox->setChecked(m_step->useQtQuickCompiler());
|
||||||
|
|
||||||
|
updateSummaryLabel();
|
||||||
|
updateEffectiveQMakeCall();
|
||||||
|
updateQtQuickCompilerOption();
|
||||||
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::qmakeArgumentsLineEdited()
|
void QMakeStepConfigWidget::qmakeArgumentsLineEdited()
|
||||||
{
|
{
|
||||||
m_ignoreChange = true;
|
m_ignoreChange = true;
|
||||||
@@ -557,7 +603,11 @@ void QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked(bool checked)
|
|||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
updateQmlDebuggingOption();
|
updateQmlDebuggingOption();
|
||||||
|
askForRebuild();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QMakeStepConfigWidget::askForRebuild()
|
||||||
|
{
|
||||||
QMessageBox *question = new QMessageBox(Core::ICore::mainWindow());
|
QMessageBox *question = new QMessageBox(Core::ICore::mainWindow());
|
||||||
question->setWindowTitle(tr("QML Debugging"));
|
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->setText(tr("The option will only take effect if the project is recompiled. Do you want to recompile now?"));
|
||||||
@@ -567,6 +617,21 @@ void QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked(bool checked)
|
|||||||
question->show();
|
question->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QMakeStepConfigWidget::useQtQuickCompilerChecked(bool checked)
|
||||||
|
{
|
||||||
|
if (m_ignoreChange)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_ignoreChange = true;
|
||||||
|
m_step->setUseQtQuickCompiler(checked);
|
||||||
|
m_ignoreChange = false;
|
||||||
|
|
||||||
|
updateSummaryLabel();
|
||||||
|
updateEffectiveQMakeCall();
|
||||||
|
updateQtQuickCompilerOption();
|
||||||
|
askForRebuild();
|
||||||
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::updateSummaryLabel()
|
void QMakeStepConfigWidget::updateSummaryLabel()
|
||||||
{
|
{
|
||||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(m_step->target()->kit());
|
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(m_step->target()->kit());
|
||||||
@@ -596,6 +661,17 @@ void QMakeStepConfigWidget::updateQmlDebuggingOption()
|
|||||||
m_ui->qmlDebuggingWarningIcon->setVisible(!warningText.isEmpty());
|
m_ui->qmlDebuggingWarningIcon->setVisible(!warningText.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QMakeStepConfigWidget::updateQtQuickCompilerOption()
|
||||||
|
{
|
||||||
|
QString warningText;
|
||||||
|
bool supported = QtSupport::BaseQtVersion::isQtQuickCompilerSupported(m_step->target()->kit(),
|
||||||
|
&warningText);
|
||||||
|
m_ui->qtQuickCompilerCheckBox->setEnabled(supported);
|
||||||
|
m_ui->qtQuickCompilerLabel->setText(tr("Enable Qt Quick Compiler:"));
|
||||||
|
m_ui->qtQuickCompilerWarningText->setText(warningText);
|
||||||
|
m_ui->qtQuickCompilerWarningIcon->setVisible(!warningText.isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::updateEffectiveQMakeCall()
|
void QMakeStepConfigWidget::updateEffectiveQMakeCall()
|
||||||
{
|
{
|
||||||
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(m_step->target()->kit());
|
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(m_step->target()->kit());
|
||||||
|
|||||||
@@ -112,12 +112,15 @@ public:
|
|||||||
void setUserArguments(const QString &arguments);
|
void setUserArguments(const QString &arguments);
|
||||||
bool linkQmlDebuggingLibrary() const;
|
bool linkQmlDebuggingLibrary() const;
|
||||||
void setLinkQmlDebuggingLibrary(bool enable);
|
void setLinkQmlDebuggingLibrary(bool enable);
|
||||||
|
bool useQtQuickCompiler() const;
|
||||||
|
void setUseQtQuickCompiler(bool enable);
|
||||||
|
|
||||||
QVariantMap toMap() const;
|
QVariantMap toMap() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void userArgumentsChanged();
|
void userArgumentsChanged();
|
||||||
void linkQmlDebuggingLibraryChanged();
|
void linkQmlDebuggingLibraryChanged();
|
||||||
|
void useQtQuickCompilerChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QMakeStep(ProjectExplorer::BuildStepList *parent, QMakeStep *source);
|
QMakeStep(ProjectExplorer::BuildStepList *parent, QMakeStep *source);
|
||||||
@@ -135,6 +138,7 @@ private:
|
|||||||
bool m_needToRunQMake; // set in init(), read in run()
|
bool m_needToRunQMake; // set in init(), read in run()
|
||||||
QString m_userArgs;
|
QString m_userArgs;
|
||||||
QmlLibraryLink m_linkQmlDebuggingLibrary;
|
QmlLibraryLink m_linkQmlDebuggingLibrary;
|
||||||
|
bool m_useQtQuickCompiler;
|
||||||
bool m_scriptTemplate;
|
bool m_scriptTemplate;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -154,11 +158,13 @@ private slots:
|
|||||||
void qmakeBuildConfigChanged();
|
void qmakeBuildConfigChanged();
|
||||||
void userArgumentsChanged();
|
void userArgumentsChanged();
|
||||||
void linkQmlDebuggingLibraryChanged();
|
void linkQmlDebuggingLibraryChanged();
|
||||||
|
void useQtQuickCompilerChanged();
|
||||||
|
|
||||||
// slots for dealing with user changes in our UI
|
// slots for dealing with user changes in our UI
|
||||||
void qmakeArgumentsLineEdited();
|
void qmakeArgumentsLineEdited();
|
||||||
void buildConfigurationSelected();
|
void buildConfigurationSelected();
|
||||||
void linkQmlDebuggingLibraryChecked(bool checked);
|
void linkQmlDebuggingLibraryChecked(bool checked);
|
||||||
|
void useQtQuickCompilerChecked(bool checked);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void recompileMessageBoxFinished(int button);
|
void recompileMessageBoxFinished(int button);
|
||||||
@@ -166,7 +172,9 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
void updateSummaryLabel();
|
void updateSummaryLabel();
|
||||||
void updateQmlDebuggingOption();
|
void updateQmlDebuggingOption();
|
||||||
|
void updateQtQuickCompilerOption();
|
||||||
void updateEffectiveQMakeCall();
|
void updateEffectiveQMakeCall();
|
||||||
|
void askForRebuild();
|
||||||
|
|
||||||
void setSummaryText(const QString &);
|
void setSummaryText(const QString &);
|
||||||
|
|
||||||
|
|||||||
@@ -154,6 +154,65 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="qtQuickCompilerLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use QML compiler</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QWidget" name="widget_3" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="qtQuickCompilerCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="qtQuickCompilerWarningIcon">
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap resource="../coreplugin/core.qrc">:/core/images/warning.png</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="qtQuickCompilerWarningText">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Effective qmake call:</string>
|
<string>Effective qmake call:</string>
|
||||||
@@ -163,7 +222,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QPlainTextEdit" name="qmakeArgumentsEdit">
|
<widget class="QPlainTextEdit" name="qmakeArgumentsEdit">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -183,6 +242,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../projectexplorer/projectexplorer.qrc"/>
|
<include location="../projectexplorer/projectexplorer.qrc"/>
|
||||||
|
<include location="../coreplugin/core.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -1501,6 +1501,35 @@ bool BaseQtVersion::isQmlDebuggingSupported(QString *reason) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BaseQtVersion::isQtQuickCompilerSupported(Kit *k, QString *reason)
|
||||||
|
{
|
||||||
|
QTC_ASSERT(k, return false);
|
||||||
|
BaseQtVersion *version = QtKitInformation::qtVersion(k);
|
||||||
|
if (!version) {
|
||||||
|
if (reason)
|
||||||
|
*reason = QCoreApplication::translate("BaseQtVersion", "No Qt version.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return version->isQtQuickCompilerSupported(reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BaseQtVersion::isQtQuickCompilerSupported(QString *reason) const
|
||||||
|
{
|
||||||
|
if (!isValid()) {
|
||||||
|
if (reason)
|
||||||
|
*reason = QCoreApplication::translate("BaseQtVersion", "Invalid Qt version.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (qtVersion() < QtVersionNumber(5, 3, 0)) {
|
||||||
|
if (reason)
|
||||||
|
*reason = QCoreApplication::translate("BaseQtVersion", "Requires Qt 5.3.0 or newer.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void BaseQtVersion::buildDebuggingHelper(Kit *k, int tools)
|
void BaseQtVersion::buildDebuggingHelper(Kit *k, int tools)
|
||||||
{
|
{
|
||||||
BaseQtVersion *version = QtKitInformation::qtVersion(k);
|
BaseQtVersion *version = QtKitInformation::qtVersion(k);
|
||||||
|
|||||||
@@ -184,6 +184,8 @@ public:
|
|||||||
|
|
||||||
static bool isQmlDebuggingSupported(ProjectExplorer::Kit *k, QString *reason = 0);
|
static bool isQmlDebuggingSupported(ProjectExplorer::Kit *k, QString *reason = 0);
|
||||||
bool isQmlDebuggingSupported(QString *reason = 0) const;
|
bool isQmlDebuggingSupported(QString *reason = 0) const;
|
||||||
|
static bool isQtQuickCompilerSupported(ProjectExplorer::Kit *k, QString *reason = 0);
|
||||||
|
bool isQtQuickCompilerSupported(QString *reason = 0) const;
|
||||||
static void buildDebuggingHelper(ProjectExplorer::Kit *k, int tools);
|
static void buildDebuggingHelper(ProjectExplorer::Kit *k, int tools);
|
||||||
void buildDebuggingHelper(ProjectExplorer::ToolChain *tc, int tools);
|
void buildDebuggingHelper(ProjectExplorer::ToolChain *tc, int tools);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user