aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-04 09:56:06 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-04 10:23:57 +0200
commit22f07a12de37416409c29c6ca396d35da15a849d (patch)
treee45d917f34717cc3c91b6c891a888307b332e735
parent8759ac2fc072738ac841117de2cda1c7f4fb5c55 (diff)
Replace typedef by 'using' or QOverload
Fix clang warnings about typedef. Change-Id: Ife4540cd114566af7822af8f6d3d4d991d1194de Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--examples/winextras/iconextractor/main.cpp2
-rw-r--r--tests/manual/dwmfeatures/testwidget.cpp9
2 files changed, 5 insertions, 6 deletions
diff --git a/examples/winextras/iconextractor/main.cpp b/examples/winextras/iconextractor/main.cpp
index cee5728..7fa5e4d 100644
--- a/examples/winextras/iconextractor/main.cpp
+++ b/examples/winextras/iconextractor/main.cpp
@@ -77,7 +77,7 @@ struct PixmapEntry {
QPixmap pixmap;
};
-typedef QList<PixmapEntry> PixmapEntryList;
+using PixmapEntryList = QList<PixmapEntry>;
static std::wostream &operator<<(std::wostream &str, const QString &s)
{
diff --git a/tests/manual/dwmfeatures/testwidget.cpp b/tests/manual/dwmfeatures/testwidget.cpp
index 42f1f37..d79502a 100644
--- a/tests/manual/dwmfeatures/testwidget.cpp
+++ b/tests/manual/dwmfeatures/testwidget.cpp
@@ -46,14 +46,13 @@ TestWidget::TestWidget(QWidget *parent) :
connect(ui->radioFlipAbove, &QAbstractButton::clicked, this, &TestWidget::onFlip3DPolicyChanged);
connect(ui->radioFlipBelow, &QAbstractButton::clicked, this, &TestWidget::onFlip3DPolicyChanged);
connect(ui->btnFrameReset, &QAbstractButton::clicked, this, &TestWidget::onResetGlassFrameClicked);
- typedef void(QSpinBox::*IntSignal)(int);
- connect(ui->frameTop, static_cast<IntSignal>(&QSpinBox::valueChanged),
+ connect(ui->frameTop, QOverload<int>::of(&QSpinBox::valueChanged),
this, &TestWidget::onGlassMarginsChanged);
- connect(ui->frameRight, static_cast<IntSignal>(&QSpinBox::valueChanged),
+ connect(ui->frameRight, QOverload<int>::of(&QSpinBox::valueChanged),
this, &TestWidget::onGlassMarginsChanged);
- connect(ui->frameBottom, static_cast<IntSignal>(&QSpinBox::valueChanged),
+ connect(ui->frameBottom, QOverload<int>::of(&QSpinBox::valueChanged),
this, &TestWidget::onGlassMarginsChanged);
- connect(ui->frameLeft, static_cast<IntSignal>(&QSpinBox::valueChanged),
+ connect(ui->frameLeft, QOverload<int>::of(&QSpinBox::valueChanged),
this, &TestWidget::onGlassMarginsChanged);
}