tweaks to debugging file saving
This commit is contained in:
parent
ea686a9d9b
commit
ca6cccd24d
2 changed files with 6 additions and 2 deletions
|
@ -262,14 +262,16 @@ Kirigami.ApplicationWindow {
|
|||
console.log(saveFile.toString());
|
||||
let file = "";
|
||||
if (saveFile.length === 0) {
|
||||
saveFileDialog.open()
|
||||
file = fileHelper.saveFile();
|
||||
finalSave(file);
|
||||
} else {
|
||||
finalSave(saveFile);
|
||||
}
|
||||
}
|
||||
|
||||
function saveAs() {
|
||||
saveFileDialog.open();
|
||||
let file = fileHelper.saveFile();
|
||||
finalSave(file);
|
||||
}
|
||||
|
||||
function finalSave(file) {
|
||||
|
|
|
@ -80,6 +80,7 @@ impl file_helper::FileHelper {
|
|||
}
|
||||
|
||||
pub fn save_file(self: Pin<&mut Self>) -> QUrl {
|
||||
debug!("Saving file in rust");
|
||||
let file = FileDialog::new()
|
||||
.set_file_name("NVTFC.pres")
|
||||
.set_title("Save Presentation")
|
||||
|
@ -95,6 +96,7 @@ impl file_helper::FileHelper {
|
|||
QUrl::from(string.as_str())
|
||||
}
|
||||
} else {
|
||||
error!("There was an error, is xdg-desktop-portals correctly setup?");
|
||||
QUrl::default()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue