File indexing completed on 2024-11-24 04:43:01

0001 /*
0002    SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "../widgets/gravatarupdatedialog.h"
0008 #include <QApplication>
0009 #include <QCommandLineParser>
0010 #include <QStandardPaths>
0011 
0012 int main(int argc, char **argv)
0013 {
0014     QApplication app(argc, argv);
0015     QStandardPaths::setTestModeEnabled(true);
0016     QCommandLineParser parser;
0017     parser.addVersionOption();
0018     parser.addHelpOption();
0019     parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("email"), QStringLiteral("Email address"), QStringLiteral("emailaddress")));
0020 
0021     parser.process(app);
0022     QString email;
0023     if (!parser.value(QStringLiteral("email")).isEmpty()) {
0024         email = parser.value(QStringLiteral("email"));
0025     }
0026 
0027     KABGravatar::GravatarUpdateDialog dlg;
0028     dlg.setEmail(email);
0029     dlg.show();
0030 
0031     app.exec();
0032     return 0;
0033 }