summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-11-27 11:42:59 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-11-27 11:42:59 (GMT)
commit00d5e1bc789cd27d2decb150426a1c7620c73bc9 (patch)
tree6fabea2ba754fb382fbb5130dbd7b7611b9e9a04 /src/gui/dialogs
parent9e68da0680d5b85a0713142df9b7ad9674960353 (diff)
parentc91ccab6f4ae1f7dd8c2c7103d6d63e7725b9eeb (diff)
downloadQt-00d5e1bc789cd27d2decb150426a1c7620c73bc9.zip
Qt-00d5e1bc789cd27d2decb150426a1c7620c73bc9.tar.gz
Qt-00d5e1bc789cd27d2decb150426a1c7620c73bc9.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp4
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index d8ae73e..0116319 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -534,7 +534,7 @@ QStringList qt_win_CID_get_open_file_names(const QFileDialogArgs &args,
modal_widget.setParent(args.parent, Qt::Window);
QApplicationPrivate::enterModal(&modal_widget);
// Multiple selection is allowed only in IFileOpenDialog.
- IFileOpenDialog *pfd;
+ IFileOpenDialog *pfd = 0;
HRESULT hr = CoCreateInstance(CLSID_FileOpenDialog,
NULL,
CLSCTX_INPROC_SERVER,
@@ -607,6 +607,8 @@ QStringList qt_win_CID_get_open_file_names(const QFileDialogArgs &args,
}
}
}
+ if (pfd)
+ pfd->Release();
return result;
}
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm
index 5b0983b..0c467cd 100644
--- a/src/gui/dialogs/qfontdialog_mac.mm
+++ b/src/gui/dialogs/qfontdialog_mac.mm
@@ -625,10 +625,11 @@ void QFontDialogPrivate::setFont(void *delegate, const QFont &font)
}
NSFontManager *mgr = [NSFontManager sharedFontManager];
- nsFont = [mgr fontWithFamily:qt_mac_QStringToNSString(font.family())
+ QFontInfo fontInfo(font);
+ nsFont = [mgr fontWithFamily:qt_mac_QStringToNSString(fontInfo.family())
traits:mask
weight:weight
- size:QFontInfo(font).pointSize()];
+ size:fontInfo.pointSize()];
}
[mgr setSelectedFont:nsFont isMultiple:NO];