forked from qt-creator/qt-creator
Boot2Qt: Replace use of 'private slots:'
... by normal functions or lambdas. Change-Id: Ie11d28e35ff04cdc0f1e0cef8462c3cc5ef44c87 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -47,16 +47,14 @@ public:
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
private slots:
|
||||
void handleWatchMessage(const QJsonDocument &document);
|
||||
|
||||
signals:
|
||||
void deviceEvent(DeviceEventType eventType, QMap<QString, QString> info);
|
||||
void trackerError(QString errorMessage);
|
||||
|
||||
private:
|
||||
QdbWatcher *m_qdbWatcher = nullptr;
|
||||
void handleWatchMessage(const QJsonDocument &document);
|
||||
|
||||
QdbWatcher *m_qdbWatcher = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -44,10 +44,9 @@ public:
|
||||
signals:
|
||||
void trackerError(QString errorMessage);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void handleWatchMessage(const QJsonDocument &document);
|
||||
|
||||
private:
|
||||
QdbWatcher *m_qdbWatcher = nullptr;
|
||||
QContiguousCache<QString> m_messageCache = QContiguousCache<QString>(10);
|
||||
};
|
||||
|
@@ -40,11 +40,10 @@ public:
|
||||
~QdbMakeDefaultAppService();
|
||||
void setMakeDefault(bool makeDefault);
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void handleStdErr();
|
||||
void handleProcessFinished(const QString &error);
|
||||
|
||||
private:
|
||||
bool isDeploymentNecessary() const { return true; }
|
||||
void doDeviceSetup() { handleDeviceSetupDone(true); }
|
||||
void stopDeviceSetup() { handleDeviceSetupDone(false); }
|
||||
|
@@ -42,7 +42,6 @@ public:
|
||||
|
||||
class QdbConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QdbConfigWidget(QdbMakeDefaultAppStep *step)
|
||||
: BuildStepConfigWidget(step)
|
||||
@@ -50,8 +49,10 @@ public:
|
||||
QVBoxLayout * const mainLayout = new QVBoxLayout(this);
|
||||
mainLayout->setMargin(0);
|
||||
|
||||
m_makeDefaultBtn.setText(tr("Set this application to start by default"));
|
||||
m_resetDefaultBtn.setText(tr("Reset default application"));
|
||||
m_makeDefaultBtn.setText(
|
||||
QdbMakeDefaultAppStep::tr("Set this application to start by default"));
|
||||
m_resetDefaultBtn.setText(
|
||||
QdbMakeDefaultAppStep::tr("Reset default application"));
|
||||
|
||||
if (step->makeDefault())
|
||||
m_makeDefaultBtn.setChecked(true);
|
||||
@@ -61,25 +62,15 @@ public:
|
||||
mainLayout->addWidget(&m_makeDefaultBtn);
|
||||
mainLayout->addWidget(&m_resetDefaultBtn);
|
||||
|
||||
connect(&m_makeDefaultBtn, &QRadioButton::clicked,
|
||||
this, &QdbConfigWidget::handleMakeDefault);
|
||||
connect(&m_resetDefaultBtn, &QRadioButton::clicked,
|
||||
this, &QdbConfigWidget::handleResetDefault);
|
||||
connect(&m_makeDefaultBtn, &QRadioButton::clicked, this, [step] {
|
||||
step->setMakeDefault(true);
|
||||
});
|
||||
connect(&m_resetDefaultBtn, &QRadioButton::clicked, this, [step] {
|
||||
step->setMakeDefault(false);
|
||||
});
|
||||
}
|
||||
|
||||
private:
|
||||
Q_SLOT void handleMakeDefault() {
|
||||
QdbMakeDefaultAppStep *step =
|
||||
qobject_cast<QdbMakeDefaultAppStep *>(this->step());
|
||||
step->setMakeDefault(true);
|
||||
}
|
||||
|
||||
Q_SLOT void handleResetDefault() {
|
||||
QdbMakeDefaultAppStep *step =
|
||||
qobject_cast<QdbMakeDefaultAppStep *>(this->step());
|
||||
step->setMakeDefault(false);
|
||||
}
|
||||
|
||||
QRadioButton m_makeDefaultBtn;
|
||||
QRadioButton m_resetDefaultBtn;
|
||||
};
|
||||
@@ -152,7 +143,6 @@ QVariantMap QdbMakeDefaultAppStep::toMap() const
|
||||
map.insert(makeDefaultKey(), d->makeDefault);
|
||||
return map;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qdb
|
||||
|
||||
#include "qdbmakedefaultappstep.moc"
|
||||
|
@@ -39,12 +39,11 @@ public:
|
||||
QdbStopApplicationService(QObject *parent = 0);
|
||||
~QdbStopApplicationService();
|
||||
|
||||
private slots:
|
||||
private:
|
||||
void handleProcessFinished(bool success);
|
||||
void handleStderr(const QString &output);
|
||||
void handleStdout(const QString &output);
|
||||
|
||||
private:
|
||||
bool isDeploymentNecessary() const final { return true; }
|
||||
void doDeviceSetup() final { handleDeviceSetupDone(true); }
|
||||
void stopDeviceSetup() final { handleDeviceSetupDone(false); }
|
||||
|
Reference in New Issue
Block a user