diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2017-12-05 20:11:09 +0300 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2017-12-07 19:39:16 +0300 |
commit | ac844a2a45af5579c4013a02f6efc93fa83dc79f (patch) | |
tree | b9745822efdae7eb14095d7dd919de3d47c95a2b /src/gui/application.cpp | |
parent | 7230fa6b4fb0d077bc82814074aeb853ed45345f (diff) |
AbstractNetworkJob: move the httpTimeout from the propagator to the network job
Remove one dependency from the config file for the sync engine.
Part of issue #6213
Diffstat (limited to 'src/gui/application.cpp')
-rw-r--r-- | src/gui/application.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 88a2c5c08..1f8b53be8 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -139,6 +139,11 @@ Application::Application(int &argc, char **argv) setupLogging(); setupTranslations(); + // The timeout is initialized with an environment variable, if not, override with the value from the config + ConfigFile cfg; + if (!AbstractNetworkJob::httpTimeout) + AbstractNetworkJob::httpTimeout = cfg.timeout(); + _folderManager.reset(new FolderMan); connect(this, &SharedTools::QtSingleApplication::messageReceived, this, &Application::slotParseMessage); @@ -166,7 +171,6 @@ Application::Application(int &argc, char **argv) setQuitOnLastWindowClosed(false); - ConfigFile cfg; _theme->setSystrayUseMonoIcons(cfg.monoIcons()); connect(_theme, &Theme::systrayUseMonoIconsChanged, this, &Application::slotUseMonoIconsChanged); |