Browse Source

Completed previous commit

Added some suggestions for the previous commit from Christophe Dumez
and made sure the argument directly after -d is looked at.
adaptive-webui-19844
Nikolas Garofil 12 years ago
parent
commit
d1060ac5f3
  1. 10
      src/main.cpp

10
src/main.cpp

@ -168,12 +168,9 @@ int main(int argc, char *argv[]) { @@ -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[]) { @@ -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

Loading…
Cancel
Save