33 for (
int i = 1; i < argc; i++) {
35 if (arg.startsWith(
"-pref")) {
38 int nextIndex = i + 1;
40 if (nextIndex < argc) {
41 FileName preferenceFile(argv[nextIndex]);
42 QString filePath = preferenceFile.expanded();
43 Preference::Preferences().clear();
44 Preference::Preferences().Load(filePath);
47 QMessageBox::warning(NULL,
"Warning",
"Preference flag set but no preference file given.");
51 setlocale(LC_NUMERIC,
"en_US");
53 QDesktopServices::setUrlHandler(
"http",
this,
"openUrl");