reset preferences command line option

This commit is contained in:
Jan Käberich 2022-07-10 15:30:42 +02:00
parent c5973fb0ea
commit 97fceb4ff4

View File

@ -181,10 +181,15 @@ AppWindow::AppWindow(QWidget *parent)
parser.addOption(QCommandLineOption("no-gui", "Disables the graphical interface"));
parser.addOption(QCommandLineOption("cal", "Calibration file to load on startup", "cal"));
parser.addOption(QCommandLineOption("setup", "Setup file to load on startup", "setup"));
parser.addOption(QCommandLineOption("reset-preferences", "Resets all preferences to their default values"));
parser.process(QCoreApplication::arguments());
if(parser.isSet("reset-preferences")) {
Preferences::getInstance().setDefault();
} else {
Preferences::getInstance().load();
}
device = nullptr;
if(parser.isSet("port")) {