Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9cbd48cd authored by Laurent Montel's avatar Laurent Montel 😁

Remove kaboutdata in test apps

parent 5d2d629f
......@@ -24,9 +24,7 @@
#include <QFile>
#include <qdebug.h>
#include <KAboutData>
#include <QCoreApplication>
#include <klocalizedstring.h>
#include <QCommandLineParser>
#include <QCommandLineOption>
......@@ -35,20 +33,14 @@
int main(int argc, char **argv)
{
KAboutData aboutData(QStringLiteral("testread"), i18n("vCard test reader"), QStringLiteral("0.1"));
aboutData.addAuthor(i18n("Cornelius Schumacher"), QString(), QStringLiteral("schumacher@kde.org"));
QCoreApplication app(argc, argv);
QCommandLineParser parser;
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("vcard21"), i18n("vCard 2.1")));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("+inputfile"), i18n("Input file")));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("vcard21"), QStringLiteral("vCard 2.1")));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("+inputfile"), QStringLiteral("Input file")));
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
if (parser.positionalArguments().count() != 1) {
std::cerr << "Missing argument" << std::endl;
......
......@@ -20,11 +20,9 @@
#include <QFile>
#include <kaboutdata.h>
#include <klocalizedstring.h>
#include <QCoreApplication>
#include <KAboutData>
#include <QCommandLineParser>
#include "kcontacts/addressee.h"
......@@ -38,16 +36,11 @@
int main(int argc, char **argv)
{
KAboutData aboutData(QLatin1String("testwrite"), i18n("vCard test writer"), QLatin1String("0.1"));
QCoreApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
KContacts::Addressee addressee;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment