mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
Status message fix, copy timestamp in assigmnet operator
* the timestamp of status message was not copied, so every time a status message was sorted or otherwise assigned the ts got lost or wrongly assigned. * this meant the log messages were in wrong order, leading to very confusing results in the log screen or file. * also added new timestamp formatter * new function "BlackMisc::CVariant displayRole(const PQ &pq) const" which can be used if the PQ is already available
This commit is contained in:
@@ -97,10 +97,12 @@ namespace BlackMisc
|
||||
|
||||
QReadLocker readLock(&other.m_lock);
|
||||
auto handledBy = other.m_handledByObjects;
|
||||
qint64 ts = other.m_timestampMSecsSinceEpoch;
|
||||
readLock.unlock(); // avoid deadlock
|
||||
|
||||
QWriteLocker writeLock(&this->m_lock);
|
||||
QWriteLocker writeLock(&m_lock);
|
||||
m_handledByObjects = handledBy;
|
||||
m_timestampMSecsSinceEpoch = ts;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user