Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 43f632f

Browse files
authored
Fix the bug of unregistered datatype QuickGlobal::SystemTheme in Qt 5. (#240)
1 parent 9dce992 commit 43f632f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/quick/framelessquickmodule.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,13 @@ void FramelessHelper::Quick::registerTypes(QQmlEngine *engine)
9191
return new FramelessQuickUtils;
9292
});
9393
qmlRegisterAnonymousType<QuickChromePalette>(QUICK_URI_SHORT);
94-
94+
#if (QT_VERSION <= QT_VERSION_CHECK(5, 16, 0))
95+
qRegisterMetaType<QuickGlobal::SystemTheme>("QuickGlobal::SystemTheme");
96+
qRegisterMetaType<QuickGlobal::SystemButtonType>("QuickGlobal::SystemButtonType");
97+
qRegisterMetaType<QuickGlobal::ButtonState>("QuickGlobal::ButtonState");
98+
qRegisterMetaType<QuickGlobal::BlurMode>("QuickGlobal::BlurMode");
99+
qRegisterMetaType<QuickGlobal::WindowEdge>("QuickGlobal::WindowEdge");
100+
#endif
95101
qmlRegisterType<FramelessQuickHelper>(QUICK_URI_EXPAND("FramelessHelper"));
96102
qmlRegisterType<QuickMicaMaterial>(QUICK_URI_EXPAND("MicaMaterial"));
97103
qmlRegisterType<QuickImageItem>(QUICK_URI_EXPAND("ImageItem"));

0 commit comments

Comments
 (0)