From afb7047bf7e3cc8995885e0020723fc6bb4795d0 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 25 Oct 2013 15:42:15 +0200 Subject: [PATCH] QbsProjectManager: Fix display of command line in step widgets. The command line equivalent of the respective options often gets too long for the summary, which means that the end of the string is cut off. Not only does that look ugly, it also hides information that is not trivially available otherwise, such as the full path to the install root. This patch therefore adds a text edit field that is guaranteed to be able to display the complete command line. This is also consistent with what the qmake step does. Change-Id: Ic8d20e484e9cfe4980ea9eff05843fef1012f067 Reviewed-by: Tobias Hunger --- .../qbsprojectmanager/qbsbuildstep.cpp | 1 + .../qbsbuildstepconfigwidget.ui | 170 ++++++++++++------ .../qbsprojectmanager/qbscleanstep.cpp | 1 + .../qbscleanstepconfigwidget.ui | 113 ++++++++---- .../qbsprojectmanager/qbsinstallstep.cpp | 1 + .../qbsinstallstepconfigwidget.ui | 101 +++++++---- 6 files changed, 262 insertions(+), 125 deletions(-) diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp index d5762397686..76f5bd808c7 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp @@ -415,6 +415,7 @@ void QbsBuildStepConfigWidget::updateState() if (m_step->isQmlDebuggingEnabled()) command += QLatin1String(" Qt.declarative.qmlDebugging:true Qt.quick.qmlDebugging:true"); + m_ui->commandLineTextEdit->setPlainText(command); QString summary = tr("Qbs: %1").arg(command); if (m_summary != summary) { diff --git a/src/plugins/qbsprojectmanager/qbsbuildstepconfigwidget.ui b/src/plugins/qbsprojectmanager/qbsbuildstepconfigwidget.ui index 0533f059ec2..4045cedd36a 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildstepconfigwidget.ui +++ b/src/plugins/qbsprojectmanager/qbsbuildstepconfigwidget.ui @@ -6,23 +6,11 @@ 0 0 - 463 - 121 + 557 + 233 - - - 0 - - - 0 - - - 0 - - - 0 - + @@ -31,56 +19,77 @@ - - - - 0 - 0 - - + - - Debug - + + + + 0 + 0 + + + + + Debug + + + + + Release + + + - - Release - + + + Qt::Horizontal + + + + 70 + 13 + + + - - - - - - - - - jobs - - - - - - - Qt::Horizontal - - - - 15 - 5 - - - + + + + Parallel Jobs: + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Enable QML debugging: - + @@ -121,17 +130,28 @@ - + Properties: - - + + + + + + - + + + + Flags: + + + + @@ -162,7 +182,43 @@ + + + + Equivalent command line: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + false + + + true + + + + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + buildVariantLabel + qmlDebuggingLabel + propertyLabel + propertyEdit + + + commandLineKeyLabel + flagsLabel + jobsLabel + commandLineTextEdit diff --git a/src/plugins/qbsprojectmanager/qbscleanstep.cpp b/src/plugins/qbsprojectmanager/qbscleanstep.cpp index c18e5ab7b0b..8403a34117c 100644 --- a/src/plugins/qbsprojectmanager/qbscleanstep.cpp +++ b/src/plugins/qbsprojectmanager/qbscleanstep.cpp @@ -293,6 +293,7 @@ void QbsCleanStepConfigWidget::updateState() command += QLatin1String("--keep-going "); if (m_step->cleanAll()) command += QLatin1String(" --all-artifacts"); + m_ui->commandLineTextEdit->setPlainText(command); QString summary = tr("Qbs: %1").arg(command); if (m_summary != summary) { diff --git a/src/plugins/qbsprojectmanager/qbscleanstepconfigwidget.ui b/src/plugins/qbsprojectmanager/qbscleanstepconfigwidget.ui index 2313f6417bd..9b10bb38318 100644 --- a/src/plugins/qbsprojectmanager/qbscleanstepconfigwidget.ui +++ b/src/plugins/qbsprojectmanager/qbscleanstepconfigwidget.ui @@ -6,58 +6,95 @@ 0 0 - 376 - 41 + 585 + 140 - - - 0 - - - 0 - - - 0 - - - 0 - - - + + + - Clean all artifacts + Flags: - - + + + + + + Clean all artifacts + + + + + + + Dry run + + + + + + + Keep going + + + + + + + Qt::Horizontal + + + + 58 + 20 + + + + + + + + + + + 0 + 0 + + - Dry run + Equivalent command line: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - Keep going + + + + + 0 + 0 + + + + false + + + true + + + - - - - Qt::Horizontal - - - - 58 - 20 - - - - + commandLineKeyLabel + flagsLabel + commandLineTextEdit diff --git a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp index 23f45c0781c..57d30690cce 100644 --- a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp @@ -318,6 +318,7 @@ void QbsInstallStepConfigWidget::updateState() if (m_step->removeFirst()) command += QLatin1String("--remove-first "); command += QString::fromLatin1("--install-root \"%1\"").arg(m_step->absoluteInstallRoot()); + m_ui->commandLineTextEdit->setPlainText(command); QString summary = tr("Qbs: %1").arg(command); if (m_summary != summary) { diff --git a/src/plugins/qbsprojectmanager/qbsinstallstepconfigwidget.ui b/src/plugins/qbsprojectmanager/qbsinstallstepconfigwidget.ui index a7482edbbb2..9a6c4fac874 100644 --- a/src/plugins/qbsprojectmanager/qbsinstallstepconfigwidget.ui +++ b/src/plugins/qbsprojectmanager/qbsinstallstepconfigwidget.ui @@ -6,29 +6,11 @@ 0 0 - 371 - 60 + 474 + 146 - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - 18 - + @@ -36,7 +18,7 @@ - + @@ -47,23 +29,82 @@ - + - Remove first + Flags: - + + + + + Dry run + + + + + + + Keep going + + + + + + + Remove first + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 0 + 0 + + - Dry run + Equivalent command line: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - Keep going + + + + + 0 + 0 + + + + true + + + + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse