X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fmain.cpp;h=ecd0fa5575f2ab9c8b6e8c9abd095a47e8c11be5;hp=102c9d44cbf8546ec718015a76f06a221998b50a;hb=d1b6499b0b848d4287efae89107576548533502c;hpb=cf28e7152c5d940aec586be1b29fbf8ddc99f087 diff --git a/src/common/main.cpp b/src/common/main.cpp index 102c9d44..ecd0fa55 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,11 +18,14 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include +#include +#include +#include + #include "global.h" #include "identity.h" #include "settings.h" -#include -#include #if defined BUILD_CORE #include @@ -61,6 +64,8 @@ int main(int argc, char **argv) { Global::registerMetaTypes(); +#include "../../version.inc" + #if defined BUILD_CORE Global::runMode = Global::CoreOnly; QCoreApplication app(argc, argv); @@ -72,6 +77,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(); @@ -106,11 +113,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