Windows: Silence warning in QWindowsFileDialogHelper::selectFile().

The function is invoked from the QFileDialog constructor in
save file mode when passing a non-existing file.

Task-number: QTBUG-35703

Change-Id: I5c13efb9b6789404b28739f6ce88ed87b594b6e4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Friedemann Kleint 2014-01-09 09:33:17 +01:00 committed by The Qt Project
parent 131a511194
commit b4c28856f1

View File

@ -1633,8 +1633,8 @@ void QWindowsFileDialogHelper::selectFile(const QUrl &fileName)
if (QWindowsContext::verboseDialogs)
qDebug("%s %s" , __FUNCTION__, qPrintable(fileName.toString()));
if (QWindowsNativeFileDialogBase *nfd = nativeFileDialog())
nfd->selectFile(fileName.toLocalFile()); // ## should use QUrl::fileName() once it exists
if (hasNativeDialog()) // Might be invoked from the QFileDialog constructor.
nativeFileDialog()->selectFile(fileName.toLocalFile()); // ## should use QUrl::fileName() once it exists
}
QList<QUrl> QWindowsFileDialogHelper::selectedFiles() const