1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
#include <QtCore/QDateTime>
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();
}
|