refs #597, use CMD arguments in setup reader.

* Setup reader will now be initialized and handles by CApplication
* Setup reader no longer threaded reader as it will be initialized and loade upfront
This commit is contained in:
Klaus Basan
2016-02-18 19:56:35 +01:00
committed by Mathew Sutcliffe
parent 6a06aa0460
commit 9ff322ae25
8 changed files with 281 additions and 136 deletions

View File

@@ -9,6 +9,7 @@
#include "threadedreader.h"
#include "blackmisc/threadutils.h"
#include "blackmisc/network/networkutils.h"
using namespace BlackMisc;
using namespace BlackMisc::Network;
@@ -26,15 +27,7 @@ namespace BlackMisc
qint64 CThreadedReader::lastModifiedMsSinceEpoch(QNetworkReply *nwReply) const
{
if (nwReply)
{
QVariant lastModifiedQv = nwReply->header(QNetworkRequest::LastModifiedHeader);
if (lastModifiedQv.isValid() && lastModifiedQv.canConvert<QDateTime>())
{
return lastModifiedQv.value<QDateTime>().toMSecsSinceEpoch();
}
}
return -1;
return CNetworkUtils::lastModifiedMsSinceEpoch(nwReply);
}
QDateTime CThreadedReader::getUpdateTimestamp() const