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++
Handle Qt6 QLabel::pixmap returning a value, not a pointer
Nicolas Fella0e3391e80f8e
diff --git a/plugins/generators/seexpr/kis_wdg_seexpr_presets_save.cpp b/plugins/generators/seexpr/kis_wdg_seexpr_presets_save.cppindex afeb7a956f..bebf26ee95 100644--- a/plugins/generators/seexpr/kis_wdg_seexpr_presets_save.cpp+++ b/plugins/generators/seexpr/kis_wdg_seexpr_presets_save.cpp@@ -145,9 +145,15 @@ void KisWdgSeExprPresetsSave::savePreset()if (idx.isValid() && !m_useNewPresetDialog) {// saving a preset that is replacing an existing oneconst QString presetFileName = m_currentPreset->name().split(" ").join("_");+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)if (!presetThumbnailWidget->pixmap()->isNull()) {m_currentPreset->setImage(presetThumbnailWidget->pixmap()->toImage());}+#else+ if (!presetThumbnailWidget->pixmap().isNull()) {+ m_currentPreset->setImage(presetThumbnailWidget->pixmap().toImage());+ }+#endifm_currentPreset->setScript(m_currentConfiguration->getString("script"));m_currentPreset->setFilename(presetFileName + m_currentPreset->defaultFileExtension());m_currentPreset->setValid(true);@@ -164,9 +170,15 @@ void KisWdgSeExprPresetsSave::savePreset()const QString presetFileName = newPresetNameTextField->text().split(" ").join("_");newPreset->setName(newPresetNameTextField->text());newPreset->setFilename(presetFileName + newPreset->defaultFileExtension());+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)if (!presetThumbnailWidget->pixmap()->isNull()) {newPreset->setImage(presetThumbnailWidget->pixmap()->toImage());}+#else+ if (!presetThumbnailWidget->pixmap().isNull()) {+ newPreset->setImage(presetThumbnailWidget->pixmap().toImage());+ }+#endifnewPreset->setScript(m_currentConfiguration->getString("script"));newPreset->setValid(true);diff --git a/plugins/impex/raw/3rdparty/libkdcraw/src/rexpanderbox.cpp b/plugins/impex/raw/3rdparty/libkdcraw/src/rexpanderbox.cppindex 0bd6ca44c7..bf4b97df9f 100644--- a/plugins/impex/raw/3rdparty/libkdcraw/src/rexpanderbox.cpp+++ b/plugins/impex/raw/3rdparty/libkdcraw/src/rexpanderbox.cpp@@ -426,7 +426,11 @@ void RLabelExpander::setIcon(const QIcon& icon)QIcon RLabelExpander::icon() const{+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)return QIcon(*d->pixmapLabel->pixmap());+#else+ return QIcon(d->pixmapLabel->pixmap());+#endif}void RLabelExpander::setWidget(QWidget* const widget)