@@ -254,6 +254,21 @@ Application::Application(int &argc, char **argv)
254254 setApplicationName (_theme->appName ());
255255 setWindowIcon (_theme->applicationIcon ());
256256
257+ parseOptions (arguments ());
258+ // no need to waste time;
259+ if (_helpOnly || _versionOnly) {
260+ return ;
261+ }
262+
263+ if (_quitInstance) {
264+ QTimer::singleShot (0 , qApp, &QApplication::quit);
265+ return ;
266+ }
267+
268+ if (!_singleApp.isPrimaryInstance ()) {
269+ return ;
270+ }
271+
257272 if (!ConfigFile ().exists ()) {
258273 setApplicationName (_theme->appNameGUI ());
259274 QString legacyDir = QStandardPaths::writableLocation (QStandardPaths::GenericConfigLocation) + " /" + APPLICATION_CONFIG_NAME;
@@ -270,18 +285,18 @@ Application::Application(int &argc, char **argv)
270285 confDir.chop (1 );
271286 }
272287
273- qCInfo (lcApplication) << " Migrating old config from" << legacyDir << " to" << confDir;
288+ qCDebug (lcApplication) << " Migrating old config from" << legacyDir << " to" << confDir;
274289
275290 if (!QFile::rename (legacyDir, confDir)) {
276- qCWarning (lcApplication) << " Failed to move the old config directory to its new location (" << legacyDir << " to" << confDir << " )" ;
291+ qCDebug (lcApplication) << " Failed to move the old config directory to its new location (" << legacyDir << " to" << confDir << " )" ;
277292
278293 // Try to move the files one by one
279294 if (QFileInfo (confDir).isDir () || QDir ().mkdir (confDir)) {
280295 const QStringList filesList = QDir (legacyDir).entryList (QDir::Files);
281- qCInfo (lcApplication) << " Will move the individual files" << filesList;
296+ qCDebug (lcApplication) << " Will move the individual files" << filesList;
282297 for (const auto &name : filesList) {
283298 if (!QFile::rename (legacyDir + " /" + name, confDir + " /" + name)) {
284- qCWarning (lcApplication) << " Fallback move of " << name << " also failed" ;
299+ qCDebug (lcApplication) << " Fallback move of " << name << " also failed" ;
285300 }
286301 }
287302 }
@@ -306,21 +321,6 @@ Application::Application(int &argc, char **argv)
306321 }
307322 }
308323
309- parseOptions (arguments ());
310- // no need to waste time;
311- if (_helpOnly || _versionOnly) {
312- return ;
313- }
314-
315- if (_quitInstance) {
316- QTimer::singleShot (0 , qApp, &QApplication::quit);
317- return ;
318- }
319-
320- if (!_singleApp.isPrimaryInstance ()) {
321- return ;
322- }
323-
324324 setupLogging ();
325325 setupTranslations ();
326326
@@ -579,17 +579,17 @@ void Application::setupConfigFile()
579579 confDir.chop (1 );
580580 }
581581
582- qCInfo (lcApplication) << " Migrating old config from" << oldDir << " to" << confDir;
582+ qCDebug (lcApplication) << " Migrating old config from" << oldDir << " to" << confDir;
583583 if (!QFile::rename (oldDir, confDir)) {
584- qCWarning (lcApplication) << " Failed to move the old config directory to its new location (" << oldDir << " to" << confDir << " )" ;
584+ qCDebug (lcApplication) << " Failed to move the old config directory to its new location (" << oldDir << " to" << confDir << " )" ;
585585
586586 // Try to move the files one by one
587587 if (QFileInfo (confDir).isDir () || QDir ().mkdir (confDir)) {
588588 const QStringList filesList = QDir (oldDir).entryList (QDir::Files);
589- qCInfo (lcApplication) << " Will move the individual files" << filesList;
589+ qCDebug (lcApplication) << " Will move the individual files" << filesList;
590590 for (const auto &name : filesList) {
591591 if (!QFile::rename (oldDir + " /" + name, confDir + " /" + name)) {
592- qCWarning (lcApplication) << " Fallback move of " << name << " also failed" ;
592+ qCDebug (lcApplication) << " Fallback move of " << name << " also failed" ;
593593 }
594594 }
595595 }
0 commit comments