diff --git a/src/qjackctl.cpp b/src/qjackctl.cpp
index 7c75a764..2f8a3632 100644
--- a/src/qjackctl.cpp
+++ b/src/qjackctl.cpp
@@ -628,13 +628,13 @@ int main ( int argc, char **argv )
}
// Check if we'll just start an external program...
- if (!setup.sCmdLine.isEmpty()) {
+ if (!setup.cmdLine.isEmpty()) {
jack_client_t *pJackClient
= jack_client_open("qjackctl-start", JackNoStartServer, nullptr);
if (pJackClient) {
jack_client_close(pJackClient);
const int iExitStatus
- = ::system(setup.sCmdLine.toUtf8().constData());
+ = ::system(setup.cmdLine.join(' ').toUtf8().constData());
app.quit();
return iExitStatus;
}
diff --git a/src/qjackctlMainForm.cpp b/src/qjackctlMainForm.cpp
index cafb72cc..c1dc4dfc 100644
--- a/src/qjackctlMainForm.cpp
+++ b/src/qjackctlMainForm.cpp
@@ -918,7 +918,7 @@ bool qjackctlMainForm::setup ( qjackctlSetup *pSetup )
jackStabilize();
// Look for immediate server startup?...
- if (m_pSetup->bStartJack || !m_pSetup->sCmdLine.isEmpty())
+ if (m_pSetup->bStartJack || !m_pSetup->cmdLine.isEmpty())
m_pSetup->bStartJackCmd = true;
if (m_pSetup->bStartJackCmd)
startJack();
@@ -3339,13 +3339,13 @@ bool qjackctlMainForm::startJackClient ( bool bDetach )
}
// Have we an initial command-line to start away?
- if (!m_pSetup->sCmdLine.isEmpty()) {
+ if (!m_pSetup->cmdLine.isEmpty()) {
// Run it dettached...
- shellExecute(m_pSetup->sCmdLine,
+ shellExecute(m_pSetup->cmdLine.join(' '),
tr("Command line argument..."),
tr("Command line argument started"));
// And reset it forever more...
- m_pSetup->sCmdLine.clear();
+ m_pSetup->cmdLine.clear();
}
// Remember to schedule an initial connection refreshment.
diff --git a/src/qjackctlSetup.cpp b/src/qjackctlSetup.cpp
index a93ee522..a10eea33 100644
--- a/src/qjackctlSetup.cpp
+++ b/src/qjackctlSetup.cpp
@@ -709,9 +709,7 @@ bool qjackctlSetup::parse_args ( const QStringList& args )
for (const QString& sArg : parser.positionalArguments()) {
if (sArg != "-T" && sArg != "-ndefault") {
- if (iCmdArgs > 0)
- sCmdLine += ' ';
- sCmdLine += sArg;
+ cmdLine.append(sArg);
++iCmdArgs;
}
}
@@ -724,14 +722,14 @@ bool qjackctlSetup::parse_args ( const QStringList& args )
for (int i = 1; i < argc; ++i) {
+ QString sArg = args.at(i);
+
if (iCmdArgs > 0) {
- sCmdLine += ' ';
- sCmdLine += args.at(i);
+ sCmdArgs.append(sArg);
++iCmdArgs;
continue;
}
- QString sArg = args.at(i);
QString sVal;
const int iEqual = sArg.indexOf('=');
if (iEqual >= 0) {
@@ -793,7 +791,7 @@ bool qjackctlSetup::parse_args ( const QStringList& args )
} // FIXME: Avoid auto-start jackd stuffed args!
else if (sArg != "-T" && sArg != "-ndefault") {
// Here starts the optional command line...
- sCmdLine += sArg;
+ cmdLine.append(sArg);
++iCmdArgs;
}
}
@@ -801,10 +799,8 @@ bool qjackctlSetup::parse_args ( const QStringList& args )
#endif
// HACK: If there's a command line, it must be spawned on background...
- if (iCmdArgs > 0) {
- sCmdLine += ' ';
- sCmdLine += '&';
- }
+ if (iCmdArgs > 0)
+ cmdLine.append("&");
// Alright with argument parsing.
return true;
diff --git a/src/qjackctlSetup.h b/src/qjackctlSetup.h
index 7b7f7db9..f3920ab5 100644
--- a/src/qjackctlSetup.h
+++ b/src/qjackctlSetup.h
@@ -129,7 +129,7 @@ class qjackctlSetup
bool bStopJack;
// User supplied command line.
- QString sCmdLine;
+ QStringList cmdLine;
// Current/previous (default) preset name.
QString sDefPreset;
diff --git a/src/translations/qjackctl_cs.ts b/src/translations/qjackctl_cs.ts
index 165985f8..56d6cd29 100644
--- a/src/translations/qjackctl_cs.ts
+++ b/src/translations/qjackctl_cs.ts
@@ -88,19 +88,19 @@
-
+
Volba -p vyžaduje argument (preset, přednastavení).
-
+
Volba -a vyžaduje argument (cesta).
-
+
Volba -n vyžaduje argument (název).
diff --git a/src/translations/qjackctl_de.ts b/src/translations/qjackctl_de.ts
index 3551b977..71752563 100644
--- a/src/translations/qjackctl_de.ts
+++ b/src/translations/qjackctl_de.ts
@@ -88,19 +88,19 @@
-
+
Option -p benötigt ein Argument (Preset).
-
+
Option -a benötigt ein Argument (Pfad).
-
+
Option -n benötigt ein Argument (Name).
diff --git a/src/translations/qjackctl_es.ts b/src/translations/qjackctl_es.ts
index 94118a94..2e97325f 100644
--- a/src/translations/qjackctl_es.ts
+++ b/src/translations/qjackctl_es.ts
@@ -78,7 +78,7 @@
-
+
La opción -p nececita un argumento (nombre de un preset).
@@ -94,13 +94,13 @@
-
+
La opción -a requiere un argumento (ruta).
-
+
La opción -n necesita un argumento (nombre).
diff --git a/src/translations/qjackctl_fr.ts b/src/translations/qjackctl_fr.ts
index 8122399c..69ac4156 100644
--- a/src/translations/qjackctl_fr.ts
+++ b/src/translations/qjackctl_fr.ts
@@ -34,7 +34,7 @@
-
+
L'option -p nécessite un argument (préréglage).
@@ -94,13 +94,13 @@
-
+
L'option -a nécessite un argument (chemin).
-
+
L'option -n nécessite un argument (nom).
diff --git a/src/translations/qjackctl_it.ts b/src/translations/qjackctl_it.ts
index f5ce40e2..efd07f8d 100644
--- a/src/translations/qjackctl_it.ts
+++ b/src/translations/qjackctl_it.ts
@@ -78,7 +78,7 @@
-
+
L'opzione -p richiede un argomento (preset).
@@ -94,13 +94,13 @@
-
+
L'opzione -a richiede un argomento (indirizzo).
-
+
L'opzione -n richiede un argomento (nome).
diff --git a/src/translations/qjackctl_ja.ts b/src/translations/qjackctl_ja.ts
index 8f2670ea..c39c82e1 100644
--- a/src/translations/qjackctl_ja.ts
+++ b/src/translations/qjackctl_ja.ts
@@ -88,19 +88,19 @@
-
+
-
+
-
+
diff --git a/src/translations/qjackctl_ko.ts b/src/translations/qjackctl_ko.ts
index ab94c070..6f09337d 100644
--- a/src/translations/qjackctl_ko.ts
+++ b/src/translations/qjackctl_ko.ts
@@ -88,19 +88,19 @@
-
+
옵션 -p에는 인수(사전설정)가 필요합니다.
-
+
옵션 -a에는 인수(경로)가 필요합니다.
-
+
옵션 -n에는 인수(이름)가 필요합니다.
diff --git a/src/translations/qjackctl_nl.ts b/src/translations/qjackctl_nl.ts
index 2aedde03..6a102b8a 100644
--- a/src/translations/qjackctl_nl.ts
+++ b/src/translations/qjackctl_nl.ts
@@ -34,7 +34,7 @@
-
+
Optie -p vereist een argument (preset).
@@ -94,13 +94,13 @@
-
+
Optie -a vereist een argument (pad).
-
+
Optie -n vereist een argument (naam).
diff --git a/src/translations/qjackctl_pt.ts b/src/translations/qjackctl_pt.ts
index e42f03e1..972ae7b3 100644
--- a/src/translations/qjackctl_pt.ts
+++ b/src/translations/qjackctl_pt.ts
@@ -78,7 +78,7 @@
-
+
Opção -p requer um argumento (preset).
@@ -94,13 +94,13 @@
-
+
A opção -a requer um argumento (caminho).
-
+
Opção -n requer um argumento (nome).
diff --git a/src/translations/qjackctl_ru.ts b/src/translations/qjackctl_ru.ts
index c2ce6d8a..7ec520a8 100644
--- a/src/translations/qjackctl_ru.ts
+++ b/src/translations/qjackctl_ru.ts
@@ -28,7 +28,7 @@
QObject
-
+
Ключ -p требует аргумента (пресет).
@@ -94,13 +94,13 @@
-
+
Ключу -a необходим аргумент (расположение)
-
+
Ключу -n необходим аргумент (название).
diff --git a/src/translations/qjackctl_sk.ts b/src/translations/qjackctl_sk.ts
index 3f6a9cdc..0c445575 100644
--- a/src/translations/qjackctl_sk.ts
+++ b/src/translations/qjackctl_sk.ts
@@ -88,19 +88,19 @@
-
+
Možnosť -p vyžaduje argument (prednastavenie).
-
+
Možnost -a vyžaduje argument (cesta).
-
+
Možnosť -n vyžaduje argument (názov).
diff --git a/src/translations/qjackctl_tr.ts b/src/translations/qjackctl_tr.ts
index e6e40cae..0364afa0 100644
--- a/src/translations/qjackctl_tr.ts
+++ b/src/translations/qjackctl_tr.ts
@@ -88,19 +88,19 @@
-
+
Seçenek -p bir bağımsız değişken (ön ayar) gerektirir.
-
+
Seçenek -a bir argüman (yol) gerektirir.
-
+
Seçenek -n bir argüman (isim) gerektirir.
diff --git a/src/translations/qjackctl_uk.ts b/src/translations/qjackctl_uk.ts
index 41ac6b85..49745a40 100644
--- a/src/translations/qjackctl_uk.ts
+++ b/src/translations/qjackctl_uk.ts
@@ -102,19 +102,19 @@
-
+
Разом із параметром -p слід вказати аргумент (набір параметрів).
-
+
Разом із параметром -a слід вказати аргумент (шлях).
-
+
Разом із параметром -n слід вказати аргумент (назву).