X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fmain.cpp;h=9bf99cf2d1c1c2a057ad805f2f5d12b5f23a1f51;hp=8ed40da47947e740ed916f5b90dc52de6255fd9d;hb=921e54680da16fcf2adb7a90506875aceb6633a4;hpb=91a0c4e08ea7da4264245de2b41f40f11846c2c4 diff --git a/src/common/main.cpp b/src/common/main.cpp index 8ed40da4..9bf99cf2 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 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 * @@ -52,14 +52,35 @@ Q_IMPORT_PLUGIN(qgif) int main(int argc, char **argv) { - // Setup build information and version string - # include "version.gen" - buildinfo.append(QString(",%1,%2").arg(__DATE__, __TIME__)); - Quassel::setupBuildInfo(buildinfo); + Quassel::setupBuildInfo(); QCoreApplication::setApplicationName(Quassel::buildInfo().applicationName); 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 @@ -95,6 +116,7 @@ int main(int argc, char **argv) #ifndef BUILD_CORE // put client-only arguments here + cliParser->addOption("icontheme ", 0, "Override the system icon theme ('oxygen' is recommended)"); cliParser->addOption("qss ", 0, "Load a custom application stylesheet"); cliParser->addSwitch("debugbufferswitches", 0, "Enables debugging for bufferswitches"); cliParser->addSwitch("debugmodel", 0, "Enables debugging for models");