2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -12,7 +12,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_chat.h"
#include "data/data_user.h"
#include "base/unixtime.h"
#include "base/qt_adapters.h"
namespace Data {
namespace {
@@ -40,7 +39,7 @@ int OnlinePhraseChangeInSeconds(TimeId online, TimeId now) {
return (hours + 1) * 3600 - (now - online);
}
const auto nowFull = base::unixtime::parse(now);
const auto tomorrow = base::QDateToDateTime(nowFull.date().addDays(1));
const auto tomorrow = nowFull.date().addDays(1).startOfDay();
return std::max(static_cast<TimeId>(nowFull.secsTo(tomorrow)), 0);
}