Commit acaa9962 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Port clijplugin from QStringRef

It's gone in Qt 6.
parent 35b64dea
Pipeline #242761 passed with stage
in 3 minutes and 36 seconds
......@@ -9,6 +9,7 @@
#include <QDateTime>
#include <QFileInfo>
#include <QStringView>
#include <KLocalizedString>
#include <KPluginFactory>
......@@ -246,17 +247,29 @@ bool CliPlugin::tryAddCurFileProperties(const QString &line)
return false;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_currentParsedFile->m_origSize = line.midRef(13, 10).toULongLong(&ok);
#else
m_currentParsedFile->m_origSize = QStringView(line).mid(13, 10).toULongLong(&ok);
#endif
if (!ok) {
return false;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_currentParsedFile->m_compressedSize = line.midRef(24, 10).toULongLong(&ok);
#else
m_currentParsedFile->m_compressedSize = QStringView(line).mid(24, 10).toULongLong(&ok);
#endif
if (!ok) {
return false;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_currentParsedFile->m_ratio = line.midRef(35, 5).toDouble(&ok);
#else
m_currentParsedFile->m_ratio = QStringView(line).mid(35, 5).toDouble(&ok);
#endif
if (!ok) {
return false;
}
......
Supports Markdown
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