forked from qt-creator/qt-creator
RemoteLinux: Use Qt5-style connects
The heavy lifting was done by clazy. Change-Id: I1a03435bbb4281bad4ff64baba0182e0050170d6 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
802edc9d8f
commit
e3b1c9b912
@@ -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();
|
||||
|
@@ -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.
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
};
|
||||
|
||||
|
@@ -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;
|
||||
};
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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.
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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();
|
||||
|
@@ -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/>
|
||||
|
@@ -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()
|
||||
|
@@ -61,7 +61,7 @@ public:
|
||||
virtual QString defaultPassWord() const;
|
||||
|
||||
private:
|
||||
Q_SLOT void handleAuthTypeChanged();
|
||||
void handleAuthTypeChanged();
|
||||
|
||||
Internal::GenericLinuxDeviceConfigurationWizardSetupPagePrivate * const d;
|
||||
};
|
||||
|
@@ -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/>
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
};
|
||||
|
@@ -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;
|
||||
|
@@ -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); }
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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());
|
||||
|
@@ -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;
|
||||
|
@@ -49,12 +49,11 @@ protected:
|
||||
void doDeploy();
|
||||
void stopDeployment();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void handleStdout();
|
||||
void handleStderr();
|
||||
void handleProcessClosed(int exitStatus);
|
||||
|
||||
private:
|
||||
Internal::RemoteLinuxCustomCommandDeployservicePrivate *d;
|
||||
};
|
||||
|
||||
|
@@ -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/>
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
};
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user