mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
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:
committed by
Mathew Sutcliffe
parent
6a06aa0460
commit
9ff322ae25
@@ -246,5 +246,18 @@ namespace BlackMisc
|
||||
CNetworkUtils::ignoreSslVerification(request);
|
||||
return request;
|
||||
}
|
||||
|
||||
qint64 CNetworkUtils::lastModifiedMsSinceEpoch(QNetworkReply *nwReply)
|
||||
{
|
||||
if (nwReply)
|
||||
{
|
||||
QVariant lastModifiedQv = nwReply->header(QNetworkRequest::LastModifiedHeader);
|
||||
if (lastModifiedQv.isValid() && lastModifiedQv.canConvert<QDateTime>())
|
||||
{
|
||||
return lastModifiedQv.value<QDateTime>().toMSecsSinceEpoch();
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
} // namespace
|
||||
} // namespacee
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <QStringList>
|
||||
#include <QUrlQuery>
|
||||
#include <QNetworkRequest>
|
||||
#include <QNetworkReply>
|
||||
#include <QJsonObject>
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -110,10 +111,12 @@ namespace BlackMisc
|
||||
//! Our tweakes network request
|
||||
static QNetworkRequest getNetworkRequest(const CUrl &url, RequestType type = Get);
|
||||
|
||||
//! Last modified from reply
|
||||
static qint64 lastModifiedMsSinceEpoch(QNetworkReply *nwReply);
|
||||
|
||||
private:
|
||||
//! Hidden constructor
|
||||
CNetworkUtils() {}
|
||||
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user