Allow QML profiling when using Qt Quick compiler

Change-Id: I40784b51e36c3c77fce6bf077613d19579336db6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-02-18 15:56:03 +01:00
parent 23ad61fc9d
commit 8b8f8ca2ba
3 changed files with 11 additions and 6 deletions

View File

@@ -85,7 +85,7 @@
\section1 Attaching to Running Qt Quick Applications
To profile Qt Quick applications that are not launched by \QC, select
\uicontrol {Analyze > QML Profiler (External)}. You must enable QML debugging for
\uicontrol {Analyze > QML Profiler (External)}. You must enable QML debugging and profiling for
the application in the project build settings. For more information, see
\l{Setting Up QML Debugging}.

View File

@@ -50,8 +50,8 @@
\li Debugging is enabled by default for Qt 4.8, or later. For Qt 4.7,
select \uicontrol Projects, and then select the
\uicontrol {Enable QML debugging} check box in the \uicontrol qmake section
in \uicontrol {Build Steps}.
\uicontrol {Enable QML debugging and profiling} check box in the \uicontrol qmake
section in \uicontrol {Build Steps}.
You might have to compile the library first, by selecting the
\uicontrol Compile link.

View File

@@ -653,17 +653,18 @@ void QMakeStepConfigWidget::updateQmlDebuggingOption()
{
QString warningText;
bool supported = QtSupport::BaseQtVersion::isQmlDebuggingSupported(m_step->target()->kit(),
&warningText)
&& !m_step->useQtQuickCompiler();
&warningText);
m_ui->qmlDebuggingLibraryCheckBox->setEnabled(supported);
m_ui->debuggingLibraryLabel->setText(tr("Enable QML debugging:"));
m_ui->debuggingLibraryLabel->setText(tr("Enable QML debugging and profiling:"));
if (supported && m_step->linkQmlDebuggingLibrary())
warningText = tr("Might make your application vulnerable. Only use in a safe environment.");
m_ui->qmlDebuggingWarningText->setText(warningText);
m_ui->qmlDebuggingWarningIcon->setVisible(!warningText.isEmpty());
updateQtQuickCompilerOption(); // show or clear compiler warning text
}
void QMakeStepConfigWidget::updateQtQuickCompilerOption()
@@ -673,6 +674,10 @@ void QMakeStepConfigWidget::updateQtQuickCompilerOption()
&warningText);
m_ui->qtQuickCompilerCheckBox->setEnabled(supported);
m_ui->qtQuickCompilerLabel->setText(tr("Enable Qt Quick Compiler:"));
if (supported && m_step->useQtQuickCompiler() && m_step->linkQmlDebuggingLibrary())
warningText = tr("Disables QML debugging. QML profiling will still work.");
m_ui->qtQuickCompilerWarningText->setText(warningText);
m_ui->qtQuickCompilerWarningIcon->setVisible(!warningText.isEmpty());
}