compile without foreach
Details
autotest ok
Diff Detail
- Repository
- R242 Plasma Framework (Library)
- Branch
- compile_without_foreach (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 10649 Build 10667: arc lint + arc unit
It's bad enough that we need to give things names because Qt keeps detaching on foreach, I'd be giving at least more semantic names to these temporary variables.
autotests/coronatest.cpp | ||
---|---|---|
149–150 | maybe call it containments? naming variables with a typename is bad (we even are using auto to not mention it's a list!) | |
src/declarativeimports/core/datamodel.cpp | ||
401 | It already is const. | |
src/plasma/pluginloader.cpp | ||
567 | shouldn't it be const? |
etc.
src/declarativeimports/core/datamodel.cpp | ||
---|---|---|
309–310 | same? | |
src/declarativeimports/core/tooltipdialog.cpp | ||
59–60 | same? | |
src/plasma/containment.cpp | ||
299–300 | just applets? | |
src/plasma/corona.cpp | ||
132–133 | applets? |
autotests/coronatest.cpp | ||
---|---|---|
150 | Please always annotate auto with e.g. asterisk or ampersand depending on type | |
216 | why not make the container const? | |
src/declarativeimports/calendar/daysmodel.cpp | ||
171 | While at it const QDate & | |
src/declarativeimports/core/datamodel.cpp | ||
309–310 | Yes, please change it to iterators |
autotests/coronatest.cpp | ||
---|---|---|
216 | Because this variable is use in code see line 228 |
Looks like this got lost/abandoned? It's painful to review (because it's so long), but it shouldn't be lost work...
Can you rebase and see if it still applies?
Maybe in the future better split this up into multiple patches so it can land in chunks instead of getting stuck forever....
src/declarativeimports/calendar/daysmodel.cpp | ||
---|---|---|
171 | Actually better not, a QDate is just a wrapper for a qint64, with a generated copy constructor (so it's just "copying" a qint64) | |
src/plasma/corona.cpp | ||
467 | (already const, this method is const) | |
src/plasma/pluginloader.cpp | ||
567 | (it is now) |
src/declarativeimports/core/iconitem.cpp | ||
---|---|---|
628 | Coding style &overlay | |
src/plasma/pluginloader.cpp | ||
328 | Coding style, auto &plugin | |
567 | Style, '&md' | |
645 | const, and style '&plugin'. | |
src/plasma/private/applet_p.cpp | ||
416 | Nit-pick: initializer list instead of <<. | |
src/plasma/private/theme_p.cpp | ||
837 | s/QLatin1Literal/QStringLiteral/ | |
src/plasma/private/timetracker.cpp | ||
44 | Style "&history". | |
71 | "&ev" | |
src/scriptengines/qml/plasmoid/containmentinterface.cpp | ||
927 | QLatin1String |
src/scriptengines/qml/plasmoid/dropmenu.cpp | ||
---|---|---|
80 ↗ | (On Diff #80182) | m_menu->addActions(m_dropActions); |