Clazy merge requestshttps://invent.kde.org/sdk/clazy/-/merge_requests2024-03-11T11:04:38Zhttps://invent.kde.org/sdk/clazy/-/merge_requests/134Fix false positives when using a typedef in combination with a generic2024-03-11T11:04:38ZAlexander LohnauFix false positives when using a typedef in combination with a genericWe should not use the underlying CXX record, because that will resolve the typedef
We usually don't do this in our code, but QVector is one example where it has happened (in qt6)We should not use the underlying CXX record, because that will resolve the typedef
We usually don't do this in our code, but QVector is one example where it has happened (in qt6)Alexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/133Add fitit for qstring-arg check2024-03-05T19:57:53ZAlexander LohnauAdd fitit for qstring-arg checkI found myself often being confused by the non-specific range. Also, it is error-prone in case one only has two .arg() calls with literals and then for example a number after thatI found myself often being confused by the non-specific range. Also, it is error-prone in case one only has two .arg() calls with literals and then for example a number after thatAlexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/132Increase minimum required CMake version to 3.82024-03-01T06:20:26ZChristoph GrĂ¼ningerIncrease minimum required CMake version to 3.8Value `17` for `CXX_STANDARD` was added in CMAke .8 and is not supported in 3.7.
See https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.htmlValue `17` for `CXX_STANDARD` was added in CMAke .8 and is not supported in 3.7.
See https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.htmlhttps://invent.kde.org/sdk/clazy/-/merge_requests/130connect-non-signal: Fix not finding method from PMF connect when signal is de...2024-02-18T08:21:16ZAlexander Lohnauconnect-non-signal: Fix not finding method from PMF connect when signal is declared in variableEspecially with long method/class names or overloads, this it a reasonable pattern to use
BUG: 478293Especially with long method/class names or overloads, this it a reasonable pattern to use
BUG: 478293Alexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/129Remove Qt4 compatibility mode and last remaining check2024-02-12T13:57:04ZAlexander LohnauRemove Qt4 compatibility mode and last remaining checkBy now, almost everyone should use Qt5 or Qt6. And even if there are old projects, this one check will not be a must-have for them.
The Qt4 mode is also AFAIK untested and not actively maintained. Thus, we should instead focus on the re...By now, almost everyone should use Qt5 or Qt6. And even if there are old projects, this one check will not be a must-have for them.
The Qt4 mode is also AFAIK untested and not actively maintained. Thus, we should instead focus on the relevant parts that have a consumer impact.Alexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/127Bump LLVM requirements to 11.0, enforce std::regex and std::filesystem being ...2024-02-11T16:54:58ZAlexander LohnauBump LLVM requirements to 11.0, enforce std::regex and std::filesystem being available when compiling clazyAlexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/126qgetenv: Fix false positives, fix wrong fixit, small general code cleanups2024-02-11T13:27:38ZAlexander Lohnauqgetenv: Fix false positives, fix wrong fixit, small general code cleanupsAlexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/128adapt usage of CXXMethodDecl::isPure for LLVM>=182024-02-09T20:07:31ZVladislav Nepogodinadapt usage of CXXMethodDecl::isPure for LLVM>=18since LLVM18 isPure was renamed to isPureVirtual
see: https://github.com/llvm/llvm-project/commit/e90e43fb9cd1d305f7196cd526aa503374e0f616since LLVM18 isPure was renamed to isPureVirtual
see: https://github.com/llvm/llvm-project/commit/e90e43fb9cd1d305f7196cd526aa503374e0f616https://invent.kde.org/sdk/clazy/-/merge_requests/125fully-qualified-moc-types: Fix nested templates, add fixits, slim down messag...2024-02-05T10:02:32ZAlexander Lohnaufully-qualified-moc-types: Fix nested templates, add fixits, slim down messages, improve warning rangesAlexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/124Fix false positive in qdatetime-utc2024-02-03T09:32:01ZDavid FaureFix false positive in qdatetime-utcQDateTime::currentDateTimeUtc().addYears(1).toMSecsSinceEpoch()
cannot be changed to use QDateTime::currentMSecsSinceEpoch()QDateTime::currentDateTimeUtc().addYears(1).toMSecsSinceEpoch()
cannot be changed to use QDateTime::currentMSecsSinceEpoch()https://invent.kde.org/sdk/clazy/-/merge_requests/121qstring-allocations: turn s == "" into s.isEmpty()2024-02-02T20:18:51ZDavid Faureqstring-allocations: turn s == "" into s.isEmpty()https://invent.kde.org/sdk/clazy/-/merge_requests/120empty-qstringliteral: Make check work with Qt6 and ignore files from QML plugins2024-01-31T11:34:14ZAlexander Lohnauempty-qstringliteral: Make check work with Qt6 and ignore files from QML pluginsThe QStringLiteral macro is very different in Qt5/Qt6, thus the
preprocessor visitor is enabled to get the used Qt version.
In the generated files, like
knewstuff/src/qtquick/.rcc/qmlcache/newstuffqmlplugin_qml/private/ErrorDisplayer_qm...The QStringLiteral macro is very different in Qt5/Qt6, thus the
preprocessor visitor is enabled to get the used Qt version.
In the generated files, like
knewstuff/src/qtquick/.rcc/qmlcache/newstuffqmlplugin_qml/private/ErrorDisplayer_qml.cpp,
Qt creates empty QStringLiterals.
While Qt does not use empty QStringLiterals in the UI files anymore, it is not worth checking them
though. Especially since we have the file name at hand already.Alexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/123wrong-qglobalstatic: Make check work properly with Qt62024-01-31T07:19:16ZAlexander Lohnauwrong-qglobalstatic: Make check work properly with Qt6Alexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/122Test/check qt6 fixes and message adjustments for connect-non-signal, connect...2024-01-26T15:54:20ZAlexander LohnauTest/check qt6 fixes and message adjustments for connect-non-signal, connect-3arg-lambda, reserve-candidatesAlexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/119Some more Qt6 checkfixes/testfixes2024-01-25T13:39:13ZAlexander LohnauSome more Qt6 checkfixes/testfixesAlexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/117qdatetime-utc: Rework test for even better performance and more usecases, add...2024-01-22T16:22:01ZAlexander Lohnauqdatetime-utc: Rework test for even better performance and more usecases, add proper Qt6/undeprecated Qt5 supportThe documented results can be verified using a simple benchmark test
```cpp
QBENCHMARK {
QDateTime::currentDateTime().toMSecsSinceEpoch();
}
QBENCHMARK {
QDateTime::currentDateTimeUtc().toM...The documented results can be verified using a simple benchmark test
```cpp
QBENCHMARK {
QDateTime::currentDateTime().toMSecsSinceEpoch();
}
QBENCHMARK {
QDateTime::currentDateTimeUtc().toMSecsSinceEpoch();
}
QBENCHMARK {
QDateTime::currentMSecsSinceEpoch();
}
```Alexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/118Qt6 test/check fixes for function-args-by-ref, unused-result and use-static-q...2024-01-22T12:18:06ZAlexander LohnauQt6 test/check fixes for function-args-by-ref, unused-result and use-static-qregularexpression checksAlexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/116detaching-temporary: Adjust tests for changed Qt6 semantics, update qcolor-fr...2024-01-20T11:26:49ZAlexander Lohnaudetaching-temporary: Adjust tests for changed Qt6 semantics, update qcolor-from-literal messages, improve docsAlexander LohnauAlexander Lohnauhttps://invent.kde.org/sdk/clazy/-/merge_requests/85Convert license headers to SPDX indentifiers2024-01-20T08:06:27ZAhmad SamirConvert license headers to SPDX indentifiersThis was done using licensedigger:
https://invent.kde.org/sdk/licensediggerThis was done using licensedigger:
https://invent.kde.org/sdk/licensediggerhttps://invent.kde.org/sdk/clazy/-/merge_requests/115qstring-allocations: Fix checks/fixits not working with Qt6, avoid many trans...2024-01-19T18:03:56ZAlexander Lohnauqstring-allocations: Fix checks/fixits not working with Qt6, avoid many transient includes for utility functions