summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-02-05 22:06:59 +0100
committerJakob Gruber <[email protected]>2015-07-15 11:23:17 +0200
commit28393b2ceb76f7a17c71b8c073a36d77d72825cc (patch)
tree72d00fb0d6826b36898d387e766c387dbf21796f
parentdedc787ec2e78e4754b83f9b9da78bc9be9656fb (diff)
kdelibs4support--
-rw-r--r--CMakeLists.txt3
-rw-r--r--src/gui/settingswindow.cpp7
-rw-r--r--src/main.cpp11
3 files changed, 11 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0210def..9f07ac5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,8 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif ()
-find_package(ECM REQUIRED NO_MODULE)
+
+find_package(ECM 1.3.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(Qt5 5.2.0 CONFIG REQUIRED Core Widgets Svg Quick QuickWidgets Test)
diff --git a/src/gui/settingswindow.cpp b/src/gui/settingswindow.cpp
index 39ee17b..ee92cb0 100644
--- a/src/gui/settingswindow.cpp
+++ b/src/gui/settingswindow.cpp
@@ -21,7 +21,7 @@
#include <assert.h>
#include <QColorDialog>
-#include <kfiledialog.h>
+#include <qfiledialog.h>
#include <klocalizedstring.h>
static inline QString toStylesheet(const QString &color)
@@ -72,9 +72,8 @@ void SettingsWindow::selectUnsolvedColor()
void SettingsWindow::bgToolButtonClicked()
{
- QString fileName = KFileDialog::getOpenFileName(QUrl(),
- i18n("*.png *.jpg|Image Files (*.png *.jpg)"),
- this, i18n("Select Background"));
+ QString fileName = QFileDialog::getOpenFileName(this, i18n("Select Background"), QString(),
+ i18n("*.png *.jpg|Image Files (*.png *.jpg)") );
if (fileName.isNull()) {
return;
diff --git a/src/main.cpp b/src/main.cpp
index 5e36577..e4db260 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -32,6 +32,12 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+ Kdelibs4ConfigMigrator migrate(QStringLiteral("picmi"));
+ migrate.setConfigFiles(QStringList() << QStringLiteral("picmirc"));
+ migrate.setUiFiles(QStringList() << QStringLiteral("picmiui.rc"));
+ migrate.migrate();
+
+
KAboutData about("picmi",
i18n("Picmi"),
QString::fromLatin1("%1.%2.%3").arg(VERSION_MAJOR)
@@ -44,11 +50,6 @@ int main(int argc, char *argv[])
"https://projects.kde.org/projects/kde/kdegames/picmi");
about.addAuthor(i18n("Jakob Gruber"), i18n("Picmi Author"), "[email protected]");
- Kdelibs4ConfigMigrator migrate(QStringLiteral("picmi"));
- migrate.setConfigFiles(QStringList() << QStringLiteral("picmirc"));
- migrate.setUiFiles(QStringList() << QStringLiteral("picmiui.rc"));
- migrate.migrate();
-
QCommandLineParser parser;
KAboutData::setApplicationData(about);