[accessibility/kontrast/carl/use-appstreamfile] /: Use KAboutData::fromAppStreamId

Carl Schwan <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 9d8fdda62934d60f65d6a26482738a01e44ca250 by Carl Schwan.
Committed on 03/08/2026 at 23:23.
Pushed by carlschwan into branch 'carl/use-appstreamfile'.

Use KAboutData::fromAppStreamId

M  +1    -1    CMakeLists.txt
M  +5    -5    src/main.cpp

https://invent.kde.org/accessibility/kontrast/-/commit/9d8fdda62934d60f65d6a26482738a01e44ca250

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2166dce..3aa2003 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
 project(kontrast VERSION ${RELEASE_SERVICE_VERSION})
 
 set(QT_MIN_VERSION "6.6.0")
-set(KF_MIN_VERSION "6.8.0")
+set(KF_MIN_VERSION "6.26.0")
 
 include(FeatureSummary)
 
diff --git a/src/main.cpp b/src/main.cpp
index ded1cae..8867661 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,6 +19,7 @@
 #endif
 #include <KLocalizedQmlContext>
 #include <QCommandLineParser>
+#include <QDebug>
 #include <QDir>
 #include <QIcon>
 #include <QQmlApplicationEngine>
@@ -28,6 +29,8 @@
 #include <QStandardPaths>
 #include <QUrl>
 
+using namespace Qt::StringLiterals;
+
 const QString DRIVER(QStringLiteral("QSQLITE"));
 
 Q_DECL_EXPORT int main(int argc, char *argv[])
@@ -39,11 +42,8 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
 #endif
     KLocalizedString::setApplicationDomain(QByteArrayLiteral("kontrast"));
 
-    KAboutData aboutData(QStringLiteral("kontrast"),
-                         i18nc("@title", "Kontrast"),
-                         QStringLiteral(KONTRAST_VERSION_STRING),
-                         i18nc("@title", "A contrast checker application"),
-                         KAboutLicense::GPL_V3);
+    auto aboutData = KAboutData::fromAppStreamId(u"org.kde.kontrast"_s);
+    aboutData.setVersion(KONTRAST_VERSION_STRING);
 
     aboutData.addAuthor(i18nc("@info:credit", "Carl Schwan"),
                         i18nc("@info:credit", "Maintainer and creator"),
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.