summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-02-04 21:18:46 +0100
committerMontel Laurent <[email protected]>2015-02-04 21:18:46 +0100
commitb0717aff53515e0ecfd0bee05e0a16f998c4b44b (patch)
tree3a1b9b43c87931c37d14ac56345bf2ef3b36e81f
parent7710c457150a43c8c1a2ab393bad33b880d778bd (diff)
Migrate settings
-rw-r--r--src/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2145431..c22be40 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -12,6 +12,7 @@
#include <KAboutData>
#include <KLocalizedString>
#include <KDBusService>
+#include <Kdelibs4ConfigMigrator>
#include <QApplication>
#include <QUrl>
@@ -26,7 +27,11 @@
int main(int argc, char** argv)
{
QApplication app(argc, argv);
-
+ Kdelibs4ConfigMigrator migrate(QStringLiteral("knavalbattle"));
+ migrate.setConfigFiles(QStringList() << QStringLiteral("knavalbattlerc"));
+ migrate.setUiFiles(QStringList() << QStringLiteral("knavalbattleui.rc"));
+ migrate.migrate();
+
KAboutData aboutData(QStringLiteral("knavalbattle"), i18n("Naval Battle"), QStringLiteral("2.1"),
i18n("The KDE ship sinking game"), KAboutLicense::GPL,
i18n("(c) 2000-2005 Nikolas Zimmermann, Daniel Molkentin\n"
@@ -53,9 +58,8 @@ int main(int argc, char** argv)
aboutData.addCredit(i18n("Roney Gomes"), i18n("Porting to KGameRenderer and QGraphicsView"), QStringLiteral("[email protected]"));
aboutData.setOrganizationDomain(QByteArray("kde.org"));
- aboutData.setProgramIconName(QStringLiteral("knavalbattle"));
aboutData.setProductName(QByteArray("knavalbattle"));
-
+ app.setWindowIcon(QIcon::fromTheme(QStringLiteral("knavalbattle")));
app.setApplicationDisplayName(aboutData.displayName());
app.setOrganizationDomain(aboutData.organizationDomain());
app.setApplicationVersion(aboutData.version());