X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fmain.cpp;h=3f6cab541661c9b0d37b89c9998ca743396b08e2;hp=9d87c4b89900a74ee81616191fd42f7ff4fa089b;hb=6538dce32fd66ee5274197f16bc9b75f09ef4aae;hpb=92807744f2baf77c6b7048b236c44d807c725f48 diff --git a/src/common/main.cpp b/src/common/main.cpp index 9d87c4b8..3f6cab54 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -25,8 +25,10 @@ #ifdef BUILD_CORE # include "coreapplication.h" #elif defined BUILD_QTUI +# include "aboutdata.h" # include "qtuiapplication.h" #elif defined BUILD_MONO +# include "aboutdata.h" # include "monoapplication.h" #else @@ -37,10 +39,17 @@ #if defined HAVE_KDE4 && defined BUILD_CORE # undef HAVE_KDE4 #endif +// We don't want quasselcore to depend on KDE +#if defined HAVE_KF5 && defined BUILD_CORE +# undef HAVE_KF5 +#endif #ifdef HAVE_KDE4 # include # include "kcmdlinewrapper.h" +#elif defined HAVE_KF5 +# include +# include "qt5cliparser.h" #elif defined HAVE_QT5 # include "qt5cliparser.h" #else @@ -97,7 +106,6 @@ int main(int argc, char **argv) #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(), ki18n("A modern, distributed IRC client")); aboutData.addLicense(KAboutData::License_GPL_V2); @@ -116,6 +124,7 @@ int main(int argc, char **argv) // Initialize CLI arguments // NOTE: We can't use tr() at this point, since app is not yet created + // TODO: Change this once we get rid of KDE4 and can initialize the parser after creating the app // put shared client&core arguments here cliParser->addSwitch("debug", 'd', "Enable debug output"); @@ -181,6 +190,15 @@ int main(int argc, char **argv) } #endif - if (!app.init()) return EXIT_FAILURE; +#ifdef HAVE_KF5 + // FIXME: This should be done after loading the translation catalogue, but still in main() + AboutData aboutData; + AboutData::setQuasselPersons(&aboutData); + KAboutData::setApplicationData(aboutData.kAboutData()); +#endif + + if (!app.init()) + return EXIT_FAILURE; + return app.exec(); }