compile without foreach
Details
autotest ok
Diff Detail
- Repository
- R242 Plasma Framework (Library)
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
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 | ||
---|---|---|
145–146 | 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 | ||
413 | It already is const. | |
src/plasma/pluginloader.cpp | ||
510 | shouldn't it be const? |
etc.
src/declarativeimports/core/datamodel.cpp | ||
---|---|---|
321–322 | same? | |
src/declarativeimports/core/tooltipdialog.cpp | ||
59–60 | same? | |
src/plasma/containment.cpp | ||
304–305 | just applets? | |
src/plasma/corona.cpp | ||
132–133 | applets? |
autotests/coronatest.cpp | ||
---|---|---|
146 | Please always annotate auto with e.g. asterisk or ampersand depending on type | |
212–213 | why not make the container const? | |
src/declarativeimports/calendar/daysmodel.cpp | ||
171 | While at it const QDate & | |
src/declarativeimports/core/datamodel.cpp | ||
321–322 | Yes, please change it to iterators |
autotests/coronatest.cpp | ||
---|---|---|
212–213 | 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 | ||
525 | (already const, this method is const) | |
src/plasma/pluginloader.cpp | ||
510 | (it is now) |
src/declarativeimports/core/iconitem.cpp | ||
---|---|---|
617 | Coding style &overlay | |
src/plasma/pluginloader.cpp | ||
280 | Coding style, auto &plugin | |
510 | Style, '&md' | |
588 | const, and style '&plugin'. | |
src/plasma/private/applet_p.cpp | ||
416–417 | Nit-pick: initializer list instead of <<. | |
src/plasma/private/theme_p.cpp | ||
838–839 | s/QLatin1Literal/QStringLiteral/ | |
src/plasma/private/timetracker.cpp | ||
44 | Style "&history". | |
71 | "&ev" | |
src/scriptengines/qml/plasmoid/containmentinterface.cpp | ||
859 | QLatin1String |
src/scriptengines/qml/plasmoid/dropmenu.cpp | ||
---|---|---|
79–80 | m_menu->addActions(m_dropActions); |