mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Completed previous commit
Added some suggestions for the previous commit from Christophe Dumez and made sure the argument directly after -d is looked at.
This commit is contained in:
parent
b8e5cc01c1
commit
d1060ac5f3
1 changed files with 6 additions and 4 deletions
10
src/main.cpp
10
src/main.cpp
|
@ -168,12 +168,9 @@ int main(int argc, char *argv[]) {
|
||||||
for(int j=i; j<argc; j++) {
|
for(int j=i; j<argc; j++) {
|
||||||
argv[j] = argv[j+1];
|
argv[j] = argv[j+1];
|
||||||
}
|
}
|
||||||
|
i--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(shouldDaemonize && daemon(1, 0) != 0) {
|
|
||||||
qCritical("Something went wrong while transforming into a daemon, exiting...");
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
QtSingleCoreApplication app("qBittorrent-"+uid, argc, argv);
|
QtSingleCoreApplication app("qBittorrent-"+uid, argc, argv);
|
||||||
#else
|
#else
|
||||||
SessionApplication app("qBittorrent-"+uid, argc, argv);
|
SessionApplication app("qBittorrent-"+uid, argc, argv);
|
||||||
|
@ -202,6 +199,11 @@ int main(int argc, char *argv[]) {
|
||||||
Preferences pref;
|
Preferences pref;
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
bool no_splash = false;
|
bool no_splash = false;
|
||||||
|
#else
|
||||||
|
if(shouldDaemonize && daemon(1, 0) != 0) {
|
||||||
|
qCritical("Something went wrong while transforming into a daemon, exiting...");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Load translation
|
// Load translation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue