mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +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:
parent
4e862414a1
commit
4687847963
@ -37,7 +37,14 @@ CaBundleUpdater::CaBundleUpdater(NetworkManager* manager, QObject* parent)
|
|||||||
m_bundleFileName = mApp->PROFILEDIR + "certificates/ca-bundle.crt";
|
m_bundleFileName = mApp->PROFILEDIR + "certificates/ca-bundle.crt";
|
||||||
m_lastUpdateFileName = mApp->PROFILEDIR + "certificates/last_update";
|
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()
|
void CaBundleUpdater::start()
|
||||||
|
Loading…
Reference in New Issue
Block a user