forked from qt-creator/qt-creator
Drop Qt5: Android, IOS & WASM: Get rid of QOverload
Add a context object into some lambdas. Change-Id: I72631aeb36703f8f335f3819796fb52148f1b377 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -189,8 +189,7 @@ QWidget *AndroidBuildApkWidget::createApplicationGroup()
|
||||
targetSDKComboBox->addItems(targets);
|
||||
targetSDKComboBox->setCurrentIndex(targets.indexOf(m_step->buildTargetSdk()));
|
||||
|
||||
const auto cbActivated = QOverload<int>::of(&QComboBox::activated);
|
||||
connect(targetSDKComboBox, cbActivated, this, [this, targetSDKComboBox](int idx) {
|
||||
connect(targetSDKComboBox, &QComboBox::activated, this, [this, targetSDKComboBox](int idx) {
|
||||
const QString sdk = targetSDKComboBox->itemText(idx);
|
||||
m_step->setBuildTargetSdk(sdk);
|
||||
AndroidManager::updateGradleProperties(m_step->target(), QString()); // FIXME: Use real key.
|
||||
@@ -292,11 +291,8 @@ QWidget *AndroidBuildApkWidget::createSignPackageGroup()
|
||||
m_step->setCertificateAlias(alias);
|
||||
};
|
||||
|
||||
const auto cbActivated = QOverload<int>::of(&QComboBox::activated);
|
||||
const auto cbCurrentIndexChanged = QOverload<int>::of(&QComboBox::currentIndexChanged);
|
||||
|
||||
connect(m_certificatesAliasComboBox, cbActivated, this, updateAlias);
|
||||
connect(m_certificatesAliasComboBox, cbCurrentIndexChanged, this, updateAlias);
|
||||
connect(m_certificatesAliasComboBox, &QComboBox::activated, this, updateAlias);
|
||||
connect(m_certificatesAliasComboBox, &QComboBox::currentIndexChanged, this, updateAlias);
|
||||
|
||||
return group;
|
||||
}
|
||||
@@ -1094,7 +1090,7 @@ PasswordInputDialog::PasswordInputDialog(PasswordInputDialog::Context context,
|
||||
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!text.isEmpty());
|
||||
});
|
||||
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, [this]() {
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, [this] {
|
||||
if (verifyCallback(inputEdit->text())) {
|
||||
accept(); // Dialog accepted.
|
||||
} else {
|
||||
|
@@ -685,7 +685,7 @@ void AndroidDeviceManager::setupDevicesWatcher()
|
||||
m_avdFileSystemWatcher.addPath(avdPath.toString());
|
||||
connect(&m_avdsFutureWatcher, &QFutureWatcherBase::finished,
|
||||
this, &AndroidDeviceManager::HandleAvdsListChange);
|
||||
connect(&m_avdFileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, [this]() {
|
||||
connect(&m_avdFileSystemWatcher, &QFileSystemWatcher::directoryChanged, this, [this] {
|
||||
// If the avd list upate command is running no need to call it again.
|
||||
if (!m_avdsFutureWatcher.isRunning())
|
||||
updateAvdsList();
|
||||
|
@@ -766,8 +766,7 @@ QProcess *AndroidManager::runAdbCommandDetached(const QStringList &args, QString
|
||||
p->start(adb.toString(), args);
|
||||
if (p->waitForStarted(500) && p->state() == QProcess::Running) {
|
||||
if (deleteOnFinish) {
|
||||
connect(p.get(), QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
p.get(), &QObject::deleteLater);
|
||||
connect(p.get(), &QProcess::finished, p.get(), &QObject::deleteLater);
|
||||
}
|
||||
return p.release();
|
||||
}
|
||||
|
@@ -380,16 +380,11 @@ QGroupBox *AndroidManifestEditorWidget::createPackageFormLayout(QWidget *parent)
|
||||
|
||||
connect(m_packageNameLineEdit, &QLineEdit::textEdited,
|
||||
this, &AndroidManifestEditorWidget::setPackageName);
|
||||
connect(m_versionCodeLineEdit, &QLineEdit::textEdited,
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_versionNameLinedit, &QLineEdit::textEdited,
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_androidMinSdkVersion,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_androidTargetSdkVersion,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_versionCodeLineEdit, &QLineEdit::textEdited, this, [this] { setDirty(); });
|
||||
connect(m_versionNameLinedit, &QLineEdit::textEdited, this, [this] { setDirty(); });
|
||||
connect(m_androidMinSdkVersion, &QComboBox::currentIndexChanged, this, [this] { setDirty(); });
|
||||
connect(m_androidTargetSdkVersion, &QComboBox::currentIndexChanged,
|
||||
this, [this] { setDirty(); });
|
||||
|
||||
return packageGroupBox;
|
||||
}
|
||||
@@ -459,16 +454,10 @@ QGroupBox *Android::Internal::AndroidManifestEditorWidget::createApplicationGrou
|
||||
}
|
||||
applicationGroupBox->setLayout(formLayout);
|
||||
|
||||
connect(m_appNameLineEdit, &QLineEdit::textEdited,
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_activityNameLineEdit, &QLineEdit::textEdited,
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_styleExtractMethod,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_screenOrientation,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this]() { setDirty(); });
|
||||
connect(m_appNameLineEdit, &QLineEdit::textEdited, this, [this] { setDirty(); });
|
||||
connect(m_activityNameLineEdit, &QLineEdit::textEdited, this, [this] { setDirty(); });
|
||||
connect(m_styleExtractMethod, &QComboBox::currentIndexChanged, this, [this] { setDirty(); });
|
||||
connect(m_screenOrientation, &QComboBox::currentIndexChanged, this, [this] { setDirty(); });
|
||||
|
||||
return applicationGroupBox;
|
||||
}
|
||||
@@ -490,15 +479,15 @@ QGroupBox *AndroidManifestEditorWidget::createAdvancedGroupBox(QWidget *parent)
|
||||
m_textEditorWidget);
|
||||
m_advanvedTabWidget->addTab(m_splashButtons, tr("Splash screen"));
|
||||
|
||||
connect(m_services, &AndroidServiceWidget::servicesModified, this, [this]() { setDirty(); });
|
||||
connect(m_services, &AndroidServiceWidget::servicesModified, this, [this] { setDirty(); });
|
||||
connect(m_services, &AndroidServiceWidget::servicesModified,
|
||||
this, &AndroidManifestEditorWidget::clearInvalidServiceInfo);
|
||||
connect(m_services, &AndroidServiceWidget::servicesInvalid,
|
||||
this, &AndroidManifestEditorWidget::setInvalidServiceInfo);
|
||||
connect(m_splashButtons, &SplashScreenContainerWidget::splashScreensModified,
|
||||
this, [this]() { setDirty(); });
|
||||
this, [this] { setDirty(); });
|
||||
connect(m_iconButtons, &AndroidManifestEditorIconContainerWidget::iconsModified,
|
||||
this, [this]() { setDirty(); });
|
||||
this, [this] { setDirty(); });
|
||||
|
||||
formLayout->addRow(m_advanvedTabWidget);
|
||||
otherGroupBox->setLayout(formLayout);
|
||||
@@ -748,7 +737,7 @@ void AndroidManifestEditorWidget::updateInfoBar(const QString &errorMessage, int
|
||||
else
|
||||
text = tr("%2: Could not parse file: \"%1\".").arg(errorMessage).arg(line);
|
||||
Utils::InfoBarEntry infoBarEntry(infoBarId, text);
|
||||
infoBarEntry.addCustomButton(tr("Goto error"), [this]() {
|
||||
infoBarEntry.addCustomButton(tr("Goto error"), [this] {
|
||||
m_textEditorWidget->gotoLine(m_errorLine, m_errorColumn);
|
||||
});
|
||||
infoBar->removeInfo(infoBarId);
|
||||
|
@@ -199,7 +199,7 @@ void AndroidPlugin::askUserAboutAndroidSetup()
|
||||
info.addCustomButton(tr("Configure Android"), [this] {
|
||||
Core::ICore::infoBar()->removeInfo(kSetupAndroidSetting);
|
||||
Core::ICore::infoBar()->globallySuppressInfo(kSetupAndroidSetting);
|
||||
QTimer::singleShot(0, this, [this]() { d->potentialKit.executeFromMenu(); });
|
||||
QTimer::singleShot(0, this, [this] { d->potentialKit.executeFromMenu(); });
|
||||
});
|
||||
Core::ICore::infoBar()->addInfo(info);
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ bool AndroidQmlPreviewWorker::isPreviewRunning(int lastKnownPid) const
|
||||
|
||||
void AndroidQmlPreviewWorker::startPidWatcher()
|
||||
{
|
||||
m_pidFutureWatcher.setFuture(runAsync([this]() {
|
||||
m_pidFutureWatcher.setFuture(runAsync([this] {
|
||||
// wait for started
|
||||
const int sleepTimeMs = 2000;
|
||||
QDeadlineTimer deadline(20000);
|
||||
|
@@ -774,7 +774,7 @@ void AndroidRunnerWorker::handleJdbWaiting()
|
||||
void AndroidRunnerWorker::handleJdbSettled()
|
||||
{
|
||||
qCDebug(androidRunWorkerLog) << "Handle JDB settled";
|
||||
auto waitForCommand = [this]() {
|
||||
auto waitForCommand = [this] {
|
||||
for (int i= 0; i < 5 && m_jdbProcess->state() == QProcess::Running; ++i) {
|
||||
m_jdbProcess->waitForReadyRead(500);
|
||||
QByteArray lines = m_jdbProcess->readAll();
|
||||
@@ -858,7 +858,7 @@ void AndroidRunnerWorker::onProcessIdChanged(qint64 pid)
|
||||
QTC_ASSERT(m_psIsAlive, return);
|
||||
m_psIsAlive->setObjectName("IsAliveProcess");
|
||||
m_psIsAlive->setProcessChannelMode(QProcess::MergedChannels);
|
||||
connect(m_psIsAlive.get(), QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
connect(m_psIsAlive.get(), &QProcess::finished,
|
||||
this, bind(&AndroidRunnerWorker::onProcessIdChanged, this, -1));
|
||||
}
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ void AndroidSdkDownloader::downloadAndExtractSdk()
|
||||
|
||||
connect(m_progressDialog, &QProgressDialog::canceled, this, &AndroidSdkDownloader::cancel);
|
||||
|
||||
connect(this, &AndroidSdkDownloader::sdkPackageWriteFinished, this, [this]() {
|
||||
connect(this, &AndroidSdkDownloader::sdkPackageWriteFinished, this, [this] {
|
||||
if (!Archive::supportsFile(m_sdkFilename))
|
||||
return;
|
||||
const FilePath extractDir = m_sdkFilename.parentDir();
|
||||
|
@@ -84,12 +84,12 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
||||
m_formatter = new Utils::OutputFormatter;
|
||||
m_formatter->setPlainTextEdit(m_ui->outputEdit);
|
||||
|
||||
connect(m_sdkModel, &AndroidSdkModel::dataChanged, [this]() {
|
||||
connect(m_sdkModel, &AndroidSdkModel::dataChanged, this, [this] {
|
||||
if (m_ui->viewStack->currentWidget() == m_ui->packagesStack)
|
||||
m_ui->applySelectionButton->setEnabled(!m_sdkModel->userSelection().isEmpty());
|
||||
});
|
||||
|
||||
connect(m_sdkModel, &AndroidSdkModel::modelAboutToBeReset, [this]() {
|
||||
connect(m_sdkModel, &AndroidSdkModel::modelAboutToBeReset, this, [this] {
|
||||
m_ui->applySelectionButton->setEnabled(false);
|
||||
m_ui->expandCheck->setChecked(false);
|
||||
cancelPendingOperations();
|
||||
@@ -102,7 +102,7 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
||||
m_ui->packagesView->header()->setSectionResizeMode(AndroidSdkModel::packageNameColumn,
|
||||
QHeaderView::Stretch);
|
||||
m_ui->packagesView->header()->setStretchLastSection(false);
|
||||
connect(m_ui->expandCheck, &QCheckBox::stateChanged, [this](int state) {
|
||||
connect(m_ui->expandCheck, &QCheckBox::stateChanged, this, [this](int state) {
|
||||
if (state == Qt::Checked)
|
||||
m_ui->packagesView->expandAll();
|
||||
else
|
||||
@@ -110,19 +110,21 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
||||
});
|
||||
connect(m_ui->updateInstalledButton, &QPushButton::clicked,
|
||||
this, &AndroidSdkManagerWidget::onUpdatePackages);
|
||||
connect(m_ui->showAllRadio, &QRadioButton::toggled, [this, proxyModel](bool checked) {
|
||||
connect(m_ui->showAllRadio, &QRadioButton::toggled, this, [this, proxyModel](bool checked) {
|
||||
if (checked) {
|
||||
proxyModel->setAcceptedPackageState(AndroidSdkPackage::AnyValidState);
|
||||
m_sdkModel->resetSelection();
|
||||
}
|
||||
});
|
||||
connect(m_ui->showInstalledRadio, &QRadioButton::toggled, [this, proxyModel](bool checked) {
|
||||
connect(m_ui->showInstalledRadio, &QRadioButton::toggled,
|
||||
this, [this, proxyModel](bool checked) {
|
||||
if (checked) {
|
||||
proxyModel->setAcceptedPackageState(AndroidSdkPackage::Installed);
|
||||
m_sdkModel->resetSelection();
|
||||
}
|
||||
});
|
||||
connect(m_ui->showAvailableRadio, &QRadioButton::toggled, [this, proxyModel](bool checked) {
|
||||
connect(m_ui->showAvailableRadio, &QRadioButton::toggled,
|
||||
this, [this, proxyModel](bool checked) {
|
||||
if (checked) {
|
||||
proxyModel->setAcceptedPackageState(AndroidSdkPackage::Available);
|
||||
m_sdkModel->resetSelection();
|
||||
@@ -130,7 +132,8 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
||||
});
|
||||
|
||||
m_ui->searchField->setPlaceholderText("Filter");
|
||||
connect(m_ui->searchField, &QLineEdit::textChanged, [this, proxyModel](const QString &text) {
|
||||
connect(m_ui->searchField, &QLineEdit::textChanged,
|
||||
this, [this, proxyModel](const QString &text) {
|
||||
proxyModel->setAcceptedSearchPackage(text);
|
||||
m_sdkModel->resetSelection();
|
||||
// It is more convenient to expand the view with the results
|
||||
@@ -138,22 +141,21 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
||||
});
|
||||
|
||||
connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &AndroidSdkManagerWidget::close);
|
||||
connect(m_ui->applySelectionButton, &QPushButton::clicked,
|
||||
this, [this]() { onApplyButton(); });
|
||||
connect(m_ui->applySelectionButton, &QPushButton::clicked, this, [this] { onApplyButton(); });
|
||||
connect(m_ui->cancelButton, &QPushButton::clicked, this,
|
||||
&AndroidSdkManagerWidget::onCancel);
|
||||
connect(m_ui->optionsButton, &QPushButton::clicked,
|
||||
this, &AndroidSdkManagerWidget::onSdkManagerOptions);
|
||||
connect(m_ui->sdkLicensebuttonBox, &QDialogButtonBox::accepted, [this]() {
|
||||
connect(m_ui->sdkLicensebuttonBox, &QDialogButtonBox::accepted, this, [this] {
|
||||
m_sdkManager->acceptSdkLicense(true);
|
||||
m_ui->sdkLicensebuttonBox->setEnabled(false); // Wait for next license to enable controls
|
||||
});
|
||||
connect(m_ui->sdkLicensebuttonBox, &QDialogButtonBox::rejected, [this]() {
|
||||
connect(m_ui->sdkLicensebuttonBox, &QDialogButtonBox::rejected, this, [this] {
|
||||
m_sdkManager->acceptSdkLicense(false);
|
||||
m_ui->sdkLicensebuttonBox->setEnabled(false); // Wait for next license to enable controls
|
||||
});
|
||||
|
||||
connect(m_ui->oboleteCheckBox, &QCheckBox::stateChanged, [this](int state) {
|
||||
connect(m_ui->oboleteCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
|
||||
const QString obsoleteArg = "--include_obsolete";
|
||||
QStringList args = m_androidConfig.sdkManagerToolArgs();
|
||||
if (state == Qt::Checked && !args.contains(obsoleteArg)) {
|
||||
@@ -166,8 +168,7 @@ AndroidSdkManagerWidget::AndroidSdkManagerWidget(AndroidConfig &config,
|
||||
m_sdkManager->reloadPackages(true);
|
||||
});
|
||||
|
||||
connect(m_ui->channelCheckbox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
[this](int index) {
|
||||
connect(m_ui->channelCheckbox, &QComboBox::currentIndexChanged, this, [this](int index) {
|
||||
QStringList args = m_androidConfig.sdkManagerToolArgs();
|
||||
QString existingArg;
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
@@ -338,14 +339,12 @@ void AndroidSdkManagerWidget::addPackageFuture(const QFuture<AndroidSdkManager::
|
||||
QTC_ASSERT(!m_currentOperation, return);
|
||||
if (!future.isFinished() || !future.isCanceled()) {
|
||||
m_currentOperation = new QFutureWatcher<AndroidSdkManager::OperationOutput>;
|
||||
connect(m_currentOperation,
|
||||
&QFutureWatcher<AndroidSdkManager::OperationOutput>::resultReadyAt,
|
||||
connect(m_currentOperation, &QFutureWatcherBase::resultReadyAt,
|
||||
this, &AndroidSdkManagerWidget::onOperationResult);
|
||||
connect(m_currentOperation, &QFutureWatcher<AndroidSdkManager::OperationOutput>::finished,
|
||||
connect(m_currentOperation, &QFutureWatcherBase::finished,
|
||||
this, &AndroidSdkManagerWidget::packageFutureFinished);
|
||||
connect(m_currentOperation,
|
||||
&QFutureWatcher<AndroidSdkManager::OperationOutput>::progressValueChanged,
|
||||
[this](int value) {
|
||||
connect(m_currentOperation, &QFutureWatcherBase::progressValueChanged,
|
||||
this, [this](int value) {
|
||||
m_ui->operationProgress->setValue(value);
|
||||
});
|
||||
m_currentOperation->setFuture(future);
|
||||
|
@@ -49,11 +49,11 @@ AndroidSdkModel::AndroidSdkModel(const AndroidConfig &config, AndroidSdkManager
|
||||
m_sdkManager(sdkManager)
|
||||
{
|
||||
QTC_CHECK(m_sdkManager);
|
||||
connect(m_sdkManager, &AndroidSdkManager::packageReloadBegin, [this]() {
|
||||
connect(m_sdkManager, &AndroidSdkManager::packageReloadBegin, [this] {
|
||||
clearContainers();
|
||||
beginResetModel();
|
||||
});
|
||||
connect(m_sdkManager, &AndroidSdkManager::packageReloadFinished, [this]() {
|
||||
connect(m_sdkManager, &AndroidSdkManager::packageReloadFinished, [this] {
|
||||
refreshData();
|
||||
endResetModel();
|
||||
});
|
||||
|
@@ -405,12 +405,12 @@ AndroidSettingsWidget::AndroidSettingsWidget()
|
||||
this, &AndroidSettingsWidget::validateSdk);
|
||||
connect(&m_sdkManager, &AndroidSdkManager::packageReloadFinished,
|
||||
m_androidProgress, &ProgressIndicator::hide);
|
||||
connect(&m_sdkManager, &AndroidSdkManager::packageReloadBegin, this, [this]() {
|
||||
connect(&m_sdkManager, &AndroidSdkManager::packageReloadBegin, this, [this] {
|
||||
m_androidSummary->setInProgressText("Retrieving packages information");
|
||||
m_androidProgress->show();
|
||||
});
|
||||
connect(m_ui.sdkManagerToolButton, &QAbstractButton::clicked,
|
||||
this, [this]() { m_sdkManagerWidget->exec(); });
|
||||
this, [this] { m_sdkManagerWidget->exec(); });
|
||||
connect(m_ui.sdkToolsAutoDownloadButton, &QAbstractButton::clicked,
|
||||
this, &AndroidSettingsWidget::downloadSdk);
|
||||
connect(&m_sdkDownloader, &AndroidSdkDownloader::sdkDownloaderError, this, [this](const QString &error) {
|
||||
|
@@ -60,11 +60,9 @@ AvdDialog::AvdDialog(const AndroidConfig &config, QWidget *parent)
|
||||
m_hideTipTimer.setSingleShot(true);
|
||||
|
||||
connect(&m_hideTipTimer, &QTimer::timeout, this, &Utils::ToolTip::hide);
|
||||
connect(m_avdDialog.deviceDefinitionTypeComboBox,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_avdDialog.deviceDefinitionTypeComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &AvdDialog::updateDeviceDefinitionComboBox);
|
||||
connect(m_avdDialog.abiComboBox,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_avdDialog.abiComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &AvdDialog::updateApiLevelComboBox);
|
||||
|
||||
deviceTypeToStringMap.insert(AvdDialog::Phone, "Phone");
|
||||
|
@@ -119,8 +119,7 @@ ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard)
|
||||
}
|
||||
|
||||
nodeSelected(m_comboBox->currentIndex());
|
||||
connect(m_comboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, &ChooseProFilePage::nodeSelected);
|
||||
connect(m_comboBox, &QComboBox::currentIndexChanged, this, &ChooseProFilePage::nodeSelected);
|
||||
|
||||
fl->addRow(tr(".pro file:"), m_comboBox);
|
||||
setTitle(tr("Select a .pro File"));
|
||||
|
@@ -45,17 +45,16 @@ CreateSimulatorDialog::CreateSimulatorDialog(QWidget *parent)
|
||||
m_ui->setupUi(this);
|
||||
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
|
||||
const auto enableOk = [this]() {
|
||||
const auto enableOk = [this] {
|
||||
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
|
||||
!m_ui->nameEdit->text().isEmpty() &&
|
||||
m_ui->deviceTypeCombo->currentIndex() > 0 &&
|
||||
m_ui->runtimeCombo->currentIndex() > 0);
|
||||
};
|
||||
|
||||
const auto indexChanged = QOverload<int>::of(&QComboBox::currentIndexChanged);
|
||||
connect(m_ui->nameEdit, &QLineEdit::textChanged, enableOk);
|
||||
connect(m_ui->runtimeCombo, indexChanged, enableOk);
|
||||
connect(m_ui->deviceTypeCombo, indexChanged, [this, enableOk]() {
|
||||
connect(m_ui->nameEdit, &QLineEdit::textChanged, this, enableOk);
|
||||
connect(m_ui->runtimeCombo, &QComboBox::currentIndexChanged, this, enableOk);
|
||||
connect(m_ui->deviceTypeCombo, &QComboBox::currentIndexChanged, this, [this, enableOk] {
|
||||
populateRuntimes(m_ui->deviceTypeCombo->currentData().value<DeviceTypeInfo>());
|
||||
enableOk();
|
||||
});
|
||||
|
@@ -155,18 +155,12 @@ IosSigningSettingsWidget::IosSigningSettingsWidget(BuildConfiguration *buildConf
|
||||
detailsWidget->setWidget(container);
|
||||
|
||||
if (m_isDevice) {
|
||||
connect(IosConfigurations::instance(),
|
||||
&IosConfigurations::provisioningDataChanged,
|
||||
this,
|
||||
&IosSigningSettingsWidget::populateDevelopmentTeams);
|
||||
connect(m_signEntityCombo,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this,
|
||||
&IosSigningSettingsWidget::onSigningEntityComboIndexChanged);
|
||||
connect(m_autoSignCheckbox,
|
||||
&QCheckBox::toggled,
|
||||
this,
|
||||
&IosSigningSettingsWidget::configureSigningUi);
|
||||
connect(IosConfigurations::instance(), &IosConfigurations::provisioningDataChanged,
|
||||
this, &IosSigningSettingsWidget::populateDevelopmentTeams);
|
||||
connect(m_signEntityCombo, &QComboBox::currentIndexChanged,
|
||||
this, &IosSigningSettingsWidget::onSigningEntityComboIndexChanged);
|
||||
connect(m_autoSignCheckbox, &QCheckBox::toggled,
|
||||
this, &IosSigningSettingsWidget::configureSigningUi);
|
||||
const QString signingIdentifier = m_signingIdentifier->value();
|
||||
configureSigningUi(m_autoSignCheckbox->isChecked());
|
||||
setDefaultSigningIdentfier(signingIdentifier);
|
||||
|
@@ -357,7 +357,7 @@ void IosDeviceTypeAspect::addToLayout(LayoutBuilder &builder)
|
||||
|
||||
updateValues();
|
||||
|
||||
connect(m_deviceTypeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
connect(m_deviceTypeComboBox, &QComboBox::currentIndexChanged,
|
||||
this, &IosDeviceTypeAspect::setDeviceTypeIndex);
|
||||
}
|
||||
|
||||
|
@@ -675,7 +675,7 @@ IosDeviceToolHandlerPrivate::IosDeviceToolHandlerPrivate(const IosDeviceType &de
|
||||
QObject::connect(process.get(), &QProcess::readyReadStandardOutput,
|
||||
std::bind(&IosDeviceToolHandlerPrivate::subprocessHasData,this));
|
||||
|
||||
QObject::connect(process.get(), QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
QObject::connect(process.get(), &QProcess::finished,
|
||||
std::bind(&IosDeviceToolHandlerPrivate::subprocessFinished,this, _1,_2));
|
||||
|
||||
QObject::connect(process.get(), &QProcess::errorOccurred,
|
||||
|
@@ -101,11 +101,10 @@ void WebBrowserSelectionAspect::addToLayout(LayoutBuilder &builder)
|
||||
for (const WebBrowserEntry &be : m_availableBrowsers)
|
||||
m_webBrowserComboBox->addItem(be.second, be.first);
|
||||
m_webBrowserComboBox->setCurrentIndex(m_webBrowserComboBox->findData(m_currentBrowser));
|
||||
connect(m_webBrowserComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
[this]() {
|
||||
m_currentBrowser = m_webBrowserComboBox->currentData().toString();
|
||||
emit changed();
|
||||
});
|
||||
connect(m_webBrowserComboBox, &QComboBox::currentIndexChanged, this, [this] {
|
||||
m_currentBrowser = m_webBrowserComboBox->currentData().toString();
|
||||
emit changed();
|
||||
});
|
||||
builder.addItems({tr("Web browser:"), m_webBrowserComboBox});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user