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

Merge branch 'master' into work/rempt/qt6-5

Halla Rempt58dc9003a6ca
diff --cc libs/ui/dialogs/kis_dlg_preferences.cc
index f85f03e795,07bf2759d1..9be1b3477a
--- a/libs/ui/dialogs/kis_dlg_preferences.cc
+++ b/libs/ui/dialogs/kis_dlg_preferences.cc
@@@ -1889,15 -1883,8 +1885,14 @@@ DisplaySettingsTab::DisplaySettingsTab(
}
const QSurfaceFormat currentFormat = KisOpenGLModeProber::instance()->surfaceformatInUse();
-
- KisSurfaceColorSpace 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());
diff --cc libs/ui/opengl/KisOpenGLModeProber.cpp
index c9d958324b,36cbd6ec57..6c369f8963
--- a/libs/ui/opengl/KisOpenGLModeProber.cpp
+++ b/libs/ui/opengl/KisOpenGLModeProber.cpp
@@@ -48,15 -48,13 +48,13 @@@ const KoColorProfile *KisOpenGLModeProb
{
const KoColorProfile *profile = KoColorSpaceRegistry::instance()->p709SRGBProfile();
- #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
-
- const KisSurfaceColorSpace surfaceColorSpace = surfaceformatInUse().colorSpace();
- if (surfaceColorSpace == KisSurfaceColorSpace::sRGBColorSpace) {
+ const QSurfaceFormat::ColorSpace surfaceColorSpace = surfaceformatInUse().colorSpace();
+ if (surfaceColorSpace == QSurfaceFormat::ColorSpace::sRGBColorSpace) {
// use the default one!
#ifdef HAVE_HDR
- } else if (surfaceColorSpace == KisSurfaceColorSpace::scRGBColorSpace) {
+ } else if (surfaceColorSpace == QSurfaceFormat::ColorSpace::scRGBColorSpace) {
profile = KoColorSpaceRegistry::instance()->p709G10Profile();
- } else if (surfaceColorSpace == KisSurfaceColorSpace::bt2020PQColorSpace) {
+ } else if (surfaceColorSpace == QSurfaceFormat::ColorSpace::bt2020PQColorSpace) {
profile = KoColorSpaceRegistry::instance()->p2020PQProfile();
#endif
}
@@@ -263,16 -250,9 +250,9 @@@ void KisOpenGLModeProber::initSurfaceFo
format->setRedBufferSize(8);
format->setGreenBufferSize(8);
format->setBlueBufferSize(8);
- #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
format->setAlphaBufferSize(8);
- #else
- format->setAlphaBufferSize(0);
- #endif
-
- #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
// TODO: check if we can use real sRGB space here
- format->setColorSpace(KisSurfaceColorSpace::DefaultColorSpace);
+ format->setColorSpace(QSurfaceFormat::ColorSpace::DefaultColorSpace);
- #endif
}
}