Commit 9dbac498 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize raw string literal

parent af5afd00
......@@ -158,7 +158,7 @@ void View::unselectHiddenItems()
QSize View::sizeHint() const
{
return QSize(500, 500);
return {500, 500};
}
void View::dropEvent(QDropEvent *event)
......
......@@ -134,7 +134,7 @@ QDateTime ParsingHelper::parseHttpDateTime(const QString &logLine)
QDateTime ParsingHelper::parseSyslogDateTime(const QString &dateTime)
{
// TODO Create this regexp in constructor
const static QRegExp regex(QLatin1String("(\\S*)[ ]+(\\d*) (\\d*):(\\d*):(\\d*) (\\d*)"));
const static QRegExp regex(QLatin1String(R"((\S*)[ ]+(\d*) (\d*):(\d*):(\d*) (\d*))"));
const int firstPosition = regex.indexIn(dateTime);
if (firstPosition == -1) {
......
......@@ -24,7 +24,7 @@
CupsPdfAnalyzer::CupsPdfAnalyzer(LogMode *logMode)
: FileAnalyzer(logMode)
, mCupsPdfRegex(QLatin1String("\\S* ") + ParsingHelper::instance()->syslogDateTimeRegexp()
+ QLatin1String("[ ]+\\[(\\w*)\\][ ]+(.*)"))
+ QLatin1String(R"([ ]+\[(\w*)\][ ]+(.*))"))
{ // \\[(.*)\\] (\\S*) (\\S*) (\\S*)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment