2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

Add Qt 6 support

Tested only on Linux so far
This commit is contained in:
Ilya Fedin
2021-10-19 17:00:21 +04:00
committed by John Preston
parent ea10cf5758
commit 847c01d605
154 changed files with 382 additions and 339 deletions

View File

@@ -143,7 +143,7 @@ QByteArray ParseRealtimeResponse(const QByteArray &bytes) {
}
const auto number = [&](int index) {
return match.capturedRef(index).toInt();
return match.capturedView(index).toInt();
};
const auto day = number(1);
const auto month = [&] {
@@ -161,9 +161,9 @@ QByteArray ParseRealtimeResponse(const QByteArray &bytes) {
"Nov",
"Dec"
};
const auto captured = match.capturedRef(2);
const auto captured = match.capturedView(2);
for (auto i = begin(months); i != end(months); ++i) {
if (captured == (*i)) {
if (captured == QString(*i)) {
return 1 + int(i - begin(months));
}
}
@@ -369,7 +369,7 @@ void SpecialConfigRequest::handleHeaderUnixtime(
LOG(("Config Error: Bad 'Date' header received: %1").arg(date));
return;
}
base::unixtime::http_update(parsed.toTime_t());
base::unixtime::http_update(parsed.toSecsSinceEpoch());
if (_timeDoneCallback) {
_timeDoneCallback();
}