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: port to KSelectAction's new API

Halla Rempta08e640eced7
diff --git a/plugins/tools/svgtexttool/FontSizeAction.cpp b/plugins/tools/svgtexttool/FontSizeAction.cpp
index b3c9f12ffb..4beed12f95 100644
--- a/plugins/tools/svgtexttool/FontSizeAction.cpp
+++ b/plugins/tools/svgtexttool/FontSizeAction.cpp
@@ -136,7 +136,11 @@ qreal FontSizeAction::fontSize() const
return currentText().toDouble();
}
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
void FontSizeAction::actionTriggered(QAction *action)
+#else
+void FontSizeAction::slotActionTriggered(QAction *action)
+#endif
{
Q_EMIT fontSizeChanged(action->text().toDouble());
KSelectAction::actionTriggered(action);
diff --git a/plugins/tools/svgtexttool/FontSizeAction.h b/plugins/tools/svgtexttool/FontSizeAction.h
index c834dd67fc..36ac28002e 100644
--- a/plugins/tools/svgtexttool/FontSizeAction.h
+++ b/plugins/tools/svgtexttool/FontSizeAction.h
@@ -49,7 +49,11 @@ protected Q_SLOTS:
/**
* This function is called whenever an action from the selections is triggered.
*/
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
void actionTriggered(QAction *action) override;
+#else
+ void slotActionTriggered(QAction *action) override;
+#endif
private:
class Private;