Skip to content

Quit exit if failing to save project#4428

Merged
zonkmachine merged 2 commits into
LMMS:stable-1.2from
zonkmachine:savefailquitexit
Jun 19, 2018
Merged

Quit exit if failing to save project#4428
zonkmachine merged 2 commits into
LMMS:stable-1.2from
zonkmachine:savefailquitexit

Conversation

@zonkmachine

Copy link
Copy Markdown
Contributor

Test for, and return the result of, Engine::getSong()->guiSaveProject() when saving a project.

Fixes #4426

Comment thread src/gui/MainWindow.cpp

Engine::getSong()->guiSaveProjectAs( fileName );
return true;
return Engine::getSong()->guiSaveProjectAs( fileName );

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor Author

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.

@PhysSong

Copy link
Copy Markdown
Member

Looks good for me.
Just a reminder for branch synchronization: #4044 has changed the same part.

@zonkmachine

Copy link
Copy Markdown
Contributor Author

OK. I need to test this some more though.

@zonkmachine zonkmachine merged commit 583e42e into LMMS:stable-1.2 Jun 19, 2018
@zonkmachine zonkmachine deleted the savefailquitexit branch June 19, 2018 19:59
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
* Quit exiting when failing to save project

*Test outcome of save in MainWindow::saveProjectAsNewVersion()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants