mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 21:40:36 -04:00
Set Operating Mode in RsInit::InitRetroShare so noGUI could use it.
This commit is contained in:
parent
8563957591
commit
f888913800
7 changed files with 85 additions and 27 deletions
|
@ -189,6 +189,17 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||
Q_INIT_RESOURCE(images);
|
||||
Q_INIT_RESOURCE(icons);
|
||||
|
||||
// Loop through all command-line args/values to get help wanted before RsInit exit.
|
||||
for (int i = 0; i < args.size(); ++i) {
|
||||
QString arg;
|
||||
/* Get the argument name and set a blank value */
|
||||
arg = args.at(i);
|
||||
if ((arg.toLower() == "-h") || (arg.toLower() == "--help")) {
|
||||
QApplication dummyApp (argc, argv); // needed for QMessageBox
|
||||
Rshare::showUsageMessageBox();
|
||||
}
|
||||
}
|
||||
|
||||
// This is needed to allocate rsNotify, so that it can be used to ask for PGP passphrase
|
||||
//
|
||||
RsControl::earlyInitNotificationSystem() ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue