Commit df7cc9c8 authored by Laurent Montel's avatar Laurent Montel 😁

Migrate settings

parent 5845302b
...@@ -16,10 +16,14 @@ ...@@ -16,10 +16,14 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************************/ *******************************************************************************/
#include <KApplication>
#include <K4AboutData> #include <KAboutData>
#include <KCmdLineArgs>
#include <KLocale> #include <KLocale>
#include <QApplication>
#include <KLocalizedString>
#include <QCommandLineParser>
#include <kdelibs4configmigrator.h>
#include "kubrick.h" #include "kubrick.h"
...@@ -30,17 +34,29 @@ static const char version [] = "1.0"; ...@@ -30,17 +34,29 @@ static const char version [] = "1.0";
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
K4AboutData about ("kubrick", 0, ki18n ("Kubrick"), KAboutData about ("kubrick", i18n ("Kubrick"),
version, ki18n (description), version, i18n (description),
K4AboutData::License_GPL, KAboutLicense::GPL,
ki18n ("(C) 2008 Ian Wadham"), KLocalizedString(), i18n ("(C) 2008 Ian Wadham"),
"http://kde.org/applications/games/kubrick/" ); "http://kde.org/applications/games/kubrick/" );
about.addAuthor (ki18n ("Ian Wadham"), ki18n ("Author"), about.addAuthor (i18n ("Ian Wadham"), i18n ("Author"),
"iandw.au@gmail.com"); "iandw.au@gmail.com");
KCmdLineArgs::init (argc, argv, &about); QApplication app(argc, argv);
Kdelibs4ConfigMigrator migrate(QStringLiteral("kubrick"));
migrate.setConfigFiles(QStringList() << QStringLiteral("kubrickrc"));
migrate.setUiFiles(QStringList() << QStringLiteral("kubrickui.rc"));
migrate.migrate();
QCommandLineParser parser;
KAboutData::setApplicationData(about);
parser.addVersionOption();
parser.addHelpOption();
about.setupCommandLine(&parser);
parser.process(app);
about.processCommandLine(&parser);
KApplication app;
Kubrick * mainWindow = 0; Kubrick * mainWindow = 0;
if (app.isSessionRestored ()) { if (app.isSessionRestored ()) {
......
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