[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kmines] /: reparse configuration after migration to update config cache
From: Mathias Kraus <k.hias () gmx ! de>
Date: 2015-03-21 16:10:11
Message-ID: E1YZLyV-0000R7-BA () scm ! kde ! org
[Download RAW message or body]
Git commit e20092ca356b5ced2f0c70e28f0ed6778d110015 by Mathias Kraus.
Committed on 21/03/2015 at 16:09.
Pushed by mkraus into branch 'master'.
reparse configuration after migration to update config cache
M +8 -3 main.cpp
http://commits.kde.org/kmines/e20092ca356b5ced2f0c70e28f0ed6778d110015
diff --git a/main.cpp b/main.cpp
index c352b0a..9710dc2 100644
--- a/main.cpp
+++ b/main.cpp
@@ -23,6 +23,7 @@
#include <QApplication>
#include <QCommandLineParser>
#include <KDBusService>
+#include <KSharedConfig>
#include "version.h"
#include "mainwindow.h"
=
@@ -32,12 +33,16 @@ static const char *DESCRIPTION
=
int main(int argc, char **argv)
{
+ QApplication app(argc, argv);
+
Kdelibs4ConfigMigrator migrate(QLatin1String("kmines"));
migrate.setConfigFiles(QStringList() << QLatin1String("kminesrc"));
migrate.setUiFiles(QStringList() << QLatin1String("kminesui.rc"));
- migrate.migrate();
-
- QApplication app(argc, argv);
+ if(migrate.migrate())
+ {
+ // update the configuration cache
+ KSharedConfig::openConfig()->reparseConfiguration();
+ }
=
KAboutData aboutData(QStringLiteral("kmines"), i18n("KMines"), QString=
Literal(LONG_VERSION),
i18n(DESCRIPTION), KAboutLicense::GPL,
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic