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++

Qt6 Use QColorSpace::description in prefences dialog

Halla Remptf239018d0f97
diff --git a/libs/ui/dialogs/kis_dlg_preferences.cc b/libs/ui/dialogs/kis_dlg_preferences.cc
index 35797ff779..f85f03e795 100644
--- a/libs/ui/dialogs/kis_dlg_preferences.cc
+++ b/libs/ui/dialogs/kis_dlg_preferences.cc
@@ -1889,9 +1889,15 @@ DisplaySettingsTab::DisplaySettingsTab(QWidget *parent, const char *name)
}
const QSurfaceFormat currentFormat = KisOpenGLModeProber::instance()->surfaceformatInUse();
- QSurfaceFormat::ColorSpace colorSpace = currentFormat.colorSpace();
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
+ QSurfaceFormat::ColorSpace colorSpace = currentFormat.colorSpace();
lblCurrentRootSurfaceFormat->setText(colorSpaceString(colorSpace, currentFormat.redBufferSize()));
+#else
+ // FIXME: find a way to get the namedcolorspace field out of QColorSpace.
+ QColorSpace colorspace = currentFormat.colorSpace();
+ lblCurrentRootSurfaceFormat->setText(colorspace.description());
+#endif
cmbPreferedRootSurfaceFormat->setCurrentIndex(formatToIndex(cfg.rootSurfaceFormat()));
connect(cmbPreferedRootSurfaceFormat, SIGNAL(currentIndexChanged(int)), SLOT(slotPreferredSurfaceFormatChanged(int)));
slotPreferredSurfaceFormatChanged(cmbPreferedRootSurfaceFormat->currentIndex());