forked from qt-creator/qt-creator
Qmake: Inline qmakestep.ui
In preparation of aspectification. Change-Id: Ib60301db79f87f6e13f511a4bab57948ce46fce5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -39,7 +39,7 @@ add_qtc_plugin(QmakeProjectManager
|
|||||||
qmakeprojectmanagerconstants.h
|
qmakeprojectmanagerconstants.h
|
||||||
qmakeprojectmanagerplugin.cpp qmakeprojectmanagerplugin.h
|
qmakeprojectmanagerplugin.cpp qmakeprojectmanagerplugin.h
|
||||||
qmakesettings.cpp qmakesettings.h
|
qmakesettings.cpp qmakesettings.h
|
||||||
qmakestep.cpp qmakestep.h qmakestep.ui
|
qmakestep.cpp qmakestep.h
|
||||||
wizards/filespage.cpp wizards/filespage.h
|
wizards/filespage.cpp wizards/filespage.h
|
||||||
wizards/qtprojectparameters.cpp wizards/qtprojectparameters.h
|
wizards/qtprojectparameters.cpp wizards/qtprojectparameters.h
|
||||||
wizards/qtwizard.cpp wizards/qtwizard.h
|
wizards/qtwizard.cpp wizards/qtwizard.h
|
||||||
|
@@ -68,7 +68,6 @@ SOURCES += \
|
|||||||
qmakemakestep.cpp
|
qmakemakestep.cpp
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
qmakestep.ui \
|
|
||||||
librarydetailswidget.ui
|
librarydetailswidget.ui
|
||||||
|
|
||||||
RESOURCES += qmakeprojectmanager.qrc \
|
RESOURCES += qmakeprojectmanager.qrc \
|
||||||
|
@@ -41,7 +41,7 @@ Project {
|
|||||||
"qmakeparsernodes.cpp", "qmakeparsernodes.h",
|
"qmakeparsernodes.cpp", "qmakeparsernodes.h",
|
||||||
"qmakeprojectimporter.cpp", "qmakeprojectimporter.h",
|
"qmakeprojectimporter.cpp", "qmakeprojectimporter.h",
|
||||||
"qmakesettings.cpp", "qmakesettings.h",
|
"qmakesettings.cpp", "qmakesettings.h",
|
||||||
"qmakestep.cpp", "qmakestep.h", "qmakestep.ui",
|
"qmakestep.cpp", "qmakestep.h",
|
||||||
"qmakebuildconfiguration.cpp", "qmakebuildconfiguration.h",
|
"qmakebuildconfiguration.cpp", "qmakebuildconfiguration.h",
|
||||||
"qmakenodes.cpp", "qmakenodes.h",
|
"qmakenodes.cpp", "qmakenodes.h",
|
||||||
"qmakenodetreebuilder.cpp", "qmakenodetreebuilder.h",
|
"qmakenodetreebuilder.cpp", "qmakenodetreebuilder.h",
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qmakestep.h"
|
#include "qmakestep.h"
|
||||||
#include "ui_qmakestep.h"
|
|
||||||
|
|
||||||
#include "qmakemakestep.h"
|
#include "qmakemakestep.h"
|
||||||
#include "qmakebuildconfiguration.h"
|
#include "qmakebuildconfiguration.h"
|
||||||
@@ -54,8 +53,15 @@
|
|||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
#include <utils/utilsicons.h>
|
#include <utils/utilsicons.h>
|
||||||
|
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QComboBox>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QFormLayout>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QListWidget>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QPlainTextEdit>
|
||||||
|
|
||||||
using namespace QmakeProjectManager;
|
using namespace QmakeProjectManager;
|
||||||
using namespace QmakeProjectManager::Internal;
|
using namespace QmakeProjectManager::Internal;
|
||||||
@@ -553,17 +559,114 @@ bool QMakeStep::fromMap(const QVariantMap &map)
|
|||||||
////
|
////
|
||||||
|
|
||||||
QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
||||||
: BuildStepConfigWidget(step), m_ui(new Internal::Ui::QMakeStep), m_step(step)
|
: BuildStepConfigWidget(step), m_step(step)
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
auto label_0 = new QLabel(tr("qmake build configuration:"), this);
|
||||||
|
|
||||||
m_ui->qmakeAdditonalArgumentsLineEdit->setText(m_step->userArguments());
|
auto buildConfigurationWidget = new QWidget(this);
|
||||||
m_ui->qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
|
||||||
m_ui->qtQuickCompilerCheckBox->setChecked(m_step->useQtQuickCompiler());
|
buildConfigurationComboBox = new QComboBox(buildConfigurationWidget);
|
||||||
m_ui->separateDebugInfoCheckBox->setChecked(m_step->separateDebugInfo());
|
buildConfigurationComboBox->addItem(tr("Debug"));
|
||||||
|
buildConfigurationComboBox->addItem(tr("Release"));
|
||||||
|
|
||||||
|
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
sizePolicy.setHorizontalStretch(0);
|
||||||
|
sizePolicy.setVerticalStretch(0);
|
||||||
|
sizePolicy.setHeightForWidth(buildConfigurationComboBox->sizePolicy().hasHeightForWidth());
|
||||||
|
buildConfigurationComboBox->setSizePolicy(sizePolicy);
|
||||||
|
|
||||||
|
auto horizontalLayout_0 = new QHBoxLayout(buildConfigurationWidget);
|
||||||
|
horizontalLayout_0->setContentsMargins(0, 0, 0, 0);
|
||||||
|
horizontalLayout_0->addWidget(buildConfigurationComboBox);
|
||||||
|
horizontalLayout_0->addItem(new QSpacerItem(71, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
|
||||||
|
|
||||||
|
auto qmakeArgsLabel = new QLabel(tr("Additional arguments:"), this);
|
||||||
|
|
||||||
|
qmakeAdditonalArgumentsLineEdit = new QLineEdit(this);
|
||||||
|
|
||||||
|
auto separateDebugInfoLabel = new QLabel(tr("Generate separate debug info:"), this);
|
||||||
|
|
||||||
|
auto widget_2 = new QWidget(this);
|
||||||
|
|
||||||
|
auto separateDebugInfoCheckBox = new QCheckBox(widget_2);
|
||||||
|
|
||||||
|
debuggingLibraryLabel = new QLabel("Link QML debugging library:", this);
|
||||||
|
|
||||||
|
auto widget_3 = new QWidget(this);
|
||||||
|
qmlDebuggingLibraryCheckBox = new QCheckBox(widget_3);
|
||||||
|
|
||||||
|
qmlDebuggingWarningIcon = new QLabel(widget_3);
|
||||||
|
|
||||||
|
auto horizontalLayout_3 = new QHBoxLayout(widget_3);
|
||||||
|
horizontalLayout_3->setContentsMargins(0, 0, 0, 0);
|
||||||
|
horizontalLayout_3->addWidget(qmlDebuggingLibraryCheckBox);
|
||||||
|
horizontalLayout_3->addWidget(qmlDebuggingWarningIcon);
|
||||||
|
|
||||||
|
qmlDebuggingWarningText = new QLabel(widget_3);
|
||||||
|
|
||||||
|
horizontalLayout_3->addWidget(qmlDebuggingWarningText);
|
||||||
|
|
||||||
|
horizontalLayout_3->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
|
||||||
|
|
||||||
|
qtQuickCompilerLabel = new QLabel(tr("Use QML compiler:"), this);
|
||||||
|
|
||||||
|
auto widget_4 = new QWidget(this);
|
||||||
|
auto horizontalLayout_4 = new QHBoxLayout(widget_4);
|
||||||
|
horizontalLayout_4->setContentsMargins(0, 0, 0, 0);
|
||||||
|
qtQuickCompilerCheckBox = new QCheckBox(widget_4);
|
||||||
|
|
||||||
|
horizontalLayout_4->addWidget(qtQuickCompilerCheckBox);
|
||||||
|
|
||||||
|
qtQuickCompilerWarningIcon = new QLabel(widget_4);
|
||||||
|
|
||||||
|
horizontalLayout_4->addWidget(qtQuickCompilerWarningIcon);
|
||||||
|
|
||||||
|
qtQuickCompilerWarningText = new QLabel(widget_4);
|
||||||
|
|
||||||
|
horizontalLayout_4->addWidget(qtQuickCompilerWarningText);
|
||||||
|
|
||||||
|
horizontalLayout_4->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
|
||||||
|
|
||||||
|
auto label = new QLabel(tr("Effective qmake call:"), this);
|
||||||
|
label->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
|
||||||
|
|
||||||
|
qmakeArgumentsEdit = new QPlainTextEdit(this);
|
||||||
|
qmakeArgumentsEdit->setEnabled(true);
|
||||||
|
qmakeArgumentsEdit->setMaximumSize(QSize(16777215, 120));
|
||||||
|
qmakeArgumentsEdit->setTextInteractionFlags(Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse);
|
||||||
|
|
||||||
|
abisLabel = new QLabel(tr("ABIs:"), this);
|
||||||
|
abisLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop);
|
||||||
|
|
||||||
|
abisListWidget = new QListWidget(this);
|
||||||
|
|
||||||
|
separateDebugInfoCheckBox->setText(QString());
|
||||||
|
qmlDebuggingLibraryCheckBox->setText(QString());
|
||||||
|
qmlDebuggingWarningText->setText(QString());
|
||||||
|
qtQuickCompilerCheckBox->setText(QString());
|
||||||
|
qtQuickCompilerWarningText->setText(QString());
|
||||||
|
|
||||||
|
qmakeAdditonalArgumentsLineEdit->setText(m_step->userArguments());
|
||||||
|
qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
||||||
|
qtQuickCompilerCheckBox->setChecked(m_step->useQtQuickCompiler());
|
||||||
|
separateDebugInfoCheckBox->setChecked(m_step->separateDebugInfo());
|
||||||
const QPixmap warning = Utils::Icons::WARNING.pixmap();
|
const QPixmap warning = Utils::Icons::WARNING.pixmap();
|
||||||
m_ui->qmlDebuggingWarningIcon->setPixmap(warning);
|
qmlDebuggingWarningIcon->setPixmap(warning);
|
||||||
m_ui->qtQuickCompilerWarningIcon->setPixmap(warning);
|
qtQuickCompilerWarningIcon->setPixmap(warning);
|
||||||
|
|
||||||
|
auto horizontalLayout_2 = new QHBoxLayout(widget_2);
|
||||||
|
horizontalLayout_2->setContentsMargins(0, 0, 0, 0);
|
||||||
|
horizontalLayout_2->addWidget(separateDebugInfoCheckBox);
|
||||||
|
horizontalLayout_2->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
|
||||||
|
|
||||||
|
auto formLayout = new QFormLayout(this);
|
||||||
|
formLayout->addRow(label_0, buildConfigurationWidget);
|
||||||
|
formLayout->addRow(qmakeArgsLabel, qmakeAdditonalArgumentsLineEdit);
|
||||||
|
formLayout->addRow(separateDebugInfoLabel, widget_2);
|
||||||
|
formLayout->addRow(debuggingLibraryLabel, widget_3);
|
||||||
|
formLayout->addRow(qtQuickCompilerLabel, widget_4);
|
||||||
|
formLayout->addRow(label, qmakeArgumentsEdit);
|
||||||
|
formLayout->addRow(abisLabel, abisListWidget);
|
||||||
|
|
||||||
qmakeBuildConfigChanged();
|
qmakeBuildConfigChanged();
|
||||||
|
|
||||||
@@ -572,22 +675,22 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
updateQmlDebuggingOption();
|
updateQmlDebuggingOption();
|
||||||
updateQtQuickCompilerOption();
|
updateQtQuickCompilerOption();
|
||||||
|
|
||||||
connect(m_ui->qmakeAdditonalArgumentsLineEdit, &QLineEdit::textEdited,
|
connect(qmakeAdditonalArgumentsLineEdit, &QLineEdit::textEdited,
|
||||||
this, &QMakeStepConfigWidget::qmakeArgumentsLineEdited);
|
this, &QMakeStepConfigWidget::qmakeArgumentsLineEdited);
|
||||||
connect(m_ui->buildConfigurationComboBox,
|
connect(buildConfigurationComboBox,
|
||||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
this, &QMakeStepConfigWidget::buildConfigurationSelected);
|
this, &QMakeStepConfigWidget::buildConfigurationSelected);
|
||||||
connect(m_ui->qmlDebuggingLibraryCheckBox, &QCheckBox::toggled,
|
connect(qmlDebuggingLibraryCheckBox, &QCheckBox::toggled,
|
||||||
this, &QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked);
|
this, &QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked);
|
||||||
connect(m_ui->qmlDebuggingLibraryCheckBox, &QCheckBox::clicked,
|
connect(qmlDebuggingLibraryCheckBox, &QCheckBox::clicked,
|
||||||
this, [this] { askForRebuild(tr("QML Debugging")); });
|
this, [this] { askForRebuild(tr("QML Debugging")); });
|
||||||
connect(m_ui->qtQuickCompilerCheckBox, &QAbstractButton::toggled,
|
connect(qtQuickCompilerCheckBox, &QAbstractButton::toggled,
|
||||||
this, &QMakeStepConfigWidget::useQtQuickCompilerChecked);
|
this, &QMakeStepConfigWidget::useQtQuickCompilerChecked);
|
||||||
connect(m_ui->qtQuickCompilerCheckBox, &QCheckBox::clicked,
|
connect(qtQuickCompilerCheckBox, &QCheckBox::clicked,
|
||||||
this, [this] { askForRebuild(tr("QML Debugging")); });
|
this, [this] { askForRebuild(tr("QML Debugging")); });
|
||||||
connect(m_ui->separateDebugInfoCheckBox, &QAbstractButton::toggled,
|
connect(separateDebugInfoCheckBox, &QAbstractButton::toggled,
|
||||||
this, &QMakeStepConfigWidget::separateDebugInfoChecked);
|
this, &QMakeStepConfigWidget::separateDebugInfoChecked);
|
||||||
connect(m_ui->separateDebugInfoCheckBox, &QCheckBox::clicked,
|
connect(separateDebugInfoCheckBox, &QCheckBox::clicked,
|
||||||
this, [this] { askForRebuild(tr("QMake Configuration")); });
|
this, [this] { askForRebuild(tr("QMake Configuration")); });
|
||||||
connect(step, &QMakeStep::userArgumentsChanged,
|
connect(step, &QMakeStep::userArgumentsChanged,
|
||||||
this, &QMakeStepConfigWidget::userArgumentsChanged);
|
this, &QMakeStepConfigWidget::userArgumentsChanged);
|
||||||
@@ -604,7 +707,7 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::qmakeBuildConfigurationChanged,
|
connect(step->qmakeBuildConfiguration(), &QmakeBuildConfiguration::qmakeBuildConfigurationChanged,
|
||||||
this, &QMakeStepConfigWidget::qmakeBuildConfigChanged);
|
this, &QMakeStepConfigWidget::qmakeBuildConfigChanged);
|
||||||
connect(step->target(), &Target::kitChanged, this, &QMakeStepConfigWidget::qtVersionChanged);
|
connect(step->target(), &Target::kitChanged, this, &QMakeStepConfigWidget::qtVersionChanged);
|
||||||
connect(m_ui->abisListWidget, &QListWidget::itemChanged, this, [this]{
|
connect(abisListWidget, &QListWidget::itemChanged, this, [this]{
|
||||||
abisChanged();
|
abisChanged();
|
||||||
QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration();
|
QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration();
|
||||||
if (!bc)
|
if (!bc)
|
||||||
@@ -615,14 +718,13 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
|
|||||||
stepLists << bc->stepList(clean);
|
stepLists << bc->stepList(clean);
|
||||||
BuildManager::buildLists(stepLists, {ProjectExplorerPlugin::displayNameForStepId(clean)});
|
BuildManager::buildLists(stepLists, {ProjectExplorerPlugin::displayNameForStepId(clean)});
|
||||||
});
|
});
|
||||||
auto chooser = new Core::VariableChooser(m_ui->qmakeAdditonalArgumentsLineEdit);
|
auto chooser = new Core::VariableChooser(qmakeAdditonalArgumentsLineEdit);
|
||||||
chooser->addMacroExpanderProvider([step] { return step->macroExpander(); });
|
chooser->addMacroExpanderProvider([step] { return step->macroExpander(); });
|
||||||
chooser->addSupportedWidget(m_ui->qmakeAdditonalArgumentsLineEdit);
|
chooser->addSupportedWidget(qmakeAdditonalArgumentsLineEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
QMakeStepConfigWidget::~QMakeStepConfigWidget()
|
QMakeStepConfigWidget::~QMakeStepConfigWidget()
|
||||||
{
|
{
|
||||||
delete m_ui;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::qtVersionChanged()
|
void QMakeStepConfigWidget::qtVersionChanged()
|
||||||
@@ -638,7 +740,7 @@ void QMakeStepConfigWidget::qmakeBuildConfigChanged()
|
|||||||
QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration();
|
QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration();
|
||||||
bool debug = bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild;
|
bool debug = bc->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild;
|
||||||
m_ignoreChange = true;
|
m_ignoreChange = true;
|
||||||
m_ui->buildConfigurationComboBox->setCurrentIndex(debug? 0 : 1);
|
buildConfigurationComboBox->setCurrentIndex(debug? 0 : 1);
|
||||||
m_ignoreChange = false;
|
m_ignoreChange = false;
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
@@ -648,7 +750,7 @@ void QMakeStepConfigWidget::userArgumentsChanged()
|
|||||||
{
|
{
|
||||||
if (m_ignoreChange)
|
if (m_ignoreChange)
|
||||||
return;
|
return;
|
||||||
m_ui->qmakeAdditonalArgumentsLineEdit->setText(m_step->userArguments());
|
qmakeAdditonalArgumentsLineEdit->setText(m_step->userArguments());
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
}
|
}
|
||||||
@@ -657,7 +759,7 @@ void QMakeStepConfigWidget::linkQmlDebuggingLibraryChanged()
|
|||||||
{
|
{
|
||||||
if (m_ignoreChange)
|
if (m_ignoreChange)
|
||||||
return;
|
return;
|
||||||
m_ui->qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
qmlDebuggingLibraryCheckBox->setChecked(m_step->linkQmlDebuggingLibrary());
|
||||||
|
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
updateEffectiveQMakeCall();
|
updateEffectiveQMakeCall();
|
||||||
@@ -698,13 +800,13 @@ void QMakeStepConfigWidget::abisChanged()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QStringList abis;
|
QStringList abis;
|
||||||
for (int i = 0; i < m_ui->abisListWidget->count(); ++i) {
|
for (int i = 0; i < abisListWidget->count(); ++i) {
|
||||||
auto item = m_ui->abisListWidget->item(i);
|
auto item = abisListWidget->item(i);
|
||||||
if (item->checkState() == Qt::CheckState::Checked)
|
if (item->checkState() == Qt::CheckState::Checked)
|
||||||
abis << item->text();
|
abis << item->text();
|
||||||
}
|
}
|
||||||
if (abis.isEmpty()) {
|
if (abis.isEmpty()) {
|
||||||
m_ui->abisListWidget->item(m_preferredAbiIndex)->setCheckState(Qt::CheckState::Checked);
|
abisListWidget->item(m_preferredAbiIndex)->setCheckState(Qt::CheckState::Checked);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
args << QStringLiteral("%1\"%2\"").arg(m_abisParam, abis.join(' '));
|
args << QStringLiteral("%1\"%2\"").arg(m_abisParam, abis.join(' '));
|
||||||
@@ -717,7 +819,7 @@ void QMakeStepConfigWidget::abisChanged()
|
|||||||
void QMakeStepConfigWidget::qmakeArgumentsLineEdited()
|
void QMakeStepConfigWidget::qmakeArgumentsLineEdited()
|
||||||
{
|
{
|
||||||
m_ignoreChange = true;
|
m_ignoreChange = true;
|
||||||
m_step->setUserArguments(m_ui->qmakeAdditonalArgumentsLineEdit->text());
|
m_step->setUserArguments(qmakeAdditonalArgumentsLineEdit->text());
|
||||||
m_ignoreChange = false;
|
m_ignoreChange = false;
|
||||||
|
|
||||||
updateSummaryLabel();
|
updateSummaryLabel();
|
||||||
@@ -730,7 +832,7 @@ void QMakeStepConfigWidget::buildConfigurationSelected()
|
|||||||
return;
|
return;
|
||||||
QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration();
|
QmakeBuildConfiguration *bc = m_step->qmakeBuildConfiguration();
|
||||||
BaseQtVersion::QmakeBuildConfigs buildConfiguration = bc->qmakeBuildConfiguration();
|
BaseQtVersion::QmakeBuildConfigs buildConfiguration = bc->qmakeBuildConfiguration();
|
||||||
if (m_ui->buildConfigurationComboBox->currentIndex() == 0) { // debug
|
if (buildConfigurationComboBox->currentIndex() == 0) { // debug
|
||||||
buildConfiguration = buildConfiguration | BaseQtVersion::DebugBuild;
|
buildConfiguration = buildConfiguration | BaseQtVersion::DebugBuild;
|
||||||
} else {
|
} else {
|
||||||
buildConfiguration = buildConfiguration & ~BaseQtVersion::DebugBuild;
|
buildConfiguration = buildConfiguration & ~BaseQtVersion::DebugBuild;
|
||||||
@@ -804,20 +906,20 @@ void QMakeStepConfigWidget::updateSummaryLabel()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool enableAbisSelect = qtVersion->qtAbis().size() > 1;
|
bool enableAbisSelect = qtVersion->qtAbis().size() > 1;
|
||||||
m_ui->abisLabel->setVisible(enableAbisSelect);
|
abisLabel->setVisible(enableAbisSelect);
|
||||||
m_ui->abisListWidget->setVisible(enableAbisSelect);
|
abisListWidget->setVisible(enableAbisSelect);
|
||||||
if (enableAbisSelect && m_ui->abisListWidget->count() != qtVersion->qtAbis().size()) {
|
if (enableAbisSelect && abisListWidget->count() != qtVersion->qtAbis().size()) {
|
||||||
m_ui->abisListWidget->clear();
|
abisListWidget->clear();
|
||||||
bool isAndroid = true;
|
bool isAndroid = true;
|
||||||
m_preferredAbiIndex = -1;
|
m_preferredAbiIndex = -1;
|
||||||
for (const auto &abi : qtVersion->qtAbis()) {
|
for (const auto &abi : qtVersion->qtAbis()) {
|
||||||
auto item = new QListWidgetItem{abi.param(), m_ui->abisListWidget};
|
auto item = new QListWidgetItem{abi.param(), abisListWidget};
|
||||||
item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
|
item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable);
|
||||||
item->setCheckState(Qt::Unchecked);
|
item->setCheckState(Qt::Unchecked);
|
||||||
isAndroid = isAndroid && abi.osFlavor() == Abi::OSFlavor::AndroidLinuxFlavor;
|
isAndroid = isAndroid && abi.osFlavor() == Abi::OSFlavor::AndroidLinuxFlavor;
|
||||||
if (isAndroid && (item->text() == "arm64-v8a" ||
|
if (isAndroid && (item->text() == "arm64-v8a" ||
|
||||||
(m_preferredAbiIndex == -1 && item->text() == "armeabi-v7a"))) {
|
(m_preferredAbiIndex == -1 && item->text() == "armeabi-v7a"))) {
|
||||||
m_preferredAbiIndex = m_ui->abisListWidget->count() - 1;
|
m_preferredAbiIndex = abisListWidget->count() - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isAndroid)
|
if (isAndroid)
|
||||||
@@ -825,7 +927,7 @@ void QMakeStepConfigWidget::updateSummaryLabel()
|
|||||||
|
|
||||||
if (m_preferredAbiIndex == -1)
|
if (m_preferredAbiIndex == -1)
|
||||||
m_preferredAbiIndex = 0;
|
m_preferredAbiIndex = 0;
|
||||||
m_ui->abisListWidget->item(m_preferredAbiIndex)->setCheckState(Qt::Checked);
|
abisListWidget->item(m_preferredAbiIndex)->setCheckState(Qt::Checked);
|
||||||
abisChanged();
|
abisChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -845,14 +947,14 @@ void QMakeStepConfigWidget::updateQmlDebuggingOption()
|
|||||||
bool supported = BaseQtVersion::isQmlDebuggingSupported(m_step->target()->kit(),
|
bool supported = BaseQtVersion::isQmlDebuggingSupported(m_step->target()->kit(),
|
||||||
&warningText);
|
&warningText);
|
||||||
|
|
||||||
m_ui->qmlDebuggingLibraryCheckBox->setEnabled(supported);
|
qmlDebuggingLibraryCheckBox->setEnabled(supported);
|
||||||
m_ui->debuggingLibraryLabel->setText(tr("Enable QML debugging and profiling:"));
|
debuggingLibraryLabel->setText(tr("Enable QML debugging and profiling:"));
|
||||||
|
|
||||||
if (supported && m_step->linkQmlDebuggingLibrary())
|
if (supported && m_step->linkQmlDebuggingLibrary())
|
||||||
warningText = tr("Might make your application vulnerable. Only use in a safe environment.");
|
warningText = tr("Might make your application vulnerable. Only use in a safe environment.");
|
||||||
|
|
||||||
m_ui->qmlDebuggingWarningText->setText(warningText);
|
qmlDebuggingWarningText->setText(warningText);
|
||||||
m_ui->qmlDebuggingWarningIcon->setVisible(!warningText.isEmpty());
|
qmlDebuggingWarningIcon->setVisible(!warningText.isEmpty());
|
||||||
|
|
||||||
updateQtQuickCompilerOption(); // show or clear compiler warning text
|
updateQtQuickCompilerOption(); // show or clear compiler warning text
|
||||||
}
|
}
|
||||||
@@ -862,19 +964,19 @@ void QMakeStepConfigWidget::updateQtQuickCompilerOption()
|
|||||||
QString warningText;
|
QString warningText;
|
||||||
bool supported = BaseQtVersion::isQtQuickCompilerSupported(m_step->target()->kit(),
|
bool supported = BaseQtVersion::isQtQuickCompilerSupported(m_step->target()->kit(),
|
||||||
&warningText);
|
&warningText);
|
||||||
m_ui->qtQuickCompilerCheckBox->setEnabled(supported);
|
qtQuickCompilerCheckBox->setEnabled(supported);
|
||||||
m_ui->qtQuickCompilerLabel->setText(tr("Enable Qt Quick Compiler:"));
|
qtQuickCompilerLabel->setText(tr("Enable Qt Quick Compiler:"));
|
||||||
|
|
||||||
if (supported && m_step->useQtQuickCompiler() && m_step->linkQmlDebuggingLibrary())
|
if (supported && m_step->useQtQuickCompiler() && m_step->linkQmlDebuggingLibrary())
|
||||||
warningText = tr("Disables QML debugging. QML profiling will still work.");
|
warningText = tr("Disables QML debugging. QML profiling will still work.");
|
||||||
|
|
||||||
m_ui->qtQuickCompilerWarningText->setText(warningText);
|
qtQuickCompilerWarningText->setText(warningText);
|
||||||
m_ui->qtQuickCompilerWarningIcon->setVisible(!warningText.isEmpty());
|
qtQuickCompilerWarningIcon->setVisible(!warningText.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::updateEffectiveQMakeCall()
|
void QMakeStepConfigWidget::updateEffectiveQMakeCall()
|
||||||
{
|
{
|
||||||
m_ui->qmakeArgumentsEdit->setPlainText(m_step->effectiveQMakeCall());
|
qmakeArgumentsEdit->setPlainText(m_step->effectiveQMakeCall());
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStepConfigWidget::recompileMessageBoxFinished(int button)
|
void QMakeStepConfigWidget::recompileMessageBoxFinished(int button)
|
||||||
|
@@ -33,6 +33,15 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QCheckBox;
|
||||||
|
class QComboBox;
|
||||||
|
class QLabel;
|
||||||
|
class QLineEdit;
|
||||||
|
class QPlainTextEdit;
|
||||||
|
class QListWidget;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
class Abi;
|
class Abi;
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
@@ -45,8 +54,6 @@ class QmakeBuildSystem;
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
namespace Ui { class QMakeStep; }
|
|
||||||
|
|
||||||
class QMakeStepFactory : public ProjectExplorer::BuildStepFactory
|
class QMakeStepFactory : public ProjectExplorer::BuildStepFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -227,11 +234,25 @@ private:
|
|||||||
void updateQtQuickCompilerOption();
|
void updateQtQuickCompilerOption();
|
||||||
void updateEffectiveQMakeCall();
|
void updateEffectiveQMakeCall();
|
||||||
|
|
||||||
Internal::Ui::QMakeStep *m_ui = nullptr;
|
|
||||||
QMakeStep *m_step = nullptr;
|
QMakeStep *m_step = nullptr;
|
||||||
bool m_ignoreChange = false;
|
bool m_ignoreChange = false;
|
||||||
int m_preferredAbiIndex = -1;
|
int m_preferredAbiIndex = -1;
|
||||||
QString m_abisParam;
|
QString m_abisParam;
|
||||||
|
|
||||||
|
QLabel *abisLabel = nullptr;
|
||||||
|
QComboBox *buildConfigurationComboBox = nullptr;
|
||||||
|
QLineEdit *qmakeAdditonalArgumentsLineEdit = nullptr;
|
||||||
|
QCheckBox *separateDebugInfoCheckBox = nullptr;
|
||||||
|
QLabel *debuggingLibraryLabel = nullptr;
|
||||||
|
QCheckBox *qmlDebuggingLibraryCheckBox = nullptr;
|
||||||
|
QCheckBox *qtQuickCompilerCheckBox = nullptr;
|
||||||
|
QPlainTextEdit *qmakeArgumentsEdit = nullptr;
|
||||||
|
QListWidget *abisListWidget = nullptr;
|
||||||
|
QLabel *qmlDebuggingWarningIcon = nullptr;
|
||||||
|
QLabel *qmlDebuggingWarningText = nullptr;
|
||||||
|
QLabel *qtQuickCompilerLabel = nullptr;
|
||||||
|
QLabel *qtQuickCompilerWarningIcon = nullptr;
|
||||||
|
QLabel *qtQuickCompilerWarningText = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmakeProjectManager
|
} // namespace QmakeProjectManager
|
||||||
|
@@ -1,288 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>QmakeProjectManager::Internal::QMakeStep</class>
|
|
||||||
<widget class="QWidget" name="QmakeProjectManager::Internal::QMakeStep">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>738</width>
|
|
||||||
<height>300</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_0">
|
|
||||||
<property name="text">
|
|
||||||
<string>qmake build configuration:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QWidget" name="buildConfigurrationWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_0">
|
|
||||||
<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="QComboBox" name="buildConfigurationComboBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Debug</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Release</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="buildConfigurationSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>71</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="qmakeArgsLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Additional arguments:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="qmakeAdditonalArgumentsLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="separateDebugInfoLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Generate separate debug info:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QWidget" name="widget_2" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<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="separateDebugInfoCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<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="3" column="0">
|
|
||||||
<widget class="QLabel" name="debuggingLibraryLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Link QML debugging library:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QWidget" name="widget_3" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<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="qmlDebuggingLibraryCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="qmlDebuggingWarningIcon"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="qmlDebuggingWarningText">
|
|
||||||
<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="qtQuickCompilerLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use QML compiler:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QWidget" name="widget_4" 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"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="qtQuickCompilerWarningText">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_4">
|
|
||||||
<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="5" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Effective qmake call:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QPlainTextEdit" name="qmakeArgumentsEdit">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>120</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="abisLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>ABIs:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="1">
|
|
||||||
<widget class="QListWidget" name="abisListWidget"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>buildConfigurationComboBox</tabstop>
|
|
||||||
<tabstop>qmakeAdditonalArgumentsLineEdit</tabstop>
|
|
||||||
<tabstop>separateDebugInfoCheckBox</tabstop>
|
|
||||||
<tabstop>qmlDebuggingLibraryCheckBox</tabstop>
|
|
||||||
<tabstop>qtQuickCompilerCheckBox</tabstop>
|
|
||||||
<tabstop>qmakeArgumentsEdit</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
Reference in New Issue
Block a user