Commit e3b1c9b9 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

RemoteLinux: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: I1a03435bbb4281bad4ff64baba0182e0050170d6
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent 802edc9d
...@@ -62,12 +62,11 @@ protected: ...@@ -62,12 +62,11 @@ protected:
virtual bool isPackagingNeeded() const; virtual bool isPackagingNeeded() const;
private slots: private:
void handleBuildConfigurationChanged(); void handleBuildConfigurationChanged();
void setDeploymentDataUnmodified(); void setDeploymentDataUnmodified();
void setDeploymentDataModified(); void setDeploymentDataModified();
private:
virtual QString packageFileName() const = 0; virtual QString packageFileName() const = 0;
void ctor(); void ctor();
......
...@@ -82,11 +82,10 @@ protected: ...@@ -82,11 +82,10 @@ protected:
void handleDeviceSetupDone(bool success); void handleDeviceSetupDone(bool success);
void handleDeploymentDone(); void handleDeploymentDone();
private slots: private:
void handleConnected(); void handleConnected();
void handleConnectionFailure(); void handleConnectionFailure();
private:
virtual bool isDeploymentNecessary() const = 0; virtual bool isDeploymentNecessary() const = 0;
// Should do things needed *before* connecting. Call handleDeviceSetupDone() afterwards. // Should do things needed *before* connecting. Call handleDeviceSetupDone() afterwards.
......
...@@ -87,13 +87,18 @@ bool AbstractRemoteLinuxDeployStep::init(QList<const BuildStep *> &earlierSteps) ...@@ -87,13 +87,18 @@ bool AbstractRemoteLinuxDeployStep::init(QList<const BuildStep *> &earlierSteps)
void AbstractRemoteLinuxDeployStep::run(QFutureInterface<bool> &fi) void AbstractRemoteLinuxDeployStep::run(QFutureInterface<bool> &fi)
{ {
connect(deployService(), SIGNAL(errorMessage(QString)), SLOT(handleErrorMessage(QString))); connect(deployService(), &AbstractRemoteLinuxDeployService::errorMessage,
connect(deployService(), SIGNAL(progressMessage(QString)), this, &AbstractRemoteLinuxDeployStep::handleErrorMessage);
SLOT(handleProgressMessage(QString))); connect(deployService(), &AbstractRemoteLinuxDeployService::progressMessage,
connect(deployService(), SIGNAL(warningMessage(QString)), SLOT(handleWarningMessage(QString))); this, &AbstractRemoteLinuxDeployStep::handleProgressMessage);
connect(deployService(), SIGNAL(stdOutData(QString)), SLOT(handleStdOutData(QString))); connect(deployService(), &AbstractRemoteLinuxDeployService::warningMessage,
connect(deployService(), SIGNAL(stdErrData(QString)), SLOT(handleStdErrData(QString))); this, &AbstractRemoteLinuxDeployStep::handleWarningMessage);
connect(deployService(), SIGNAL(finished()), SLOT(handleFinished())); 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->hasError = false;
d->future = fi; d->future = fi;
......
...@@ -60,7 +60,7 @@ protected: ...@@ -60,7 +60,7 @@ protected:
AbstractRemoteLinuxDeployStep *other); AbstractRemoteLinuxDeployStep *other);
virtual bool initInternal(QString *error = 0) = 0; virtual bool initInternal(QString *error = 0) = 0;
private slots: private:
void handleProgressMessage(const QString &message); void handleProgressMessage(const QString &message);
void handleErrorMessage(const QString &message); void handleErrorMessage(const QString &message);
void handleWarningMessage(const QString &message); void handleWarningMessage(const QString &message);
...@@ -68,7 +68,6 @@ private slots: ...@@ -68,7 +68,6 @@ private slots:
void handleStdOutData(const QString &data); void handleStdOutData(const QString &data);
void handleStdErrData(const QString &data); void handleStdErrData(const QString &data);
private:
Internal::AbstractRemoteLinuxDeployStepPrivate *d; Internal::AbstractRemoteLinuxDeployStepPrivate *d;
}; };
......
...@@ -81,7 +81,7 @@ protected: ...@@ -81,7 +81,7 @@ protected:
void reset(); void reset();
protected slots: protected:
virtual void handleRemoteSetupRequested() = 0; virtual void handleRemoteSetupRequested() = 0;
virtual void handleAppRunnerError(const QString &error) = 0; virtual void handleAppRunnerError(const QString &error) = 0;
virtual void handleRemoteOutput(const QByteArray &output) = 0; virtual void handleRemoteOutput(const QByteArray &output) = 0;
...@@ -89,11 +89,10 @@ protected slots: ...@@ -89,11 +89,10 @@ protected slots:
virtual void handleAppRunnerFinished(bool success) = 0; virtual void handleAppRunnerFinished(bool success) = 0;
virtual void handleProgressReport(const QString &progressOutput) = 0; virtual void handleProgressReport(const QString &progressOutput) = 0;
private slots: private:
void handleResourcesError(const QString &message); void handleResourcesError(const QString &message);
void handleResourcesAvailable(); void handleResourcesAvailable();
private:
friend class Internal::AbstractRemoteLinuxRunSupportPrivate; friend class Internal::AbstractRemoteLinuxRunSupportPrivate;
Internal::AbstractRemoteLinuxRunSupportPrivate * const d; Internal::AbstractRemoteLinuxRunSupportPrivate * const d;
}; };
......
...@@ -150,10 +150,12 @@ void AbstractUploadAndInstallPackageService::handleUploadFinished(const QString ...@@ -150,10 +150,12 @@ void AbstractUploadAndInstallPackageService::handleUploadFinished(const QString
+ Utils::FileName::fromString(packageFilePath()).fileName(); + Utils::FileName::fromString(packageFilePath()).fileName();
d->state = Installing; d->state = Installing;
emit progressMessage(tr("Installing package to device...")); emit progressMessage(tr("Installing package to device..."));
connect(packageInstaller(), SIGNAL(stdoutData(QString)), SIGNAL(stdOutData(QString))); connect(packageInstaller(), &AbstractRemoteLinuxPackageInstaller::stdoutData,
connect(packageInstaller(), SIGNAL(stderrData(QString)), SIGNAL(stdErrData(QString))); this, &AbstractRemoteLinuxDeployService::stdOutData);
connect(packageInstaller(), SIGNAL(finished(QString)), connect(packageInstaller(), &AbstractRemoteLinuxPackageInstaller::stderrData,
SLOT(handleInstallationFinished(QString))); this, &AbstractRemoteLinuxDeployService::stdErrData);
connect(packageInstaller(), &AbstractRemoteLinuxPackageInstaller::finished,
this, &AbstractUploadAndInstallPackageService::handleInstallationFinished);
packageInstaller()->installPackage(deviceConfiguration(), remoteFilePath, true); packageInstaller()->installPackage(deviceConfiguration(), remoteFilePath, true);
} }
......
...@@ -46,11 +46,10 @@ protected: ...@@ -46,11 +46,10 @@ protected:
QString packageFilePath() const; QString packageFilePath() const;
private slots: private:
void handleUploadFinished(const QString &errorMsg); void handleUploadFinished(const QString &errorMsg);
void handleInstallationFinished(const QString &errorMsg); void handleInstallationFinished(const QString &errorMsg);
private:
virtual AbstractRemoteLinuxPackageInstaller *packageInstaller() const = 0; virtual AbstractRemoteLinuxPackageInstaller *packageInstaller() const = 0;
virtual QString uploadDir() const; // Defaults to remote user's home directory. virtual QString uploadDir() const; // Defaults to remote user's home directory.
......
...@@ -120,9 +120,10 @@ void GenericDirectUploadService::doDeploy() ...@@ -120,9 +120,10 @@ void GenericDirectUploadService::doDeploy()
QTC_ASSERT(d->state == Inactive, setFinished(); return); QTC_ASSERT(d->state == Inactive, setFinished(); return);
d->uploader = connection()->createSftpChannel(); d->uploader = connection()->createSftpChannel();
connect(d->uploader.data(), SIGNAL(initialized()), SLOT(handleSftpInitialized())); connect(d->uploader.data(), &SftpChannel::initialized,
connect(d->uploader.data(), SIGNAL(channelError(QString)), this, &GenericDirectUploadService::handleSftpInitialized);
SLOT(handleSftpChannelError(QString))); connect(d->uploader.data(), &SftpChannel::channelError,
this, &GenericDirectUploadService::handleSftpChannelError);
d->uploader->initialize(); d->uploader->initialize();
d->state = InitializingSftp; d->state = InitializingSftp;
} }
...@@ -138,8 +139,8 @@ void GenericDirectUploadService::handleSftpInitialized() ...@@ -138,8 +139,8 @@ void GenericDirectUploadService::handleSftpInitialized()
} }
Q_ASSERT(!d->filesToUpload.isEmpty()); Q_ASSERT(!d->filesToUpload.isEmpty());
connect(d->uploader.data(), SIGNAL(finished(QSsh::SftpJobId,QString)), connect(d->uploader.data(), &SftpChannel::finished,
SLOT(handleUploadFinished(QSsh::SftpJobId,QString))); this, &GenericDirectUploadService::handleUploadFinished);
d->state = Uploading; d->state = Uploading;
uploadNextFile(); uploadNextFile();
} }
...@@ -184,11 +185,12 @@ void GenericDirectUploadService::handleUploadFinished(SftpJobId jobId, const QSt ...@@ -184,11 +185,12 @@ void GenericDirectUploadService::handleUploadFinished(SftpJobId jobId, const QSt
const QString command = QLatin1String("chmod a+x ") const QString command = QLatin1String("chmod a+x ")
+ Utils::QtcProcess::quoteArgUnix(df.remoteFilePath()); + Utils::QtcProcess::quoteArgUnix(df.remoteFilePath());
d->chmodProc = connection()->createRemoteProcess(command.toUtf8()); d->chmodProc = connection()->createRemoteProcess(command.toUtf8());
connect(d->chmodProc.data(), SIGNAL(closed(int)), SLOT(handleChmodFinished(int))); connect(d->chmodProc.data(), &SshRemoteProcess::closed,
connect(d->chmodProc.data(), SIGNAL(readyReadStandardOutput()), this, &GenericDirectUploadService::handleChmodFinished);
SLOT(handleStdOutData())); connect(d->chmodProc.data(), &SshRemoteProcess::readyReadStandardOutput,
connect(d->chmodProc.data(), SIGNAL(readyReadStandardError()), this, &GenericDirectUploadService::handleStdOutData);
SLOT(handleStdErrData())); connect(d->chmodProc.data(), &SshRemoteProcess::readyReadStandardError,
this, &GenericDirectUploadService::handleStdErrData);
d->chmodProc->start(); d->chmodProc->start();
} else { } else {
uploadNextFile(); uploadNextFile();
...@@ -267,9 +269,12 @@ void GenericDirectUploadService::handleMkdirFinished(int exitStatus) ...@@ -267,9 +269,12 @@ void GenericDirectUploadService::handleMkdirFinished(int exitStatus)
// See comment in SftpChannel::createLink as to why we can't use it. // See comment in SftpChannel::createLink as to why we can't use it.
d->lnProc = connection()->createRemoteProcess(command.toUtf8()); d->lnProc = connection()->createRemoteProcess(command.toUtf8());
connect(d->lnProc.data(), SIGNAL(closed(int)), SLOT(handleLnFinished(int))); connect(d->lnProc.data(), &SshRemoteProcess::closed,
connect(d->lnProc.data(), SIGNAL(readyReadStandardOutput()), SLOT(handleStdOutData())); this, &GenericDirectUploadService::handleLnFinished);
connect(d->lnProc.data(), SIGNAL(readyReadStandardError()), SLOT(handleStdErrData())); connect(d->lnProc.data(), &SshRemoteProcess::readyReadStandardOutput,
this, &GenericDirectUploadService::handleStdOutData);
connect(d->lnProc.data(), &SshRemoteProcess::readyReadStandardError,
this, &GenericDirectUploadService::handleStdErrData);
d->lnProc->start(); d->lnProc->start();
} else { } else {
const SftpJobId job = d->uploader->uploadFile(df.localFilePath().toString(), const SftpJobId job = d->uploader->uploadFile(df.localFilePath().toString(),
...@@ -372,9 +377,12 @@ void GenericDirectUploadService::uploadNextFile() ...@@ -372,9 +377,12 @@ void GenericDirectUploadService::uploadNextFile()
const QString command = QLatin1String("mkdir -p ") const QString command = QLatin1String("mkdir -p ")
+ Utils::QtcProcess::quoteArgUnix(dirToCreate); + Utils::QtcProcess::quoteArgUnix(dirToCreate);
d->mkdirProc = connection()->createRemoteProcess(command.toUtf8()); d->mkdirProc = connection()->createRemoteProcess(command.toUtf8());
connect(d->mkdirProc.data(), SIGNAL(closed(int)), SLOT(handleMkdirFinished(int))); connect(d->mkdirProc.data(), &SshRemoteProcess::closed,
connect(d->mkdirProc.data(), SIGNAL(readyReadStandardOutput()), SLOT(handleStdOutData())); this, &GenericDirectUploadService::handleMkdirFinished);
connect(d->mkdirProc.data(), SIGNAL(readyReadStandardError()), SLOT(handleStdErrData())); connect(d->mkdirProc.data(), &SshRemoteProcess::readyReadStandardOutput,
this, &GenericDirectUploadService::handleStdOutData);
connect(d->mkdirProc.data(), &SshRemoteProcess::readyReadStandardError,
this, &GenericDirectUploadService::handleStdErrData);
emit progressMessage(tr("Uploading file \"%1\"...") emit progressMessage(tr("Uploading file \"%1\"...")
.arg(df.localFilePath().toUserOutput())); .arg(df.localFilePath().toUserOutput()));
d->mkdirProc->start(); d->mkdirProc->start();
......
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
void doDeploy(); void doDeploy();
void stopDeployment(); void stopDeployment();
private slots: private:
void handleSftpInitialized(); void handleSftpInitialized();
void handleSftpChannelError(const QString &errorMessage); void handleSftpChannelError(const QString &errorMessage);
void handleUploadFinished(QSsh::SftpJobId jobId, const QString &errorMsg); void handleUploadFinished(QSsh::SftpJobId jobId, const QString &errorMsg);
...@@ -69,7 +69,6 @@ private slots: ...@@ -69,7 +69,6 @@ private slots:
void handleStdOutData(); void handleStdOutData();
void handleStdErrData(); void handleStdErrData();
private:
void checkDeploymentNeeded(const ProjectExplorer::DeployableFile &file) const; void checkDeploymentNeeded(const ProjectExplorer::DeployableFile &file) const;
void setFinished(); void setFinished();
void uploadNextFile(); void uploadNextFile();
......
...@@ -55,21 +55,21 @@ public: ...@@ -55,21 +55,21 @@ public:
mainLayout->addWidget(&m_ignoreMissingFilesCheckBox); mainLayout->addWidget(&m_ignoreMissingFilesCheckBox);
m_incrementalCheckBox.setChecked(step->incrementalDeployment()); m_incrementalCheckBox.setChecked(step->incrementalDeployment());
m_ignoreMissingFilesCheckBox.setChecked(step->ignoreMissingFiles()); m_ignoreMissingFilesCheckBox.setChecked(step->ignoreMissingFiles());
connect(&m_incrementalCheckBox, SIGNAL(toggled(bool)), connect(&m_incrementalCheckBox, &QAbstractButton::toggled,
SLOT(handleIncrementalChanged(bool))); this, &ConfigWidget::handleIncrementalChanged);
connect(&m_ignoreMissingFilesCheckBox, SIGNAL(toggled(bool)), connect(&m_ignoreMissingFilesCheckBox, &QAbstractButton::toggled,
SLOT(handleIgnoreMissingFilesChanged(bool))); this, &ConfigWidget::handleIgnoreMissingFilesChanged);
} }
bool showWidget() const { return true; } bool showWidget() const { return true; }
private: private:
Q_SLOT void handleIncrementalChanged(bool incremental) { void handleIncrementalChanged(bool incremental) {
GenericDirectUploadStep *step = qobject_cast<GenericDirectUploadStep *>(this->step()); GenericDirectUploadStep *step = qobject_cast<GenericDirectUploadStep *>(this->step());
step->setIncrementalDeployment(incremental); step->setIncrementalDeployment(incremental);
} }
Q_SLOT void handleIgnoreMissingFilesChanged(bool ignoreMissingFiles) { void handleIgnoreMissingFilesChanged(bool ignoreMissingFiles) {
GenericDirectUploadStep *step = qobject_cast<GenericDirectUploadStep *>(this->step()); GenericDirectUploadStep *step = qobject_cast<GenericDirectUploadStep *>(this->step());
step->setIgnoreMissingFiles(ignoreMissingFiles); step->setIgnoreMissingFiles(ignoreMissingFiles);
} }
......
...@@ -44,23 +44,38 @@ GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget( ...@@ -44,23 +44,38 @@ GenericLinuxDeviceConfigurationWidget::GenericLinuxDeviceConfigurationWidget(
m_ui(new Ui::GenericLinuxDeviceConfigurationWidget) m_ui(new Ui::GenericLinuxDeviceConfigurationWidget)
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
connect(m_ui->hostLineEdit, SIGNAL(editingFinished()), this, SLOT(hostNameEditingFinished())); connect(m_ui->hostLineEdit, &QLineEdit::editingFinished,
connect(m_ui->userLineEdit, SIGNAL(editingFinished()), this, SLOT(userNameEditingFinished())); this, &GenericLinuxDeviceConfigurationWidget::hostNameEditingFinished);
connect(m_ui->pwdLineEdit, SIGNAL(editingFinished()), this, SLOT(passwordEditingFinished())); connect(m_ui->userLineEdit, &QLineEdit::editingFinished,
connect(m_ui->passwordButton, SIGNAL(toggled(bool)), this, SLOT(authenticationTypeChanged())); this, &GenericLinuxDeviceConfigurationWidget::userNameEditingFinished);
connect(m_ui->keyFileLineEdit, SIGNAL(editingFinished()), this, SLOT(keyFileEditingFinished())); connect(m_ui->pwdLineEdit, &QLineEdit::editingFinished,
connect(m_ui->keyFileLineEdit, SIGNAL(browsingFinished()), this, SLOT(keyFileEditingFinished())); this, &GenericLinuxDeviceConfigurationWidget::passwordEditingFinished);
connect(m_ui->keyButton, SIGNAL(toggled(bool)), this, SLOT(authenticationTypeChanged())); connect(m_ui->passwordButton, &QAbstractButton::toggled,
connect(m_ui->timeoutSpinBox, SIGNAL(editingFinished()), this, SLOT(timeoutEditingFinished())); this, &GenericLinuxDeviceConfigurationWidget::authenticationTypeChanged);
connect(m_ui->timeoutSpinBox, SIGNAL(valueChanged(int)), this, SLOT(timeoutEditingFinished())); connect(m_ui->keyFileLineEdit, &PathChooser::editingFinished,
connect(m_ui->sshPortSpinBox, SIGNAL(editingFinished()), this, SLOT(sshPortEditingFinished())); this, &GenericLinuxDeviceConfigurationWidget::keyFileEditingFinished);
connect(m_ui->sshPortSpinBox, SIGNAL(valueChanged(int)), this, SLOT(sshPortEditingFinished())); connect(m_ui->keyFileLineEdit, &PathChooser::browsingFinished,
connect(m_ui->showPasswordCheckBox, SIGNAL(toggled(bool)), this, SLOT(showPassword(bool))); this, &GenericLinuxDeviceConfigurationWidget::keyFileEditingFinished);
connect(m_ui->portsLineEdit, SIGNAL(editingFinished()), this, SLOT(handleFreePortsChanged())); connect(m_ui->keyButton, &QAbstractButton::toggled,
connect(m_ui->createKeyButton, SIGNAL(clicked()), SLOT(createNewKey())); this, &GenericLinuxDeviceConfigurationWidget::authenticationTypeChanged);
connect(m_ui->gdbServerLineEdit, SIGNAL(editingFinished()), SLOT(gdbServerEditingFinished())); connect(m_ui->timeoutSpinBox, &QAbstractSpinBox::editingFinished,
connect(m_ui->hostKeyCheckBox, &QCheckBox::toggled, this, this, &GenericLinuxDeviceConfigurationWidget::timeoutEditingFinished);
&GenericLinuxDeviceConfigurationWidget::hostKeyCheckingChanged); 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(); initGui();
} }
......
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
const ProjectExplorer::IDevice::Ptr &deviceConfig, QWidget *parent = 0); const ProjectExplorer::IDevice::Ptr &deviceConfig, QWidget *parent = 0);
~GenericLinuxDeviceConfigurationWidget(); ~GenericLinuxDeviceConfigurationWidget();
private slots: private:
void authenticationTypeChanged(); void authenticationTypeChanged();
void hostNameEditingFinished(); void hostNameEditingFinished();
void sshPortEditingFinished(); void sshPortEditingFinished();
...@@ -58,7 +58,6 @@ private slots: ...@@ -58,7 +58,6 @@ private slots:
void createNewKey(); void createNewKey();
void hostKeyCheckingChanged(bool doCheck); void hostKeyCheckingChanged(bool doCheck);
private:
void updateDeviceFromUi(); void updateDeviceFromUi();
void updatePortsWarningLabel(); void updatePortsWarningLabel();
void initGui(); void initGui();
......
...@@ -292,10 +292,6 @@ ...@@ -292,10 +292,6 @@
<extends>QWidget</extends> <extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header> <header location="global">utils/pathchooser.h</header>
<container>1</container> <container>1</container>
<slots>
<signal>editingFinished()</signal>
<signal>browsingFinished()</signal>
</slots>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
......
...@@ -57,11 +57,13 @@ GenericLinuxDeviceConfigurationWizardSetupPage::GenericLinuxDeviceConfigurationW ...@@ -57,11 +57,13 @@ GenericLinuxDeviceConfigurationWizardSetupPage::GenericLinuxDeviceConfigurationW
d->ui.privateKeyPathChooser->setExpectedKind(PathChooser::File); d->ui.privateKeyPathChooser->setExpectedKind(PathChooser::File);
d->ui.privateKeyPathChooser->setHistoryCompleter(QLatin1String("Ssh.KeyFile.History")); d->ui.privateKeyPathChooser->setHistoryCompleter(QLatin1String("Ssh.KeyFile.History"));
d->ui.privateKeyPathChooser->setPromptDialogTitle(tr("Choose a Private Key File")); d->ui.privateKeyPathChooser->setPromptDialogTitle(tr("Choose a Private Key File"));
connect(d->ui.nameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(completeChanged())); connect(d->ui.nameLineEdit, &QLineEdit::textChanged, this, &QWizardPage::completeChanged);
connect(d->ui.hostNameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(completeChanged())); connect(d->ui.hostNameLineEdit, &QLineEdit::textChanged, this, &QWizardPage::completeChanged);
connect(d->ui.userNameLineEdit, SIGNAL(textChanged(QString)), SIGNAL(completeChanged())); connect(d->ui.userNameLineEdit, &QLineEdit::textChanged, this, &QWizardPage::completeChanged);
connect(d->ui.privateKeyPathChooser, SIGNAL(validChanged(bool)), SIGNAL(completeChanged())); connect(d->ui.privateKeyPathChooser, &PathChooser::validChanged,
connect(d->ui.passwordButton, SIGNAL(toggled(bool)), SLOT(handleAuthTypeChanged())); this, &QWizardPage::completeChanged);
connect(d->ui.passwordButton, &QAbstractButton::toggled,
this, &GenericLinuxDeviceConfigurationWizardSetupPage::handleAuthTypeChanged);
} }
GenericLinuxDeviceConfigurationWizardSetupPage::~GenericLinuxDeviceConfigurationWizardSetupPage() GenericLinuxDeviceConfigurationWizardSetupPage::~GenericLinuxDeviceConfigurationWizardSetupPage()
......
...@@ -61,7 +61,7 @@ public: ...@@ -61,7 +61,7 @@ public:
virtual QString defaultPassWord() const; virtual QString defaultPassWord() const;
private: private:
Q_SLOT void handleAuthTypeChanged(); void handleAuthTypeChanged();
Internal::GenericLinuxDeviceConfigurationWizardSetupPagePrivate * const d; Internal::GenericLinuxDeviceConfigurationWizardSetupPagePrivate * const d;
}; };
......
...@@ -186,10 +186,6 @@ ...@@ -186,10 +186,6 @@
<extends>QWidget</extends> <extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header> <header location="global">utils/pathchooser.h</header>
<container>1</container> <container>1</container>
<slots>
<signal>editingFinished()</signal>
<signal>browsingFinished()</signal>
</slots>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
......
...@@ -115,7 +115,8 @@ void GenericLinuxDeviceTester::handleConnected() ...@@ -115,7 +115,8 @@ void GenericLinuxDeviceTester::handleConnected()
QTC_ASSERT(d->state == Connecting, return); QTC_ASSERT(d->state == Connecting, return);
d->process = d->connection->createRemoteProcess("uname -rsm"); 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...")); emit progressMessage(tr("Checking kernel version..."));
d->state = RunningUname; d->state = RunningUname;
......
...@@ -50,14 +50,13 @@ public: ...@@ -50,14 +50,13 @@ public:
ProjectExplorer::DeviceUsedPortsGatherer *usedPortsGatherer() const; ProjectExplorer::DeviceUsedPortsGatherer *usedPortsGatherer() const;
private slots: private:
void handleConnected(); void handleConnected();
void handleConnectionFailure(); void handleConnectionFailure();
void handleProcessFinished(int exitStatus); void handleProcessFinished(int exitStatus);
void handlePortsGatheringError(const QString &message); void handlePortsGatheringError(const QString &message);
void handlePortListReady(); void handlePortListReady();
private:
void setFinished(ProjectExplorer::DeviceTester::TestResult result); void setFinished(ProjectExplorer::DeviceTester::TestResult result);
Internal::GenericLinuxDeviceTesterPrivate * const d; Internal::GenericLinuxDeviceTesterPrivate * const d;
......
...@@ -57,12 +57,12 @@ void PackageUploader::uploadPackage(SshConnection *connection, ...@@ -57,12 +57,12 @@ void PackageUploader::uploadPackage(SshConnection *connection,
connect(m_connection, &SshConnection::error, connect(m_connection, &SshConnection::error,
this, &PackageUploader::handleConnectionFailure); this, &PackageUploader::handleConnectionFailure);
m_uploader = m_connection->createSftpChannel(); m_uploader = m_connection->createSftpChannel();
connect(m_uploader.data(), SIGNAL(initialized()), this, connect(m_uploader.data(), &SftpChannel::initialized,
SLOT(handleSftpChannelInitialized())); this, &PackageUploader::handleSftpChannelInitialized);
connect(m_uploader.data(), SIGNAL(channelError(QString)), this, connect(m_uploader.data(), &SftpChannel::channelError,
SLOT(handleSftpChannelError(QString))); this, &PackageUploader::handleSftpChannelError);
connect(m_uploader.data(), SIGNAL(finished(QSsh::SftpJobId,QString)), connect(m_uploader.data(), &SftpChannel::finished,
this, SLOT(handleSftpJobFinished(QSsh::SftpJobId,QString))); this, &PackageUploader::handleSftpJobFinished);
m_uploader->initialize(); m_uploader->initialize();
} }
......
...@@ -55,15 +55,13 @@ signals: ...@@ -55,15 +55,13 @@ signals:
void progress(const QString &message); void progress(const QString &message);
void uploadFinished(const QString &errorMsg = QString()); void uploadFinished(const QString &errorMsg = QString());
private slots: private:
enum State { InitializingSftp, Uploading, Inactive };
void handleConnectionFailure(); void handleConnectionFailure();
void handleSftpChannelInitialized(); void handleSftpChannelInitialized();
void handleSftpChannelError(const QString &error);