Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F34906376
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
View Options
diff --git a/common/utils.cpp b/common/utils.cpp
index da2c399..3b14fc6 100644
--- a/common/utils.cpp
+++ b/common/utils.cpp
@@ -1,26 +1,26 @@
// SPDX-FileCopyrightText: 2023 g10 code GmbH
// SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
// SPDX-License-Identifier: GPL-2.0-or-later
#include "utils.h"
#include <QList>
-#if QT_VERSION > QT_VERSION_CHECK(6, 7, 0)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
QByteArray Utils::findHeader(const QHttpHeaders &headers, const QByteArray &key)
{
return headers.value(key).toByteArray();
}
#else
QByteArray Utils::findHeader(QList<QPair<QByteArray, QByteArray>> headers, const QByteArray &key)
{
const auto it = std::find_if(std::cbegin(headers), std::cend(headers), [&key](auto header) {
return header.first == key;
});
if (it == std::cend(headers)) {
return {};
}
return it->second;
}
#endif
diff --git a/common/utils.h b/common/utils.h
index c95c2a5..e86320f 100644
--- a/common/utils.h
+++ b/common/utils.h
@@ -1,18 +1,18 @@
// SPDX-FileCopyrightText: 2023 g10 code GmbH
// SPDX-Contributor: Carl Schwan <carl.schwan@gnupg.com>
// SPDX-License-Identifier: GPL-2.0-or-later
#include <QByteArray>
-#if QT_VERSION > QT_VERSION_CHECK(6, 7, 0)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
#include <QHttpHeaders>
#endif
namespace Utils
{
-#if QT_VERSION > QT_VERSION_CHECK(6, 7, 0)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
QByteArray findHeader(const QHttpHeaders &headers, const QByteArray &key);
#else
QByteArray findHeader(QList<QPair<QByteArray, QByteArray>> headers, const QByteArray &key);
#endif
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jan 27, 8:50 PM (15 m, 19 s)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1c/7b/8ef543fc922fbb0aa84fde095ba7
Attached To
rOJ GpgOL.js
Event Timeline
Log In to Comment