1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

[CaBundleUpdater] Download bundle immediately on first run.

Instead of 30 seconds waiting, try to download certificate bundle
immediately on first run of application.
This commit is contained in:
nowrep 2013-03-11 17:09:28 +01:00
parent 4e862414a1
commit 4687847963

View File

@ -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()