Commit c584cbf9 authored by David Jarvie's avatar David Jarvie
Browse files

Convert to Qt6 compatible code

parent 2a475134
Pipeline #209410 passed with stage
in 3 minutes and 19 seconds
......@@ -10,7 +10,6 @@
#include "alarmtext.h"
#include <KLocalizedString>
#include <QStringList>
......
......@@ -63,11 +63,7 @@ void FileResourceConfigManager::createResources(QObject* parent)
std::sort(resourceGroups.begin(), resourceGroups.end(),
[](const QString& g1, const QString& g2)
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
return g1.midRef(9).toInt() < g2.midRef(9).toInt();
#else
return QStringView(g1).mid(9).toInt() < QStringView(g2).mid(9).toInt();
#endif
});
KConfigGroup general(manager->mConfig, GROUP_GENERAL);
......@@ -75,11 +71,7 @@ void FileResourceConfigManager::createResources(QObject* parent)
for (const QString& resourceGroup : std::as_const(resourceGroups))
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
const int groupIndex = resourceGroup.midRef(9).toInt();
#else
const int groupIndex = QStringView(resourceGroup).mid(9).toInt();
#endif
FileResourceSettings::Ptr settings(new FileResourceSettings(manager->mConfig, resourceGroup));
if (!settings->isValid())
{
......
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