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 start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void handleWatchMessage(const QJsonDocument &document);
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void deviceEvent(DeviceEventType eventType, QMap<QString, QString> info);
|
void deviceEvent(DeviceEventType eventType, QMap<QString, QString> info);
|
||||||
void trackerError(QString errorMessage);
|
void trackerError(QString errorMessage);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QdbWatcher *m_qdbWatcher = nullptr;
|
void handleWatchMessage(const QJsonDocument &document);
|
||||||
|
|
||||||
|
QdbWatcher *m_qdbWatcher = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -44,10 +44,9 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void trackerError(QString errorMessage);
|
void trackerError(QString errorMessage);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void handleWatchMessage(const QJsonDocument &document);
|
void handleWatchMessage(const QJsonDocument &document);
|
||||||
|
|
||||||
private:
|
|
||||||
QdbWatcher *m_qdbWatcher = nullptr;
|
QdbWatcher *m_qdbWatcher = nullptr;
|
||||||
QContiguousCache<QString> m_messageCache = QContiguousCache<QString>(10);
|
QContiguousCache<QString> m_messageCache = QContiguousCache<QString>(10);
|
||||||
};
|
};
|
||||||
|
@@ -40,11 +40,10 @@ public:
|
|||||||
~QdbMakeDefaultAppService();
|
~QdbMakeDefaultAppService();
|
||||||
void setMakeDefault(bool makeDefault);
|
void setMakeDefault(bool makeDefault);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void handleStdErr();
|
void handleStdErr();
|
||||||
void handleProcessFinished(const QString &error);
|
void handleProcessFinished(const QString &error);
|
||||||
|
|
||||||
private:
|
|
||||||
bool isDeploymentNecessary() const { return true; }
|
bool isDeploymentNecessary() const { return true; }
|
||||||
void doDeviceSetup() { handleDeviceSetupDone(true); }
|
void doDeviceSetup() { handleDeviceSetupDone(true); }
|
||||||
void stopDeviceSetup() { handleDeviceSetupDone(false); }
|
void stopDeviceSetup() { handleDeviceSetupDone(false); }
|
||||||
|
@@ -42,7 +42,6 @@ public:
|
|||||||
|
|
||||||
class QdbConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
class QdbConfigWidget : public ProjectExplorer::BuildStepConfigWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
public:
|
public:
|
||||||
QdbConfigWidget(QdbMakeDefaultAppStep *step)
|
QdbConfigWidget(QdbMakeDefaultAppStep *step)
|
||||||
: BuildStepConfigWidget(step)
|
: BuildStepConfigWidget(step)
|
||||||
@@ -50,8 +49,10 @@ public:
|
|||||||
QVBoxLayout * const mainLayout = new QVBoxLayout(this);
|
QVBoxLayout * const mainLayout = new QVBoxLayout(this);
|
||||||
mainLayout->setMargin(0);
|
mainLayout->setMargin(0);
|
||||||
|
|
||||||
m_makeDefaultBtn.setText(tr("Set this application to start by default"));
|
m_makeDefaultBtn.setText(
|
||||||
m_resetDefaultBtn.setText(tr("Reset default application"));
|
QdbMakeDefaultAppStep::tr("Set this application to start by default"));
|
||||||
|
m_resetDefaultBtn.setText(
|
||||||
|
QdbMakeDefaultAppStep::tr("Reset default application"));
|
||||||
|
|
||||||
if (step->makeDefault())
|
if (step->makeDefault())
|
||||||
m_makeDefaultBtn.setChecked(true);
|
m_makeDefaultBtn.setChecked(true);
|
||||||
@@ -61,25 +62,15 @@ public:
|
|||||||
mainLayout->addWidget(&m_makeDefaultBtn);
|
mainLayout->addWidget(&m_makeDefaultBtn);
|
||||||
mainLayout->addWidget(&m_resetDefaultBtn);
|
mainLayout->addWidget(&m_resetDefaultBtn);
|
||||||
|
|
||||||
connect(&m_makeDefaultBtn, &QRadioButton::clicked,
|
connect(&m_makeDefaultBtn, &QRadioButton::clicked, this, [step] {
|
||||||
this, &QdbConfigWidget::handleMakeDefault);
|
step->setMakeDefault(true);
|
||||||
connect(&m_resetDefaultBtn, &QRadioButton::clicked,
|
});
|
||||||
this, &QdbConfigWidget::handleResetDefault);
|
connect(&m_resetDefaultBtn, &QRadioButton::clicked, this, [step] {
|
||||||
|
step->setMakeDefault(false);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
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_makeDefaultBtn;
|
||||||
QRadioButton m_resetDefaultBtn;
|
QRadioButton m_resetDefaultBtn;
|
||||||
};
|
};
|
||||||
@@ -152,7 +143,6 @@ QVariantMap QdbMakeDefaultAppStep::toMap() const
|
|||||||
map.insert(makeDefaultKey(), d->makeDefault);
|
map.insert(makeDefaultKey(), d->makeDefault);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Qdb
|
} // namespace Qdb
|
||||||
|
|
||||||
#include "qdbmakedefaultappstep.moc"
|
|
||||||
|
@@ -39,12 +39,11 @@ public:
|
|||||||
QdbStopApplicationService(QObject *parent = 0);
|
QdbStopApplicationService(QObject *parent = 0);
|
||||||
~QdbStopApplicationService();
|
~QdbStopApplicationService();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void handleProcessFinished(bool success);
|
void handleProcessFinished(bool success);
|
||||||
void handleStderr(const QString &output);
|
void handleStderr(const QString &output);
|
||||||
void handleStdout(const QString &output);
|
void handleStdout(const QString &output);
|
||||||
|
|
||||||
private:
|
|
||||||
bool isDeploymentNecessary() const final { return true; }
|
bool isDeploymentNecessary() const final { return true; }
|
||||||
void doDeviceSetup() final { handleDeviceSetupDone(true); }
|
void doDeviceSetup() final { handleDeviceSetupDone(true); }
|
||||||
void stopDeviceSetup() final { handleDeviceSetupDone(false); }
|
void stopDeviceSetup() final { handleDeviceSetupDone(false); }
|
||||||
|
Reference in New Issue
Block a user