Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/MacOS-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
matrix:
dist:
- {
os: macos-15,
os: macos-26,
arch: arm64
}
- {
os: macos-15,
os: macos-26-intel,
arch: intel
}
runs-on: ${{ matrix.dist.os }}
Expand Down
5 changes: 3 additions & 2 deletions src/tools/launcher/applauncherwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <QTemporaryFile>

namespace {

#if defined(Q_OS_WIN)
QMap<QString, QString> catIconNames({ { "Graphics", "image.svg" },
{ "Utility", "apps.svg" } });
Expand Down Expand Up @@ -140,7 +141,7 @@ void AppLauncherWidget::launch(const QModelIndex& index)
QStringList prog_args;
prog_args << command;
#else
QStringList prog_args = command.split(" ");
QStringList prog_args = QProcess::splitCommand(command);
#endif
// no quotes because it is going in an array!
static const QRegularExpression regexp("(\\%.)");
Expand All @@ -158,7 +159,7 @@ void AppLauncherWidget::launch(const QModelIndex& index)
bool inTerminal =
index.data(Qt::UserRole + 1).toBool() || m_terminalCheckbox->isChecked();
if (inTerminal) {
bool ok = TerminalLauncher::launchDetached(command);
bool ok = TerminalLauncher::launchDetached(prog_args);
if (!ok) {
QMessageBox::about(
this, tr("Error"), tr("Unable to launch in terminal."));
Expand Down
8 changes: 6 additions & 2 deletions src/tools/launcher/terminallauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ TerminalApp TerminalLauncher::getPreferedTerminal()
return res;
}

bool TerminalLauncher::launchDetached(const QString& command)
bool TerminalLauncher::launchDetached(const QStringList& args)
{
TerminalApp app = getPreferedTerminal();
return QProcess::startDetached(app.name, { app.arg, command });
if (app.name.isEmpty())
return false;
QStringList termArgs = { app.arg };
termArgs.append(args);
return QProcess::startDetached(app.name, termArgs);
}
2 changes: 1 addition & 1 deletion src/tools/launcher/terminallauncher.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TerminalLauncher : public QObject
public:
explicit TerminalLauncher(QObject* parent = nullptr);

static bool launchDetached(const QString& command);
static bool launchDetached(const QStringList& args);

private:
static TerminalApp getPreferedTerminal();
Expand Down
Loading