mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Status message without tabs/CR
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
#include "loghandler.h"
|
||||
#include "logmessage.h"
|
||||
#include "comparefunctions.h"
|
||||
#include "stringutils.h"
|
||||
|
||||
#include <QMetaEnum>
|
||||
#include <QStringBuilder>
|
||||
|
||||
@@ -223,6 +225,13 @@ namespace BlackMisc
|
||||
return this->getSeverity() == SeverityError;
|
||||
}
|
||||
|
||||
QString CStatusMessage::getMessageNoLineBreaks() const
|
||||
{
|
||||
const QString m = this->getMessage();
|
||||
if (!containsLineBreakOrTab(m)) { return m; } // by far most messages will NOT contain tabs/CR
|
||||
return removeLineBreakAndTab(m);
|
||||
}
|
||||
|
||||
void CStatusMessage::prependMessage(const QString &msg)
|
||||
{
|
||||
if (msg.isEmpty()) { return; }
|
||||
|
||||
Reference in New Issue
Block a user