summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
authorMartin Petersson <martin.petersson@nokia.com>2011-03-10 14:07:15 (GMT)
committerMartin Petersson <martin.petersson@nokia.com>2011-03-10 14:07:15 (GMT)
commitdb1ccf9d57f19cf01efb020b6d1967ef6084a8e3 (patch)
tree6d950a5a9648073ba0a60fc468c62620ee4e755b /src/gui/kernel/qwidget_mac.mm
parent4500aa5227f75c3f10f82e5e5b452eb6bee386ae (diff)
downloadQt-db1ccf9d57f19cf01efb020b6d1967ef6084a8e3.zip
Qt-db1ccf9d57f19cf01efb020b6d1967ef6084a8e3.tar.gz
Qt-db1ccf9d57f19cf01efb020b6d1967ef6084a8e3.tar.bz2
Mac: Center the Window title on Cocoa.
Task-number: QTBUG-13593 Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r--src/gui/kernel/qwidget_mac.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 9a5a5f1..14a90ef 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3239,6 +3239,8 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset)
ReleaseIconRef(previousIcon);
#else
QMacCocoaAutoReleasePool pool;
+ if (icon.isNull())
+ return;
NSButton *iconButton = [qt_mac_window_for(q) standardWindowButton:NSWindowDocumentIconButton];
if (iconButton == nil) {
QCFString string(q->windowTitle());