there is no need to seed now from the QHttpMultiPartPrivate constructor

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2016-10-24 06:05:41 +00:00
parent f3377a23ad
commit f18f7edc6c
3 changed files with 4 additions and 19 deletions

2
README
View file

@ -45,7 +45,7 @@ There are several things you should be aware before considering Katie:
- support for generating SHA-224, SHA-256, SHA-384, SHA-512 hash sums (SHA-2) - support for generating SHA-224, SHA-256, SHA-384, SHA-512 hash sums (SHA-2)
- desktop files, Shell profile and dynamic linker/loader config are installed - desktop files, Shell profile and dynamic linker/loader config are installed
to ease vendors and deployment in general to ease vendors and deployment in general
- automatic async DBus calls based on method return type - automatic async DBus calls based on return type, no Q_NOREPLY needed
Bugs fixed in Katie, some of which in Qt5 too: Bugs fixed in Katie, some of which in Qt5 too:
QTBUG-23502, QTBUG-37115, QTBUG-15052, QTBUG-23522, QTBUG-6139, QTBUG-26889, QTBUG-23502, QTBUG-37115, QTBUG-15052, QTBUG-23522, QTBUG-6139, QTBUG-26889,

View file

@ -790,17 +790,9 @@ bool QUuid::operator>(const QUuid &other) const
/*! /*!
\fn QUuid QUuid::createUuid() \fn QUuid QUuid::createUuid()
On any platform other than Windows, this function returns a new This function returns a new UUID with variant QUuid::DCE and
UUID with variant QUuid::DCE and version QUuid::Random. If version QUuid::Random. The randomness of the created UUID depends
the /dev/urandom device exists, then the numbers used to construct on qrand().
the UUID will be of cryptographic quality, which will make the UUID
unique. Otherwise, the numbers of the UUID will be obtained from
the local pseudo-random number generator (qrand(), which is seeded
by qsrand()) which is usually not of cryptograhic quality, which
means that the UUID can't be guaranteed to be unique.
On a Windows platform, a GUID is generated, which almost certainly
\e{will} be unique, on this or any other system, networked or not.
\sa variant(), version() \sa variant(), version()
*/ */

View file

@ -424,15 +424,8 @@ void QHttpPartPrivate::checkHeaderCreated() const
} }
} }
thread_local bool seedCreatedStorage;
QHttpMultiPartPrivate::QHttpMultiPartPrivate() : contentType(QHttpMultiPart::MixedType), device(new QHttpMultiPartIODevice(this)) QHttpMultiPartPrivate::QHttpMultiPartPrivate() : contentType(QHttpMultiPart::MixedType), device(new QHttpMultiPartIODevice(this))
{ {
if (!seedCreatedStorage) {
qsrand(QTime(0,0,0).msecsTo(QTime::currentTime()) ^ reinterpret_cast<quintptr>(this));
seedCreatedStorage = true;
}
boundary = QByteArray("boundary_.oOo._") boundary = QByteArray("boundary_.oOo._")
+ QByteArray::number(qrand()).toBase64() + QByteArray::number(qrand()).toBase64()
+ QByteArray::number(qrand()).toBase64() + QByteArray::number(qrand()).toBase64()