summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Štikonas <andrius@stikonas.eu>2016-07-13 20:20:08 (GMT)
committerAndrius Štikonas <andrius@stikonas.eu>2016-07-13 20:20:08 (GMT)
commitf8f98b742006b77c5536251f5912d9d3042e0491 (patch)
treeafbfd62b4b15657a9ac469cee1cd0ff2ff08dfb6
parente14b55e783d8f86bc388be7837b0d9b491b52728 (diff)
Port away from K4AboutData.
-rw-r--r--main.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/main.cpp b/main.cpp
index a5c8e96..72b8600 100644
--- a/main.cpp
+++ b/main.cpp
@@ -19,26 +19,33 @@
#include <QCommandLineOption>
#include <QCommandLineParser>
-#include <K4AboutData>
#include <KAboutData>
#include <KDBusService>
#include <KLocalizedString>
-static const char description[] =
- I18N_NOOP("KGpg - simple gui for GnuPG");
-
int main(int argc, char *argv[])
{
- K4AboutData about("kgpg", 0, ki18n("KGpg"), KGPG_VERSION, ki18n(description), K4AboutData::License_GPL, ki18n("&copy; 2003-2016, The KGpg Developers"));
KGpgApp *app = new KGpgApp(argc, argv);
KLocalizedString::setApplicationDomain("kgpg");
- about.addAuthor(ki18n("Rolf Eike Beer"), ki18n("Maintainer"), "kde@opensource.sf-tec.de");
- about.addAuthor(ki18n("Jean-Baptiste Mardelle"), ki18n("Author and former maintainer"), "bj@altern.org");
- about.addAuthor(ki18n("Jimmy Gilles"), KLocalizedString(), "jimmygilles@gmail.com");
+ KAboutData about (
+ QLatin1String("kgpg"),
+ xi18nc("@title", "<application>KGpg</application>"),
+ QLatin1String(KGPG_VERSION),
+ i18nc("@title", "KGpg - simple gui for GnuPG"),
+ KAboutLicense::GPL,
+ i18nc("@info:credit", "&copy; 2003-2016, The KGpg Developers"));
+
+ about.addAuthor(i18nc("@info:credit", "Rolf Eike Beer"), i18nc("@info:credit", "Maintainer"), "kde@opensource.sf-tec.de");
+ about.addAuthor(i18nc("@info:credit", "Jean-Baptiste Mardelle"), i18nc("@info:credit", "Author and former maintainer"), "bj@altern.org");
+ about.addAuthor(i18nc("@info:credit", "Jimmy Gilles"), QString(), "jimmygilles@gmail.com");
+ about.addAuthor(i18nc("@info:credit", "Andrius Štikonas"), i18nc("@info:credit", "KF5 port"), "andrius@stikonas.eu");
+
+ about.setHomepage(QLatin1String("http://utils.kde.org/projects/kgpg"));
- about.setHomepage("http://utils.kde.org/projects/kgpg");
+ about.setOrganizationDomain(QByteArray("kde.org"));
+ about.setProductName(QByteArray("kgpg"));
KAboutData::setApplicationData(about);
@@ -46,7 +53,7 @@ int main(int argc, char *argv[])
parser.setApplicationDescription(about.shortDescription());
parser.addVersionOption();
parser.addHelpOption();
- KAboutData(about).setupCommandLine(&parser);
+ about.setupCommandLine(&parser);
parser.addOption(QCommandLineOption(QStringList() << QLatin1String("e"), i18n("Encrypt file")));
parser.addOption(QCommandLineOption(QStringList() << QLatin1String("k"), i18n("Open key manager")));
parser.addOption(QCommandLineOption(QStringList() << QLatin1String("d"), i18n("Open editor")));
@@ -56,7 +63,7 @@ int main(int argc, char *argv[])
parser.addPositionalArgument(QLatin1String("[File]"), i18n("File to open"));
parser.process(*app);
- KAboutData(about).processCommandLine(&parser);
+ about.processCommandLine(&parser);
app->setQuitOnLastWindowClosed(false);
KDBusService service(KDBusService::Unique);