1 /*
2     This file is part of Kiten, a KDE Japanese Reference Tool
3     SPDX-FileCopyrightText: 2011 Daniel E. Moctezuma <democtezuma@gmail.com>
4 
5     SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #include <QApplication>
9 
10 #include <KAboutData>
11 #include <KLocalizedString>
12 #include <Kdelibs4ConfigMigrator>
13 #include "kanjibrowser.h"
14 
15 static const char description[] = I18N_NOOP( "Kiten's Kanji Browser, a KDE Japanese Reference Tool" );
16 static const char version[] = "1.0";
17 
main(int argc,char ** argv)18 int main( int argc, char **argv )
19 {
20   Kdelibs4ConfigMigrator migrate(QStringLiteral("kitenkanjibrowser"));
21   migrate.setConfigFiles(QStringList() << QStringLiteral("kitenkanjibrowserrc"));
22   migrate.setUiFiles(QStringList() << QStringLiteral("kanjibrowserui.rc"));
23   migrate.migrate();
24 
25   QApplication app(argc, argv);
26   app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kiten"), app.windowIcon()));
27   KLocalizedString::setApplicationDomain("kiten");
28 
29   KAboutData about( QStringLiteral("kitenkanjibrowser")
30                     , i18n( "kitenkanjibrowser" )
31                     , version
32                     , i18n( description )
33                     , KAboutLicense::GPL_V2
34                     , i18n( "(C) 2011 Daniel E. Moctezuma" )
35                     , QString()
36                     , QStringLiteral("https://edu.kde.org/kiten")
37                     , QStringLiteral("democtezuma@gmail.com") );
38   about.addAuthor(   i18n( "Daniel E. Moctezuma" )
39                    , QString()
40                    , QStringLiteral("democtezuma@gmail.com") );
41   about.setOrganizationDomain( "kde.org" );
42 
43   KAboutData::setApplicationData(about);
44 
45   if( app.isSessionRestored() )
46   {
47     kRestoreMainWindows<KanjiBrowser>();
48   }
49   else
50   {
51     KanjiBrowser *kanjiBrowser = new KanjiBrowser();
52     kanjiBrowser->show();
53   }
54 
55   return app.exec();
56 }
57