SUMMARY QVariant assignment (-Wclazy-qt6-deprecated-api-fixes) STEPS TO REPRODUCE The following code gives warning: QVariant variant; QString string; variant = string; OBSERVED RESULT warning: operator does not exist in Qt6. Using QVariant::compare() instead [-Wclazy-qt6-deprecated-api-fixes] EXPECTED RESULT No warning. Is this a bug? I'm compiling with Qt dev branch and it does compile and work. Changing it setValue instead does not produce the warning: variant.setValue(string); SOFTWARE/OS VERSIONS Qt Version: Latest dev branch clazy version: 1.9 clang version: 12.0.0
Maybe also fixed in master
This is still happening in master
A possibly relevant merge request was started @ https://invent.kde.org/sdk/clazy/-/merge_requests/43
Git commit e223fd501c5835eb46048681d84d4db7887221c7 by Nicolas Fella. Committed on 30/06/2021 at 13:02. Pushed by smartins into branch 'master'. Fix container find operation Make sure we compare with the end of the correct container M +1 -1 src/checks/manuallevel/qt6-deprecated-api-fixes.cpp https://invent.kde.org/sdk/clazy/commit/e223fd501c5835eb46048681d84d4db7887221c7
Git commit 83a41301e72cf30a8be1fa9c3eba7173a298c958 by Sergio Martins, on behalf of Nicolas Fella. Committed on 30/06/2021 at 13:07. Pushed by smartins into branch '1.9'. Fix container find operation Make sure we compare with the end of the correct container (cherry picked from commit e223fd501c5835eb46048681d84d4db7887221c7) M +1 -1 src/checks/manuallevel/qt6-deprecated-api-fixes.cpp https://invent.kde.org/sdk/clazy/commit/83a41301e72cf30a8be1fa9c3eba7173a298c958