Skip to content

Commit

Permalink
removed no longer needed option
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPudashkin committed Aug 6, 2021
1 parent 8e4b200 commit 3ac155b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 25 deletions.
13 changes: 0 additions & 13 deletions src/project/internal/projectconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ static const Settings::Key RECENT_PROJECTS_PATHS(module_name, "userscores/recent
static const Settings::Key USER_TEMPLATES_PATH(module_name, "application/paths/myTemplates");
static const Settings::Key USER_PROJECTS_PATH(module_name, "application/paths/myScores");
static const Settings::Key PREFERRED_SCORE_CREATION_MODE_KEY(module_name, "userscores/preferredScoreCreationMode");
static const Settings::Key NEED_SHOW_WARNING_ABOUT_UNSAVED_SCORE_KEY(module_name, "userscores/unsavedScoreWarning");

const QString ProjectConfiguration::DEFAULT_FILE_SUFFIX(".mscz");

Expand All @@ -61,8 +60,6 @@ void ProjectConfiguration::init()

Val preferredScoreCreationMode = Val(static_cast<int>(PreferredScoreCreationMode::FromInstruments));
settings()->setDefaultValue(PREFERRED_SCORE_CREATION_MODE_KEY, preferredScoreCreationMode);

settings()->setDefaultValue(NEED_SHOW_WARNING_ABOUT_UNSAVED_SCORE_KEY, Val(true));
}

io::paths ProjectConfiguration::recentProjectPaths() const
Expand Down Expand Up @@ -198,13 +195,3 @@ void ProjectConfiguration::setPreferredScoreCreationMode(PreferredScoreCreationM
{
settings()->setSharedValue(PREFERRED_SCORE_CREATION_MODE_KEY, Val(static_cast<int>(mode)));
}

bool ProjectConfiguration::needShowWarningAboutUnsavedScore() const
{
return settings()->value(NEED_SHOW_WARNING_ABOUT_UNSAVED_SCORE_KEY).toBool();
}

void ProjectConfiguration::setNeedShowWarningAboutUnsavedScore(bool value)
{
settings()->setSharedValue(NEED_SHOW_WARNING_ABOUT_UNSAVED_SCORE_KEY, Val(value));
}
3 changes: 0 additions & 3 deletions src/project/internal/projectconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ class ProjectConfiguration : public IProjectConfiguration
PreferredScoreCreationMode preferredScoreCreationMode() const override;
void setPreferredScoreCreationMode(PreferredScoreCreationMode mode) override;

bool needShowWarningAboutUnsavedScore() const override;
void setNeedShowWarningAboutUnsavedScore(bool value) override;

private:

io::paths parsePaths(const mu::Val& value) const;
Expand Down
6 changes: 0 additions & 6 deletions src/project/internal/projectfilescontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,6 @@ bool ProjectFilesController::closeOpenedProject()

IInteractive::Button ProjectFilesController::askAboutSavingScore(const io::path& filePath)
{
if (!configuration()->needShowWarningAboutUnsavedScore()) {
return IInteractive::Button::DontSave;
}

std::string title = qtrc("userscores", "Do you want to save changes to the score “%1” before closing?")
.arg(io::completebasename(filePath).toQString()).toStdString();

Expand All @@ -235,8 +231,6 @@ IInteractive::Button ProjectFilesController::askAboutSavingScore(const io::path&
IInteractive::Button::Save
}, IInteractive::Button::Save, options);

configuration()->setNeedShowWarningAboutUnsavedScore(result.showAgain());

return result.standartButton();
}

Expand Down
3 changes: 0 additions & 3 deletions src/project/iprojectconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ class IProjectConfiguration : MODULE_EXPORT_INTERFACE

virtual PreferredScoreCreationMode preferredScoreCreationMode() const = 0;
virtual void setPreferredScoreCreationMode(PreferredScoreCreationMode mode) = 0;

virtual bool needShowWarningAboutUnsavedScore() const = 0;
virtual void setNeedShowWarningAboutUnsavedScore(bool value) = 0;
};
}

Expand Down

0 comments on commit 3ac155b

Please sign in to comment.