Qt-QDateTimeUTC¶
QDateTime::currentDateTime() should not be used to get UTC
Required inputs: IR
QDateTime::currentDateTime() are expensive and should be replaced with QDateTime::currentDateTimeUTC() if possible.
The considered cases are:
- Use
QDateTime::currentDateTimeUtc().toTime_t()instead ofQDateTime::currentDateTime().toTime_t() - and
QDateTime::currentDateTimeUtc()instead ofQDateTime::currentDateTime().toUTC().
This rule is based on clazy rule qdatetime-utc
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
qdatetime_utc |
Using {} is expensive and should be avoided, use {} insted. |
None |
False |
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
level¶
level : int = 0