Commit 88dfa84f authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Android: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: Id09b62b7b9812d9c0981202c257d18387a8b09d9
Reviewed-by: default avatarBogDan Vatra <bogdan@kdab.com>
parent c3acbc46
......@@ -79,13 +79,11 @@ public:
void setBuildTargetSdk(const QString &sdk);
virtual Utils::FileName androidPackageSourceDir() const = 0;
public slots:
void setDeployAction(AndroidDeployAction deploy);
protected slots:
void showInGraphicalShell();
protected:
Q_INVOKABLE void showInGraphicalShell();
AndroidBuildApkStep(ProjectExplorer::BuildStepList *bc,
AndroidBuildApkStep *other);
bool keystorePassword();
......
......@@ -96,37 +96,47 @@ AndroidBuildApkWidget::AndroidBuildApkWidget(AndroidBuildApkStep *step)
m_ui->openPackageLocationCheckBox->setChecked(m_step->openPackageLocation());
// target sdk
connect(m_ui->targetSDKComboBox, SIGNAL(activated(QString)), SLOT(setTargetSdk(QString)));
connect(m_ui->targetSDKComboBox,
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated),
this, &AndroidBuildApkWidget::setTargetSdk);
// deployment options
connect(m_ui->ministroOption, SIGNAL(clicked()), SLOT(setMinistro()));
connect(m_ui->temporaryQtOption, SIGNAL(clicked()), SLOT(setDeployLocalQtLibs()));
connect(m_ui->bundleQtOption, SIGNAL(clicked()), SLOT(setBundleQtLibs()));
connect(m_ui->ministroOption, SIGNAL(clicked()), SLOT(updateDebugDeploySigningWarning()));
connect(m_ui->temporaryQtOption, SIGNAL(clicked()), SLOT(updateDebugDeploySigningWarning()));
connect(m_ui->bundleQtOption, SIGNAL(clicked()), SLOT(updateDebugDeploySigningWarning()));
connect(m_ui->useGradleCheckBox, SIGNAL(toggled(bool)),
this, SLOT(useGradleCheckBoxToggled(bool)));
connect(m_ui->openPackageLocationCheckBox, SIGNAL(toggled(bool)),
this, SLOT(openPackageLocationCheckBoxToggled(bool)));
connect(m_ui->verboseOutputCheckBox, SIGNAL(toggled(bool)),
this, SLOT(verboseOutputCheckBoxToggled(bool)));
connect(m_ui->ministroOption, &QAbstractButton::clicked,
this, &AndroidBuildApkWidget::setMinistro);
connect(m_ui->temporaryQtOption, &QAbstractButton::clicked,
this, &AndroidBuildApkWidget::setDeployLocalQtLibs);
connect(m_ui->bundleQtOption, &QAbstractButton::clicked,
this, &AndroidBuildApkWidget::setBundleQtLibs);
connect(m_ui->ministroOption, &QAbstractButton::clicked,
this, &AndroidBuildApkWidget::updateDebugDeploySigningWarning);
connect(m_ui->temporaryQtOption, &QAbstractButton::clicked,
this, &AndroidBuildApkWidget::updateDebugDeploySigningWarning);
connect(m_ui->bundleQtOption, &QAbstractButton::clicked,
this, &AndroidBuildApkWidget::updateDebugDeploySigningWarning);
connect(m_ui->useGradleCheckBox, &QAbstractButton::toggled,
this, &AndroidBuildApkWidget::useGradleCheckBoxToggled);
connect(m_ui->openPackageLocationCheckBox, &QAbstractButton::toggled,
this, &AndroidBuildApkWidget::openPackageLocationCheckBoxToggled);
connect(m_ui->verboseOutputCheckBox, &QAbstractButton::toggled,
this, &AndroidBuildApkWidget::verboseOutputCheckBoxToggled);
//signing
connect(m_ui->signPackageCheckBox, SIGNAL(toggled(bool)),
this, SLOT(signPackageCheckBoxToggled(bool)));
connect(m_ui->KeystoreCreatePushButton, SIGNAL(clicked()),
this, SLOT(createKeyStore()));
connect(m_ui->KeystoreLocationPathChooser, SIGNAL(pathChanged(QString)),
SLOT(updateKeyStorePath(QString)));
connect(m_ui->certificatesAliasComboBox, SIGNAL(activated(QString)),
this, SLOT(certificatesAliasComboBoxActivated(QString)));
connect(m_ui->certificatesAliasComboBox, SIGNAL(currentIndexChanged(QString)),
this, SLOT(certificatesAliasComboBoxCurrentIndexChanged(QString)));
connect(m_step->buildConfiguration(), SIGNAL(buildTypeChanged()),
this, SLOT(updateSigningWarning()));
connect(m_ui->signPackageCheckBox, &QAbstractButton::toggled,
this, &AndroidBuildApkWidget::signPackageCheckBoxToggled);
connect(m_ui->KeystoreCreatePushButton, &QAbstractButton::clicked,
this, &AndroidBuildApkWidget::createKeyStore);
connect(m_ui->KeystoreLocationPathChooser, &Utils::PathChooser::pathChanged,
this, &AndroidBuildApkWidget::updateKeyStorePath);
connect(m_ui->certificatesAliasComboBox,
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated),
this, &AndroidBuildApkWidget::certificatesAliasComboBoxActivated);
connect(m_ui->certificatesAliasComboBox,
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
this, &AndroidBuildApkWidget::certificatesAliasComboBoxCurrentIndexChanged);
connect(m_step->buildConfiguration(), &ProjectExplorer::BuildConfiguration::buildTypeChanged,
this, &AndroidBuildApkWidget::updateSigningWarning);
updateSigningWarning();
updateDebugDeploySigningWarning();
......
......@@ -49,7 +49,7 @@ public:
AndroidBuildApkWidget(AndroidBuildApkStep *step);
~AndroidBuildApkWidget();
private slots:
private:
void setTargetSdk(const QString &sdk);
void setMinistro();
void setDeployLocalQtLibs();
......@@ -65,7 +65,6 @@ private slots:
void updateKeyStorePath(const QString &path);
void signPackageCheckBoxToggled(bool checked);
private:
virtual QString summaryText() const;
virtual QString displayName() const;
void setCertificates();
......
......@@ -776,7 +776,8 @@ QString AndroidConfig::startAVD(const QString &name) const
bool AndroidConfig::startAVDAsync(const QString &avdName) const
{
QProcess *avdProcess = new QProcess();
avdProcess->connect(avdProcess, SIGNAL(finished(int)), avdProcess, SLOT(deleteLater()));
QObject::connect(avdProcess, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
avdProcess, &QObject::deleteLater);
// start the emulator
QStringList arguments;
......
......@@ -224,7 +224,6 @@ public:
static AndroidDeviceInfo showDeviceDialog(ProjectExplorer::Project *project, int apiLevel, const QString &abi, Options options);
static void setDefaultDevice(ProjectExplorer::Project *project, const QString &abi, const QString &serialNumber); // serial number or avd name
static QString defaultDevice(ProjectExplorer::Project *project, const QString &abi); // serial number or avd name
public slots:
static void clearDefaultDevices(ProjectExplorer::Project *project);
static void registerNewToolChains();
static void removeOldToolChains();
......
......@@ -39,12 +39,18 @@ AndroidCreateKeystoreCertificate::AndroidCreateKeystoreCertificate(QWidget *pare
ui(new Ui::AndroidCreateKeystoreCertificate)
{
ui->setupUi(this);
connect(ui->keystorePassLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkKeystorePassword()));
connect(ui->keystoreRetypePassLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkKeystorePassword()));
connect(ui->certificatePassLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkCertificatePassword()));
connect(ui->certificateRetypePassLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkCertificatePassword()));
connect(ui->certificateAliasLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkCertificateAlias()));
connect(ui->countryLineEdit, SIGNAL(textChanged(QString)), this, SLOT(checkCountryCode()));
connect(ui->keystorePassLineEdit, &QLineEdit::textChanged,
this, &AndroidCreateKeystoreCertificate::checkKeystorePassword);
connect(ui->keystoreRetypePassLineEdit, &QLineEdit::textChanged,
this, &AndroidCreateKeystoreCertificate::checkKeystorePassword);
connect(ui->certificatePassLineEdit, &QLineEdit::textChanged,
this, &AndroidCreateKeystoreCertificate::checkCertificatePassword);
connect(ui->certificateRetypePassLineEdit, &QLineEdit::textChanged,
this, &AndroidCreateKeystoreCertificate::checkCertificatePassword);
connect(ui->certificateAliasLineEdit, &QLineEdit::textChanged,
this, &AndroidCreateKeystoreCertificate::checkCertificateAlias);
connect(ui->countryLineEdit, &QLineEdit::textChanged,
this, &AndroidCreateKeystoreCertificate::checkCountryCode);
}
AndroidCreateKeystoreCertificate::~AndroidCreateKeystoreCertificate()
......
......@@ -54,11 +54,13 @@ public:
QString certificateAlias();
QString certificatePassword();
private slots:
private:
PasswordStatus checkKeystorePassword();
PasswordStatus checkCertificatePassword();
bool checkCertificateAlias();
bool checkCountryCode();
private slots:
void on_keystoreShowPassCheckBox_stateChanged(int state);
void on_certificateShowPassCheckBox_stateChanged(int state);
void on_buttonBox_accepted();
......
......@@ -77,7 +77,6 @@ public:
AndroidDeviceInfo deviceInfo() const;
public slots:
void setUninstallPreviousPackage(bool uninstall);
signals:
......
......@@ -44,11 +44,14 @@ AndroidDeployQtWidget::AndroidDeployQtWidget(AndroidDeployQtStep *step)
m_ui->uninstallPreviousPackage->setChecked(m_step->uninstallPreviousPackage() > AndroidDeployQtStep::Keep);
m_ui->uninstallPreviousPackage->setEnabled(m_step->uninstallPreviousPackage() != AndroidDeployQtStep::ForceUnintall);
connect(m_ui->installMinistroButton, SIGNAL(clicked()), SLOT(installMinistro()));
connect(m_ui->cleanLibsPushButton, SIGNAL(clicked()), SLOT(cleanLibsOnDevice()));
connect(m_ui->resetDefaultDevices, SIGNAL(clicked()), SLOT(resetDefaultDevices()));
connect(m_ui->uninstallPreviousPackage, SIGNAL(toggled(bool)),
m_step, SLOT(setUninstallPreviousPackage(bool)));
connect(m_ui->installMinistroButton, &QAbstractButton::clicked,
this, &AndroidDeployQtWidget::installMinistro);
connect(m_ui->cleanLibsPushButton, &QAbstractButton::clicked,
this, &AndroidDeployQtWidget::cleanLibsOnDevice);
connect(m_ui->resetDefaultDevices, &QAbstractButton::clicked,
this, &AndroidDeployQtWidget::resetDefaultDevices);
connect(m_ui->uninstallPreviousPackage, &QAbstractButton::toggled,
m_step, &AndroidDeployQtStep::setUninstallPreviousPackage);
}
......
......@@ -46,12 +46,11 @@ public:
AndroidDeployQtWidget(AndroidDeployQtStep *step);
~AndroidDeployQtWidget();
private slots:
private:
void installMinistro();
void cleanLibsOnDevice();
void resetDefaultDevices();
private:
virtual QString summaryText() const;
virtual QString displayName() const;
......
......@@ -439,19 +439,19 @@ AndroidDeviceDialog::AndroidDeviceDialog(int apiLevel, const QString &abi, Andro
+ tr("No Device Found") + QLatin1String("</span></p><br/>")
+ msgConnect() + QLatin1String("<br/>")
+ msgAdbListDevices());
connect(m_ui->missingLabel, SIGNAL(linkActivated(QString)),
this, SLOT(showHelp()));
connect(m_ui->missingLabel, &QLabel::linkActivated,
this, &AndroidDeviceDialog::showHelp);
connect(m_ui->refreshDevicesButton, SIGNAL(clicked()),
this, SLOT(refreshDeviceList()));
connect(m_ui->refreshDevicesButton, &QAbstractButton::clicked,
this, &AndroidDeviceDialog::refreshDeviceList);
connect(m_ui->createAVDButton, SIGNAL(clicked()),
this, SLOT(createAvd()));
connect(m_ui->deviceView, SIGNAL(doubleClicked(QModelIndex)),
this, SLOT(accept()));
connect(m_ui->createAVDButton, &QAbstractButton::clicked,
this, &AndroidDeviceDialog::createAvd);
connect(m_ui->deviceView, &QAbstractItemView::doubleClicked,
this, &QDialog::accept);
connect(&m_futureWatcherAddDevice, SIGNAL(finished()),
this, SLOT(avdAdded()));
connect(&m_futureWatcherAddDevice, &QFutureWatcherBase::finished,
this, &AndroidDeviceDialog::avdAdded);
connect(&m_futureWatcherRefreshDevices, &QFutureWatcherBase::finished,
this, &AndroidDeviceDialog::devicesRefreshed);
......
......@@ -57,13 +57,12 @@ public:
bool saveDeviceSelection() const;
private slots:
private:
void refreshDeviceList();
void createAvd();
void clickedOnView(const QModelIndex &idx);
void showHelp();
void avdAdded();
private:
void devicesRefreshed();
void enableOkayButton();
void defaultDeviceClear();
......
......@@ -122,9 +122,11 @@ AndroidGdbServerKitInformationWidget::AndroidGdbServerKitInformationWidget(Kit *
// ToolButton with Menu, defaulting to 'Autodetect'.
auto buttonMenu = new QMenu(m_button);
QAction *autoDetectAction = buttonMenu->addAction(tr("Auto-detect"));
connect(autoDetectAction, SIGNAL(triggered()), this, SLOT(autoDetectDebugger()));
connect(autoDetectAction, &QAction::triggered,
this, &AndroidGdbServerKitInformationWidget::autoDetectDebugger);
QAction *changeAction = buttonMenu->addAction(tr("Edit..."));
connect(changeAction, SIGNAL(triggered()), this, SLOT(showDialog()));
connect(changeAction, &QAction::triggered,
this, &AndroidGdbServerKitInformationWidget::showDialog);
m_button->setMenu(buttonMenu);
refresh();
......@@ -192,8 +194,8 @@ void AndroidGdbServerKitInformationWidget::showDialog()
layout->addLayout(formLayout);
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &dialog);
connect(buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
layout->addWidget(buttonBox);
dialog.setWindowTitle(tr("GDB Server for \"%1\"").arg(m_kit->displayName()));
......
......@@ -53,10 +53,10 @@ public:
QWidget *mainWidget() const override;
QWidget *buttonWidget() const override;
private slots:
private:
void autoDetectDebugger();
void showDialog();
private:
QLabel *m_label;
QPushButton *m_button;
};
......
......@@ -316,7 +316,8 @@ void AndroidManager::cleanLibsOnDevice(ProjectExplorer::Target *target)
QProcess *process = new QProcess();
QStringList arguments = AndroidDeviceInfo::adbSelector(deviceSerialNumber);
arguments << QLatin1String("shell") << QLatin1String("rm") << QLatin1String("-r") << QLatin1String("/data/local/tmp/qt");
process->connect(process, SIGNAL(finished(int)), process, SLOT(deleteLater()));
QObject::connect(process, static_cast<void (QProcess::*)(int)>(&QProcess::finished),
process, &QObject::deleteLater);
const QString adb = AndroidConfigurations::currentConfig().adbToolPath().toString();
Core::MessageManager::write(adb + QLatin1Char(' ') + arguments.join(QLatin1Char(' ')));
process->start(adb, arguments);
......
......@@ -43,8 +43,8 @@ AndroidManifestDocument::AndroidManifestDocument(AndroidManifestEditorWidget *ed
setId(Constants::ANDROID_MANIFEST_EDITOR_ID);
setMimeType(QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE));
setSuspendAllowed(false);
connect(editorWidget, SIGNAL(guiChanged()),
this, SIGNAL(changed()));
connect(editorWidget, &AndroidManifestEditorWidget::guiChanged,
this, &Core::IDocument::changed);
}
bool AndroidManifestDocument::save(QString *errorString, const QString &fileName, bool autoSave)
......
......@@ -42,7 +42,8 @@ AndroidManifestEditor::AndroidManifestEditor(AndroidManifestEditorWidget *editor
{
m_toolBar = new QToolBar(editorWidget);
m_actionGroup = new QActionGroup(this);
connect(m_actionGroup, SIGNAL(triggered(QAction*)), this, SLOT(changeEditorPage(QAction*)));
connect(m_actionGroup, &QActionGroup::triggered,
this, &AndroidManifestEditor::changeEditorPage);
QAction *generalAction = m_toolBar->addAction(tr("General"));
generalAction->setData(AndroidManifestEditorWidget::General);
......
......@@ -57,10 +57,9 @@ public:
int currentColumn() const override;
void gotoLine(int line, int column = 0, bool centerLine = true) override;
private slots:
private:
void changeEditorPage(QAction *action);
private:
QString m_displayName;
QToolBar *m_toolBar;
QActionGroup *m_actionGroup;
......
......@@ -112,11 +112,11 @@ AndroidManifestEditorWidget::AndroidManifestEditorWidget()
m_editor = new AndroidManifestEditor(this);
connect(&m_timerParseCheck, SIGNAL(timeout()),
this, SLOT(delayedParseCheck()));
connect(&m_timerParseCheck, &QTimer::timeout,
this, &AndroidManifestEditorWidget::delayedParseCheck);
connect(m_textEditorWidget->document(), SIGNAL(contentsChanged()),
this, SLOT(startParseCheck()));
connect(m_textEditorWidget->document(), &QTextDocument::contentsChanged,
this, &AndroidManifestEditorWidget::startParseCheck);
connect(m_textEditorWidget->textDocument(), &TextEditor::TextDocument::reloadFinished,
this, [this](bool success) { if (success) updateAfterFileLoad(); });
connect(m_textEditorWidget->textDocument(), &TextEditor::TextDocument::openFinishedSuccessfully,
......@@ -137,6 +137,7 @@ void AndroidManifestEditorWidget::initializePage()
QGroupBox *packageGroupBox = new QGroupBox(mainWidget);
topLayout->addWidget(packageGroupBox);
auto setDirtyFunc = [this] { setDirty(); };
packageGroupBox->setTitle(tr("Package"));
{
QFormLayout *formLayout = new QFormLayout();
......@@ -201,16 +202,18 @@ void AndroidManifestEditorWidget::initializePage()
updateSdkVersions();
connect(m_packageNameLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(setPackageName()));
connect(m_versionCode, SIGNAL(valueChanged(int)),
this, SLOT(setDirty()));
connect(m_versionNameLinedit, SIGNAL(textEdited(QString)),
this, SLOT(setDirty()));
connect(m_androidMinSdkVersion, SIGNAL(currentIndexChanged(int)),
this, SLOT(setDirty()));
connect(m_androidTargetSdkVersion, SIGNAL(currentIndexChanged(int)),
this, SLOT(setDirty()));
connect(m_packageNameLineEdit, &QLineEdit::textEdited,
this, &AndroidManifestEditorWidget::setPackageName);
connect(m_versionCode, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &AndroidManifestEditorWidget::setDirty);
connect(m_versionNameLinedit, &QLineEdit::textEdited,
this, setDirtyFunc);
connect(m_androidMinSdkVersion,
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, setDirtyFunc);
connect(m_androidTargetSdkVersion,
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, setDirtyFunc);
}
......@@ -261,16 +264,19 @@ void AndroidManifestEditorWidget::initializePage()
applicationGroupBox->setLayout(formLayout);
connect(m_appNameLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(setDirty()));
connect(m_activityNameLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(setDirty()));
connect(m_targetLineEdit, SIGNAL(currentTextChanged(QString)),
this, SLOT(setDirty()));
connect(m_lIconButton, SIGNAL(clicked()), SLOT(setLDPIIcon()));
connect(m_mIconButton, SIGNAL(clicked()), SLOT(setMDPIIcon()));
connect(m_hIconButton, SIGNAL(clicked()), SLOT(setHDPIIcon()));
connect(m_appNameLineEdit, &QLineEdit::textEdited,
this, setDirtyFunc);
connect(m_activityNameLineEdit, &QLineEdit::textEdited,
this, setDirtyFunc);
connect(m_targetLineEdit, &QComboBox::currentTextChanged,
this, setDirtyFunc);
connect(m_lIconButton, &QAbstractButton::clicked,
this, &AndroidManifestEditorWidget::setLDPIIcon);
connect(m_mIconButton, &QAbstractButton::clicked,
this, &AndroidManifestEditorWidget::setMDPIIcon);
connect(m_hIconButton, &QAbstractButton::clicked,
this, &AndroidManifestEditorWidget::setHDPIIcon);
}
......@@ -443,17 +449,17 @@ void AndroidManifestEditorWidget::initializePage()
permissionsGroupBox->setLayout(layout);
connect(m_defaultPermissonsCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
connect(m_defaultFeaturesCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
connect(m_addPermissionButton, SIGNAL(clicked()),
this, SLOT(addPermission()));
connect(m_removePermissionButton, SIGNAL(clicked()),
this, SLOT(removePermission()));
connect(m_permissionsComboBox, SIGNAL(currentTextChanged(QString)),
this, SLOT(updateAddRemovePermissionButtons()));
connect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged,
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
connect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged,
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
connect(m_addPermissionButton, &QAbstractButton::clicked,
this, &AndroidManifestEditorWidget::addPermission);
connect(m_removePermissionButton, &QAbstractButton::clicked,
this, &AndroidManifestEditorWidget::removePermission);
connect(m_permissionsComboBox, &QComboBox::currentTextChanged,
this, &AndroidManifestEditorWidget::updateAddRemovePermissionButtons);
}
topLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding));
......@@ -470,7 +476,7 @@ bool AndroidManifestEditorWidget::eventFilter(QObject *obj, QEvent *event)
{
if (obj == m_targetLineEdit) {
if (event->type() == QEvent::FocusIn)
QTimer::singleShot(0, this, SLOT(updateTargetComboBox()));
QTimer::singleShot(0, this, &AndroidManifestEditorWidget::updateTargetComboBox);
}
return QWidget::eventFilter(obj, event);
......@@ -772,10 +778,10 @@ void AndroidManifestEditorWidget::syncToWidgets(const QDomDocument &doc)
m_mIconPath.clear();
m_hIconPath.clear();
disconnect(m_defaultPermissonsCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
disconnect(m_defaultFeaturesCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
disconnect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged,
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
disconnect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged,
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
m_defaultPermissonsCheckBox->setChecked(false);
m_defaultFeaturesCheckBox->setChecked(false);
......@@ -796,10 +802,10 @@ void AndroidManifestEditorWidget::syncToWidgets(const QDomDocument &doc)
m_defaultPermissonsCheckBox->setChecked(foundPermissionComment);
m_defaultFeaturesCheckBox->setChecked(foundFeatureComment);
connect(m_defaultPermissonsCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
connect(m_defaultFeaturesCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(defaultPermissionOrFeatureCheckBoxClicked()));
connect(m_defaultPermissonsCheckBox, &QCheckBox::stateChanged,
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
connect(m_defaultFeaturesCheckBox, &QCheckBox::stateChanged,
this, &AndroidManifestEditorWidget::defaultPermissionOrFeatureCheckBoxClicked);
QStringList permissions;
QDomElement permissionElem = manifest.firstChildElement(QLatin1String("uses-permission"));
......
......@@ -101,7 +101,6 @@ public:
Core::IEditor *editor() const;
TextEditor::TextEditorWidget *textEditorWidget() const;
public slots:
void setDirty(bool dirty = true);
signals:
......@@ -109,7 +108,8 @@ signals:
protected:
bool eventFilter(QObject *obj, QEvent *event);
private slots:
private:
void setLDPIIcon();
void setMDPIIcon();
void setHDPIIcon();
......@@ -122,7 +122,6 @@ private slots:
void updateSdkVersions();
void startParseCheck();
void delayedParseCheck();
private:
void initializePage();
bool syncToWidgets();
void syncToWidgets(const QDomDocument &doc);
......@@ -138,7 +137,7 @@ private:
void updateInfoBar(const QString &errorMessage, int line, int column);
void hideInfoBar();
Q_SLOT void updateTargetComboBox();
void updateTargetComboBox();
void parseManifest(QXmlStreamReader &reader, QXmlStreamWriter &writer);
void parseApplication(QXmlStreamReader &reader, QXmlStreamWriter &writer);
......
......@@ -40,7 +40,7 @@ public:
bool initialize(const QStringList &arguments, QString *errorMessage);
void extensionsInitialized() { }
private slots:
private:
void updateDevice();
void kitsRestored();
};
......
......@@ -105,11 +105,11 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
openOptions->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
layout->addWidget(openOptions, 1, 1);
connect(openOptions, SIGNAL(clicked()),
this, SLOT(openOptions()));
connect(openOptions, &QAbstractButton::clicked,
this, &AndroidPotentialKitWidget::openOptions);
connect(AndroidConfigurations::instance(), SIGNAL(updated()),
this, SLOT(recheck()));
connect(AndroidConfigurations::instance(), &AndroidConfigurations::updated,
this, &AndroidPotentialKitWidget::recheck);
}
void AndroidPotentialKitWidget::openOptions()
......
......@@ -46,7 +46,7 @@ class AndroidPotentialKitWidget : public Utils::DetailsWidget
Q_OBJECT
public:
AndroidPotentialKitWidget(QWidget *parent);
private slots:
private:
void openOptions();
void recheck();
};
......
......@@ -58,12 +58,12 @@ void AndroidRunControl::start()
emit started();
disconnect(m_runner, 0, this, 0);
connect(m_runner, SIGNAL(remoteErrorOutput(QString)),
SLOT(handleRemoteErrorOutput(QString)));
connect(m_runner, SIGNAL(remoteOutput(QString)),
SLOT(handleRemoteOutput(QString)));
connect(m_runner, SIGNAL(remoteProcessFinished(QString)),
SLOT(handleRemoteProcessFinished(QString)));
connect(m_runner, &AndroidRunner::remoteErrorOutput,
this, &AndroidRunControl::handleRemoteErrorOutput);
connect(m_runner, &AndroidRunner::remoteOutput,
this, &AndroidRunControl::handleRemoteOutput);
connect(m_runner, &AndroidRunner::remoteProcessFinished,
this, &AndroidRunControl::handleRemoteProcessFinished);
appendMessage(tr("Starting remote process."), Utils::NormalMessageFormat);
m_runner->setRunnable(runnable().as<AndroidRunnable>());
m_runner->start();
......
......@@ -46,12 +46,11 @@ public:
bool isRunning() const override;
QString displayName() const override;
private slots:
private:
void handleRemoteProcessFinished(const QString &error);
void handleRemoteOutput(const QString &output);
void handleRemoteErrorOutput(const QString &output);
private:
AndroidRunner *const m_runner;
bool m_running;
};
......
......@@ -179,9 +179,11 @@ AndroidRunner::AndroidRunner(QObject *parent,
m_checkPIDTimer.setInterval(1000);
connect(&m_adbLogcatProcess, SIGNAL(readyReadStandardOutput()), SLOT(logcatReadStandardOutput()));
connect(&m_adbLogcatProcess, SIGNAL(readyReadStandardError()), SLOT(logcatReadStandardError()));
connect(&m_checkPIDTimer, SIGNAL(timeout()), SLOT(checkPID()));
connect(&m_adbLogcatProcess, &QProcess::readyReadStandardOutput,
this, &AndroidRunner::logcatReadStandardOutput);
connect(&m_adbLogcatProcess, &QProcess::readyReadStandardError,
this, &AndroidRunner::logcatReadStandardError);
connect(&m_checkPIDTimer, &QTimer::timeout, this, &AndroidRunner::checkPID);
if (version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0)) {
if (qEnvironmentVariableIsSet("QTC_ANDROID_USE_FILE_HANDSHAKE"))
......
......@@ -61,7 +61,7 @@ public:
void setRunnable(const AndroidRunnable &runnable);
const AndroidRunnable &runnable() const { return m_androidRunnable; }
public slots: