aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/boot2qt
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-06-11 08:42:23 +0200
committerhjk <hjk@qt.io>2019-06-11 07:30:31 +0000
commit021d3a6c59264e4aac0284628b8d2daadbad4ed7 (patch)
tree69e63c49c8415682aa2fc9081a4fca3b5aff65a9 /src/plugins/boot2qt
parentd0b4b190a63f597195b87b5a8a5c51e16b77bdaa (diff)
Boot2Qt: Replace use of 'private slots:'
... by normal functions or lambdas. Change-Id: Ie11d28e35ff04cdc0f1e0cef8462c3cc5ef44c87 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/boot2qt')
-rw-r--r--src/plugins/boot2qt/device-detection/qdbdevicetracker.h6
-rw-r--r--src/plugins/boot2qt/device-detection/qdbmessagetracker.h3
-rw-r--r--src/plugins/boot2qt/qdbmakedefaultappservice.h3
-rw-r--r--src/plugins/boot2qt/qdbmakedefaultappstep.cpp32
-rw-r--r--src/plugins/boot2qt/qdbstopapplicationservice.h3
5 files changed, 16 insertions, 31 deletions
diff --git a/src/plugins/boot2qt/device-detection/qdbdevicetracker.h b/src/plugins/boot2qt/device-detection/qdbdevicetracker.h
index 197cb7abbc1..85cf9ee8fcf 100644
--- a/src/plugins/boot2qt/device-detection/qdbdevicetracker.h
+++ b/src/plugins/boot2qt/device-detection/qdbdevicetracker.h
@@ -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
diff --git a/src/plugins/boot2qt/device-detection/qdbmessagetracker.h b/src/plugins/boot2qt/device-detection/qdbmessagetracker.h
index a6a2ae7e1c0..499b0dd55bc 100644
--- a/src/plugins/boot2qt/device-detection/qdbmessagetracker.h
+++ b/src/plugins/boot2qt/device-detection/qdbmessagetracker.h
@@ -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);
};
diff --git a/src/plugins/boot2qt/qdbmakedefaultappservice.h b/src/plugins/boot2qt/qdbmakedefaultappservice.h
index 75c78144a31..4e900a0bb65 100644
--- a/src/plugins/boot2qt/qdbmakedefaultappservice.h
+++ b/src/plugins/boot2qt/qdbmakedefaultappservice.h
@@ -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); }
diff --git a/src/plugins/boot2qt/qdbmakedefaultappstep.cpp b/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
index db65267238a..70bf5c6a889 100644
--- a/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
+++ b/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
@@ -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"
diff --git a/src/plugins/boot2qt/qdbstopapplicationservice.h b/src/plugins/boot2qt/qdbstopapplicationservice.h
index 19dbc1f585b..9e925ade4eb 100644
--- a/src/plugins/boot2qt/qdbstopapplicationservice.h
+++ b/src/plugins/boot2qt/qdbstopapplicationservice.h
@@ -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); }