I'm seeing some false positives in the rule-of-two-soft check: - Using assign operator but class QModelIndex has copy-ctor but no assign operator -Using copy-ctor but class QPair has a trivial copy-ctor but non trivial assign operator These two classes could probably be ignored safely in the check
these warnings are not false-positives, but will blacklist those classes since it can't be fixed in Qt 4, thanks
Git commit 40710f301343dcf78efc78aa3c6c13b775a7b86c by Sergio Martins. Committed on 12/11/2015 at 12:42. Pushed by smartins into branch 'master'. rule-of-two-soft: Blacklist some cases that are safe We can't fix QModelIndex and QPair in Qt4, so don't warn. In Qt5 they are fixed already. M +5 -1 checks/ruleofbase.cpp M +2 -2 tests/rule-of-two-soft/main.cpp http://commits.kde.org/clazy/40710f301343dcf78efc78aa3c6c13b775a7b86c
I detected the following warnings for rule of three: QTypedArrayData::iterator QTypedArrayData::const_iterator QStringBuilder QVariant::Private QSet QSet::iterator QSet::const_iterator and for rule of two: QByteRef QCharRef QVariant::Private but i'm not sure if these should be fixed in Qt, or if they are false positives