Summary: | clazy-empty-qstringliteral for uic generated files | ||
---|---|---|---|
Product: | [Developer tools] clazy | Reporter: | Evgeniy A. Dushistov <dushistov> |
Component: | general | Assignee: | Sergio Martins <smartins> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/clazy/6e5fee3730ad2e443d9ec93eb88f06ee7f8b33e2 | Version Fixed In: | |
Sentry Crash Report: |
Description
Evgeniy A. Dushistov
2018-10-09 09:15:55 UTC
Does it happen only for stylesheets ? Probably any property. Deserves to be fixed in Qt first though. Git commit 6e5fee3730ad2e443d9ec93eb88f06ee7f8b33e2 by Sergio Martins. Committed on 09/10/2018 at 10:37. Pushed by smartins into branch '1.4'. empty-qstringliteral: Don't warn for uic generated files Since 5.12 this is no longer an issue, since QStringLiteral was abolished from ui_*.h files. M +17 -0 src/checks/level0/empty-qstringliteral.cpp M +1 -0 src/checks/level0/empty-qstringliteral.h M +1 -1 tests/empty-qstringliteral/main.cpp A +50 -0 tests/empty-qstringliteral/ui_qstringliteral.h [License: GENERATED FILE] * The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. https://commits.kde.org/clazy/6e5fee3730ad2e443d9ec93eb88f06ee7f8b33e2 Thank you. The problem is still here, I suppose this is because of: + // Since 5.12 uic no longer uses QStringLiteral("") + if (preProcessorVisitor && preProcessorVisitor->qtVersion() >= 051200) + return false; In my case preProcessorVisitor->qtVersion() return 51102, but this is in decimal representation, in octet representation it is 0143636, and os it it bigger then 051200. I suppose the right fix will be 51200, without '0' prefix. Git commit 2860f3dc6069b600383959563d5c5b475d523014 by Sergio Martins. Committed on 09/10/2018 at 12:20. Pushed by smartins into branch '1.4'. Fix unintended octal value M +1 -1 src/checks/level0/empty-qstringliteral.cpp https://commits.kde.org/clazy/2860f3dc6069b600383959563d5c5b475d523014 try now, it should be fixed (branch 1.4) thanks Thank you, now after long period of time I have zero warnings in my projects. Git commit 971c0cc4f3488c847746967450557c4fa390753b by Sergio Martins. Committed on 09/10/2018 at 12:19. Pushed by smartins into branch 'master'. Fix unintended octal value M +1 -1 src/checks/level0/empty-qstringliteral.cpp https://commits.kde.org/clazy/971c0cc4f3488c847746967450557c4fa390753b > if (preProcessorVisitor && preProcessorVisitor->qtVersion() >= 51200) At now I updated my system Qt to 5.12 and: >ui_ValueCancelDialog.h:42:42: warning: Use QString instead of an empty QStringLiteral [-Wclazy-empty-qstringliteral] So may be change 51200 to something like 59999 ? Sorry for noise, it was cache issue, after clean rebuild ui_ files were generated without empty QStringLiteral |