mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Fix processing of arguments including spaces
This commit is contained in:
parent
a9a3bb74e7
commit
a1a9f8bc7e
@ -718,7 +718,7 @@ void GUI::on_actionOpen_triggered() {
|
|||||||
// the right addTorrent function, considering
|
// the right addTorrent function, considering
|
||||||
// the parameter type.
|
// the parameter type.
|
||||||
void GUI::processParams(const QString& params_str) {
|
void GUI::processParams(const QString& params_str) {
|
||||||
processParams(params_str.split(" ", QString::SkipEmptyParts));
|
processParams(params_str.split("|", QString::SkipEmptyParts));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI::processParams(const QStringList& params) {
|
void GUI::processParams(const QStringList& params) {
|
||||||
|
@ -192,10 +192,11 @@ int main(int argc, char *argv[]){
|
|||||||
if(p.startsWith("--")) continue;
|
if(p.startsWith("--")) continue;
|
||||||
message += argv[a];
|
message += argv[a];
|
||||||
if (a < argc-1)
|
if (a < argc-1)
|
||||||
message += " ";
|
message += "|";
|
||||||
}
|
}
|
||||||
if(!message.isEmpty()) {
|
if(!message.isEmpty()) {
|
||||||
qDebug("Passing program parameters to running instance...");
|
qDebug("Passing program parameters to running instance...");
|
||||||
|
qDebug("Message: %s", qPrintable(message));
|
||||||
app->sendMessage(message);
|
app->sendMessage(message);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user