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