Follow up of T156, improved setup loading dialog

* allow to load the delivered setup file if there are no other data
* display setup cache information
This commit is contained in:
Klaus Basan
2017-09-23 02:40:33 +02:00
committed by Mathew Sutcliffe
parent bdbf2e75b4
commit 071f327fca
5 changed files with 158 additions and 39 deletions

View File

@@ -526,6 +526,18 @@ namespace BlackCore
return m_setup.get();
}
bool CSetupReader::hasCachedSetup() const
{
const CGlobalSetup cachedSetup = m_setup.get();
const bool cacheAvailable = cachedSetup.wasLoaded();
return cacheAvailable;
}
QDateTime CSetupReader::getSetupCacheTimestamp() const
{
return m_setup.getTimestamp();
}
bool CSetupReader::prefillCacheWithLocalResourceBootstrapFile()
{
if (m_shutdown) { return false; }
@@ -554,6 +566,17 @@ namespace BlackCore
return m_distributions.get();
}
bool CSetupReader::hasCachedDistributionInfo() const
{
const CDistributionList distributions = m_distributions.get();
return !distributions.isEmpty();
}
QDateTime CSetupReader::getDistributionCacheTimestamp() const
{
return m_distributions.getTimestamp();
}
QString CSetupReader::getLastSuccessfulDistributionUrl() const
{
QReadLocker l(&m_lockDistribution);