mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Merge pull request #7174 from spycrab/qt_fs_export
Qt/FilesystemWidget: Suggest default filename when exporting files
This commit is contained in:
@ -7,6 +7,7 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QFileInfo>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
@ -244,7 +245,8 @@ void FilesystemWidget::ShowContextMenu(const QPoint&)
|
|||||||
break;
|
break;
|
||||||
case EntryType::File:
|
case EntryType::File:
|
||||||
AddAction(menu, tr("Extract File..."), this, [this, partition, path] {
|
AddAction(menu, tr("Extract File..."), this, [this, partition, path] {
|
||||||
auto dest = QFileDialog::getSaveFileName(this, tr("Save File to"));
|
auto dest =
|
||||||
|
QFileDialog::getSaveFileName(this, tr("Save File to"), QFileInfo(path).fileName());
|
||||||
|
|
||||||
if (!dest.isEmpty())
|
if (!dest.isEmpty())
|
||||||
ExtractFile(partition, path, dest);
|
ExtractFile(partition, path, dest);
|
||||||
|
Reference in New Issue
Block a user