summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2013-08-06 07:38:11 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-23 16:16:40 +0200
commitaf9ecedd523e5d41983160a9832bb8d90a1c5391 (patch)
tree88020bacc3f753c261c28d50b3b05d94443c7507 /src/gui/dialogs
parentb2a91d3a918524f7e45f0f19d3f0efa4db0db709 (diff)
OSX: Disable window restoration for the Mac font panel
because if it is automatically restored it's out of the application's control, so the user's interaction will be ignored. Change I8ce3cd94f5ae81d7877a346743ca4e0e188baa02 did this for normal windows by default, but the dialog helpers generate windows which aren't affected by that. Change-Id: I46ce3f85ee0c11dca778eb663c87774e322d6b6b (cherry-picked from qtbase commit c9182bc11b77675405941a0a163603cac064d8bc) Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm
index 767451416e..0137df0e45 100644
--- a/src/gui/dialogs/qfontdialog_mac.mm
+++ b/src/gui/dialogs/qfontdialog_mac.mm
@@ -176,6 +176,11 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
mReturnCode = -1;
mAppModal = false;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7)
+ [mFontPanel setRestorable:NO];
+#endif
+
if (mPanelHackedWithButtons) {
[self relayout];