1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 14:57:52 +00: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:
Nikolas Garofil 2012-08-18 18:11:27 +02:00
parent b8e5cc01c1
commit d1060ac5f3

View File

@ -168,12 +168,9 @@ int main(int argc, char *argv[]) {
for(int j=i; j<argc; j++) {
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);
#else
SessionApplication app("qBittorrent-"+uid, argc, argv);
@ -202,6 +199,11 @@ int main(int argc, char *argv[]) {
Preferences pref;
#ifndef DISABLE_GUI
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
// Load translation