[skip ci] improve possibility to create a QApplication in a thread

This commit is contained in:
wmayer
2020-06-21 00:07:21 +02:00
parent 002e25b561
commit daec778694
3 changed files with 9 additions and 3 deletions

View File

@@ -1889,7 +1889,7 @@ void Application::initConfig(int argc, char ** argv)
Branding brand;
QString binDir = QString::fromUtf8((mConfig["AppHomePath"] + "bin").c_str());
QFileInfo fi(binDir, QString::fromLatin1("branding.xml"));
if (brand.readFile(fi.absoluteFilePath())) {
if (fi.exists() && brand.readFile(fi.absoluteFilePath())) {
Branding::XmlConfig cfg = brand.getUserDefines();
for (Branding::XmlConfig::iterator it = cfg.begin(); it != cfg.end(); ++it) {
App::Application::Config()[it.key()] = it.value();