| 1 |
#include <QtCore/QDateTime> |
| 2 |
|
| 3 |
void test() |
| 4 |
{ |
| 5 |
QDateTime::currentDateTime(); // OK |
| 6 |
QDateTime::currentDateTimeUtc(); // OK |
| 7 |
QDateTime::currentDateTimeUtc(); // Warning |
| 8 |
#if QT_VERSION_MAJOR == 5 |
| 9 |
QDateTime::currentSecsSinceEpoch(); // Warning, but this method is removed in Qt6 |
| 10 |
#endif |
| 11 |
QDateTime::currentMSecsSinceEpoch(); // Warning |
| 12 |
QDateTime::currentMSecsSinceEpoch(); // Warning, this may even be improved! |
| 13 |
QDateTime::currentSecsSinceEpoch(); // Warning |
| 14 |
QDateTime::currentSecsSinceEpoch(); // Warning, this may even be improved! |
| 15 |
QDateTime::currentDateTimeUtc().addYears(1).toMSecsSinceEpoch(); |
| 16 |
} |