Commit 9018c1f8 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix compilation with KF5 5.86

parent dc05232b
Pipeline #212960 canceled with stage
in 2 minutes and 43 seconds
......@@ -20,11 +20,14 @@
#include <KConfigGroup>
#include <KLocalizedString>
#include <KSharedConfig>
#include <kconfigwidgets_version.h>
ThemeManager::ThemeManager(QObject *parent)
: KColorSchemeManager(parent)
{
#if KCONFIGWIDGETS_VERSION >= QT_VERSION_CHECK(5, 89, 0)
setAutosaveChanges(false);
#endif
const auto schemePath(loadCurrentPath());
// KColorSchemeManager includes a system color scheme option that reacts to system scheme changes.
......@@ -34,7 +37,11 @@ ThemeManager::ThemeManager(QObject *parent)
if (!schemePath.isEmpty()) {
for (int i = 1; i < model()->rowCount(); ++i) {
QModelIndex index = model()->index(i, 0);
#if KCONFIGWIDGETS_VERSION >= QT_VERSION_CHECK(5, 94, 0)
if (index.data(KColorSchemeModel::PathRole).toString().endsWith(schemePath)) {
#else
if (index.data(Qt::UserRole).toString().endsWith(schemePath)) {
#endif
scheme = index.data(Qt::DisplayRole).toString();
}
}
......
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