X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fmain.cpp;h=f34cfd16a247e79cc416ccf64207182f10fa0f62;hb=9f5481c93c3676f765333d4d9c36c559a339f3aa;hp=f715192357d5fd4635674f81cadab1aec3688bb5;hpb=c6bc07febff322910675a1eb60c44f6be209a934;p=quassel.git diff --git a/src/common/main.cpp b/src/common/main.cpp index f7151923..f34cfd16 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-07 by the Quassel IRC Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,12 +18,15 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "global.h" -#include "identity.h" -#include "settings.h" +#include #include +#include #include +#include "global.h" +#include "logger.h" +#include "settings.h" + #if defined BUILD_CORE #include #include @@ -59,8 +62,12 @@ int main(int argc, char **argv) { signal(SIGTERM, handle_signal); signal(SIGINT, handle_signal); + // Logger logger; + Global::registerMetaTypes(); +#include "../../version.inc" + #if defined BUILD_CORE Global::runMode = Global::CoreOnly; QCoreApplication app(argc, argv); @@ -72,6 +79,8 @@ int main(int argc, char **argv) { QApplication app(argc, argv); #endif + qsrand(QDateTime::currentDateTime().toTime_t()); + // Set up i18n support QLocale locale = QLocale::system(); @@ -85,7 +94,7 @@ int main(int argc, char **argv) { QCoreApplication::setOrganizationDomain("quassel-irc.org"); QCoreApplication::setApplicationName("Quassel IRC"); - QCoreApplication::setOrganizationName("Quassel IRC Development Team"); // FIXME + QCoreApplication::setOrganizationName("Quassel Project"); // Check if a non-standard core port is requested QStringList args = QCoreApplication::arguments(); // TODO Build a CLI parser @@ -106,11 +115,13 @@ int main(int argc, char **argv) { #ifndef BUILD_CORE QtUi *gui = new QtUi(); Client::init(gui); - gui->init(); + // init gui only after the event loop has started + QTimer::singleShot(0, gui, SLOT(init())); + //gui->init(); #endif #ifndef BUILD_QTUI - if(args.contains("--norestore")) { + if(!args.contains("--norestore")) { Core::restoreState(); } #endif