New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quit exit if failing to save project #4428
Conversation
@@ -1022,8 +1024,7 @@ bool MainWindow::saveProjectAsNewVersion() | |||
do VersionedSaveDialog::changeFileNameVersion( fileName, true ); | |||
while ( QFile( fileName ).exists() ); | |||
|
|||
Engine::getSong()->guiSaveProjectAs( fileName ); | |||
return true; | |||
return Engine::getSong()->guiSaveProjectAs( fileName ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to make MainWindow::saveProjectAsNewVersion()
return false
for the purpose of testing, but the function returns a bool and this looks correct. Still works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy to test. Just create a directory with test files and change ownership to root. Load and change one of the files and then saveAsNewVersion/()
. Works as expected both with and without this change.
Looks good for me. |
OK. I need to test this some more though. |
* Quit exiting when failing to save project *Test outcome of save in MainWindow::saveProjectAsNewVersion()
Test for, and return the result of,
Engine::getSong()->guiSaveProject()
when saving a project.Fixes #4426