Summary: | ctor-missing-parent-argument for subclasses of QCoreApplication | ||
---|---|---|---|
Product: | [Developer tools] clazy | Reporter: | Markus Enzenberger <markus.enzenberger> |
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/b843957a8dd3fc24ecdaae0289d976a08a0e6958 | Version Fixed In: | |
Sentry Crash Report: |
Description
Markus Enzenberger
2017-09-21 10:45:29 UTC
clazy shouldn't warn for any base class that lives in a system header, such as QCoreApplication (In reply to Sergio Martins from comment #1) > clazy shouldn't warn for any base class that lives in a system header, such > as QCoreApplication sure, but I'm saying it should also not warn for the subclass. It doesn't make much sense to write a constructor with a parent argument for subclasses of QCoreApplication. (In reply to Markus Enzenberger from comment #2) > (In reply to Sergio Martins from comment #1) > > clazy shouldn't warn for any base class that lives in a system header, such > > as QCoreApplication > > sure, but I'm saying it should also not warn for the subclass. It doesn't > make much sense to write a constructor with a parent argument for subclasses > of QCoreApplication. just to be explicit: I mean subclasses written by the user, not in Qt headers. Git commit 641ef2cf56a5d8e64e43a46e01aee0efd354215a by Sergio Martins. Committed on 21/09/2017 at 15:04. Pushed by smartins into branch '1.2'. ctor-missing-parent-argument: Add a failing unit-test M +2 -1 tests/ctor-missing-parent-argument/config.json M +7 -0 tests/ctor-missing-parent-argument/main.cpp https://commits.kde.org/clazy/641ef2cf56a5d8e64e43a46e01aee0efd354215a Git commit b843957a8dd3fc24ecdaae0289d976a08a0e6958 by Sergio Martins. Committed on 21/09/2017 at 21:42. Pushed by smartins into branch '1.2'. ctor-missing-parent-argument: Don't warn when base class is in system header and doesn't accept any QObject in any ctor. M +10 -0 src/checks/level1/ctor-missing-parent-argument.cpp M +1 -2 tests/ctor-missing-parent-argument/config.json https://commits.kde.org/clazy/b843957a8dd3fc24ecdaae0289d976a08a0e6958 |