From aa146d1893eb7a98d8c281e54b25347a395c6313 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Wed, 13 May 2020 20:01:44 +0800 Subject: [PATCH] Fix 5.12 build error. Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- README.md | 2 +- framelessquickhelper.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 846d65e..db5c2ed 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ WinNativeEventFilter::setWindowData(reinterpret_cast(widget.winId()), &dat const auto data = WinNativeEventFilter::windowData(reinterpret_cast(widget.winId())); data.borderWidth = 5; data.borderHeight = 5; -data.titlebarHeight = 30; +data.titleBarHeight = 30; ``` ## Supported Platforms diff --git a/framelessquickhelper.h b/framelessquickhelper.h index 9010f47..49a39ae 100644 --- a/framelessquickhelper.h +++ b/framelessquickhelper.h @@ -36,6 +36,16 @@ #include "framelesshelper.h" #endif +#if (QT_VERSION < QT_VERSION_CHECK(5, 13, 0)) +#define Q_DISABLE_MOVE(Class) \ + Class(Class &&) = delete; \ + Class &operator=(Class &&) = delete; + +#define Q_DISABLE_COPY_MOVE(Class) \ + Q_DISABLE_COPY(Class) \ + Q_DISABLE_MOVE(Class) +#endif + class FramelessQuickHelper : public QQuickItem { Q_OBJECT Q_DISABLE_COPY_MOVE(FramelessQuickHelper)