mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-16 15:28:47 +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 <DependencyManager.h>
|
||||||
#include <StatTracker.h>
|
#include <StatTracker.h>
|
||||||
|
|
||||||
|
#include <QtCore/QDateTime>
|
||||||
#include <QtCore/QThread>
|
#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() {
|
void ResourceRequest::send() {
|
||||||
if (QThread::currentThread() != thread()) {
|
if (QThread::currentThread() != thread()) {
|
||||||
|
|
|
@ -90,6 +90,7 @@ public:
|
||||||
void setCacheEnabled(bool value) { _cacheEnabled = value; }
|
void setCacheEnabled(bool value) { _cacheEnabled = value; }
|
||||||
void setByteRange(ByteRange byteRange) { _byteRange = byteRange; }
|
void setByteRange(ByteRange byteRange) { _byteRange = byteRange; }
|
||||||
|
|
||||||
|
static QString toHttpDateString(uint64_t msecsSinceEpoch);
|
||||||
public slots:
|
public slots:
|
||||||
void send();
|
void send();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue