summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qmacstyle_mac.mm')
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 04fea3ec47..b2bf2c5565 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -661,11 +661,11 @@ static CGColorSpaceRef qt_mac_displayColorSpace(const QWidget *widget)
bool qt_macWindowIsTextured(const QWidget *window)
{
- NSWindow *nswindow = static_cast<NSWindow*>(
- QApplication::platformNativeInterface()->nativeResourceForWindow("NSWindow", window->windowHandle()));
- if (!nswindow)
- return false;
- return ([nswindow styleMask] & NSTexturedBackgroundWindowMask) ? true : false;
+ if (QWindow *w = window->windowHandle())
+ if (w->handle())
+ if (NSWindow *nswindow = static_cast<NSWindow*>(QGuiApplication::platformNativeInterface()->nativeResourceForWindow(QByteArrayLiteral("NSWindow"), w)))
+ return ([nswindow styleMask] & NSTexturedBackgroundWindowMask) ? true : false;
+ return false;
}
/*****************************************************************************
@@ -1785,6 +1785,7 @@ QMacStyle::~QMacStyle()
NotificationReceiver *receiver = static_cast<NotificationReceiver *>(d->receiver);
[[NSNotificationCenter defaultCenter] removeObserver:receiver];
+ [receiver release];
}
#endif
@@ -2465,9 +2466,6 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_TabBar_PreferNoArrows:
ret = true;
break;
- case SH_LineEdit_PasswordCharacter:
- ret = kBulletUnicode;
- break;
/*
case SH_DialogButtons_DefaultButton:
ret = QDialogButtons::Reject;