From: Manuel Nickschas Date: Sat, 21 Jun 2008 14:27:36 +0000 (+0200) Subject: Use qsrand initialization from Qt examples X-Git-Tag: 0.2.0-rc1~43 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=8118a0eefe8c4f696f28bf9107e4c33e95cb9966 Use qsrand initialization from Qt examples Since for some bizarre (and locally unreproducable) reason the default nick for newly created identities seems to be "quassel251" for many people, we try a different way of seeding the random generator. No idea why localtime wouldn't work... --- diff --git a/src/common/main.cpp b/src/common/main.cpp index 64433f0c..1ea05225 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -79,7 +79,7 @@ int main(int argc, char **argv) { QApplication app(argc, argv); #endif - qsrand(QDateTime::currentDateTime().toTime_t()); + qsrand(QTime(0,0,0).secsTo(QTime::currentTime())); // Set up i18n support QLocale locale = QLocale::system();