X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreapplication.cpp;h=99fcfd80c1477205cca6f877a5f1083cd4d43958;hp=2cdc5a6071643e213744b2b7835cfc637f25065f;hb=965183188ee726036685fcba379c2559bd183247;hpb=60021fef0c9644e022095043a9072d5ad99c89e4 diff --git a/src/core/coreapplication.cpp b/src/core/coreapplication.cpp index 2cdc5a60..99fcfd80 100644 --- a/src/core/coreapplication.cpp +++ b/src/core/coreapplication.cpp @@ -27,14 +27,6 @@ CoreApplicationInternal::CoreApplicationInternal() : _coreCreated(false) { Q_INIT_RESOURCE(sql); - - // put core-only arguments here - CliParser *parser = Quassel::cliParser(); - parser->addOption("port",'p', tr("The port quasselcore will listen at"), QString("4242")); - parser->addSwitch("norestore", 'n', tr("Don't restore last core's state")); - parser->addOption("logfile", 'l', tr("Path to logfile")); - parser->addOption("loglevel", 'L', tr("Loglevel Debug|Info|Warning|Error"), "Info"); - parser->addOption("datadir", 0, tr("Specify the directory holding datafiles like the Sqlite DB and the SSL Cert")); } CoreApplicationInternal::~CoreApplicationInternal() { @@ -60,16 +52,21 @@ bool CoreApplicationInternal::init() { Core::instance(); // create and init the core _coreCreated = true; - if(!Quassel::isOptionSet("norestore")) { + // if using KDE, option is called "restore" instead of "norestore" + if(Quassel::isOptionSet("restore") || !Quassel::isOptionSet("norestore")) Core::restoreState(); - } + return true; } /*****************************************************************************/ CoreApplication::CoreApplication(int &argc, char **argv) +#ifdef HAVE_KDE + : KApplication(false), +#else : QCoreApplication(argc, argv), +#endif Quassel() { setRunMode(Quassel::CoreOnly);