#include void test() { QDateTime::currentDateTime(); // OK QDateTime::currentDateTimeUtc(); // OK QDateTime::currentDateTimeUtc(); // Warning #if QT_VERSION_MAJOR == 5 QDateTime::currentSecsSinceEpoch(); // Warning, but this method is removed in Qt6 #endif QDateTime::currentMSecsSinceEpoch(); // Warning QDateTime::currentMSecsSinceEpoch(); // Warning, this may even be improved! QDateTime::currentSecsSinceEpoch(); // Warning QDateTime::currentSecsSinceEpoch(); // Warning, this may even be improved! QDateTime::currentDateTimeUtc().addYears(1).toMSecsSinceEpoch(); }