From e7b4aaadfa49b289dd23879f8b1e3d5d1df4caf1 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 9 Jul 2014 09:52:20 +0200 Subject: [PATCH] qfiledialog: clean up dead code. Q_WS_WIN is never defined, and the qt_win_get_* functions don't exist anymore. The QPA plugin takes care of doing the Windows-specific handling for the file dialog. Change-Id: Icdf9aed7da3db8ed2bd71d60f821869340ec1041 Reviewed-by: Friedemann Kleint --- src/widgets/dialogs/qfiledialog.cpp | 51 ----------------------------- 1 file changed, 51 deletions(-) diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 6349bdc301..f0dc577c0f 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -2028,26 +2028,6 @@ QString QFileDialog::labelText(DialogLabel label) const return QString(); } -/* - For the native file dialogs -*/ - -#if defined(Q_WS_WIN) -extern QString qt_win_get_open_file_name(const QFileDialogArgs &args, - QString *initialDirectory, - QString *selectedFilter); - -extern QString qt_win_get_save_file_name(const QFileDialogArgs &args, - QString *initialDirectory, - QString *selectedFilter); - -extern QStringList qt_win_get_open_file_names(const QFileDialogArgs &args, - QString *initialDirectory, - QString *selectedFilter); - -extern QString qt_win_get_existing_directory(const QFileDialogArgs &args); -#endif - /*! This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string. @@ -2110,13 +2090,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent, args.filter = filter; args.mode = ExistingFile; args.options = options; -#if defined(Q_WS_WIN) - if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog)) { - return qt_win_get_open_file_name(args, &(args.directory), selectedFilter); - } -#endif - // create a qt dialog QFileDialog dialog(args); if (selectedFilter && !selectedFilter->isEmpty()) dialog.selectNameFilter(*selectedFilter); @@ -2239,13 +2213,6 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent, args.mode = ExistingFiles; args.options = options; -#if defined(Q_WS_WIN) - if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog)) { - return qt_win_get_open_file_names(args, &(args.directory), selectedFilter); - } -#endif - - // create a qt dialog QFileDialog dialog(args); if (selectedFilter && !selectedFilter->isEmpty()) dialog.selectNameFilter(*selectedFilter); @@ -2371,13 +2338,6 @@ QString QFileDialog::getSaveFileName(QWidget *parent, args.mode = AnyFile; args.options = options; -#if defined(Q_WS_WIN) - if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog)) { - return qt_win_get_save_file_name(args, &(args.directory), selectedFilter); - } -#endif - - // create a qt dialog QFileDialog dialog(args); dialog.setAcceptMode(AcceptSave); if (selectedFilter && !selectedFilter->isEmpty()) @@ -2483,17 +2443,6 @@ QString QFileDialog::getExistingDirectory(QWidget *parent, args.mode = (options & ShowDirsOnly ? DirectoryOnly : Directory); args.options = options; -#if defined(Q_WS_WIN) - if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog) && (options & ShowDirsOnly) -#if defined(Q_OS_WINCE) - && qt_priv_ptr_valid -#endif - ) { - return qt_win_get_existing_directory(args); - } -#endif - - // create a qt dialog QFileDialog dialog(args); if (dialog.exec() == QDialog::Accepted) { return dialog.selectedFiles().value(0);