Move showing of save result dialog out of Song
Move the showing of save result dialogs, e.g. "The project XYZ is now saved.", from the class Song into the class MainWindow. Implementation details: Add three new methods guiSaveProject, guiSaveProjectAs and handleSaveResult to MainWindow. The first two correspond to the methods with the same name in Song which don't do anything GUI related anymore. The GUI related actions are instead implemented in the two new methods in MainWindow. The method handleSaveResult shows the dialogs for successful and failed saves, updates the list of recent files and the title bar of the main window. This commit also fixes a problem in Song::guiSaveProject where a failed saved without a GUI would still have returned true, i.e. success.
This commit is contained in:
@@ -197,6 +197,9 @@ private:
|
||||
void refocus();
|
||||
|
||||
void exportProject(bool multiExport = false);
|
||||
void handleSaveResult(QString const & filename, bool songSavedSuccessfully);
|
||||
bool guiSaveProject();
|
||||
bool guiSaveProjectAs( const QString & filename );
|
||||
|
||||
QMdiArea * m_workspace;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user