/***************************************************************************
- * Copyright (C) 2005-2014 by the Quassel Project *
+ * Copyright (C) 2005-2015 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#endif
// We don't want quasselcore to depend on KDE
-#if defined HAVE_KDE && defined BUILD_CORE
-# undef HAVE_KDE
+#if defined HAVE_KDE4 && defined BUILD_CORE
+# undef HAVE_KDE4
#endif
-#ifdef HAVE_KDE
+#ifdef HAVE_KDE4
# include <KAboutData>
# include "kcmdlinewrapper.h"
#endif
QCoreApplication::setOrganizationName(Quassel::buildInfo().organizationName);
QCoreApplication::setOrganizationDomain(Quassel::buildInfo().organizationDomain);
+ // on OSX with Qt4, raster seems to fix performance issues
+#if QT_VERSION < 0x050000 && defined Q_OS_MAC && !defined BUILD_CORE
+ QApplication::setGraphicsSystem("raster");
+#endif
+
+ // We need to explicitly initialize the required resources when linking statically
+#ifndef BUILD_QTUI
+ Q_INIT_RESOURCE(sql);
+#endif
+#ifndef BUILD_CORE
+ Q_INIT_RESOURCE(pics);
+ Q_INIT_RESOURCE(hicolor);
+#endif
+
+#ifdef EMBED_DATA
+ Q_INIT_RESOURCE(i18n);
+# ifndef BUILD_CORE
+ Q_INIT_RESOURCE(data);
+# ifdef WITH_OXYGEN
+ Q_INIT_RESOURCE(oxygen);
+# endif
+# endif
+#endif
+
AbstractCliParser *cliParser;
-#ifdef HAVE_KDE
+#ifdef HAVE_KDE4
// We need to init KCmdLineArgs first
// TODO: build an AboutData compat class to replace our aboutDlg strings
KAboutData aboutData("quassel", "kdelibs4", ki18n("Quassel IRC"), Quassel::buildInfo().plainVersionString.toUtf8(),
#ifndef BUILD_CORE
// put client-only arguments here
+ cliParser->addOption("icontheme <theme>", 0, "Override the system icon theme ('oxygen' is recommended)");
cliParser->addOption("qss <file.qss>", 0, "Load a custom application stylesheet");
cliParser->addSwitch("debugbufferswitches", 0, "Enables debugging for bufferswitches");
cliParser->addSwitch("debugmodel", 0, "Enables debugging for models");
cliParser->addSwitch("enable-experimental-dcc", 0, "Enable highly experimental and unfinished support for CTCP DCC (DANGEROUS)");
#endif
-#ifdef HAVE_KDE
+#ifdef HAVE_KDE4
// the KDE version needs this extra call to parse argc/argv before app is instantiated
if (!cliParser->init()) {
cliParser->usage();
MonolithicApplication app(argc, argv);
# endif
-#ifndef HAVE_KDE
+#ifndef HAVE_KDE4
// the non-KDE version parses after app has been instantiated
if (!cliParser->init(app.arguments())) {
cliParser->usage();