mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 22:52:26 +02:00
add toHttpDateString helper method
This commit is contained in:
parent
1aac970996
commit
f012772fa3
2 changed files with 7 additions and 0 deletions
|
@ -15,8 +15,14 @@
|
|||
#include <DependencyManager.h>
|
||||
#include <StatTracker.h>
|
||||
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QThread>
|
||||
|
||||
QString ResourceRequest::toHttpDateString(uint64_t msecsSinceEpoch) {
|
||||
return QLocale::c()
|
||||
.toString(QDateTime::fromMSecsSinceEpoch(msecsSinceEpoch), QLatin1String("ddd, dd MMM yyyy hh:mm:ss 'GMT'"))
|
||||
.toLatin1();
|
||||
}
|
||||
|
||||
void ResourceRequest::send() {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
|
|
|
@ -90,6 +90,7 @@ public:
|
|||
void setCacheEnabled(bool value) { _cacheEnabled = value; }
|
||||
void setByteRange(ByteRange byteRange) { _byteRange = byteRange; }
|
||||
|
||||
static QString toHttpDateString(uint64_t msecsSinceEpoch);
|
||||
public slots:
|
||||
void send();
|
||||
|
||||
|
|
Loading…
Reference in a new issue