From 2fc8475fdf486d85732a77bf74720fc6c798d864 Mon Sep 17 00:00:00 2001 From: Cory Bloor Date: Thu, 12 Oct 2017 03:13:14 -0600 Subject: [PATCH] Replace "All Files (*.*)" with "All Files (*)" To quote the Qt documentation for QFileDialog::setNameFilters: > Note that the filter *.* is not portable, because the historical > assumption that the file extension determines the file type is not > consistent on every operating system. It is possible to have a file > with no dot in its name (for example, Makefile). In a native Windows > file dialog, *.* will match such files, while in other types of file > dialogs it may not. So it is better to use * if you mean to select > any file. Admittedly, one of these usages is Windows-only and we are using the native file dialog there, but we might as well be consistent. --- qrenderdoc/Code/QRDUtils.cpp | 2 +- qrenderdoc/Windows/BufferViewer.cpp | 2 +- qrenderdoc/Windows/MainWindow.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qrenderdoc/Code/QRDUtils.cpp b/qrenderdoc/Code/QRDUtils.cpp index d2c9d9190..75e775f13 100644 --- a/qrenderdoc/Code/QRDUtils.cpp +++ b/qrenderdoc/Code/QRDUtils.cpp @@ -514,7 +514,7 @@ QString RDDialog::getExecutableFileName(QWidget *parent, const QString &caption, #if defined(Q_OS_WIN32) // can't filter by executable bit on windows, but we have extensions - filter = QApplication::translate("RDDialog", "Executables (*.exe);;All Files (*.*)"); + filter = QApplication::translate("RDDialog", "Executables (*.exe);;All Files (*)"); #endif QFileDialog fd(parent, caption, dir, filter); diff --git a/qrenderdoc/Windows/BufferViewer.cpp b/qrenderdoc/Windows/BufferViewer.cpp index 4df27515a..e932dbad5 100644 --- a/qrenderdoc/Windows/BufferViewer.cpp +++ b/qrenderdoc/Windows/BufferViewer.cpp @@ -2894,7 +2894,7 @@ void BufferViewer::exportData(const BufferExport ¶ms) filter = tr("Binary Files (*.bin)"); QString filename = RDDialog::getSaveFileName(this, tr("Export buffer to bytes"), QString(), - tr("%1;;All files (*.*)").arg(filter)); + tr("%1;;All files (*)").arg(filter)); if(filename.isEmpty()) return; diff --git a/qrenderdoc/Windows/MainWindow.cpp b/qrenderdoc/Windows/MainWindow.cpp index f0c5ae899..acecd18ce 100644 --- a/qrenderdoc/Windows/MainWindow.cpp +++ b/qrenderdoc/Windows/MainWindow.cpp @@ -268,7 +268,7 @@ void MainWindow::on_action_Open_Log_triggered() QString filename = RDDialog::getOpenFileName( this, tr("Select Logfile to open"), m_Ctx.Config().LastLogPath, tr("Capture Files (*.rdc);;Image Files (*.dds *.hdr *.exr *.bmp *.jpg " - "*.jpeg *.png *.tga *.gif *.psd;;All Files (*.*)")); + "*.jpeg *.png *.tga *.gif *.psd;;All Files (*)")); if(!filename.isEmpty()) LoadFromFilename(filename, false);