diff options
author | Liang Qi <liang.qi@digia.com> | 2013-07-17 11:13:08 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-17 11:36:47 +0200 |
commit | c9182bc11b77675405941a0a163603cac064d8bc (patch) | |
tree | f4cf19154e3c8b1c3e065c07d716b15bb4566e82 /src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | |
parent | 5ec344cc7796b8708e2ae722f7cd184c56844504 (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: I819d7ab4e51e90783d55cee0676dbc33b38c5b00
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index e7cf47395b..a70ba3749f 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -140,6 +140,11 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) mDialogIsExecuting = false; mResultSet = 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 + [mFontPanel setTitle:QCFString::toNSString(helper->options()->windowTitle())]; if (mHelper->options()->testOption(QFontDialogOptions::NoButtons)) { |