diff --git a/src/blackmisc/statusmessage.cpp b/src/blackmisc/statusmessage.cpp index 2e1023d58..86dca35fc 100644 --- a/src/blackmisc/statusmessage.cpp +++ b/src/blackmisc/statusmessage.cpp @@ -102,21 +102,19 @@ namespace BlackMisc CStatusMessage &CStatusMessage::operator =(const CStatusMessage &other) { - // locks because of mutable members if (this == &other) { return *this; } static_cast(*this) = other; + static_cast(*this) = other; + static_cast(*this) = other; + // locks because of mutable member QReadLocker readLock(&other.m_lock); const auto handledBy = other.m_handledByObjects; - const qint64 ts = other.m_timestampMSecsSinceEpoch; - const int order = other.m_order; readLock.unlock(); // avoid deadlock QWriteLocker writeLock(&m_lock); m_handledByObjects = handledBy; - m_timestampMSecsSinceEpoch = ts; - m_order = order; return *this; } diff --git a/src/blackmisc/statusmessage.h b/src/blackmisc/statusmessage.h index f5df51ae6..d6d44ca5b 100644 --- a/src/blackmisc/statusmessage.h +++ b/src/blackmisc/statusmessage.h @@ -518,7 +518,7 @@ namespace BlackMisc CStatusMessage(const CLogCategoryList &categories, StatusSeverity severity, QStringView message, bool validation); mutable QVector m_handledByObjects; - mutable QReadWriteLock m_lock; //!< lock (because of mutable members) + mutable QReadWriteLock m_lock; //!< lock (because of mutable member) //! \fixme KB 2019-01 order and timestamp "disabled" for Ref T184 token bucket. Would it be better to enable those and use a special comparison function for that (e.g. "equalMessageAndSeverity")? BLACK_METACLASS(