From 27e723496351bf4077b3f5e548fddb252e032579 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 24 May 2019 16:34:40 +0200 Subject: Windows QPA: Fix clang warnings about using typedef Replace by using (except for function pointers). Change-Id: I0dfe03c22f9f87155003d13a6376381623df7217 Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowscursor.h | 2 +- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 10 +++++----- src/plugins/platforms/windows/qwindowsdialoghelpers.h | 2 +- src/plugins/platforms/windows/qwindowsmenu.h | 4 ++-- src/plugins/platforms/windows/qwindowsmousehandler.cpp | 4 ++-- src/plugins/platforms/windows/qwindowsscreen.cpp | 2 +- src/plugins/platforms/windows/qwindowsscreen.h | 4 ++-- src/plugins/platforms/windows/qwindowssystemtrayicon.cpp | 2 +- src/plugins/platforms/windows/qwindowswindow.cpp | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowscursor.h b/src/plugins/platforms/windows/qwindowscursor.h index d5c189b5ca..b896f4c7a9 100644 --- a/src/plugins/platforms/windows/qwindowscursor.h +++ b/src/plugins/platforms/windows/qwindowscursor.h @@ -84,7 +84,7 @@ private: const HCURSOR m_hcursor; }; -typedef QSharedPointer CursorHandlePtr; +using CursorHandlePtr = QSharedPointer; class QWindowsCursor : public QPlatformCursor { diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index e55b8fd7b8..57f19b5ff2 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -271,7 +271,7 @@ QWindowsNativeDialogBase *QWindowsDialogHelperBase::ensureNativeDialo class QWindowsDialogThread : public QThread { public: - typedef QSharedPointer QWindowsNativeDialogBasePtr; + using QWindowsNativeDialogBasePtr = QSharedPointer; explicit QWindowsDialogThread(const QWindowsNativeDialogBasePtr &d, HWND owner) : m_dialog(d), m_owner(owner) {} @@ -551,7 +551,7 @@ IFileDialogEvents *QWindowsNativeFileDialogEventHandler::create(QWindowsNativeFi class QWindowsShellItem { public: - typedef std::vector IShellItems; + using IShellItems = std::vector; explicit QWindowsShellItem(IShellItem *item); @@ -1688,7 +1688,7 @@ class QWindowsXpNativeFileDialog : public QWindowsNativeDialogBase { Q_OBJECT public: - typedef QSharedPointer OptionsPtr; + using OptionsPtr = QSharedPointer; static QWindowsXpNativeFileDialog *create(const OptionsPtr &options, const QWindowsFileDialogSharedData &data); @@ -1779,7 +1779,7 @@ static int QT_WIN_CALLBACK xpFileDialogGetExistingDirCallbackProc(HWND hwnd, UIN #if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3) typedef ITEMIDLIST *qt_LpItemIdList; #else -typedef PIDLIST_ABSOLUTE qt_LpItemIdList; +using qt_LpItemIdList = PIDLIST_ABSOLUTE; #endif int QWindowsXpNativeFileDialog::existingDirCallback(HWND hwnd, UINT uMsg, LPARAM lParam) @@ -2007,7 +2007,7 @@ QString QWindowsXpFileDialogHelper::selectedNameFilter() const \ingroup qt-lighthouse-win */ -typedef QSharedPointer SharedPointerColor; +using SharedPointerColor = QSharedPointer; #ifdef USE_NATIVE_COLOR_DIALOG class QWindowsNativeColorDialog : public QWindowsNativeDialogBase diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.h b/src/plugins/platforms/windows/qwindowsdialoghelpers.h index f0a7ef5e90..8686749011 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.h +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.h @@ -66,7 +66,7 @@ class QWindowsDialogHelperBase : public BaseClass { Q_DISABLE_COPY_MOVE(QWindowsDialogHelperBase) public: - typedef QSharedPointer QWindowsNativeDialogBasePtr; + using QWindowsNativeDialogBasePtr = QSharedPointer; ~QWindowsDialogHelperBase() { cleanupThread(); } void exec() override; diff --git a/src/plugins/platforms/windows/qwindowsmenu.h b/src/plugins/platforms/windows/qwindowsmenu.h index 6de1553f35..aa36846ec0 100644 --- a/src/plugins/platforms/windows/qwindowsmenu.h +++ b/src/plugins/platforms/windows/qwindowsmenu.h @@ -120,7 +120,7 @@ class QWindowsMenu : public QPlatformMenu { Q_OBJECT public: - typedef QVector MenuItems; + using MenuItems = QVector; QWindowsMenu(); ~QWindowsMenu(); @@ -196,7 +196,7 @@ class QWindowsMenuBar : public QPlatformMenuBar { Q_OBJECT public: - typedef QVector Menus; + using Menus = QVector; QWindowsMenuBar(); ~QWindowsMenuBar() override; diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp index 97e1319e8d..c15819a65f 100644 --- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp +++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp @@ -609,8 +609,8 @@ bool QWindowsMouseHandler::translateTouchEvent(QWindow *window, HWND, QtWindows::WindowsEventType, MSG msg, LRESULT *) { - typedef QWindowSystemInterface::TouchPoint QTouchPoint; - typedef QList QTouchPointList; + using QTouchPoint = QWindowSystemInterface::TouchPoint; + using QTouchPointList = QList; if (!QWindowsContext::instance()->initTouch()) { qWarning("Unable to initialize touch handling."); diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp index 2f8850cbe0..e3931b3bb1 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.cpp +++ b/src/plugins/platforms/windows/qwindowsscreen.cpp @@ -72,7 +72,7 @@ static inline QDpi monitorDPI(HMONITOR hMonitor) return {0, 0}; } -typedef QList WindowsScreenDataList; +using WindowsScreenDataList = QList; static bool monitorData(HMONITOR hMonitor, QWindowsScreenData *data) { diff --git a/src/plugins/platforms/windows/qwindowsscreen.h b/src/plugins/platforms/windows/qwindowsscreen.h index 3eb2d35b27..0ccebf6d71 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.h +++ b/src/plugins/platforms/windows/qwindowsscreen.h @@ -76,7 +76,7 @@ class QWindowsScreen : public QPlatformScreen { public: #ifndef QT_NO_CURSOR - typedef QScopedPointer CursorPtr; + using CursorPtr = QScopedPointer; #endif explicit QWindowsScreen(const QWindowsScreenData &data); @@ -127,7 +127,7 @@ private: class QWindowsScreenManager { public: - typedef QList WindowsScreenList; + using WindowsScreenList = QList; QWindowsScreenManager(); diff --git a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp index c0f4e4d014..f2dba4d06b 100644 --- a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp +++ b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp @@ -117,7 +117,7 @@ struct QWindowsHwndSystemTrayIconEntry QWindowsSystemTrayIcon *trayIcon; }; -typedef QVector HwndTrayIconEntries; +using HwndTrayIconEntries = QVector; Q_GLOBAL_STATIC(HwndTrayIconEntries, hwndTrayIconEntries) diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 174c63bbbd..3669407765 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE -typedef QSharedPointer QWindowCreationContextPtr; +using QWindowCreationContextPtr = QSharedPointer; enum { defaultWindowWidth = 160, @@ -494,7 +494,7 @@ static QMargins invisibleMargins(QPoint screenPoint) struct WindowCreationData { - typedef QWindowsWindowData WindowData; + using WindowData = QWindowsWindowData; enum Flags { ForceChild = 0x1, ForceTopLevel = 0x2 }; void fromWindow(const QWindow *w, const Qt::WindowFlags flags, unsigned creationFlags = 0); -- cgit v1.2.3