aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmap/tst_qpixmap.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-04 11:58:35 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-04 11:58:35 +0200
commit5c6762c53d47b3bd3b604afd389669a3670b1ec5 (patch)
treee717ba17a3a4f6679d5e163a6c879283123d1710 /tests/auto/qpixmap/tst_qpixmap.cpp
parentc1c3e7546f578554d1de0f865cb4fa359a8d0109 (diff)
Fix clang warnings about repetitive type names
Fix warning like: warning: use auto when initializing with new/reinterpret_cast to avoid duplicating the type name [modernize-use-auto] Change-Id: I46919c041f6a217e098b82c9f7f6548e0a0a9ec5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'tests/auto/qpixmap/tst_qpixmap.cpp')
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index b028f52..2791cd2 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -101,7 +101,7 @@ void tst_QPixmap::toHBITMAP()
const HDC displayDc = GetDC(nullptr);
const HDC bitmapDc = CreateCompatibleDC(displayDc);
- const HBITMAP nullBitmap = static_cast<HBITMAP>(SelectObject(bitmapDc, bitmap));
+ const auto nullBitmap = static_cast<HBITMAP>(SelectObject(bitmapDc, bitmap));
const COLORREF pixel = GetPixel(bitmapDc, 0, 0);
QCOMPARE(int(GetRValue(pixel)), red);
@@ -264,7 +264,7 @@ void tst_QPixmap::fromHICON()
const QString iconFileName = image + QStringLiteral(".ico");
QVERIFY2(QFileInfo::exists(iconFileName), qPrintable(iconFileName));
- const HICON icon =
+ const auto icon =
static_cast<HICON>(LoadImage(nullptr, reinterpret_cast<const wchar_t *>(iconFileName.utf16()),
IMAGE_ICON, width, height, LR_LOADFROMFILE));
const QImage imageFromHICON = QtWin::fromHICON(icon).toImage();