# HG changeset patch # User Chris Cannam # Date 1554303819 -3600 # Node ID e4f31f506116abce8c5e6ff7fc9a98f797ebc715 # Parent 4ca784e5033ebda34b62b50cd668241f6395f61a Start ids at 0 - backward-compatibility makes testing easier diff -r 4ca784e5033e -r e4f31f506116 base/XmlExportable.cpp --- a/base/XmlExportable.cpp Wed Apr 03 16:03:18 2019 +0100 +++ b/base/XmlExportable.cpp Wed Apr 03 16:03:39 2019 +0100 @@ -72,10 +72,11 @@ { if (m_exportId == -1) { static QMutex mutex; - static int lastId = 0; + static int nextId = 0; QMutexLocker locker(&mutex); if (m_exportId == -1) { - m_exportId = ++lastId; + m_exportId = nextId; + ++nextId; } } return m_exportId;