diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-05-24 16:08:18 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-13 10:04:44 +0200 |
commit | 38f1a36f608f729f47d880eb8389e88159bda7a4 (patch) | |
tree | 7e1a41a20a24a62f13855c660c1c51f11edccfcf /src/plugins/platforms/windows/qwindowsnativeinterface.cpp | |
parent | 7f7eaf1cad2681e361d365ce3c602105338603d1 (diff) |
Windows QPA: 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: Ieb7f052919173f6923e68de9f9e849dee45e36e7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsnativeinterface.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsnativeinterface.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp index e581b30ced..d1d181d66e 100644 --- a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp +++ b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp @@ -98,7 +98,7 @@ void *QWindowsNativeInterface::nativeResourceForWindow(const QByteArray &resourc qWarning("%s: '%s' requested for null window or window without handle.", __FUNCTION__, resource.constData()); return nullptr; } - QWindowsWindow *bw = static_cast<QWindowsWindow *>(window->handle()); + auto *bw = static_cast<QWindowsWindow *>(window->handle()); int type = resourceType(resource); if (type == HandleType) return bw->handle(); @@ -131,7 +131,7 @@ void *QWindowsNativeInterface::nativeResourceForScreen(const QByteArray &resourc qWarning("%s: '%s' requested for null screen or screen without handle.", __FUNCTION__, resource.constData()); return nullptr; } - QWindowsScreen *bs = static_cast<QWindowsScreen *>(screen->handle()); + auto *bs = static_cast<QWindowsScreen *>(screen->handle()); int type = resourceType(resource); if (type == HandleType) return bs->handle(); @@ -157,7 +157,7 @@ static const char customMarginPropertyC[] = "WindowsCustomMargins"; QVariant QWindowsNativeInterface::windowProperty(QPlatformWindow *window, const QString &name) const { - QWindowsWindow *platformWindow = static_cast<QWindowsWindow *>(window); + auto *platformWindow = static_cast<QWindowsWindow *>(window); if (name == QLatin1String(customMarginPropertyC)) return QVariant::fromValue(platformWindow->customMargins()); return QVariant(); @@ -171,7 +171,7 @@ QVariant QWindowsNativeInterface::windowProperty(QPlatformWindow *window, const void QWindowsNativeInterface::setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) { - QWindowsWindow *platformWindow = static_cast<QWindowsWindow *>(window); + auto *platformWindow = static_cast<QWindowsWindow *>(window); if (name == QLatin1String(customMarginPropertyC)) platformWindow->setCustomMargins(qvariant_cast<QMargins>(value)); } @@ -206,7 +206,7 @@ void *QWindowsNativeInterface::nativeResourceForContext(const QByteArray &resour return nullptr; } - QWindowsOpenGLContext *glcontext = static_cast<QWindowsOpenGLContext *>(context->handle()); + auto *glcontext = static_cast<QWindowsOpenGLContext *>(context->handle()); switch (resourceType(resource)) { case RenderingContextType: // Fall through. case EglContextType: |