Commit d3633c7b authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Fix broken load/save due to use of outdated ":<kwin4>"

KFileDialog of kdelibs <= 3.x supported ':<keyword>' for the dir parameter
to start in the directory last used by a filedialog in the same
application that specified the same keyword.

QFileDialog does not have that option, porting failed to adapt that.
parent 73123815
...@@ -485,11 +485,10 @@ void KWin4App::readProperties() ...@@ -485,11 +485,10 @@ void KWin4App::readProperties()
// Load a game menu // Load a game menu
void KWin4App::menuOpenGame() void KWin4App::menuOpenGame()
{ {
QString dir(QStringLiteral(":<kwin4>")); const QString file =
QString filter(QStringLiteral("*")); (global_debug < 1) ?
QString file(QStringLiteral("/tmp/kwin.save")); QFileDialog::getOpenFileName(this) :
if (global_debug < 1) QStringLiteral("/tmp/kwin.save");
file = QFileDialog::getOpenFileName(this, QString(), dir, filter);
mDoc->load(file,true); mDoc->load(file,true);
checkMenus(); checkMenus();
} }
...@@ -497,11 +496,10 @@ void KWin4App::menuOpenGame() ...@@ -497,11 +496,10 @@ void KWin4App::menuOpenGame()
// Save game menu // Save game menu
void KWin4App::menuSaveGame() void KWin4App::menuSaveGame()
{ {
QString dir(QStringLiteral(":<kwin4>")); const QString file =
QString filter(QStringLiteral("*")); (global_debug < 1) ?
QString file(QStringLiteral("/tmp/kwin.save")); QFileDialog::getSaveFileName(this) :
if (global_debug < 1) QStringLiteral("/tmp/kwin.save");
file = QFileDialog::getSaveFileName(this, QString(), dir, filter);
mDoc->save(file); mDoc->save(file);
} }
......
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