diff options
author | Liang Qi <liang.qi@digia.com> | 2013-08-06 05:38:11 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-23 14:16:40 (GMT) |
commit | af9ecedd523e5d41983160a9832bb8d90a1c5391 (patch) | |
tree | 88020bacc3f753c261c28d50b3b05d94443c7507 /src/gui/dialogs | |
parent | b2a91d3a918524f7e45f0f19d3f0efa4db0db709 (diff) | |
download | Qt-af9ecedd523e5d41983160a9832bb8d90a1c5391.zip Qt-af9ecedd523e5d41983160a9832bb8d90a1c5391.tar.gz Qt-af9ecedd523e5d41983160a9832bb8d90a1c5391.tar.bz2 |
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.mm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm index 7674514..0137df0 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]; |