Changeset View
Changeset View
Standalone View
Standalone View
kmplot/kmplot.cpp
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Line(s) | 62 | { | |||
---|---|---|---|---|---|
102 | 102 | | |||
103 | // apply the saved mainwindow settings, if any, and ask the mainwindow | 103 | // apply the saved mainwindow settings, if any, and ask the mainwindow | ||
104 | // to automatically save settings if changed: window size, toolbar | 104 | // to automatically save settings if changed: window size, toolbar | ||
105 | // position, icon size, etc. | 105 | // position, icon size, etc. | ||
106 | setAutoSaveSettings(); | 106 | setAutoSaveSettings(); | ||
107 | { | 107 | { | ||
108 | bool exit = false; | 108 | bool exit = false; | ||
109 | bool first = true; | 109 | bool first = true; | ||
110 | foreach(const QString& arg, parser.positionalArguments()) | 110 | const auto arguments = parser.positionalArguments(); | ||
111 | for (const QString& arg : arguments) | ||||
111 | { | 112 | { | ||
112 | QUrl url = urlFromArg(arg); | 113 | QUrl url = urlFromArg(arg); | ||
113 | if (first) | 114 | if (first) | ||
114 | { | 115 | { | ||
115 | exit = !load(url); | 116 | exit = !load(url); | ||
116 | } | 117 | } | ||
117 | else | 118 | else | ||
118 | openFileInNewWindow( url ); | 119 | openFileInNewWindow( url ); | ||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |