File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -745,22 +745,34 @@ static inline void releaseWindowProxy(const WId windowId) {
745745 Q_ASSERT (m_windowId);
746746
747747 if (key == QStringLiteral (" no-system-buttons" )) {
748+ #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
748749 if (attribute.type () != QVariant::Bool)
750+ #else
751+ if (attribute.typeId () != QMetaType::Type::Bool)
752+ #endif
749753 return false ;
750754 ensureWindowProxy (m_windowId)->setSystemButtonVisible (!attribute.toBool ());
751755 return true ;
752756 }
753757
754758 if (key == QStringLiteral (" blur-effect" )) {
755759 auto mode = NSWindowProxy::BlurMode::None;
760+ #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
756761 if (attribute.type () == QVariant::Bool) {
762+ #else
763+ if (attribute.typeId () == QMetaType::Type::Bool) {
764+ #endif
757765 if (attribute.toBool ()) {
758766 NSString *osxMode =
759767 [[NSUserDefaults standardUserDefaults ] stringForKey: @" AppleInterfaceStyle" ];
760768 mode = [osxMode isEqualToString: @" Dark" ] ? NSWindowProxy::BlurMode::Dark
761769 : NSWindowProxy::BlurMode::Light;
762770 }
771+ #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
763772 } else if (attribute.type () == QVariant::String) {
773+ #else
774+ } else if (attribute.typeId () == QMetaType::Type::QString) {
775+ #endif
764776 auto value = attribute.toString ();
765777 if (value == QStringLiteral (" dark" )) {
766778 mode = NSWindowProxy::BlurMode::Dark;
You can’t perform that action at this time.
0 commit comments