Commit b7a17340 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some compile error against qt6

parent f525d679
Pipeline #113171 passed with stage
in 1 minute and 26 seconds
......@@ -10,7 +10,6 @@
#include <kio/filejob.h>
#include <kio/job.h>
#include <kio_version.h>
#include <KDirWatch>
......
......@@ -13,7 +13,6 @@
#include <KDirWatch>
#include <KLocalizedString>
#include <karchive_version.h>
#include <KCompressionDevice>
#include "logFileReaderPrivate.h"
......
......@@ -10,6 +10,7 @@
#include <QList>
#include <QObject>
#include <QString>
#include <QVariant>
#include <QVector>
#include "logFile.h"
......
......@@ -7,9 +7,9 @@
#pragma once
#include <QList>
#include <QStringList>
class LogViewColumn;
class QStringList;
class LogViewColumns
{
......
......@@ -7,6 +7,7 @@
#include "logViewWidget.h"
#include <QAction>
#include <QActionGroup>
#include <QHeaderView>
#include <KLocalizedString>
......
......@@ -87,14 +87,21 @@ LogLine *SyslogAnalyzer::parseMessage(const QString &logLine, const LogFile &ori
line.remove(0, 3);
// Time
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QString stringTime(line.left(8));
const int h = stringTime.leftRef(2).toInt();
stringTime.remove(0, 3);
const int m = stringTime.leftRef(2).toInt();
stringTime.remove(0, 3);
const int s = stringTime.leftRef(2).toInt();
#else
QString stringTime(line.left(8));
const int h = QStringView(stringTime).left(2).toInt();
stringTime.remove(0, 3);
const int m = QStringView(stringTime).left(2).toInt();
stringTime.remove(0, 3);
const int s = QStringView(stringTime).left(2).toInt();
#endif
const QDateTime dateTime(QDate(year, monthNum, dayNum), QTime(h, m, s));
if (!dateTime.isValid()) {
qCDebug(KSYSTEMLOG) << "Malformed date and time";
......
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