NOISSUE Use .command extension for shortcut scripts on macOS

This means that the script will run when clicked, instead of being opened in a text editor
This commit is contained in:
arthomnix 2022-07-20 17:03:20 +01:00 committed by Petr Mrázek
parent 86f68389c9
commit 6307689cf1

View File

@ -60,9 +60,12 @@ CreateShortcutDialog::~CreateShortcutDialog()
void CreateShortcutDialog::on_shortcutPathBrowse_clicked()
{
QString linkExtension;
#ifdef Q_OS_UNIX
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
linkExtension = ui->createScriptCheckBox->isChecked() ? "sh" : "desktop";
#endif
#ifdef Q_OS_MAC
linkExtension = "command";
#endif
#ifdef Q_OS_WIN
linkExtension = ui->createScriptCheckBox->isChecked() ? "bat" : "lnk";
#endif