NOISSUE shortcut creation: put file dialog in save mode

This makes sure that the user is prompted if they are about to overwrite a file
This commit is contained in:
arthomnix 2022-07-03 19:53:45 +01:00
parent 0a2ad17f06
commit 79910e3542

View File

@ -91,7 +91,7 @@ void CreateShortcutDialog::on_shortcutPathBrowse_clicked()
#endif
QFileDialog fileDialog(this, tr("Select shortcut path"), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));
fileDialog.setDefaultSuffix(linkExtension);
fileDialog.setAcceptMode(QFileDialog::AcceptOpen);
fileDialog.setAcceptMode(QFileDialog::AcceptSave);
fileDialog.setFileMode(QFileDialog::AnyFile);
fileDialog.selectFile(m_instance->name() + " - " + BuildConfig.LAUNCHER_DISPLAYNAME + "." + linkExtension);
if (fileDialog.exec())