# HG changeset patch # User Chris Cannam # Date 1588163279 -3600 # Node ID f3f9114ff29521446a90c0a0add8415574b4b57c # Parent 27dc177e114f1d6b8d318653ebee32ebdfc4f7dc Improve chances of user getting to see splash screen (rather than empty box) by processing events a little more diff -r 27dc177e114f -r f3f9114ff295 main/main.cpp --- a/main/main.cpp Wed Apr 29 13:27:22 2020 +0100 +++ b/main/main.cpp Wed Apr 29 13:27:59 2020 +0100 @@ -356,13 +356,19 @@ settings.endGroup(); settings.beginGroup("Preferences"); - if (showSplash && settings.value("show-splash", true).toBool()) { + if (showSplash) { + if (!settings.value("show-splash", true).toBool()) { + showSplash = false; + } + } + settings.endGroup(); + + if (showSplash) { splash = new SVSplash(); splash->show(); QTimer::singleShot(5000, splash, SLOT(hide())); application.processEvents(); } - settings.endGroup(); settings.beginGroup("RDF"); QStringList list; @@ -394,6 +400,10 @@ } QApplication::setWindowIcon(icon); + if (showSplash) { + application.processEvents(); + } + QTranslator qtTranslator; QString qtTrName = QString("qt_%1").arg(language); SVDEBUG << "Loading " << qtTrName << "... "; @@ -428,6 +438,10 @@ // Make known-plugins query as early as possible after showing // splash screen. PluginScan::getInstance()->scan(); + + if (showSplash) { + application.processEvents(); + } // Permit these types to be used as args in queued signal calls qRegisterMetaType("PropertyContainer::PropertyName");