mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #649, do not init to current timestamp
* force explicit init (performance/invalid objects) * allow to find mising timestamps * style
This commit is contained in:
@@ -59,7 +59,10 @@ namespace BlackMisc
|
||||
const StatusSeverity CStatusMessage::SeverityWarning;
|
||||
const StatusSeverity CStatusMessage::SeverityError;
|
||||
|
||||
CStatusMessage::CStatusMessage() = default;
|
||||
CStatusMessage::CStatusMessage(): ITimestampBased(QDateTime::currentMSecsSinceEpoch())
|
||||
{
|
||||
// void
|
||||
}
|
||||
|
||||
CStatusMessage::CStatusMessage(const CStatusMessage &other) :
|
||||
CValueObject(other),
|
||||
@@ -72,6 +75,7 @@ namespace BlackMisc
|
||||
|
||||
CStatusMessage &CStatusMessage::operator =(const CStatusMessage &other)
|
||||
{
|
||||
// locks because of mutable members
|
||||
if (this == &other) { return *this; }
|
||||
|
||||
static_cast<CMessageBase &>(*this) = other;
|
||||
@@ -85,7 +89,7 @@ namespace BlackMisc
|
||||
return *this;
|
||||
}
|
||||
|
||||
CStatusMessage::CStatusMessage(const QString &message)
|
||||
CStatusMessage::CStatusMessage(const QString &message) : ITimestampBased(QDateTime::currentMSecsSinceEpoch())
|
||||
{
|
||||
m_message = message.trimmed();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user