Fix build on 5.12
Q_DISABLE_COPY_MOVE: since 5.13 QLatin1String arg: since 5.14 Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
17b35173ef
commit
cde5ebcf8d
|
@ -41,6 +41,10 @@
|
|||
#define GET_X_LPARAM(lp) ((int) (short) LOWORD(lp))
|
||||
#define GET_Y_LPARAM(lp) ((int) (short) HIWORD(lp))
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||
#define QLatin1String(str) QString::fromUtf8(str)
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
const char useNativeTitleBar[] = "WNEF_USE_NATIVE_TITLE_BAR";
|
||||
|
|
|
@ -32,6 +32,16 @@ QT_FORWARD_DECLARE_CLASS(Widget)
|
|||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#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 Widget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Reference in New Issue