Skip to content

Commit

Permalink
Merge pull request #5139 from mike320/288600-RComandLine
Browse files Browse the repository at this point in the history
Fix #288600 -R Command Line
  • Loading branch information
anatoly-os committed Aug 30, 2019
2 parents 7a3c7ad + 01efd1a commit c9b9359
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7250,7 +7250,7 @@ int main(int argc, char* av[])
parser.addOption(QCommandLineOption({"p", "plugin"}, "Execute named plugin", "name"));
parser.addOption(QCommandLineOption( "template-mode", "Save template mode, no page size")); // and no platform and creationDate tags
parser.addOption(QCommandLineOption({"F", "factory-settings"}, "Use factory settings")); // this includes -R, --revert-settimngs
parser.addOption(QCommandLineOption({"R", "revert-settings"}, "Revert to default preferences"));
parser.addOption(QCommandLineOption({"R", "revert-settings"}, "Revert to factory settings, but keep default preferences"));
parser.addOption(QCommandLineOption({"i", "load-icons"}, "Load icons from INSTALLPATH/icons"));
parser.addOption(QCommandLineOption({"j", "job"}, "Process a conversion job", "file"));
parser.addOption(QCommandLineOption({"e", "experimental"}, "Enable experimental features"));
Expand Down Expand Up @@ -7370,8 +7370,8 @@ int main(int argc, char* av[])
if (styleFile.isEmpty())
parser.showHelp(EXIT_FAILURE);
}
useFactorySettings = parser.isSet("F");
deletePreferences = (useFactorySettings || parser.isSet("R"));
deletePreferences = parser.isSet("F");
useFactorySettings = (deletePreferences || parser.isSet("R"));
enableExperimental = parser.isSet("e");
if (parser.isSet("c")) {
QString path = parser.value("c");
Expand Down Expand Up @@ -7480,8 +7480,8 @@ int main(int argc, char* av[])
if (dataPath.isEmpty())
dataPath = QStandardPaths::writableLocation(QStandardPaths::DataLocation);

if (deletePreferences) {
if (useFactorySettings)
if (useFactorySettings) {
if (deletePreferences)
QDir(dataPath).removeRecursively();
QSettings settings;
QFile::remove(settings.fileName() + ".lock"); //forcibly remove lock
Expand Down

0 comments on commit c9b9359

Please sign in to comment.