summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowscontext.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-24 16:08:18 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-13 10:04:44 +0200
commit38f1a36f608f729f47d880eb8389e88159bda7a4 (patch)
tree7e1a41a20a24a62f13855c660c1c51f11edccfcf /src/plugins/platforms/windows/qwindowscontext.cpp
parent7f7eaf1cad2681e361d365ce3c602105338603d1 (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/qwindowscontext.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index 9be6d4ced7..f7897336c9 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -133,8 +133,8 @@ static inline bool useRTL_Extensions()
#if QT_CONFIG(sessionmanager)
static inline QWindowsSessionManager *platformSessionManager()
{
- QGuiApplicationPrivate *guiPrivate = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(qApp));
- QSessionManagerPrivate *managerPrivate = static_cast<QSessionManagerPrivate*>(QObjectPrivate::get(guiPrivate->session_manager));
+ auto *guiPrivate = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(qApp));
+ auto *managerPrivate = static_cast<QSessionManagerPrivate*>(QObjectPrivate::get(guiPrivate->session_manager));
return static_cast<QWindowsSessionManager *>(managerPrivate->platformSessionManager);
}
@@ -545,7 +545,7 @@ QString QWindowsContext::registerWindowClass(QString cname,
// add an instance-specific ID, the address of the window proc.
static int classExists = -1;
- const HINSTANCE appInstance = static_cast<HINSTANCE>(GetModuleHandle(nullptr));
+ const auto appInstance = static_cast<HINSTANCE>(GetModuleHandle(nullptr));
if (classExists == -1) {
WNDCLASS wcinfo;
classExists = GetClassInfo(appInstance, reinterpret_cast<LPCWSTR>(cname.utf16()), &wcinfo);
@@ -598,7 +598,7 @@ QString QWindowsContext::registerWindowClass(QString cname,
void QWindowsContext::unregisterWindowClasses()
{
- const HINSTANCE appInstance = static_cast<HINSTANCE>(GetModuleHandle(nullptr));
+ const auto appInstance = static_cast<HINSTANCE>(GetModuleHandle(nullptr));
for (const QString &name : qAsConst(d->m_registeredWindowClassNames)) {
if (!UnregisterClass(reinterpret_cast<LPCWSTR>(name.utf16()), appInstance) && QWindowsContext::verbose)
@@ -1351,7 +1351,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
sessionManager->blocksInteraction();
sessionManager->clearCancellation();
- QGuiApplicationPrivate *qGuiAppPriv = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(qApp));
+ auto *qGuiAppPriv = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(qApp));
qGuiAppPriv->commitData();
if (lParam & ENDSESSION_LOGOFF)
@@ -1369,7 +1369,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
// we receive the message for each toplevel window included internal hidden ones,
// but the aboutToQuit signal should be emitted only once.
- QGuiApplicationPrivate *qGuiAppPriv = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(qApp));
+ auto *qGuiAppPriv = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(qApp));
if (endsession && !qGuiAppPriv->aboutToQuitEmitted) {
qGuiAppPriv->aboutToQuitEmitted = true;
int index = QGuiApplication::staticMetaObject.indexOfSignal("aboutToQuit()");