[CaBundleUpdater] Download bundle immediately on first run.

Instead of 30 seconds waiting, try to download certificate bundle
immediately on first run of application.
remotes/origin/falkon
nowrep 13 years ago
parent 4e862414a1
commit 4687847963
  1. 9
      src/lib/network/cabundleupdater.cpp

@ -37,7 +37,14 @@ CaBundleUpdater::CaBundleUpdater(NetworkManager* manager, QObject* parent)
m_bundleFileName = mApp->PROFILEDIR + "certificates/ca-bundle.crt";
m_lastUpdateFileName = mApp->PROFILEDIR + "certificates/last_update";
QTimer::singleShot(30 * 1000, this, SLOT(start()));
int updateTime = 30 * 1000;
// Check immediately on first run
if (!QFile(m_lastUpdateFileName).exists()) {
updateTime = 0;
}
QTimer::singleShot(updateTime, this, SLOT(start()));
}
void CaBundleUpdater::start()

Loading…
Cancel
Save