summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowscontext.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-24 15:48:34 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-11-30 14:45:17 +0000
commit9ef93fa153e9093f7b1b9c901192dcf8282b6c3d (patch)
treede418a632ef0a7f7d969c7dfe08e166368a069c1 /src/plugins/platforms/windows/qwindowscontext.h
parent39fc377bf105ba09e2a8f9acae467dc789b96525 (diff)
Windows QPA plugin: Use member initialization
Use C++ 11 member initialization in value-type structs. Task-number: QTBUG-51673 Change-Id: I668389b4a0ad1d862a505b740d67357cb9c2a3dc Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.h')
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.h34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h
index 43fde03fa3..b50010321b 100644
--- a/src/plugins/platforms/windows/qwindowscontext.h
+++ b/src/plugins/platforms/windows/qwindowscontext.h
@@ -80,7 +80,6 @@ class QTouchDevice;
struct QWindowsUser32DLL
{
- QWindowsUser32DLL();
inline void init();
inline bool initTouch();
@@ -99,32 +98,31 @@ struct QWindowsUser32DLL
typedef int (WINAPI *GetAwarenessFromDpiAwarenessContext)(int);
// Touch functions from Windows 7 onwards (also for use with Q_CC_MSVC).
- IsTouchWindow isTouchWindow;
- RegisterTouchWindow registerTouchWindow;
- UnregisterTouchWindow unregisterTouchWindow;
- GetTouchInputInfo getTouchInputInfo;
- CloseTouchInputHandle closeTouchInputHandle;
+ IsTouchWindow isTouchWindow = nullptr;
+ RegisterTouchWindow registerTouchWindow = nullptr;
+ UnregisterTouchWindow unregisterTouchWindow = nullptr;
+ GetTouchInputInfo getTouchInputInfo = nullptr;
+ CloseTouchInputHandle closeTouchInputHandle = nullptr;
// Windows Vista onwards
- SetProcessDPIAware setProcessDPIAware;
+ SetProcessDPIAware setProcessDPIAware = nullptr;
// Clipboard listeners are present on Windows Vista onwards
// but missing in MinGW 4.9 stub libs. Can be removed in MinGW 5.
- AddClipboardFormatListener addClipboardFormatListener;
- RemoveClipboardFormatListener removeClipboardFormatListener;
+ AddClipboardFormatListener addClipboardFormatListener = nullptr;
+ RemoveClipboardFormatListener removeClipboardFormatListener = nullptr;
// Rotation API
- GetDisplayAutoRotationPreferences getDisplayAutoRotationPreferences;
- SetDisplayAutoRotationPreferences setDisplayAutoRotationPreferences;
+ GetDisplayAutoRotationPreferences getDisplayAutoRotationPreferences = nullptr;
+ SetDisplayAutoRotationPreferences setDisplayAutoRotationPreferences = nullptr;
- EnableNonClientDpiScaling enableNonClientDpiScaling;
- GetWindowDpiAwarenessContext getWindowDpiAwarenessContext;
- GetAwarenessFromDpiAwarenessContext getAwarenessFromDpiAwarenessContext;
+ EnableNonClientDpiScaling enableNonClientDpiScaling = nullptr;
+ GetWindowDpiAwarenessContext getWindowDpiAwarenessContext = nullptr;
+ GetAwarenessFromDpiAwarenessContext getAwarenessFromDpiAwarenessContext = nullptr;
};
// Shell scaling library (Windows 8.1 onwards)
struct QWindowsShcoreDLL {
- QWindowsShcoreDLL();
void init();
inline bool isValid() const { return getProcessDpiAwareness && setProcessDpiAwareness && getDpiForMonitor; }
@@ -132,9 +130,9 @@ struct QWindowsShcoreDLL {
typedef HRESULT (WINAPI *SetProcessDpiAwareness)(int);
typedef HRESULT (WINAPI *GetDpiForMonitor)(HMONITOR,int,UINT *,UINT *);
- GetProcessDpiAwareness getProcessDpiAwareness;
- SetProcessDpiAwareness setProcessDpiAwareness;
- GetDpiForMonitor getDpiForMonitor;
+ GetProcessDpiAwareness getProcessDpiAwareness = nullptr;
+ SetProcessDpiAwareness setProcessDpiAwareness = nullptr;
+ GetDpiForMonitor getDpiForMonitor = nullptr;
};
class QWindowsContext