Commit 37caba73 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Fix saving courses and games

BUGS: 437318
parent 0c7acc28
...@@ -2164,7 +2164,7 @@ void KolfGame::save() ...@@ -2164,7 +2164,7 @@ void KolfGame::save()
return; return;
} }
else { else {
setFilename(newfile.url()); setFilename(newfile.toLocalFile());
} }
} }
delete fileSaveDialog; delete fileSaveDialog;
......
...@@ -551,7 +551,7 @@ void KolfWindow::saveAs() ...@@ -551,7 +551,7 @@ void KolfWindow::saveAs()
if (fileSaveDialog->exec() == QDialog::Accepted) { if (fileSaveDialog->exec() == QDialog::Accepted) {
QUrl newfile = fileSaveDialog->selectedUrls().first(); QUrl newfile = fileSaveDialog->selectedUrls().first();
if (!newfile.isEmpty()) { if (!newfile.isEmpty()) {
filename = newfile.url(); filename = newfile.toLocalFile();
game->setFilename(filename); game->setFilename(filename);
game->save(); game->save();
game->setFocus(); game->setFocus();
...@@ -572,7 +572,7 @@ void KolfWindow::saveGameAs() ...@@ -572,7 +572,7 @@ void KolfWindow::saveGameAs()
return; return;
} }
else { else {
loadedGame = newfile.url(); loadedGame = newfile.toLocalFile();
saveGame(); saveGame();
} }
} }
...@@ -606,7 +606,7 @@ void KolfWindow::loadGame() ...@@ -606,7 +606,7 @@ void KolfWindow::loadGame()
fileLoadDialog->setAcceptMode(QFileDialog::AcceptOpen); fileLoadDialog->setAcceptMode(QFileDialog::AcceptOpen);
fileLoadDialog->setFileMode(QFileDialog::ExistingFile); fileLoadDialog->setFileMode(QFileDialog::ExistingFile);
if (fileLoadDialog->exec() == QDialog::Accepted) { if (fileLoadDialog->exec() == QDialog::Accepted) {
QUrl loadedGame = fileLoadDialog->selectedUrls().first(); loadedGame = fileLoadDialog->selectedUrls().first().toLocalFile();
if (loadedGame.isEmpty()) { if (loadedGame.isEmpty()) {
return; return;
} }
......
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