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.
This commit is contained in:
sowens99
2021-10-09 22:28:59 -04:00
parent d90b30ca25
commit 839b04014e
16 changed files with 175 additions and 81 deletions

View File

@ -4,7 +4,6 @@
#include <QComboBox>
#include <QCryptographicHash>
#include <QDir>
#include <QFileDialog>
#include <QFormLayout>
#include <QGroupBox>
#include <QLabel>
@ -19,6 +18,7 @@
#include "DiscIO/Volume.h"
#include "DolphinQt/Config/InfoWidget.h"
#include "DolphinQt/QtUtils/DolphinFileDialog.h"
#include "DolphinQt/QtUtils/ImageConverter.h"
#include "UICommon/UICommon.h"
@ -190,8 +190,8 @@ QWidget* InfoWidget::CreateBannerGraphic(const QPixmap& image)
void InfoWidget::SaveBanner()
{
QString path = QFileDialog::getSaveFileName(this, tr("Select a File"), QDir::currentPath(),
tr("PNG image file (*.png);; All Files (*)"));
QString path = DolphinFileDialog::getSaveFileName(this, tr("Select a File"), QDir::currentPath(),
tr("PNG image file (*.png);; All Files (*)"));
ToQPixmap(m_game.GetBannerImage()).save(path, "PNG");
}