Auto-allocate ids.

svn path=/branches/work/~ervin/sodep/; revision=945432
This commit is contained in:
Kevin Ottens 2009-03-27 13:49:17 +00:00
parent d2d756f3fd
commit 113d703984

View File

@ -44,7 +44,13 @@ SodepMessage::SodepMessage()
SodepMessage::SodepMessage(const QString &resourcePath, const QString &operationName, qint64 id)
: d(new SodepMessagePrivate)
{
d->id = id;
static qint64 lastId = 0;
if (id==0) {
d->id = ++lastId;
} else {
d->id = id;
}
d->resourcePath = resourcePath;
d->operationName = operationName;
}