summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/FilesystemWidget.cpp
diff options
context:
space:
mode:
authorsowens99 <seanowens@comcast.net>2021-10-09 22:28:59 -0400
committersowens99 <seanowens@comcast.net>2021-10-09 22:43:56 -0400
commit839b04014e8152f136943a2ba1cc474a9c43abef (patch)
tree835a3926a00f1131d11d997d57861fb80bffcd93 /Source/Core/DolphinQt/Config/FilesystemWidget.cpp
parentd90b30ca251146c478759190d9b206f38c3b70d3 (diff)
Add wrapper function to disable hotkeys for QFileDialog
Previously, if you have "Hotkeys Require Window Focus" disabled, you could repeatedly use the "Open" hotkey, for example, to stack File Open windows over top of each other over and over. This commit allows the hotkey manager to disable/enable on QFileDialog creation and destruction.
Diffstat (limited to 'Source/Core/DolphinQt/Config/FilesystemWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Config/FilesystemWidget.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/DolphinQt/Config/FilesystemWidget.cpp b/Source/Core/DolphinQt/Config/FilesystemWidget.cpp
index b830a2e015..d9d053f0b1 100644
--- a/Source/Core/DolphinQt/Config/FilesystemWidget.cpp
+++ b/Source/Core/DolphinQt/Config/FilesystemWidget.cpp
@@ -5,7 +5,6 @@
#include <QApplication>
#include <QCoreApplication>
-#include <QFileDialog>
#include <QFileInfo>
#include <QHeaderView>
#include <QMenu>
@@ -23,6 +22,7 @@
#include "DiscIO/Filesystem.h"
#include "DiscIO/Volume.h"
+#include "DolphinQt/QtUtils/DolphinFileDialog.h"
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/QtUtils/ParallelProgressDialog.h"
#include "DolphinQt/Resources.h"
@@ -211,7 +211,8 @@ void FilesystemWidget::PopulateDirectory(int partition_id, QStandardItem* root,
QString FilesystemWidget::SelectFolder()
{
- return QFileDialog::getExistingDirectory(this, QObject::tr("Choose the folder to extract to"));
+ return DolphinFileDialog::getExistingDirectory(this,
+ QObject::tr("Choose the folder to extract to"));
}
void FilesystemWidget::ShowContextMenu(const QPoint&)
@@ -296,7 +297,7 @@ void FilesystemWidget::ShowContextMenu(const QPoint&)
case EntryType::File:
menu->addAction(tr("Extract File..."), this, [this, partition, path] {
auto dest =
- QFileDialog::getSaveFileName(this, tr("Save File to"), QFileInfo(path).fileName());
+ DolphinFileDialog::getSaveFileName(this, tr("Save File to"), QFileInfo(path).fileName());
if (!dest.isEmpty())
ExtractFile(partition, path, dest);