mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 04:08:13 +02:00
Fix constexpr compile error on Windows
This commit is contained in:
parent
03c8c14f61
commit
d140ccb790
1 changed files with 2 additions and 1 deletions
|
@ -2134,7 +2134,6 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
|
||||||
_contentManager->getAllBackupsAndStatus(deferred);
|
_contentManager->getAllBackupsAndStatus(deferred);
|
||||||
return true;
|
return true;
|
||||||
} else if (url.path().startsWith(URI_API_BACKUPS_ID)) {
|
} else if (url.path().startsWith(URI_API_BACKUPS_ID)) {
|
||||||
constexpr const char* CONTENT_TYPE_ZIP = "application/zip";
|
|
||||||
auto id = url.path().mid(QString(URI_API_BACKUPS_ID).length());
|
auto id = url.path().mid(QString(URI_API_BACKUPS_ID).length());
|
||||||
auto deferred = makePromise("consolidateBackup");
|
auto deferred = makePromise("consolidateBackup");
|
||||||
deferred->then([connectionPtr, JSON_MIME_TYPE, id](QString error, QVariantMap result) {
|
deferred->then([connectionPtr, JSON_MIME_TYPE, id](QString error, QVariantMap result) {
|
||||||
|
@ -2148,6 +2147,8 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
|
||||||
auto path = result["backupFilePath"].toString();
|
auto path = result["backupFilePath"].toString();
|
||||||
auto file { std::unique_ptr<QFile>(new QFile(path)) };
|
auto file { std::unique_ptr<QFile>(new QFile(path)) };
|
||||||
if (file->open(QIODevice::ReadOnly)) {
|
if (file->open(QIODevice::ReadOnly)) {
|
||||||
|
constexpr const char* CONTENT_TYPE_ZIP = "application/zip";
|
||||||
|
|
||||||
auto downloadedFilename = id;
|
auto downloadedFilename = id;
|
||||||
downloadedFilename.replace(QRegularExpression(".zip$"), ".content.zip");
|
downloadedFilename.replace(QRegularExpression(".zip$"), ".content.zip");
|
||||||
auto contentDisposition = "attachment; filename=\"" + downloadedFilename + "\"";
|
auto contentDisposition = "attachment; filename=\"" + downloadedFilename + "\"";
|
||||||
|
|
Loading…
Reference in a new issue