From 7a0dedab8d13d2ff09ef4a39ed2b755b4193ebc4 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 26 Feb 2010 14:23:52 +0000 Subject: make sure the random number generator is seeded, otherwise all our qrand() and NOT random! --- source/QXmppStream.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source') diff --git a/source/QXmppStream.cpp b/source/QXmppStream.cpp index 91b4c1cc..a0ccf2b5 100644 --- a/source/QXmppStream.cpp +++ b/source/QXmppStream.cpp @@ -64,6 +64,9 @@ QXmppStream::QXmppStream(QXmppClient* client) m_vCardManager(m_client), m_authStep(0) { + // Make sure the random number generator is seeded + qsrand(QTime(0,0,0).secsTo(QTime::currentTime())); + bool check = QObject::connect(&m_socket, SIGNAL(hostFound()), this, SLOT(socketHostFound())); Q_ASSERT(check); -- cgit v1.2.3