summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-11-23 16:39:53 +0100
committerArno <arno@disconnect.de>2018-11-23 16:39:53 +0100
commit955f5a7a8acbce7d2c16df798f855946fd71cacd (patch)
tree173b9ef25bb04bd17cff2f5386ede0abe79ae3b9
parent5d821c47f4badb8ca8e7c3e74155e25e327a5249 (diff)
downloadSheMov-955f5a7a8acbce7d2c16df798f855946fd71cacd.tar.gz
SheMov-955f5a7a8acbce7d2c16df798f855946fd71cacd.tar.bz2
SheMov-955f5a7a8acbce7d2c16df798f855946fd71cacd.zip
Some more syntax fixes
No functional changes.
-rw-r--r--smdialog.cpp12
-rw-r--r--smdialog.h6
2 files changed, 9 insertions, 9 deletions
diff --git a/smdialog.cpp b/smdialog.cpp
index bd6c3f6..380e7b9 100644
--- a/smdialog.cpp
+++ b/smdialog.cpp
@@ -28,9 +28,9 @@ SeriesPartsDialog::SeriesPartsDialog(QWidget *parent, Qt::WindowFlags f) : SmDia
mPartno->setMinimum(0);
mainLayout->addRow(tr("&Part no."), mPartno);
mOk = new QPushButton(tr("Ok"));
- connect(mOk, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(mOk, &QPushButton::clicked, this, &SeriesPartsDialog::accept);
mCancel = new QPushButton(tr("Cancel"));
- connect(mCancel, SIGNAL(clicked()), this, SLOT(reject()));
+ connect(mCancel, &QPushButton::clicked, this, &SeriesPartsDialog::reject);
mCancel->setDefault(true);
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addStretch();
@@ -66,7 +66,7 @@ UnpackDialog::UnpackDialog(QWidget *parent, Qt::WindowFlags f) : SmDialog(parent
mainLayout->addWidget(mOutput);
QHBoxLayout *buttonLayout = new QHBoxLayout;
mClose = new QPushButton(tr("Close"));
- connect(mClose, SIGNAL(clicked()), this, SLOT(hide()));
+ connect(mClose, &QPushButton::clicked, this, &UnpackDialog::hide);
buttonLayout->addStretch();
buttonLayout->addWidget(mClose);
buttonLayout->addStretch();
@@ -74,9 +74,9 @@ UnpackDialog::UnpackDialog(QWidget *parent, Qt::WindowFlags f) : SmDialog(parent
setLayout(mainLayout);
mUnpacker = new Unpacker(this);
- connect(mUnpacker, SIGNAL(outputRead(QByteArray)), this, SLOT(addProcOutput(QByteArray)));
- connect(mUnpacker, SIGNAL(unpackStarted(QString)), this, SLOT(newPackage(QString)));
- connect(mUnpacker, SIGNAL(unpackDone()), this, SLOT(unpackDone()));
+ connect(mUnpacker, &Unpacker::outputRead, this, &UnpackDialog::addProcOutput);
+ connect(mUnpacker, &Unpacker::unpackStarted, this, &UnpackDialog::newPackage);
+ connect(mUnpacker, &Unpacker::unpackDone, this, &UnpackDialog::unpackDone);
}
void UnpackDialog::setCurrentLabel(const QString &cur){
diff --git a/smdialog.h b/smdialog.h
index 2f0fb16..ed0a086 100644
--- a/smdialog.h
+++ b/smdialog.h
@@ -20,13 +20,13 @@ class Unpacker;
class SmDialog : public QDialog {
Q_OBJECT
public:
- explicit SmDialog(QWidget *parent = 0, Qt::WindowFlags f = 0) : QDialog(parent, f) {}
+ explicit SmDialog(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::Widget) : QDialog(parent, f) {}
};
class SeriesPartsDialog : public SmDialog {
Q_OBJECT
public:
- explicit SeriesPartsDialog(QWidget *parent, Qt::WindowFlags f = 0);
+ explicit SeriesPartsDialog(QWidget *parent, Qt::WindowFlags f = Qt::Widget);
QString subtitle() const;
int partNo() const;
void setSubtitle(const QString &subtitle);
@@ -43,7 +43,7 @@ class SeriesPartsDialog : public SmDialog {
class UnpackDialog : public SmDialog {
Q_OBJECT
public:
- explicit UnpackDialog(QWidget *parent = 0, Qt::WindowFlags f = 0);
+ explicit UnpackDialog(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::Widget);
void setCurrentLabel(const QString &cur);
void clearOutput();
void setCloseEnabled(bool enabled);