aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/objects/qthttp/qhttpauthenticator.cpp
diff options
context:
space:
mode:
authorGravatar ctrlaltca2025-07-17 13:26:45 +0200
committerGravatar GitHub2025-07-17 13:26:45 +0200
commit735c673d8865e3abfe1d9505af5f107306bb82d3 (patch)
tree8337a96387dfd33bb197cac7796768e63faa9f16 /src/modules/objects/qthttp/qhttpauthenticator.cpp
parentKviControlCodes: fix compilation with Qt >= 6.9 (#2705) (diff)
downloadKVIrc-735c673d8865e3abfe1d9505af5f107306bb82d3.tar.gz
KVIrc-735c673d8865e3abfe1d9505af5f107306bb82d3.tar.bz2
KVIrc-735c673d8865e3abfe1d9505af5f107306bb82d3.zip
Adapt to Qt 6.9 deprecations (#2706)
* Adapt to Qt 6.9 deprecations * Windows 2019 images are no more available no github, switch to 2022 * Wordaround Qt5 missing QTimezone::UTC
Diffstat (limited to 'src/modules/objects/qthttp/qhttpauthenticator.cpp')
-rw-r--r--src/modules/objects/qthttp/qhttpauthenticator.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/objects/qthttp/qhttpauthenticator.cpp b/src/modules/objects/qthttp/qhttpauthenticator.cpp
index 2d256c6de..35ed15482 100644
--- a/src/modules/objects/qthttp/qhttpauthenticator.cpp
+++ b/src/modules/objects/qthttp/qhttpauthenticator.cpp
@@ -50,6 +50,7 @@
#include <qendian.h>
#include <qstring.h>
#include <qdatetime.h>
+#include <QTimeZone>
#include <QRandomGenerator>
//#define NTLMV1_CLIENT
@@ -1308,8 +1309,14 @@ static QByteArray qEncodeNtlmv2Response(const QHttpAuthenticatorPrivate * ctx,
}
else
{
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QDateTime currentTime(QDate::currentDate(),
QTime::currentTime(), Qt::UTC);
+#else
+ QDateTime currentTime(QDate::currentDate(),
+ QTime::currentTime(), QTimeZone::UTC);
+#endif
+
// number of seconds between 1601 and epoc(1970)
// 369 years, 89 leap years