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 82919add authored by Laurent Montel's avatar Laurent Montel 😁

Remove usage of kaboutdata and i18n in test apps

parent 558886ff
......@@ -18,8 +18,6 @@
*/
#include <QApplication>
#include <KAboutData>
#include <KLocalizedString>
#include <QCommandLineParser>
#include <QStandardPaths>
#include "sendlaterdialog.h"
......@@ -28,15 +26,10 @@ int main(int argc, char **argv)
{
QApplication app(argc, argv);
QStandardPaths::setTestModeEnabled(true);
KAboutData aboutData(QStringLiteral("sendlaterdialog_gui"), i18n("SendLaterDialog_Gui"), QStringLiteral("1.0"));
aboutData.setShortDescription(i18n("Test for autocreate sendlater dialog"));
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
SendLater::SendLaterDialog *dialog = new SendLater::SendLaterDialog(nullptr);
dialog->exec();
delete dialog;
......
......@@ -18,7 +18,6 @@
#include <KLocalizedString>
#include <qapplication.h>
#include <QCommandLineParser>
#include <kaboutdata.h>
#include <QStandardPaths>
#include <KSieveUi/MultiImapVacationDialog>
......@@ -30,19 +29,12 @@ int main(int argc, char **argv)
{
QApplication app(argc, argv);
QStandardPaths::setTestModeEnabled(true);
KAboutData aboutData(QStringLiteral("vacationmultiscripttest"),
i18n("VacationMultiScriptTest_Gui"),
QStringLiteral("1.0"));
KAboutData::setApplicationData(aboutData);
QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
app.setQuitOnLastWindowClosed(true);
KSieveUi::SieveImapInstanceInterfaceManager::self()->setSieveImapInstanceInterface(new KMailSieveImapInstanceInterface);
......
#include <qdebug.h>
#include <QCoreApplication>
#include <KAboutData>
#include <KLocalizedString>
#include <QCommandLineParser>
#include "kmailinterface.h"
......@@ -11,15 +9,11 @@ int main(int argc, char **argv)
{
qDebug() << "Test KMail D-Bus interface.";
KAboutData aboutData(QStringLiteral("testKMailDBUS"), i18n("Test for KMail D-Bus interface"), QStringLiteral("0.0"));
QCoreApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
OrgKdeKmailKmailInterface kmailInterface(QStringLiteral("org.kde.kmail"), QStringLiteral("/KMail"), QDBusConnection::sessionBus());
kmailInterface.openComposer(QStringLiteral("to 1"), QString(), QString(), QStringLiteral("First test"), QStringLiteral("simple openComp call"), 0);
......
......@@ -20,8 +20,6 @@
#include <qdebug.h>
#include <QCoreApplication>
#include <KAboutData>
#include <KLocalizedString>
#include <QCommandLineParser>
#include <KToolInvocation>
#include <QStandardPaths>
......@@ -30,15 +28,11 @@ int main(int argc, char **argv)
{
qDebug() << "Test kinvocation by desktop name.";
KAboutData aboutData(QStringLiteral("testKInvocation"), i18n("Test for KMail invocation"), QStringLiteral("0.0"));
QCoreApplication app(argc, argv);
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
QString errmsg;
if (KToolInvocation::startServiceByDesktopName(QStringLiteral("org.kde.kmail2"), QString(), &errmsg)) {
......
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