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: add includes for QSurfaceFormat and QColorSpace

Halla Rempt06ff29fd6175
diff --git a/libs/ui/dialogs/kis_dlg_preferences.cc b/libs/ui/dialogs/kis_dlg_preferences.cc
index 0cbefe09d6..29d943c80d 100644
--- a/libs/ui/dialogs/kis_dlg_preferences.cc
+++ b/libs/ui/dialogs/kis_dlg_preferences.cc
@@ -38,6 +38,8 @@
#include <QScreen>
#include <QFontComboBox>
#include <QFont>
+#include <QSurfaceFormat>
+#include <QColorSpace>
#include <KisApplication.h>
#include <KisDocument.h>
@@ -1887,11 +1889,8 @@ DisplaySettingsTab::DisplaySettingsTab(QWidget *parent, const char *name)
}
const QSurfaceFormat currentFormat = KisOpenGLModeProber::instance()->surfaceformatInUse();
-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
KisSurfaceColorSpace colorSpace = currentFormat.colorSpace();
-#else
- KisSurfaceColorSpace colorSpace = KisSurfaceColorSpace::DefaultColorSpace;
-#endif
+
lblCurrentRootSurfaceFormat->setText(colorSpaceString(colorSpace, currentFormat.redBufferSize()));
cmbPreferedRootSurfaceFormat->setCurrentIndex(formatToIndex(cfg.rootSurfaceFormat()));
connect(cmbPreferedRootSurfaceFormat, SIGNAL(currentIndexChanged(int)), SLOT(slotPreferredSurfaceFormatChanged(int)));