1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 11:39:16 +02:00

Never change a winning team!

This commit is contained in:
2018-10-08 22:07:36 +02:00
parent 0e4a5abc2b
commit e568806366
3 changed files with 13 additions and 11 deletions

View File

@ -40,6 +40,11 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
QNetworkProxyFactory::setUseSystemConfiguration(true);
QSettings settings(APP_NAME, APP_NAME);
settings.beginGroup(OPTIONS_SETTINGS_GROUP);
/* The QNetworkAccessManager must be a child of QApplication, otherwise it
triggers the following warning on exit (and may probably crash):
"QThreadStorage: Thread X exited after QThreadStorage Y destroyed" */
Downloader::setNetworkManager(new QNetworkAccessManager(this));
#ifdef ENABLE_HTTP2
Downloader::enableHTTP2(settings.value(ENABLE_HTTP2_SETTING,
ENABLE_HTTP2_DEFAULT).toBool());