diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-06-30 23:04:57 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2016-07-01 11:29:27 +0000 |
commit | e3b1c9b912c1408ba63f5b75e78ed16730c21f40 (patch) | |
tree | 64e09f0bc7c969607557e3c860059179bb68ad7f /src/plugins | |
parent | 802edc9d8fdae55ea247567a337d5b769e206363 (diff) | |
download | qt-creator-e3b1c9b912c1408ba63f5b75e78ed16730c21f40.tar.gz |
RemoteLinux: Use Qt5-style connects
The heavy lifting was done by clazy.
Change-Id: I1a03435bbb4281bad4ff64baba0182e0050170d6
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins')
37 files changed, 151 insertions, 145 deletions
diff --git a/src/plugins/remotelinux/abstractpackagingstep.h b/src/plugins/remotelinux/abstractpackagingstep.h index 5b3dfb9cc0..b278fd772e 100644 --- a/src/plugins/remotelinux/abstractpackagingstep.h +++ b/src/plugins/remotelinux/abstractpackagingstep.h @@ -62,12 +62,11 @@ protected: virtual bool isPackagingNeeded() const; -private slots: +private: void handleBuildConfigurationChanged(); void setDeploymentDataUnmodified(); void setDeploymentDataModified(); -private: virtual QString packageFileName() const = 0; void ctor(); diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h index 8efb793953..931930806e 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h +++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h @@ -82,11 +82,10 @@ protected: void handleDeviceSetupDone(bool success); void handleDeploymentDone(); -private slots: +private: void handleConnected(); void handleConnectionFailure(); -private: virtual bool isDeploymentNecessary() const = 0; // Should do things needed *before* connecting. Call handleDeviceSetupDone() afterwards. diff --git a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp index acb7789de6..c8c8c52f4c 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp +++ b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp @@ -87,13 +87,18 @@ bool AbstractRemoteLinuxDeployStep::init(QList<const BuildStep *> &earlierSteps) void AbstractRemoteLinuxDeployStep::run(QFutureInterface<bool> &fi) { - connect(deployService(), SIGNAL(errorMessage(QString)), SLOT(handleErrorMessage(QString))); - connect(deployService(), SIGNAL(progressMessage(QString)), - SLOT(handleProgressMessage(QString))); - connect(deployService(), SIGNAL(warningMessage(QString)), SLOT(handleWarningMessage(QString))); - connect(deployService(), SIGNAL(stdOutData(QString)), SLOT(handleStdOutData(QString))); - connect(deployService(), SIGNAL(stdErrData(QString)), SLOT(handleStdErrData(QString))); - connect(deployService(), SIGNAL(finished()), SLOT(handleFinished())); + connect(deployService(), &AbstractRemoteLinuxDeployService::errorMessage, + this, &AbstractRemoteLinuxDeployStep::handleErrorMessage); + connect(deployService(), &AbstractRemoteLinuxDeployService::progressMessage, + this, &AbstractRemoteLinuxDeployStep::handleProgressMessage); + connect(deployService(), &AbstractRemoteLinuxDeployService::warningMessage, + this, &AbstractRemoteLinuxDeployStep::handleWarningMessage); + connect(deployService(), &AbstractRemoteLinuxDeployService::stdOutData, + this, &AbstractRemoteLinuxDeployStep::handleStdOutData); + connect(deployService(), &AbstractRemoteLinuxDeployService::stdErrData, + this, &AbstractRemoteLinuxDeployStep::handleStdErrData); + connect(deployService(), &AbstractRemoteLinuxDeployService::finished, + this, &AbstractRemoteLinuxDeployStep::handleFinished); d->hasError = false; d->future = fi; diff --git a/src/plugins/remotelinux/abstractremotelinuxdeploystep.h b/src/plugins/remotelinux/abstractremotelinuxdeploystep.h index 12d8fd547c..b0148aa2e0 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeploystep.h +++ b/src/plugins/remotelinux/abstractremotelinuxdeploystep.h @@ -60,7 +60,7 @@ protected: AbstractRemoteLinuxDeployStep *other); virtual bool initInternal(QString *error = 0) = 0; -private slots: +private: void handleProgressMessage(const QString &message); void handleErrorMessage(const QString &message); void handleWarningMessage(const QString &message); @@ -68,7 +68,6 @@ private slots: void handleStdOutData(const QString &data); void handleStdErrData(const QString &data); -private: Internal::AbstractRemoteLinuxDeployStepPrivate *d; }; diff --git a/src/plugins/remotelinux/abstractremotelinuxrunsupport.h b/src/plugins/remotelinux/abstractremotelinuxrunsupport.h index d80d08fcf2..f4b8416573 100644 --- a/src/plugins/remotelinux/abstractremotelinuxrunsupport.h +++ b/src/plugins/remotelinux/abstractremotelinuxrunsupport.h @@ -81,7 +81,7 @@ protected: void reset(); -protected slots: +protected: virtual void handleRemoteSetupRequested() = 0; virtual void handleAppRunnerError(const QString &error) = 0; virtual void handleRemoteOutput(const QByteArray &output) = 0; @@ -89,11 +89,10 @@ protected slots: virtual void handleAppRunnerFinished(bool success) = 0; virtual void handleProgressReport(const QString &progressOutput) = 0; -private slots: +private: void handleResourcesError(const QString &message); void handleResourcesAvailable(); -private: friend class Internal::AbstractRemoteLinuxRunSupportPrivate; Internal::AbstractRemoteLinuxRunSupportPrivate * const d; }; diff --git a/src/plugins/remotelinux/abstractuploadandinstallpackageservice.cpp b/src/plugins/remotelinux/abstractuploadandinstallpackageservice.cpp index b2c216515d..5974a6d557 100644 --- a/src/plugins/remotelinux/abstractuploadandinstallpackageservice.cpp +++ b/src/plugins/remotelinux/abstractuploadandinstallpackageservice.cpp @@ -150,10 +150,12 @@ void AbstractUploadAndInstallPackageService::handleUploadFinished(const QString + Utils::FileName::fromString(packageFilePath()).fileName(); d->state = Installing; emit progressMessage(tr("Installing package to device...")); - connect(packageInstaller(), SIGNAL(stdoutData(QString)), SIGNAL(stdOutData(QString))); - connect(packageInstaller(), SIGNAL(stderrData(QString)), SIGNAL(stdErrData(QString))); - connect(packageInstaller(), SIGNAL(finished(QString)), - SLOT(handleInstallationFinished(QString))); + connect(packageInstaller(), &AbstractRemoteLinuxPackageInstaller::stdoutData, + this, &AbstractRemoteLinuxDeployService::stdOutData); + connect(packageInstaller(), &AbstractRemoteLinuxPackageInstaller::stderrData, + this, &AbstractRemoteLinuxDeployService::stdErrData); + connect(packageInstaller(), &AbstractRemoteLinuxPackageInstaller::finished, + this, &AbstractUploadAndInstallPackageService::handleInstallationFinished); packageInstaller()->installPackage(deviceConfiguration(), remoteFilePath, true); } diff --git a/src/plugins/remotelinux/abstractuploadandinstallpackageservice.h b/src/plugins/remotelinux/abstractuploadandinstallpackageservice.h index d646323639..c08682c597 100644 --- a/src/plugins/remotelinux/abstractuploadandinstallpackageservice.h +++ b/src/plugins/remotelinux/abstractuploadandinstallpackageservice.h @@ -46,11 +46,10 @@ protected: QString packageFilePath() const; -private slots: +private: void handleUploadFinished(const QString &errorMsg); void handleInstallationFinished(const QString &errorMsg); -private: virtual AbstractRemoteLinuxPackageInstaller *packageInstaller() const = 0; virtual QString uploadDir() const; // Defaults to remote user's home directory. diff --git a/src/plugins/remotelinux/genericdirectuploadservice.cpp b/src/plugins/remotelinux/genericdirectuploadservice.cpp index bcfad71acf..e72e77e07b 100644 --- a/src/plugins/remotelinux/genericdirectuploadservice.cpp +++ b/src/plugins/remotelinux/genericdirectuploadservice.cpp @@ -120,9 +120,10 @@ void GenericDirectUploadService::doDeploy() QTC_ASSERT(d->state == Inactive, setFinished(); return); d->uploader = connection()->createSftpChannel(); - connect(d->uploader.data(), SIGNAL(initialized()), SLOT(handleSftpInitialized())); - connect(d->uploader.data(), SIGNAL(channelError(QString)), - SLOT(handleSftpChannelError(QString))); + connect(d->uploader.data(), &SftpChannel::initialized, + this, &GenericDirectUploadService::handleSftpInitialized); + connect(d->uploader.data(), &SftpChannel::channelError, + this, &GenericDirectUploadService::handleSftpChannelError); d->uploader->initialize(); d->state = InitializingSftp; } @@ -138,8 +139,8 @@ void GenericDirectUploadService::handleSftpInitialized() } Q_ASSERT(!d->filesToUpload.isEmpty()); - connect(d->uploader.data(), SIGNAL(finished(QSsh::SftpJobId,QString)), - SLOT(handleUploadFinished(QSsh::SftpJobId,QString))); + connect(d->uploader.data(), &SftpChannel::finished, + this, &GenericDirectUploadService::handleUploadFinished); d->state = Uploading; uploadNextFile(); } @@ -184,11 +185,12 @@ void GenericDirectUploadService::handleUploadFinished(SftpJobId jobId, const QSt const QString command = QLatin1String("chmod a+x ") + Utils::QtcProcess::quoteArgUnix(df.remoteFilePath()); d->chmodProc = connection()->createRemoteProcess(command.toUtf8()); - connect(d->chmodProc.data(), SIGNAL(closed(int)), SLOT(handleChmodFinished(int))); - connect(d->chmodProc.data(), SIGNAL(readyReadStandardOutput()), - SLOT(handleStdOutData())); - connect(d->chmodProc.data(), SIGNAL(readyReadStandardError()), - SLOT(handleStdErrData())); + connect(d->chmodProc.data(), &SshRemoteProcess::closed, + this, &GenericDirectUploadService::handleChmodFinished); + connect(d->chmodProc.data(), &SshRemoteProcess::readyReadStandardOutput, + this, &GenericDirectUploadService::handleStdOutData); + connect(d->chmodProc.data(), &SshRemoteProcess::readyReadStandardError, + this, &GenericDirectUploadService::handleStdErrData); d->chmodProc->start(); } else { uploadNextFile(); @@ -267,9 +269,12 @@ void GenericDirectUploadService::handleMkdirFinished(int exitStatus) // See comment in SftpChannel::createLink as to why we can't use it. d->lnProc = connection()->createRemoteProcess(command.toUtf8()); - connect(d->lnProc.data(), SIGNAL(closed(int)), SLOT(handleLnFinished(int))); - connect(d->lnProc.data(), SIGNAL(readyReadStandardOutput()), SLOT(handleStdOutData())); - connect(d->lnProc.data(), SIGNAL(readyReadStandardError()), SLOT(handleStdErrData())); + connect(d->lnProc.data(), &SshRemoteProcess::closed, + this, &GenericDirectUploadService::handleLnFinished); + connect(d->lnProc.data(), &SshRemoteProcess::readyReadStandardOutput, + this, &GenericDirectUploadService::handleStdOutData); + connect(d->lnProc.data(), &SshRemoteProcess::readyReadStandardError, + this, &GenericDirectUploadService::handleStdErrData); d->lnProc->start(); } else { const SftpJobId job = d->uploader->uploadFile(df.localFilePath().toString(), @@ -372,9 +377,12 @@ void GenericDirectUploadService::uploadNextFile() const QString command = QLatin1String("mkdir -p ") + Utils::QtcProcess::quoteArgUnix(dirToCreate); d->mkdirProc = connection()->createRemoteProcess(command.toUtf8()); - connect(d->mkdirProc.data(), SIGNAL(closed(int)), SLOT(handleMkdirFinished(int))); - connect(d->mkdirProc.data(), SIGNAL(readyReadStandardOutput()), SLOT(handleStdOutData())); - connect(d->mkdirProc.data(), SIGNAL(readyReadStandardError()), SLOT(handleStdErrData())); + connect(d->mkdirProc.data(), &SshRemoteProcess::closed, + this, &GenericDirectUploadService::handleMkdirFinished); + connect(d->mkdirProc.data(), &SshRemoteProcess::readyReadStandardOutput, + this, &GenericDirectUploadService::handleStdOutData); + connect(d->mkdirProc.data(), &SshRemoteProcess::readyReadStandardError, + this, &GenericDirectUploadService::handleStdErrData); emit progressMessage(tr("Uploading file \"%1\"...") .arg(df.localFilePath().toUserOutput())); d->mkdirProc->start(); diff --git a/src/plugins/remotelinux/genericdirectuploadservice.h b/src/plugins/remotelinux/genericdirectuploadservice.h index a015bc6500..e10f8a0b56 100644 --- a/src/plugins/remotelinux/genericdirectuploadservice.h +++ b/src/plugins/remotelinux/genericdirectuploadservice.h @@ -59,7 +59,7 @@ public: void doDeploy(); void stopDeployment(); -private slots: +private: void handleSftpInitialized(); void handleSftpChannelError(const QString &errorMessage); void handleUploadFinished(QSsh::SftpJobId jobId, const QString &errorMsg); @@ -69,7 +69,6 @@ private slots: void handleStdOutData(); void handleStdErrData(); -private: void checkDeploymentNeeded(const ProjectExplorer::DeployableFile &file) const; void setFinished(); void uploadNextFile(); diff --git a/src/plugins/remotelinux/genericdirectuploadstep.cpp b/src/plugins/remotelinux/genericdirectuploadstep.cpp index 22de9684f2..b0890c6ba6 100644 --- a/src/plugins/remotelinux/genericdirectuploadstep.cpp +++ b/src/plugins/remotelinux/genericdirectuploadstep.cpp @@ -55,21 +55,21 @@ public: mainLayout->addWidget(&m_ignoreMissingFilesCheckBox); m_incrementalCheckBox.setChecked(step->incrementalDeployment()); m_ignoreMissingFilesCheckBox.setChecked(step->ignoreMissingFiles()); - connect(&m_incrementalCheckBox, SIGNAL(toggled(bool)), - SLOT(handleIncrementalChanged(bool))); - connect(&m_ignoreMissingFilesCheckBox, SIGNAL(toggled(bool)), - SLOT(handleIgnoreMissingFilesChanged(bool))); + connect(&m_incrementalCheckBox, &QAbstractButton::toggled, + this, &ConfigWidget::handleIncrementalChanged); + connect(&m_ignoreMissingFilesCheckBox, &QAbstractButton::toggled, + this, &ConfigWidget::handleIgnoreMissingFilesChanged); } bool showWidget() const { return true; } private: - Q_SLOT void handleIncrementalChanged(bool incremental) { + void handleIncrementalChanged(bool incremental) { GenericDirectUploadStep *step = qobject_cast<GenericDirectUploadStep *>(this->step()); step->setIncrementalDeployment(incremental); } - Q_SLOT void handleIgnoreMissingFilesChanged(bool ignoreMissingFiles) { + void handleIgnoreMissingFilesChanged(bool ignoreMissingFiles) { GenericDirectUploadStep *step = qobject_cast<GenericDirectUploadStep *>(this->step()); step->setIgnoreMissingFiles(ignoreMissingFiles); } diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp index 11bf23b4c4..6b7d9d5065 100644 --- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp +++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp @@ -44,23 +44,38 @@ GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget( m_ui(new Ui::GenericLinuxDeviceConfigurationWidget) { m_ui->setupUi(this); - connect(m_ui->hostLineEdit, SIGNAL(editingFinished()), this, SLOT(hostNameEditingFinished())); - connect(m_ui->userLineEdit, SIGNAL(editingFinished()), this, SLOT(userNameEditingFinished())); - connect(m_ui->pwdLineEdit, SIGNAL(editingFinished()), this, SLOT(passwordEditingFinished())); - connect(m_ui->passwordButton, SIGNAL(toggled(bool)), this, SLOT(authenticationTypeChanged())); - connect(m_ui->keyFileLineEdit, SIGNAL(editingFinished()), this, SLOT(keyFileEditingFinished())); - connect(m_ui->keyFileLineEdit, SIGNAL(browsingFinished()), this, SLOT(keyFileEditingFinished())); - connect(m_ui->keyButton, SIGNAL(toggled(bool)), this, SLOT(authenticationTypeChanged())); - connect(m_ui->timeoutSpinBox, SIGNAL(editingFinished()), this, SLOT(timeoutEditingFinished())); - connect(m_ui->timeoutSpinBox, SIGNAL(valueChanged(int)), this, SLOT(timeoutEditingFinished())); - connect(m_ui->sshPortSpinBox, SIGNAL(editingFinished()), this, SLOT(sshPortEditingFinished())); - connect(m_ui->sshPortSpinBox, SIGNAL(valueChanged(int)), this, SLOT(sshPortEditingFinished())); - connect(m_ui->showPasswordCheckBox, SIGNAL(toggled(bool)), this, SLOT(showPassword(bool))); - connect(m_ui->portsLineEdit, SIGNAL(editingFinished()), this, SLOT(handleFreePortsChanged())); - connect(m_ui->createKeyButton, SIGNAL(clicked()), SLOT(createNewKey())); - connect(m_ui->gdbServerLineEdit, SIGNAL(editingFinished()), SLOT(gdbServerEditingFinished())); - connect(m_ui->hostKeyCheckBox, &QCheckBox::toggled, this, - &GenericLinuxDeviceConfigurationWidget::hostKeyCheckingChanged); + connect(m_ui->hostLineEdit, &QLineEdit::editingFinished, + this, &GenericLinuxDeviceConfigurationWidget::hostNameEditingFinished); + connect(m_ui->userLineEdit, &QLineEdit::editingFinished, + this, &GenericLinuxDeviceConfigurationWidget::userNameEditingFinished); + connect(m_ui->pwdLineEdit, &QLineEdit::editingFinished, + this, &GenericLinuxDeviceConfigurationWidget::passwordEditingFinished); + connect(m_ui->passwordButton, &QAbstractButton::toggled, + this, &GenericLinuxDeviceConfigurationWidget::authenticationTypeChanged); + connect(m_ui->keyFileLineEdit, &PathChooser::editingFinished, + this, &GenericLinuxDeviceConfigurationWidget::keyFileEditingFinished); + connect(m_ui->keyFileLineEdit, &PathChooser::browsingFinished, + this, &GenericLinuxDeviceConfigurationWidget::keyFileEditingFinished); + connect(m_ui->keyButton, &QAbstractButton::toggled, + this, &GenericLinuxDeviceConfigurationWidget::authenticationTypeChanged); + connect(m_ui->timeoutSpinBox, &QAbstractSpinBox::editingFinished, + this, &GenericLinuxDeviceConfigurationWidget::timeoutEditingFinished); + connect(m_ui->timeoutSpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), + this, &GenericLinuxDeviceConfigurationWidget::timeoutEditingFinished); + connect(m_ui->sshPortSpinBox, &QAbstractSpinBox::editingFinished, + this, &GenericLinuxDeviceConfigurationWidget::sshPortEditingFinished); + connect(m_ui->sshPortSpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), + this, &GenericLinuxDeviceConfigurationWidget::sshPortEditingFinished); + connect(m_ui->showPasswordCheckBox, &QAbstractButton::toggled, + this, &GenericLinuxDeviceConfigurationWidget::showPassword); + connect(m_ui->portsLineEdit, &QLineEdit::editingFinished, + this, &GenericLinuxDeviceConfigurationWidget::handleFreePortsChanged); + connect(m_ui->createKeyButton, &QAbstractButton::clicked, + this, &GenericLinuxDeviceConfigurationWidget::createNewKey); + connect(m_ui->gdbServerLineEdit, &QLineEdit::editingFinished, + this, &GenericLinuxDeviceConfigurationWidget::gdbServerEditingFinished); + connect(m_ui->hostKeyCheckBox, &QCheckBox::toggled, + this, &GenericLinuxDeviceConfigurationWidget::hostKeyCheckingChanged); initGui(); } diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.h b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.h index 5017439cfe..3b9b46dca7 100644 --- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.h +++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.h @@ -43,7 +43,7 @@ public: const ProjectExplorer::IDevice::Ptr &deviceConfig, QWidget *parent = 0); ~GenericLinuxDeviceConfigurationWidget(); -private slots: +private: void authenticationTypeChanged(); void hostNameEditingFinished(); void sshPortEditingFinished(); @@ -58,7 +58,6 @@ private slots: void createNewKey(); void hostKeyCheckingChanged(bool doCheck); -private: void updateDeviceFromUi(); void updatePortsWarningLabel(); void initGui(); diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.ui b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.ui index 3074e469da..75e81d285d 100644 --- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.ui +++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.ui @@ -292,10 +292,6 @@ <extends>QWidget</extends> <header location="global">utils/pathchooser.h</header> <container>1</container> - <slots> - <signal>editingFinished()</signal> - <signal>browsingFinished()</signal> - </slots> </customwidget> </customwidgets> <resources/> diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp index 5c0f6234fe..c9fe3be665 100644 --- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp +++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.cpp @@ -57,11 +57,13 @@ GenericLinuxDeviceConfigurationWizardSetupPage::GenericLinuxDeviceConfigurationW d->ui.privateKeyPathChooser->setExpectedKind(PathChooser::File); d->ui.privateKeyPathChooser->setHistoryCompleter(QLatin1String("Ssh.KeyFile.History")); d->ui.privateKeyPathChooser->setPromptDialogTitle(tr("Choose a Private Key File")); - connect(d->ui.nameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(completeChanged())); - connect(d->ui.hostNameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(completeChanged())); - connect(d->ui.userNameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(completeChanged())); - connect(d->ui.privateKeyPathChooser, SIGNAL(validChanged(bool)), SIGNAL(completeChanged())); - connect(d->ui.passwordButton, SIGNAL(toggled(bool)), SLOT(handleAuthTypeChanged())); + connect(d->ui.nameLineEdit, &QLineEdit::textChanged, this, &QWizardPage::completeChanged); + connect(d->ui.hostNameLineEdit, &QLineEdit::textChanged, this, &QWizardPage::completeChanged); + connect(d->ui.userNameLineEdit, &QLineEdit::textChanged, this, &QWizardPage::completeChanged); + connect(d->ui.privateKeyPathChooser, &PathChooser::validChanged, + this, &QWizardPage::completeChanged); + connect(d->ui.passwordButton, &QAbstractButton::toggled, + this, &GenericLinuxDeviceConfigurationWizardSetupPage::handleAuthTypeChanged); } GenericLinuxDeviceConfigurationWizardSetupPage::~GenericLinuxDeviceConfigurationWizardSetupPage() diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.h b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.h index 88e5ea315e..b3d12aa897 100644 --- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.h +++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardpages.h @@ -61,7 +61,7 @@ public: virtual QString defaultPassWord() const; private: - Q_SLOT void handleAuthTypeChanged(); + void handleAuthTypeChanged(); Internal::GenericLinuxDeviceConfigurationWizardSetupPagePrivate * const d; }; diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardsetuppage.ui b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardsetuppage.ui index 4b0efcef56..6a1e8de8af 100644 --- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardsetuppage.ui +++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizardsetuppage.ui @@ -186,10 +186,6 @@ <extends>QWidget</extends> <header location="global">utils/pathchooser.h</header> <container>1</container> - <slots> - <signal>editingFinished()</signal> - <signal>browsingFinished()</signal> - </slots> </customwidget> </customwidgets> <resources/> diff --git a/src/plugins/remotelinux/linuxdevicetester.cpp b/src/plugins/remotelinux/linuxdevicetester.cpp index 56e2e290dc..cbb84a442b 100644 --- a/src/plugins/remotelinux/linuxdevicetester.cpp +++ b/src/plugins/remotelinux/linuxdevicetester.cpp @@ -115,7 +115,8 @@ void GenericLinuxDeviceTester::handleConnected() QTC_ASSERT(d->state == Connecting, return); d->process = d->connection->createRemoteProcess("uname -rsm"); - connect(d->process.data(), SIGNAL(closed(int)), SLOT(handleProcessFinished(int))); + connect(d->process.data(), &SshRemoteProcess::closed, + this, &GenericLinuxDeviceTester::handleProcessFinished); emit progressMessage(tr("Checking kernel version...")); d->state = RunningUname; diff --git a/src/plugins/remotelinux/linuxdevicetester.h b/src/plugins/remotelinux/linuxdevicetester.h index e06e4d5448..8c658bf150 100644 --- a/src/plugins/remotelinux/linuxdevicetester.h +++ b/src/plugins/remotelinux/linuxdevicetester.h @@ -50,14 +50,13 @@ public: ProjectExplorer::DeviceUsedPortsGatherer *usedPortsGatherer() const; -private slots: +private: void handleConnected(); void handleConnectionFailure(); void handleProcessFinished(int exitStatus); void handlePortsGatheringError(const QString &message); void handlePortListReady(); -private: void setFinished(ProjectExplorer::DeviceTester::TestResult result); Internal::GenericLinuxDeviceTesterPrivate * const d; diff --git a/src/plugins/remotelinux/packageuploader.cpp b/src/plugins/remotelinux/packageuploader.cpp index 53d21dd6bf..5543d5fd08 100644 --- a/src/plugins/remotelinux/packageuploader.cpp +++ b/src/plugins/remotelinux/packageuploader.cpp @@ -57,12 +57,12 @@ void PackageUploader::uploadPackage(SshConnection *connection, connect(m_connection, &SshConnection::error, this, &PackageUploader::handleConnectionFailure); m_uploader = m_connection->createSftpChannel(); - connect(m_uploader.data(), SIGNAL(initialized()), this, - SLOT(handleSftpChannelInitialized())); - connect(m_uploader.data(), SIGNAL(channelError(QString)), this, - SLOT(handleSftpChannelError(QString))); - connect(m_uploader.data(), SIGNAL(finished(QSsh::SftpJobId,QString)), - this, SLOT(handleSftpJobFinished(QSsh::SftpJobId,QString))); + connect(m_uploader.data(), &SftpChannel::initialized, + this, &PackageUploader::handleSftpChannelInitialized); + connect(m_uploader.data(), &SftpChannel::channelError, + this, &PackageUploader::handleSftpChannelError); + connect(m_uploader.data(), &SftpChannel::finished, + this, &PackageUploader::handleSftpJobFinished); m_uploader->initialize(); } diff --git a/src/plugins/remotelinux/packageuploader.h b/src/plugins/remotelinux/packageuploader.h index dce0d864ba..2314d6ac51 100644 --- a/src/plugins/remotelinux/packageuploader.h +++ b/src/plugins/remotelinux/packageuploader.h @@ -55,15 +55,13 @@ signals: void progress(const QString &message); void uploadFinished(const QString &errorMsg = QString()); -private slots: +private: + enum State { InitializingSftp, Uploading, Inactive }; + void handleConnectionFailure(); void handleSftpChannelInitialized(); void handleSftpChannelError(const QString &error); void handleSftpJobFinished(QSsh::SftpJobId job, const QString &error); - -private: - enum State { InitializingSftp, Uploading, Inactive }; - void cleanup(); void setState(State newState); diff --git a/src/plugins/remotelinux/publickeydeploymentdialog.h b/src/plugins/remotelinux/publickeydeploymentdialog.h index 94e5c4b3f4..16ffa82364 100644 --- a/src/plugins/remotelinux/publickeydeploymentdialog.h +++ b/src/plugins/remotelinux/publickeydeploymentdialog.h @@ -44,15 +44,13 @@ public: ~PublicKeyDeploymentDialog(); -private slots: - void handleDeploymentError(const QString &errorMsg); - void handleDeploymentSuccess(); - void handleCanceled(); - private: explicit PublicKeyDeploymentDialog(const ProjectExplorer::IDevice::ConstPtr &deviceConfig, const QString &publicKeyFileName, QWidget *parent = 0); void handleDeploymentFinished(const QString &errorMsg); + void handleDeploymentError(const QString &errorMsg); + void handleDeploymentSuccess(); + void handleCanceled(); Internal::PublicKeyDeploymentDialogPrivate * const d; }; diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.h b/src/plugins/remotelinux/remotelinuxanalyzesupport.h index ca93bcdda5..27ab0ff436 100644 --- a/src/plugins/remotelinux/remotelinuxanalyzesupport.h +++ b/src/plugins/remotelinux/remotelinuxanalyzesupport.h @@ -50,7 +50,7 @@ protected: void startExecution(); void handleAdapterSetupFailed(const QString &error); -private slots: +private: void handleRemoteSetupRequested(); void handleAppRunnerError(const QString &error); void handleRemoteOutput(const QByteArray &output); @@ -63,7 +63,6 @@ private slots: void remoteIsRunning(); -private: void showMessage(const QString &, Utils::OutputFormat); Internal::RemoteLinuxAnalyzeSupportPrivate * const d; diff --git a/src/plugins/remotelinux/remotelinuxcheckforfreediskspaceservice.h b/src/plugins/remotelinux/remotelinuxcheckforfreediskspaceservice.h index 945cf564e5..461bf23676 100644 --- a/src/plugins/remotelinux/remotelinuxcheckforfreediskspaceservice.h +++ b/src/plugins/remotelinux/remotelinuxcheckforfreediskspaceservice.h @@ -40,11 +40,10 @@ public: void setPathToCheck(const QString &path); void setRequiredSpaceInBytes(quint64 sizeInBytes); -private slots: +private: void handleStdErr(); void handleProcessFinished(); -private: bool isDeploymentNecessary() const { return true; } void doDeviceSetup() { handleDeviceSetupDone(true); } void stopDeviceSetup() { handleDeviceSetupDone(false); } diff --git a/src/plugins/remotelinux/remotelinuxcheckforfreediskspacestep.cpp b/src/plugins/remotelinux/remotelinuxcheckforfreediskspacestep.cpp index b0f7ba1dce..fa2e323987 100644 --- a/src/plugins/remotelinux/remotelinuxcheckforfreediskspacestep.cpp +++ b/src/plugins/remotelinux/remotelinuxcheckforfreediskspacestep.cpp @@ -53,14 +53,16 @@ public: m_ui.pathLineEdit->setText(m_step.pathToCheck()); m_ui.requiredSpaceSpinBox->setValue(m_step.requiredSpaceInBytes()/multiplier); - connect(m_ui.pathLineEdit, SIGNAL(textChanged(QString)), SLOT(handlePathChanged())); - connect(m_ui.requiredSpaceSpinBox, SIGNAL(valueChanged(int)), - SLOT(handleRequiredSpaceChanged())); + connect(m_ui.pathLineEdit, &QLineEdit::textChanged, + this, &RemoteLinuxCheckForFreeDiskSpaceStepWidget::handlePathChanged); + connect(m_ui.requiredSpaceSpinBox, + static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), + this, &RemoteLinuxCheckForFreeDiskSpaceStepWidget::handleRequiredSpaceChanged); } private: - Q_SLOT void handlePathChanged() { m_step.setPathToCheck(m_ui.pathLineEdit->text().trimmed()); } - Q_SLOT void handleRequiredSpaceChanged() { + void handlePathChanged() { m_step.setPathToCheck(m_ui.pathLineEdit->text().trimmed()); } + void handleRequiredSpaceChanged() { m_step.setRequiredSpaceInBytes(quint64(m_ui.requiredSpaceSpinBox->value())*multiplier); } diff --git a/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.cpp b/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.cpp index 689bf1e8d1..3e269831b4 100644 --- a/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.cpp +++ b/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.cpp @@ -55,13 +55,14 @@ public: m_commandLineEdit.setText(step->commandLine()); commandLineLayout->addWidget(&m_commandLineEdit); - connect(&m_commandLineEdit, SIGNAL(textEdited(QString)), SLOT(handleCommandLineEdited())); + connect(&m_commandLineEdit, &QLineEdit::textEdited, + this, &ConfigWidget::handleCommandLineEdited); } bool showWidget() const { return true; } private: - Q_SLOT void handleCommandLineEdited() { + void handleCommandLineEdited() { AbstractRemoteLinuxCustomCommandDeploymentStep *step = qobject_cast<AbstractRemoteLinuxCustomCommandDeploymentStep *>(this->step()); step->setCommandLine(m_commandLineEdit.text().trimmed()); diff --git a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp index 165b072784..6822db222c 100644 --- a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp +++ b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.cpp @@ -89,9 +89,12 @@ void RemoteLinuxCustomCommandDeployService::doDeploy() if (!d->runner) d->runner = new SshRemoteProcessRunner(this); - connect(d->runner, SIGNAL(readyReadStandardOutput()), SLOT(handleStdout())); - connect(d->runner, SIGNAL(readyReadStandardError()), SLOT(handleStderr())); - connect(d->runner, SIGNAL(processClosed(int)), SLOT(handleProcessClosed(int))); + connect(d->runner, &SshRemoteProcessRunner::readyReadStandardOutput, + this, &RemoteLinuxCustomCommandDeployService::handleStdout); + connect(d->runner, &SshRemoteProcessRunner::readyReadStandardError, + this, &RemoteLinuxCustomCommandDeployService::handleStderr); + connect(d->runner, &SshRemoteProcessRunner::processClosed, + this, &RemoteLinuxCustomCommandDeployService::handleProcessClosed); emit progressMessage(tr("Starting remote command \"%1\"...").arg(d->commandLine)); d->state = Running; diff --git a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.h b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.h index ddb84698d9..0adb1943ec 100644 --- a/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.h +++ b/src/plugins/remotelinux/remotelinuxcustomcommanddeployservice.h @@ -49,12 +49,11 @@ protected: void doDeploy(); void stopDeployment(); -private slots: +private: void handleStdout(); void handleStderr(); void handleProcessClosed(int exitStatus); -private: Internal::RemoteLinuxCustomCommandDeployservicePrivate *d; }; diff --git a/src/plugins/remotelinux/remotelinuxcustomrunconfigurationwidget.ui b/src/plugins/remotelinux/remotelinuxcustomrunconfigurationwidget.ui index 16480f8041..76975ec9e7 100644 --- a/src/plugins/remotelinux/remotelinuxcustomrunconfigurationwidget.ui +++ b/src/plugins/remotelinux/remotelinuxcustomrunconfigurationwidget.ui @@ -62,10 +62,6 @@ <extends>QWidget</extends> <header location="global">utils/pathchooser.h</header> <container>1</container> - <slots> - <signal>editingFinished()</signal> - <signal>browsingFinished()</signal> - </slots> </customwidget> </customwidgets> <resources/> diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.h b/src/plugins/remotelinux/remotelinuxdebugsupport.h index a9f03f42de..43240e96f1 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.h +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.h @@ -47,7 +47,7 @@ protected: void handleAdapterSetupFailed(const QString &error); void handleAdapterSetupDone(); -private slots: +private: void handleRemoteSetupRequested(); void handleAppRunnerError(const QString &error); void handleRemoteOutput(const QByteArray &output); @@ -58,7 +58,6 @@ private slots: void handleRemoteProcessStarted(); void handleDebuggingFinished(); -private: void showMessage(const QString &msg, int channel); Internal::LinuxDeviceDebugSupportPrivate * const d; diff --git a/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.h b/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.h index 92bfe29628..77ea62166c 100644 --- a/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.h +++ b/src/plugins/remotelinux/remotelinuxenvironmentaspectwidget.h @@ -45,13 +45,12 @@ public: RemoteLinuxEnvironmentAspect *aspect() const; QPushButton *fetchButton() const; -private slots: +private: void fetchEnvironment(); void fetchEnvironmentFinished(); void fetchEnvironmentError(const QString &error); void stopFetchEnvironment(); -private: Internal::RemoteLinuxEnvironmentReader *deviceEnvReader; }; diff --git a/src/plugins/remotelinux/remotelinuxpackageinstaller.h b/src/plugins/remotelinux/remotelinuxpackageinstaller.h index aa4a836df1..dacdf5b5ef 100644 --- a/src/plugins/remotelinux/remotelinuxpackageinstaller.h +++ b/src/plugins/remotelinux/remotelinuxpackageinstaller.h @@ -52,13 +52,12 @@ signals: protected: explicit AbstractRemoteLinuxPackageInstaller(QObject *parent = 0); -private slots: +private: void handleConnectionError(); void handleInstallationFinished(int exitStatus); void handleInstallerOutput(); void handleInstallerErrorOutput(); -private: virtual QString installCommandLine(const QString &packageFilePath) const = 0; virtual QString cancelInstallationCommandLine() const = 0; diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp index 44f710ec50..0729a999c2 100644 --- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp +++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp @@ -106,10 +106,13 @@ void RemoteLinuxRunConfiguration::init() addExtraAspect(new RemoteLinuxEnvironmentAspect(this)); - connect(target(), SIGNAL(deploymentDataChanged()), SLOT(handleBuildSystemDataUpdated())); - connect(target(), SIGNAL(applicationTargetsChanged()), SLOT(handleBuildSystemDataUpdated())); - connect(target(), SIGNAL(kitChanged()), - this, SLOT(handleBuildSystemDataUpdated())); // Handles device changes, etc. + connect(target(), &Target::deploymentDataChanged, + this, &RemoteLinuxRunConfiguration::handleBuildSystemDataUpdated); + connect(target(), &Target::applicationTargetsChanged, + this, &RemoteLinuxRunConfiguration::handleBuildSystemDataUpdated); + // Handles device changes, etc. + connect(target(), &Target::kitChanged, + this, &RemoteLinuxRunConfiguration::handleBuildSystemDataUpdated); } bool RemoteLinuxRunConfiguration::isEnabled() const diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.h b/src/plugins/remotelinux/remotelinuxrunconfiguration.h index ab23002b8f..1b527cd012 100644 --- a/src/plugins/remotelinux/remotelinuxrunconfiguration.h +++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.h @@ -89,13 +89,11 @@ protected: bool fromMap(const QVariantMap &map) override; QString defaultDisplayName(); -protected slots: +protected: void updateEnabledState() { emit enabledChanged(); } -private slots: - void handleBuildSystemDataUpdated(); - private: + void handleBuildSystemDataUpdated(); void init(); Internal::RemoteLinuxRunConfigurationPrivate * const d; diff --git a/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.h b/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.h index 18ae8ef2b3..a25d74220a 100644 --- a/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.h +++ b/src/plugins/remotelinux/remotelinuxrunconfigurationwidget.h @@ -50,9 +50,9 @@ public: void addFormLayoutRow(QWidget *label, QWidget *field); void addDisabledLabel(QVBoxLayout *topLayout); - Q_SLOT void runConfigurationEnabledChange(); + void runConfigurationEnabledChange(); -private slots: +private: void argumentsEdited(const QString &args); void updateTargetInformation(); void handleDeploySpecsChanged(); @@ -60,7 +60,6 @@ private slots: void handleAlternateCommandChanged(); void handleWorkingDirectoryChanged(); -private: void addGenericWidgets(QVBoxLayout *mainLayout); void setLabelText(QLabel &label, const QString ®ularText, const QString &errorText); diff --git a/src/plugins/remotelinux/remotelinuxruncontrol.h b/src/plugins/remotelinux/remotelinuxruncontrol.h index b8b680b628..fd98845627 100644 --- a/src/plugins/remotelinux/remotelinuxruncontrol.h +++ b/src/plugins/remotelinux/remotelinuxruncontrol.h @@ -42,14 +42,12 @@ public: virtual StopResult stop() override; virtual bool isRunning() const override; -private slots: +private: void handleErrorMessage(const QString &error); void handleRunnerFinished(); void handleRemoteOutput(const QByteArray &output); void handleRemoteErrorOutput(const QByteArray &output); void handleProgressReport(const QString &progressString); - -private: void setFinished(); class RemoteLinuxRunControlPrivate; diff --git a/src/plugins/remotelinux/sshkeydeployer.h b/src/plugins/remotelinux/sshkeydeployer.h index 8da128006a..ebd8214fa1 100644 --- a/src/plugins/remotelinux/sshkeydeployer.h +++ b/src/plugins/remotelinux/sshkeydeployer.h @@ -50,11 +50,9 @@ signals: void error(const QString &errorMsg); void finishedSuccessfully(); -private slots: +private: void handleConnectionFailure(); void handleKeyUploadFinished(int exitStatus); - -private: void cleanup(); Internal::SshKeyDeployerPrivate * const d; diff --git a/src/plugins/remotelinux/tarpackagecreationstep.cpp b/src/plugins/remotelinux/tarpackagecreationstep.cpp index 560971cc8a..bbaf6c1c9b 100644 --- a/src/plugins/remotelinux/tarpackagecreationstep.cpp +++ b/src/plugins/remotelinux/tarpackagecreationstep.cpp @@ -56,10 +56,11 @@ public: mainLayout->setMargin(0); mainLayout->addWidget(&m_ignoreMissingFilesCheckBox); m_ignoreMissingFilesCheckBox.setChecked(step->ignoreMissingFiles()); - connect(&m_ignoreMissingFilesCheckBox, SIGNAL(toggled(bool)), - SLOT(handleIgnoreMissingFilesChanged(bool))); + connect(&m_ignoreMissingFilesCheckBox, &QAbstractButton::toggled, + this, &CreateTarStepWidget::handleIgnoreMissingFilesChanged); - connect(step, SIGNAL(packageFilePathChanged()), SIGNAL(updateSummary())); + connect(step, &AbstractPackagingStep::packageFilePathChanged, + this, &BuildStepConfigWidget::updateSummary); } QString summaryText() const @@ -76,7 +77,7 @@ public: bool showWidget() const { return true; } private: - Q_SLOT void handleIgnoreMissingFilesChanged(bool ignoreMissingFiles) { + void handleIgnoreMissingFilesChanged(bool ignoreMissingFiles) { TarPackageCreationStep *step = qobject_cast<TarPackageCreationStep *>(this->step()); step->setIgnoreMissingFiles(ignoreMissingFiles); } |