diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-03 15:26:34 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-03 15:51:20 +0200 |
commit | 5591e821358b9111c79336a66eac4d04bb5811ba (patch) | |
tree | 4b4c1da4f5ccaead1cf4f487622de1d0b242b0b9 /src/plugins | |
parent | e4079eca49adce16e31dac2a18d49d7a55817891 (diff) | |
parent | ca0c9f82cbf7c8c37acdcbdfdc3fa0c5fc138059 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ide5b3408bfefca410323cf26b810b44c06d3a227
Diffstat (limited to 'src/plugins')
51 files changed, 169 insertions, 216 deletions
diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.h b/src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.h index f72ea2b038..6d4d47e3da 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.h +++ b/src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.h @@ -48,7 +48,7 @@ class QWindowsDirect2DWindow; class QWindowsDirect2DBackingStore : public QPlatformBackingStore { - Q_DISABLE_COPY(QWindowsDirect2DBackingStore) + Q_DISABLE_COPY_MOVE(QWindowsDirect2DBackingStore) public: QWindowsDirect2DBackingStore(QWindow *window); diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h index d8a8a49aec..8fd683106d 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h +++ b/src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h @@ -59,7 +59,7 @@ class QColor; class QWindowsDirect2DBitmap { Q_DECLARE_PRIVATE(QWindowsDirect2DBitmap) - Q_DISABLE_COPY(QWindowsDirect2DBitmap) + Q_DISABLE_COPY_MOVE(QWindowsDirect2DBitmap) public: QWindowsDirect2DBitmap(); QWindowsDirect2DBitmap(ID2D1Bitmap1 *bitmap, ID2D1DeviceContext *dc); diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h index aee0eb867d..a28c674671 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h +++ b/src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h @@ -91,7 +91,7 @@ private: }; class QWindowsDirect2DDeviceContextSuspender { - Q_DISABLE_COPY(QWindowsDirect2DDeviceContextSuspender) + Q_DISABLE_COPY_MOVE(QWindowsDirect2DDeviceContextSuspender) QWindowsDirect2DDeviceContext *m_dc; public: diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp index fa201c784e..1b82db0b37 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp +++ b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp @@ -1800,7 +1800,7 @@ void QWindowsDirect2DPaintEngine::resume() class QWindowsDirect2DPaintEngineSuspenderImpl { - Q_DISABLE_COPY(QWindowsDirect2DPaintEngineSuspenderImpl) + Q_DISABLE_COPY_MOVE(QWindowsDirect2DPaintEngineSuspenderImpl) QWindowsDirect2DPaintEngine *m_engine; bool m_active; public: diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h index 6404c60b13..f61e908bce 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h +++ b/src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h @@ -128,7 +128,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QWindowsDirect2DPaintEngine::Flags) class QWindowsDirect2DPaintEngineSuspenderPrivate; class QWindowsDirect2DPaintEngineSuspender { - Q_DISABLE_COPY(QWindowsDirect2DPaintEngineSuspender) + Q_DISABLE_COPY_MOVE(QWindowsDirect2DPaintEngineSuspender) Q_DECLARE_PRIVATE(QWindowsDirect2DPaintEngineSuspender) QScopedPointer<QWindowsDirect2DPaintEngineSuspenderPrivate> d_ptr; public: diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.h b/src/plugins/platforms/windows/qwindowsbackingstore.h index 088ab3b257..b96c8f0e61 100644 --- a/src/plugins/platforms/windows/qwindowsbackingstore.h +++ b/src/plugins/platforms/windows/qwindowsbackingstore.h @@ -52,7 +52,7 @@ class QWindowsNativeImage; class QWindowsBackingStore : public QPlatformBackingStore { - Q_DISABLE_COPY(QWindowsBackingStore) + Q_DISABLE_COPY_MOVE(QWindowsBackingStore) public: QWindowsBackingStore(QWindow *window); ~QWindowsBackingStore() override; diff --git a/src/plugins/platforms/windows/qwindowsclipboard.h b/src/plugins/platforms/windows/qwindowsclipboard.h index 469d638b89..24a6bc908d 100644 --- a/src/plugins/platforms/windows/qwindowsclipboard.h +++ b/src/plugins/platforms/windows/qwindowsclipboard.h @@ -58,7 +58,7 @@ protected: class QWindowsClipboard : public QPlatformClipboard { - Q_DISABLE_COPY(QWindowsClipboard) + Q_DISABLE_COPY_MOVE(QWindowsClipboard) public: QWindowsClipboard(); ~QWindowsClipboard() override; @@ -87,8 +87,8 @@ private: QWindowsClipboardRetrievalMimeData m_retrievalData; QWindowsOleDataObject *m_data = nullptr; - HWND m_clipboardViewer = 0; - HWND m_nextClipboardViewer = 0; + HWND m_clipboardViewer = nullptr; + HWND m_nextClipboardViewer = nullptr; bool m_formatListenerRegistered = false; }; diff --git a/src/plugins/platforms/windows/qwindowscombase.h b/src/plugins/platforms/windows/qwindowscombase.h index 6b25d665dc..45cba9c68b 100644 --- a/src/plugins/platforms/windows/qwindowscombase.h +++ b/src/plugins/platforms/windows/qwindowscombase.h @@ -80,7 +80,7 @@ bool qWindowsComQueryUnknownInterfaceMulti(Derived *d, REFIID id, LPVOID *iface) // Helper base class to provide IUnknown methods for COM classes (single inheritance) template <class ComInterface> class QWindowsComBase : public ComInterface { - Q_DISABLE_COPY(QWindowsComBase) + Q_DISABLE_COPY_MOVE(QWindowsComBase) public: explicit QWindowsComBase(ULONG initialRefCount = 1) : m_ref(initialRefCount) {} virtual ~QWindowsComBase() = default; diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h index 4908f14629..d94ae3f73b 100644 --- a/src/plugins/platforms/windows/qwindowscontext.h +++ b/src/plugins/platforms/windows/qwindowscontext.h @@ -155,7 +155,7 @@ struct QWindowsShcoreDLL { class QWindowsContext { - Q_DISABLE_COPY(QWindowsContext) + Q_DISABLE_COPY_MOVE(QWindowsContext) public: enum SystemInfoFlags @@ -180,11 +180,11 @@ public: QString registerWindowClass(const QWindow *w); QString registerWindowClass(QString cname, WNDPROC proc, - unsigned style = 0, HBRUSH brush = 0, + unsigned style = 0, HBRUSH brush = nullptr, bool icon = false); HWND createDummyWindow(const QString &classNameIn, const wchar_t *windowName, - WNDPROC wndProc = 0, DWORD style = WS_OVERLAPPED); + WNDPROC wndProc = nullptr, DWORD style = WS_OVERLAPPED); HDC displayContext() const; int screenDepth() const; diff --git a/src/plugins/platforms/windows/qwindowscursor.h b/src/plugins/platforms/windows/qwindowscursor.h index 2e57c80def..d5c189b5ca 100644 --- a/src/plugins/platforms/windows/qwindowscursor.h +++ b/src/plugins/platforms/windows/qwindowscursor.h @@ -68,7 +68,7 @@ inline uint qHash(const QWindowsPixmapCursorCacheKey &k, uint seed) noexcept class CursorHandle { - Q_DISABLE_COPY(CursorHandle) + Q_DISABLE_COPY_MOVE(CursorHandle) public: explicit CursorHandle(HCURSOR hcursor = nullptr) : m_hcursor(hcursor) {} ~CursorHandle() diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index e0bd38c951..e55b8fd7b8 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -507,7 +507,7 @@ class QWindowsNativeFileDialogBase; class QWindowsNativeFileDialogEventHandler : public QWindowsComBase<IFileDialogEvents> { - Q_DISABLE_COPY(QWindowsNativeFileDialogEventHandler) + Q_DISABLE_COPY_MOVE(QWindowsNativeFileDialogEventHandler) public: static IFileDialogEvents *create(QWindowsNativeFileDialogBase *nativeFileDialog); diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.h b/src/plugins/platforms/windows/qwindowsdialoghelpers.h index 6099ea9ac6..f0a7ef5e90 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.h +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.h @@ -64,7 +64,7 @@ namespace QWindowsDialogs template <class BaseClass> class QWindowsDialogHelperBase : public BaseClass { - Q_DISABLE_COPY(QWindowsDialogHelperBase) + Q_DISABLE_COPY_MOVE(QWindowsDialogHelperBase) public: typedef QSharedPointer<QWindowsNativeDialogBase> QWindowsNativeDialogBasePtr; ~QWindowsDialogHelperBase() { cleanupThread(); } @@ -75,7 +75,7 @@ public: QWindow *parent) override; void hide() override; - virtual bool supportsNonModalDialog(const QWindow * /* parent */ = 0) const { return true; } + virtual bool supportsNonModalDialog(const QWindow * /* parent */ = nullptr) const { return true; } protected: QWindowsDialogHelperBase() = default; @@ -91,7 +91,7 @@ private: void cleanupThread(); QWindowsNativeDialogBasePtr m_nativeDialog; - HWND m_ownerWindow = 0; + HWND m_ownerWindow = nullptr; int m_timerId = 0; QThread *m_thread = nullptr; }; diff --git a/src/plugins/platforms/windows/qwindowseglcontext.h b/src/plugins/platforms/windows/qwindowseglcontext.h index 8a1e1ddae8..d96e266159 100644 --- a/src/plugins/platforms/windows/qwindowseglcontext.h +++ b/src/plugins/platforms/windows/qwindowseglcontext.h @@ -109,7 +109,7 @@ private: class QWindowsEGLStaticContext : public QWindowsStaticOpenGLContext { - Q_DISABLE_COPY(QWindowsEGLStaticContext) + Q_DISABLE_COPY_MOVE(QWindowsEGLStaticContext) public: static QWindowsEGLStaticContext *create(QWindowsOpenGLTester::Renderers preferredType); diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index d534ce87cd..66dd32d05e 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -916,7 +916,7 @@ void QWindowsOpenGLContextFormat::apply(QSurfaceFormat *format) const class QOpenGLTemporaryContext { - Q_DISABLE_COPY(QOpenGLTemporaryContext) + Q_DISABLE_COPY_MOVE(QOpenGLTemporaryContext) public: QOpenGLTemporaryContext(); ~QOpenGLTemporaryContext(); diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h index 199f8112e3..1abe2eb390 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.h +++ b/src/plugins/platforms/windows/qwindowsglcontext.h @@ -75,9 +75,9 @@ struct QOpenGLContextData QOpenGLContextData(HGLRC r, HWND h, HDC d) : renderingContext(r), hwnd(h), hdc(d) {} QOpenGLContextData() {} - HGLRC renderingContext = 0; - HWND hwnd = 0; - HDC hdc = 0; + HGLRC renderingContext = nullptr; + HWND hwnd = nullptr; + HDC hdc = nullptr; }; class QOpenGLStaticContext; @@ -89,7 +89,7 @@ struct QWindowsOpenGLContextFormat QSurfaceFormat::OpenGLContextProfile profile = QSurfaceFormat::NoProfile; int version = 0; //! majorVersion<<8 + minorVersion - QSurfaceFormat::FormatOptions options = 0; + QSurfaceFormat::FormatOptions options = nullptr; }; #ifndef QT_NO_DEBUG_STREAM @@ -134,7 +134,7 @@ private: class QOpenGLStaticContext : public QWindowsStaticOpenGLContext { - Q_DISABLE_COPY(QOpenGLStaticContext) + Q_DISABLE_COPY_MOVE(QOpenGLStaticContext) QOpenGLStaticContext(); public: enum Extensions @@ -222,7 +222,7 @@ private: typedef GLenum (APIENTRY *GlGetGraphicsResetStatusArbType)(); inline void releaseDCs(); - bool updateObtainedParams(HDC hdc, int *obtainedSwapInterval = 0); + bool updateObtainedParams(HDC hdc, int *obtainedSwapInterval = nullptr); QOpenGLStaticContext *m_staticContext; QOpenGLContext *m_context; diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.h b/src/plugins/platforms/windows/qwindowsinputcontext.h index a47585c29e..857706bcb9 100644 --- a/src/plugins/platforms/windows/qwindowsinputcontext.h +++ b/src/plugins/platforms/windows/qwindowsinputcontext.h @@ -53,12 +53,12 @@ class QWindowsWindow; class QWindowsInputContext : public QPlatformInputContext { - Q_DISABLE_COPY(QWindowsInputContext) + Q_DISABLE_COPY_MOVE(QWindowsInputContext) Q_OBJECT struct CompositionContext { - HWND hwnd = 0; + HWND hwnd = nullptr; QString composition; int position = 0; bool isComposing = false; diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 8dd3810463..f0754e3e57 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -133,7 +133,7 @@ QT_BEGIN_NAMESPACE struct QWindowsIntegrationPrivate { - Q_DISABLE_COPY(QWindowsIntegrationPrivate) + Q_DISABLE_COPY_MOVE(QWindowsIntegrationPrivate) explicit QWindowsIntegrationPrivate(const QStringList ¶mList); ~QWindowsIntegrationPrivate(); diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h index 015cf79b6c..b49d21022b 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.h +++ b/src/plugins/platforms/windows/qwindowsintegration.h @@ -54,7 +54,7 @@ class QWindowsStaticOpenGLContext; class QWindowsIntegration : public QPlatformIntegration { - Q_DISABLE_COPY(QWindowsIntegration) + Q_DISABLE_COPY_MOVE(QWindowsIntegration) public: enum Options { // Options to be passed on command line. FontDatabaseFreeType = 0x1, diff --git a/src/plugins/platforms/windows/qwindowskeymapper.h b/src/plugins/platforms/windows/qwindowskeymapper.h index a454f0f973..b1ada1d373 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.h +++ b/src/plugins/platforms/windows/qwindowskeymapper.h @@ -71,7 +71,7 @@ struct KeyboardLayoutItem { class QWindowsKeyMapper { - Q_DISABLE_COPY(QWindowsKeyMapper) + Q_DISABLE_COPY_MOVE(QWindowsKeyMapper) public: explicit QWindowsKeyMapper(); ~QWindowsKeyMapper(); diff --git a/src/plugins/platforms/windows/qwindowsmime.h b/src/plugins/platforms/windows/qwindowsmime.h index 6bbbae1a0e..1c389e8800 100644 --- a/src/plugins/platforms/windows/qwindowsmime.h +++ b/src/plugins/platforms/windows/qwindowsmime.h @@ -53,7 +53,7 @@ class QMimeData; class QWindowsMime { - Q_DISABLE_COPY(QWindowsMime) + Q_DISABLE_COPY_MOVE(QWindowsMime) public: QWindowsMime(); virtual ~QWindowsMime(); @@ -73,7 +73,7 @@ public: class QWindowsMimeConverter { - Q_DISABLE_COPY(QWindowsMimeConverter) + Q_DISABLE_COPY_MOVE(QWindowsMimeConverter) public: QWindowsMimeConverter(); ~QWindowsMimeConverter(); @@ -85,7 +85,7 @@ public: // Convenience. QVariant convertToMime(const QStringList &mimeTypes, IDataObject *pDataObj, QVariant::Type preferredType, - QString *format = 0) const; + QString *format = nullptr) const; void registerMime(QWindowsMime *mime); void unregisterMime(QWindowsMime *mime) { m_mimes.removeOne(mime); } diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.h b/src/plugins/platforms/windows/qwindowsmousehandler.h index 5fe4b09c1e..1d3d1f4761 100644 --- a/src/plugins/platforms/windows/qwindowsmousehandler.h +++ b/src/plugins/platforms/windows/qwindowsmousehandler.h @@ -54,7 +54,7 @@ class QTouchDevice; class QWindowsMouseHandler { - Q_DISABLE_COPY(QWindowsMouseHandler) + Q_DISABLE_COPY_MOVE(QWindowsMouseHandler) public: QWindowsMouseHandler(); @@ -79,7 +79,7 @@ public: static Qt::MouseButtons queryMouseButtons(); QWindow *windowUnderMouse() const { return m_windowUnderMouse.data(); } - void clearWindowUnderMouse() { m_windowUnderMouse = 0; } + void clearWindowUnderMouse() { m_windowUnderMouse = nullptr; } void clearEvents(); private: diff --git a/src/plugins/platforms/windows/qwindowsopenglcontext.h b/src/plugins/platforms/windows/qwindowsopenglcontext.h index cc6d93d35e..1416a7e575 100644 --- a/src/plugins/platforms/windows/qwindowsopenglcontext.h +++ b/src/plugins/platforms/windows/qwindowsopenglcontext.h @@ -51,7 +51,7 @@ class QWindowsOpenGLContext; class QWindowsStaticOpenGLContext { - Q_DISABLE_COPY(QWindowsStaticOpenGLContext) + Q_DISABLE_COPY_MOVE(QWindowsStaticOpenGLContext) public: static QWindowsStaticOpenGLContext *create(); virtual ~QWindowsStaticOpenGLContext() = default; @@ -63,7 +63,7 @@ public: // If the windowing system interface needs explicitly created window surfaces (like EGL), // reimplement these. - virtual void *createWindowSurface(void * /*nativeWindow*/, void * /*nativeConfig*/, int * /*err*/) { return 0; } + virtual void *createWindowSurface(void * /*nativeWindow*/, void * /*nativeConfig*/, int * /*err*/) { return nullptr; } virtual void destroyWindowSurface(void * /*nativeSurface*/) { } protected: @@ -75,14 +75,14 @@ private: class QWindowsOpenGLContext : public QPlatformOpenGLContext { - Q_DISABLE_COPY(QWindowsOpenGLContext) + Q_DISABLE_COPY_MOVE(QWindowsOpenGLContext) public: // Returns the native context handle (e.g. HGLRC for WGL, EGLContext for EGL). virtual void *nativeContext() const = 0; // These should be implemented only for some winsys interfaces, for example EGL. // For others, like WGL, they are not relevant. - virtual void *nativeDisplay() const { return 0; } + virtual void *nativeDisplay() const { return nullptr; } virtual void *nativeConfig() const { return 0; } protected: diff --git a/src/plugins/platforms/windows/qwindowsopengltester.cpp b/src/plugins/platforms/windows/qwindowsopengltester.cpp index 35418a18e7..ff495c8290 100644 --- a/src/plugins/platforms/windows/qwindowsopengltester.cpp +++ b/src/plugins/platforms/windows/qwindowsopengltester.cpp @@ -83,7 +83,7 @@ static GpuDescription adapterIdentifierToGpuDescription(const D3DADAPTER_IDENTIF class QDirect3D9Handle { public: - Q_DISABLE_COPY(QDirect3D9Handle) + Q_DISABLE_COPY_MOVE(QDirect3D9Handle) QDirect3D9Handle(); ~QDirect3D9Handle(); diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp index 778170d563..36c614af34 100644 --- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp +++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp @@ -480,7 +480,7 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd, << " message=" << Qt::hex << msg.message << " count=" << Qt::dec << count; - Qt::TouchPointStates allStates = 0; + Qt::TouchPointStates allStates = nullptr; for (quint32 i = 0; i < count; ++i) { if (QWindowsContext::verbose > 1) diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.h b/src/plugins/platforms/windows/qwindowspointerhandler.h index ccbb1d3939..068e804007 100644 --- a/src/plugins/platforms/windows/qwindowspointerhandler.h +++ b/src/plugins/platforms/windows/qwindowspointerhandler.h @@ -55,7 +55,7 @@ class QTouchDevice; class QWindowsPointerHandler { - Q_DISABLE_COPY(QWindowsPointerHandler) + Q_DISABLE_COPY_MOVE(QWindowsPointerHandler) public: QWindowsPointerHandler() = default; bool translatePointerEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result); diff --git a/src/plugins/platforms/windows/qwindowssessionmanager.h b/src/plugins/platforms/windows/qwindowssessionmanager.h index 4c4256f2b0..0769ed1fce 100644 --- a/src/plugins/platforms/windows/qwindowssessionmanager.h +++ b/src/plugins/platforms/windows/qwindowssessionmanager.h @@ -79,7 +79,7 @@ private: bool m_blockUserInput = false; bool m_canceled = false; - Q_DISABLE_COPY(QWindowsSessionManager) + Q_DISABLE_COPY_MOVE(QWindowsSessionManager) }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/windows/qwindowstabletsupport.h b/src/plugins/platforms/windows/qwindowstabletsupport.h index 8f97982308..6bcf3357a5 100644 --- a/src/plugins/platforms/windows/qwindowstabletsupport.h +++ b/src/plugins/platforms/windows/qwindowstabletsupport.h @@ -110,7 +110,7 @@ QDebug operator<<(QDebug d, const QWindowsTabletDeviceData &t); class QWindowsTabletSupport { - Q_DISABLE_COPY(QWindowsTabletSupport) + Q_DISABLE_COPY_MOVE(QWindowsTabletSupport) explicit QWindowsTabletSupport(HWND window, HCTX context); diff --git a/src/plugins/platforms/windows/qwindowstheme.h b/src/plugins/platforms/windows/qwindowstheme.h index c132f20167..4e24308445 100644 --- a/src/plugins/platforms/windows/qwindowstheme.h +++ b/src/plugins/platforms/windows/qwindowstheme.h @@ -51,7 +51,7 @@ class QWindow; class QWindowsTheme : public QPlatformTheme { - Q_DISABLE_COPY(QWindowsTheme) + Q_DISABLE_COPY_MOVE(QWindowsTheme) public: QWindowsTheme(); ~QWindowsTheme() override; @@ -71,7 +71,7 @@ public: QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override; - QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions = 0) const override; + QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions = nullptr) const override; void windowsThemeChanged(QWindow *window); void displayChanged() { refreshIconPixmapSizes(); } diff --git a/src/plugins/platforms/windows/qwindowsthreadpoolrunner.h b/src/plugins/platforms/windows/qwindowsthreadpoolrunner.h index 731e4b5432..ffe2e62069 100644 --- a/src/plugins/platforms/windows/qwindowsthreadpoolrunner.h +++ b/src/plugins/platforms/windows/qwindowsthreadpoolrunner.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE */ class QWindowsThreadPoolRunner { - Q_DISABLE_COPY(QWindowsThreadPoolRunner) + Q_DISABLE_COPY_MOVE(QWindowsThreadPoolRunner) #if QT_CONFIG(thread) template <class RunnableFunction> // nested class implementing QRunnable to execute a function. diff --git a/src/plugins/platforms/windows/qwindowsvulkaninstance.cpp b/src/plugins/platforms/windows/qwindowsvulkaninstance.cpp index 7a01483abd..812ea8193a 100644 --- a/src/plugins/platforms/windows/qwindowsvulkaninstance.cpp +++ b/src/plugins/platforms/windows/qwindowsvulkaninstance.cpp @@ -81,7 +81,7 @@ bool QWindowsVulkanInstance::supportsPresent(VkPhysicalDevice physicalDevice, VkSurfaceKHR QWindowsVulkanInstance::createSurface(HWND win) { - VkSurfaceKHR surface = 0; + VkSurfaceKHR surface = VK_NULL_HANDLE; if (!m_createSurface) { m_createSurface = reinterpret_cast<PFN_vkCreateWin32SurfaceKHR>( diff --git a/src/plugins/platforms/windows/qwindowsvulkaninstance.h b/src/plugins/platforms/windows/qwindowsvulkaninstance.h index 3292137c39..cc7ef476d4 100644 --- a/src/plugins/platforms/windows/qwindowsvulkaninstance.h +++ b/src/plugins/platforms/windows/qwindowsvulkaninstance.h @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE class QWindowsVulkanInstance : public QBasicPlatformVulkanInstance { - Q_DISABLE_COPY(QWindowsVulkanInstance) + Q_DISABLE_COPY_MOVE(QWindowsVulkanInstance) public: QWindowsVulkanInstance(QVulkanInstance *instance); diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index e700e6cff4..174c63bbbd 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1303,7 +1303,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data) m_cursor(new CursorHandle), m_format(aWindow->requestedFormat()) #if QT_CONFIG(vulkan) - , m_vkSurface(0) + , m_vkSurface(VK_NULL_HANDLE) #endif { QWindowsContext::instance()->addWindow(m_data.hwnd, this); @@ -1404,14 +1404,14 @@ void QWindowsWindow::destroyWindow() QVulkanInstance *inst = window()->vulkanInstance(); if (inst) static_cast<QWindowsVulkanInstance *>(inst->handle())->destroySurface(m_vkSurface); - m_vkSurface = 0; + m_vkSurface = VK_NULL_HANDLE; } #endif #ifndef QT_NO_OPENGL if (m_surface) { if (QWindowsStaticOpenGLContext *staticOpenGLContext = QWindowsIntegration::staticOpenGLContext()) staticOpenGLContext->destroyWindowSurface(m_surface); - m_surface = 0; + m_surface = nullptr; } #endif DestroyWindow(m_data.hwnd); @@ -2943,14 +2943,14 @@ void QWindowsWindow::invalidateSurface() QVulkanInstance *inst = window()->vulkanInstance(); if (inst) static_cast<QWindowsVulkanInstance *>(inst->handle())->destroySurface(m_vkSurface); - m_vkSurface = 0; + m_vkSurface = VK_NULL_HANDLE; } #endif #ifndef QT_NO_OPENGL if (m_surface) { if (QWindowsStaticOpenGLContext *staticOpenGLContext = QWindowsIntegration::staticOpenGLContext()) staticOpenGLContext->destroyWindowSurface(m_surface); - m_surface = 0; + m_surface = nullptr; } #endif // QT_NO_OPENGL } diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h index 1abe1e3531..7efbcf900c 100644 --- a/src/plugins/platforms/windows/qwindowswindow.h +++ b/src/plugins/platforms/windows/qwindowswindow.h @@ -106,7 +106,7 @@ struct QWindowsWindowData QRect geometry; QMargins fullFrameMargins; // Do not use directly for windows, see FrameDirty. QMargins customMargins; // User-defined, additional frame for NCCALCSIZE - HWND hwnd = 0; + HWND hwnd = nullptr; bool embedded = false; bool hasFrame = false; @@ -117,7 +117,7 @@ struct QWindowsWindowData class QWindowsBaseWindow : public QPlatformWindow { - Q_DISABLE_COPY(QWindowsBaseWindow) + Q_DISABLE_COPY_MOVE(QWindowsBaseWindow) public: explicit QWindowsBaseWindow(QWindow *window) : QPlatformWindow(window) {} @@ -357,7 +357,7 @@ private: inline void setParent_sys(const QPlatformWindow *parent); inline void updateTransientParent() const; void destroyWindow(); - inline bool isDropSiteEnabled() const { return m_dropTarget != 0; } + inline bool isDropSiteEnabled() const { return m_dropTarget != nullptr; } void setDropSiteEnabled(bool enabled); void updateDropSite(bool topLevel); void handleGeometryChange(); @@ -368,7 +368,7 @@ private: mutable QWindowsWindowData m_data; QPointer<QWindowsMenuBar> m_menuBar; mutable unsigned m_flags = WithinCreate; - HDC m_hdc = 0; + HDC m_hdc = nullptr; Qt::WindowStates m_windowState = Qt::WindowNoState; qreal m_opacity = 1; #ifndef QT_NO_CURSOR @@ -378,15 +378,15 @@ private: unsigned m_savedStyle = 0; QRect m_savedFrameGeometry; const QSurfaceFormat m_format; - HICON m_iconSmall = 0; - HICON m_iconBig = 0; + HICON m_iconSmall = nullptr; + HICON m_iconBig = nullptr; void *m_surface = nullptr; static bool m_screenForGLInitialized; #if QT_CONFIG(vulkan) // note: intentionally not using void * in order to avoid breaking x86 - VkSurfaceKHR m_vkSurface = 0; + VkSurfaceKHR m_vkSurface = VK_NULL_HANDLE; #endif static bool m_borderInFullScreenDefault; }; @@ -471,11 +471,11 @@ inline void QWindowsWindow::destroyIcon() { if (m_iconBig) { DestroyIcon(m_iconBig); - m_iconBig = 0; + m_iconBig = nullptr; } if (m_iconSmall) { DestroyIcon(m_iconSmall); - m_iconSmall = 0; + m_iconSmall = nullptr; } } diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.h index 9caa7d6898..a20df28e3f 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiabaseprovider.h @@ -57,7 +57,7 @@ class QAccessibleInterface; class QWindowsUiaBaseProvider : public QObject { Q_OBJECT - Q_DISABLE_COPY(QWindowsUiaBaseProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaBaseProvider) public: explicit QWindowsUiaBaseProvider(QAccessible::Id id); virtual ~QWindowsUiaBaseProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.h index 3d17056d38..3244122038 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiagriditemprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaGridItemProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<IGridItemProvider> { - Q_DISABLE_COPY(QWindowsUiaGridItemProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaGridItemProvider) public: explicit QWindowsUiaGridItemProvider(QAccessible::Id id); virtual ~QWindowsUiaGridItemProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.h index b96fc1a93c..0e5f81108e 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiagridprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaGridProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<IGridProvider> { - Q_DISABLE_COPY(QWindowsUiaGridProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaGridProvider) public: explicit QWindowsUiaGridProvider(QAccessible::Id id); virtual ~QWindowsUiaGridProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.h index 5fb509c5f3..7d646894a1 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiainvokeprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaInvokeProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<IInvokeProvider> { - Q_DISABLE_COPY(QWindowsUiaInvokeProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaInvokeProvider) public: explicit QWindowsUiaInvokeProvider(QAccessible::Id id); virtual ~QWindowsUiaInvokeProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.h index df0d60f9c9..cdc239ed99 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.h @@ -60,7 +60,7 @@ class QWindowsUiaMainProvider : public IRawElementProviderFragmentRoot { Q_OBJECT - Q_DISABLE_COPY(QWindowsUiaMainProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaMainProvider) public: static QWindowsUiaMainProvider *providerForAccessible(QAccessibleInterface *accessible); explicit QWindowsUiaMainProvider(QAccessibleInterface *a, int initialRefCount = 1); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.h index c5e0a03ee5..fc82d3a2cc 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiarangevalueprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaRangeValueProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<IRangeValueProvider> { - Q_DISABLE_COPY(QWindowsUiaRangeValueProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaRangeValueProvider) public: explicit QWindowsUiaRangeValueProvider(QAccessible::Id id); virtual ~QWindowsUiaRangeValueProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.h index 1f2605188b..4b59c4e40f 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionitemprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaSelectionItemProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<ISelectionItemProvider> { - Q_DISABLE_COPY(QWindowsUiaSelectionItemProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaSelectionItemProvider) public: explicit QWindowsUiaSelectionItemProvider(QAccessible::Id id); virtual ~QWindowsUiaSelectionItemProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.h index 0376d25804..ee1044ec7a 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiaselectionprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaSelectionProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<ISelectionProvider> { - Q_DISABLE_COPY(QWindowsUiaSelectionProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaSelectionProvider) public: explicit QWindowsUiaSelectionProvider(QAccessible::Id id); virtual ~QWindowsUiaSelectionProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.h index bf4b52ee0b..9804c35f8e 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableitemprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaTableItemProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<ITableItemProvider> { - Q_DISABLE_COPY(QWindowsUiaTableItemProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaTableItemProvider) public: explicit QWindowsUiaTableItemProvider(QAccessible::Id id); virtual ~QWindowsUiaTableItemProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.h index 94c8ab93a7..a8b16035ec 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatableprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaTableProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<ITableProvider> { - Q_DISABLE_COPY(QWindowsUiaTableProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaTableProvider) public: explicit QWindowsUiaTableProvider(QAccessible::Id id); virtual ~QWindowsUiaTableProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.h index a9be70fa16..ffab48b0e8 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaTextProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<ITextProvider2> { - Q_DISABLE_COPY(QWindowsUiaTextProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaTextProvider) public: explicit QWindowsUiaTextProvider(QAccessible::Id id); ~QWindowsUiaTextProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.h index 39b9069fc0..3b4ec63ceb 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatextrangeprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaTextRangeProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<ITextRangeProvider> { - Q_DISABLE_COPY(QWindowsUiaTextRangeProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaTextRangeProvider) public: explicit QWindowsUiaTextRangeProvider(QAccessible::Id id, int startOffset, int endOffset); virtual ~QWindowsUiaTextRangeProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.h index 2bed6f7e36..892b635b41 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiatoggleprovider.h @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaToggleProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<IToggleProvider> { - Q_DISABLE_COPY(QWindowsUiaToggleProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaToggleProvider) public: explicit QWindowsUiaToggleProvider(QAccessible::Id id); virtual ~QWindowsUiaToggleProvider(); diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.h b/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.h index 334a17e51d..3edfe7a08b 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.h +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiavalueprovider.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE class QWindowsUiaValueProvider : public QWindowsUiaBaseProvider, public QWindowsComBase<IValueProvider> { - Q_DISABLE_COPY(QWindowsUiaValueProvider) + Q_DISABLE_COPY_MOVE(QWindowsUiaValueProvider) public: explicit QWindowsUiaValueProvider(QAccessible::Id id); virtual ~QWindowsUiaValueProvider(); diff --git a/src/plugins/sqldrivers/psql/qsql_psql.cpp b/src/plugins/sqldrivers/psql/qsql_psql.cpp index c1be91cb22..bf9424897d 100644 --- a/src/plugins/sqldrivers/psql/qsql_psql.cpp +++ b/src/plugins/sqldrivers/psql/qsql_psql.cpp @@ -1506,7 +1506,7 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const // this is safe since postgresql stores only the UTC value and not the timezone offset (only used // while parsing), so we have correct behavior in both case of with timezone and without tz r = QStringLiteral("TIMESTAMP WITH TIME ZONE ") + QLatin1Char('\'') + - QLocale::c().toString(field.value().toDateTime().toUTC(), QStringLiteral("yyyy-MM-ddThh:mm:ss.zzz")) + + QLocale::c().toString(field.value().toDateTime().toUTC(), QStringViewLiteral("yyyy-MM-ddThh:mm:ss.zzz")) + QLatin1Char('Z') + QLatin1Char('\''); } else { r = nullStr(); @@ -1518,7 +1518,7 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const case QVariant::Time: #if QT_CONFIG(datestring) if (field.value().toTime().isValid()) { - r = QLatin1Char('\'') + field.value().toTime().toString(QLatin1String("hh:mm:ss.zzz")) + QLatin1Char('\''); + r = QLatin1Char('\'') + field.value().toTime().toString(QStringViewLiteral("hh:mm:ss.zzz")) + QLatin1Char('\''); } else #endif { diff --git a/src/plugins/sqldrivers/tds/qsql_tds.cpp b/src/plugins/sqldrivers/tds/qsql_tds.cpp index ad95b097ef..603372230d 100644 --- a/src/plugins/sqldrivers/tds/qsql_tds.cpp +++ b/src/plugins/sqldrivers/tds/qsql_tds.cpp @@ -813,7 +813,7 @@ QString QTDSDriver::formatValue(const QSqlField &field, r = QLatin1String("NULL"); else if (field.type() == QVariant::DateTime) { if (field.value().toDateTime().isValid()){ - r = field.value().toDateTime().toString(QLatin1String("yyyyMMdd hh:mm:ss")); + r = field.value().toDateTime().toString(QStringViewLiteral("yyyyMMdd hh:mm:ss")); r.prepend(QLatin1String("'")); r.append(QLatin1String("'")); } else diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index 392368a40b..743713c86a 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -50,92 +50,30 @@ #define QMAC_QAQUASTYLE_SIZE_CONSTRAIN //#define DEBUG_SIZE_CONSTRAINT -#include <private/qcore_mac_p.h> -#if QT_CONFIG(tabbar) -#include <private/qtabbar_p.h> -#endif -#include <private/qpainter_p.h> -#include <qapplication.h> -#include <qbitmap.h> -#if QT_CONFIG(combobox) -#include <private/qcombobox_p.h> -#include <qcombobox.h> -#endif -#if QT_CONFIG(dialogbuttonbox) -#include <qdialogbuttonbox.h> -#endif -#if QT_CONFIG(dockwidget) -#include <qdockwidget.h> -#endif -#include <qevent.h> -#include <qfocusframe.h> -#include <qformlayout.h> -#include <qgroupbox.h> -#include <qhash.h> -#include <qheaderview.h> -#if QT_CONFIG(lineedit) -#include <qlineedit.h> -#endif -#if QT_CONFIG(mainwindow) -#include <qmainwindow.h> -#endif +#include <QtCore/qoperatingsystemversion.h> +#include <QtCore/qvariant.h> +#include <QtCore/qvarlengtharray.h> + +#include <QtCore/private/qcore_mac_p.h> + +#include <QtGui/private/qcoregraphics_p.h> +#include <QtGui/qpa/qplatformfontdatabase.h> +#include <QtGui/qpa/qplatformtheme.h> + +#include <QtWidgets/private/qstyleanimation_p.h> + #if QT_CONFIG(mdiarea) -#include <qmdisubwindow.h> -#endif -#if QT_CONFIG(menubar) -#include <qmenubar.h> -#endif -#include <qpaintdevice.h> -#include <qpainter.h> -#include <qpixmapcache.h> -#include <qpointer.h> -#if QT_CONFIG(progressbar) -#include <qprogressbar.h> -#endif -#if QT_CONFIG(pushbutton) -#include <qpushbutton.h> -#endif -#include <qradiobutton.h> -#if QT_CONFIG(rubberband) -#include <qrubberband.h> +#include <QtWidgets/qmdisubwindow.h> #endif #if QT_CONFIG(scrollbar) -#include <qscrollbar.h> -#endif -#if QT_CONFIG(sizegrip) -#include <qsizegrip.h> +#include <QtWidgets/qscrollbar.h> #endif -#include <qstyleoption.h> -#include <qtoolbar.h> -#if QT_CONFIG(toolbutton) -#include <qtoolbutton.h> -#endif -#if QT_CONFIG(treeview) -#include <qtreeview.h> -#endif -#if QT_CONFIG(tableview) -#include <qtableview.h> +#if QT_CONFIG(tabbar) +#include <QtWidgets/private/qtabbar_p.h> #endif -#include <qoperatingsystemversion.h> #if QT_CONFIG(wizard) -#include <qwizard.h> -#endif -#include <qdebug.h> -#if QT_CONFIG(datetimeedit) -#include <qdatetimeedit.h> -#endif -#include <qmath.h> -#include <QtWidgets/qgraphicsproxywidget.h> -#if QT_CONFIG(graphicsview) -#include <QtWidgets/qgraphicsview.h> +#include <QtWidgets/qwizard.h> #endif -#include <QtCore/qvariant.h> -#include <QtCore/qvarlengtharray.h> -#include <private/qstylehelper_p.h> -#include <private/qstyleanimation_p.h> -#include <qpa/qplatformfontdatabase.h> -#include <qpa/qplatformtheme.h> -#include <QtGui/private/qcoregraphics_p.h> QT_USE_NAMESPACE @@ -933,8 +871,10 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg else if (qobject_cast<const QLineEdit *>(widg)) ct = QStyle::CT_LineEdit; #endif +#if QT_CONFIG(itemviews) else if (qobject_cast<const QHeaderView *>(widg)) ct = QStyle::CT_HeaderSection; +#endif #if QT_CONFIG(menubar) else if (qobject_cast<const QMenuBar *>(widg)) ct = QStyle::CT_MenuBar; @@ -2908,9 +2848,11 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w ret = [NSScroller preferredScrollerStyle] == NSScrollerStyleOverlay; } break; +#if QT_CONFIG(itemviews) case SH_ItemView_ScrollMode: ret = QAbstractItemView::ScrollPerPixel; break; +#endif case SH_TitleBar_ShowToolTipsOnButtons: // min/max/close buttons on windows don't show tool tips ret = false; @@ -4608,6 +4550,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt, const int controlSize = getControlSize(opt, widget); switch (sr) { +#if QT_CONFIG(itemviews) case SE_ItemViewItemText: if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { int fw = proxy()->pixelMetric(PM_FocusFrameHMargin, opt, widget); @@ -4617,6 +4560,7 @@ QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt, rect.adjust(-fw, 0, 0, 0); } break; +#endif case SE_ToolBoxTabContents: rect = QCommonStyle::subElementRect(sr, opt, widget); break; @@ -6444,12 +6388,14 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, sz = sz.expandedTo(QSize(sz.width(), minimumSize)); } break; +#if QT_CONFIG(itemviews) case CT_ItemViewItem: if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { sz = QCommonStyle::sizeFromContents(ct, vopt, csz, widget); sz.setHeight(sz.height() + 2); } break; +#endif default: sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget); diff --git a/src/plugins/styles/mac/qmacstyle_mac_p_p.h b/src/plugins/styles/mac/qmacstyle_mac_p_p.h index dd99cf4bb5..6e7004485c 100644 --- a/src/plugins/styles/mac/qmacstyle_mac_p_p.h +++ b/src/plugins/styles/mac/qmacstyle_mac_p_p.h @@ -41,98 +41,105 @@ #ifndef QMACSTYLE_MAC_P_P_H #define QMACSTYLE_MAC_P_P_H -#include <QtWidgets/private/qtwidgetsglobal_p.h> -#include <QtWidgets/private/qcommonstyle_p.h> #include "qmacstyle_mac_p.h" -#include <private/qapplication_p.h> + +#include <QtCore/qdebug.h> +#include <QtCore/qhash.h> +#include <QtCore/qmap.h> +#include <QtCore/qmath.h> +#include <QtCore/qpair.h> +#include <QtCore/qpointer.h> +#include <QtCore/qtextstream.h> +#include <QtCore/qvector.h> + +#include <QtGui/private/qpainter_p.h> + +#include <QtGui/qbitmap.h> +#include <QtGui/qevent.h> +#include <QtGui/qpaintdevice.h> +#include <QtGui/qpainter.h> +#include <QtGui/qpixmapcache.h> + +#include <QtWidgets/private/qapplication_p.h> +#include <QtWidgets/private/qcommonstyle_p.h> +#include <QtWidgets/private/qstylehelper_p.h> + +#include <QtWidgets/qapplication.h> +#include <QtWidgets/qfocusframe.h> +#include <QtWidgets/qformlayout.h> +#include <QtWidgets/qlayout.h> +#include <QtWidgets/qstyleoption.h> +#include <QtWidgets/qtextedit.h> + +#if QT_CONFIG(checkbox) +#include <QtWidgets/qcheckbox.h> +#endif #if QT_CONFIG(combobox) -#include <private/qcombobox_p.h> +#include <QtWidgets/private/qcombobox_p.h> +#include <QtWidgets/qcombobox.h> #endif -#include <private/qpainter_p.h> -#include <private/qstylehelper_p.h> -#include <qapplication.h> -#include <qbitmap.h> -#if QT_CONFIG(checkbox) -#include <qcheckbox.h> +#if QT_CONFIG(datetimeedit) +#include <QtWidgets/qdatetimeedit.h> #endif -#include <qcombobox.h> #if QT_CONFIG(dialogbuttonbox) -#include <qdialogbuttonbox.h> +#include <QtWidgets/qdialogbuttonbox.h> #endif #if QT_CONFIG(dockwidget) -#include <qdockwidget.h> +#include <QtWidgets/qdockwidget.h> +#endif +#if QT_CONFIG(graphicsview) +#include <QtWidgets/qgraphicsproxywidget.h> +#include <QtWidgets/qgraphicsview.h> #endif -#include <qevent.h> -#include <qfocusframe.h> -#include <qformlayout.h> #if QT_CONFIG(groupbox) -#include <qgroupbox.h> +#include <QtWidgets/qgroupbox.h> +#endif +#if QT_CONFIG(itemviews) +#include <QtWidgets/qheaderview.h> #endif -#include <qhash.h> -#include <qheaderview.h> -#include <qlayout.h> #if QT_CONFIG(lineedit) -#include <qlineedit.h> +#include <QtWidgets/qlineedit.h> #endif #if QT_CONFIG(listview) -#include <qlistview.h> +#include <QtWidgets/qlistview.h> #endif #if QT_CONFIG(mainwindow) -#include <qmainwindow.h> +#include <QtWidgets/qmainwindow.h> #endif -#include <qmap.h> #if QT_CONFIG(menubar) -#include <qmenubar.h> +#include <QtWidgets/qmenubar.h> #endif -#include <qpaintdevice.h> -#include <qpainter.h> -#include <qpixmapcache.h> -#include <qpointer.h> #if QT_CONFIG(progressbar) -#include <qprogressbar.h> +#include <QtWidgets/qprogressbar.h> #endif #if QT_CONFIG(pushbutton) -#include <qpushbutton.h> +#include <QtWidgets/qpushbutton.h> #endif -#include <qradiobutton.h> +#include <QtWidgets/qradiobutton.h> #if QT_CONFIG(rubberband) -#include <qrubberband.h> +#include <QtWidgets/qrubberband.h> #endif #if QT_CONFIG(sizegrip) -#include <qsizegrip.h> +#include <QtWidgets/qsizegrip.h> #endif #if QT_CONFIG(spinbox) -#include <qspinbox.h> +#include <QtWidgets/qspinbox.h> #endif #if QT_CONFIG(splitter) -#include <qsplitter.h> +#include <QtWidgets/qsplitter.h> +#endif +#if QT_CONFIG(tableview) +#include <QtWidgets/qtableview.h> #endif -#include <qstyleoption.h> -#include <qtextedit.h> -#include <qtextstream.h> #if QT_CONFIG(toolbar) -#include <qtoolbar.h> +#include <QtWidgets/qtoolbar.h> #endif #if QT_CONFIG(toolbutton) -#include <qtoolbutton.h> +#include <QtWidgets/qtoolbutton.h> #endif #if QT_CONFIG(treeview) -#include <qtreeview.h> -#endif -#if QT_CONFIG(tableview) -#include <qtableview.h> +#include <QtWidgets/qtreeview.h> #endif -#include <qdebug.h> -#if QT_CONFIG(datetimeedit) -#include <qdatetimeedit.h> -#endif -#include <qmath.h> -#include <qpair.h> -#include <qvector.h> -#include <QtWidgets/qgraphicsproxywidget.h> -#include <QtWidgets/qgraphicsview.h> - - // // W A R N I N G |