Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix linking of PythonPluginsModel to KF6::ColorScheme

Dmitry Kazakoved6a0630d731
diff --git a/plugins/extensions/pykrita/plugin/CMakeLists.txt b/plugins/extensions/pykrita/plugin/CMakeLists.txt
index e908ed2f07..f3d6b29d93 100644
--- a/plugins/extensions/pykrita/plugin/CMakeLists.txt
+++ b/plugins/extensions/pykrita/plugin/CMakeLists.txt
@@ -24,6 +24,7 @@ target_link_libraries(
${PYTHON_LIBRARY}
kritaui
kritalibkis
+ KF6::ColorScheme
)
kis_add_library(kritapykrita MODULE
diff --git a/plugins/extensions/pykrita/plugin/PythonPluginsModel.cpp b/plugins/extensions/pykrita/plugin/PythonPluginsModel.cpp
index 04137cf273..49cebd0400 100644
--- a/plugins/extensions/pykrita/plugin/PythonPluginsModel.cpp
+++ b/plugins/extensions/pykrita/plugin/PythonPluginsModel.cpp
@@ -89,14 +89,12 @@ QVariant PythonPluginsModel::data(const QModelIndex& index, const int role) cons
}
}
break;
-#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) // todo: why does this fail to build on Qt6?
case Qt::ForegroundRole:
if (plugin->isUnstable()) {
KColorScheme scheme(QPalette::Inactive, KColorScheme::View);
return scheme.foreground(KColorScheme::NegativeText).color();
}
break;
-#endif
default:
break;
}