/***************************************************************************
- * 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 *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "global.h"
-#include "identity.h"
-#include "settings.h"
+#include <QDateTime>
#include <QString>
+#include <QTimer>
#include <QTranslator>
+#include "global.h"
+#include "settings.h"
+
#if defined BUILD_CORE
#include <QCoreApplication>
#include <QDir>
Global::registerMetaTypes();
+#include "../../version.inc"
+
#if defined BUILD_CORE
Global::runMode = Global::CoreOnly;
QCoreApplication app(argc, argv);
QApplication app(argc, argv);
#endif
+ qsrand(QDateTime::currentDateTime().toTime_t());
+
// Set up i18n support
QLocale locale = QLocale::system();
#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