diff -r 56cd8111b7f7 -r 41300fa6a67c src/gui/dialogs/qfiledialog_win.cpp --- a/src/gui/dialogs/qfiledialog_win.cpp Tue Jan 26 12:42:25 2010 +0200 +++ b/src/gui/dialogs/qfiledialog_win.cpp Tue Feb 02 00:43:10 2010 +0200 @@ -509,7 +509,7 @@ DWORD newOptions; hr = pfd->GetOptions(&newOptions); if (SUCCEEDED(hr)) { - newOptions |= (FOS_NOCHANGEDIR | FOS_NOREADONLYRETURN); + newOptions |= FOS_NOCHANGEDIR; if (mode == QFileDialog::ExistingFile || mode == QFileDialog::ExistingFiles) newOptions |= (FOS_FILEMUSTEXIST | FOS_PATHMUSTEXIST); @@ -534,7 +534,7 @@ 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 @@ } } } + if (pfd) + pfd->Release(); return result; }