Commit d32e4723 authored by Frederik Schwarzer's avatar Frederik Schwarzer

KFileDialog -> QFileDialog.

Also QStandardPaths::AppDataLocation needs Qt 5.4.
parent ed45bc16
project(kigo)
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.3.0")
set (QT_MIN_VERSION "5.4.0")
find_package(ECM 1.7.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
......
......@@ -33,9 +33,7 @@
#include <QAction>
#include <KActionCollection>
#include <KConfigDialog>
#include <KFileDialog>
#include <KNS3/DownloadDialog>
#include <KStandardDirs>
#include <KStandardGameAction>
#include <KToggleAction>
#include <QUrl>
......@@ -45,6 +43,7 @@
#include <libkdegamesprivate/kgamethemeselector.h>
#include <QDockWidget>
#include <QFileDialog>
#include <QTimer>
#include <QUndoView>
#include <QDebug>
......@@ -111,7 +110,8 @@ void MainWindow::newGame()
void MainWindow::loadGame()
{
QString fileName = KFileDialog::getOpenFileName(QUrl::fromLocalFile(KStandardDirs::locate("appdata", QStringLiteral("games/"))), QStringLiteral("*.sgf"));
const QString folderName = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("games"), QStandardPaths::LocateDirectory);
const QString fileName = QFileDialog::getOpenFileName(this, QString(), folderName, i18n("Kigo Game Files | *.sgf"));
if (!fileName.isEmpty()) {
loadGame(fileName);
}
......@@ -197,7 +197,7 @@ void MainWindow::backendError()
void MainWindow::saveGame()
{
QString fileName = KFileDialog::getSaveFileName(QUrl::fromLocalFile(QDir::homePath()), QStringLiteral("*.sgf"));
const QString fileName = QFileDialog::getSaveFileName(this, QString(), QStandardPaths::writableLocation(QStandardPaths::HomeLocation), i18n("Kigo Game Files | *.sgf"));
if (!fileName.isEmpty()) {
if (m_game->save(fileName))
......@@ -510,5 +510,3 @@ bool MainWindow::isBackendWorking()
}
} // End of namespace Kigo
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