Avoids creating a temporary list for no reason.
Also use value() which is always const compared to operator[]
Details
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma - Commits
- R242:fe3990556046: [Containment Interface] No need for values() as contains() looks up keys
Dropped a file, still got an icon widget
Diff Detail
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.
src/scriptengines/qml/plasmoid/containmentinterface.cpp | ||
---|---|---|
565 | Here you're still doing 1 look-up too many. QPoint posi = m_dropPoints.value(tjob); will possibly do the same, then you can if (posi.isNull()). Otherwise you can constFind and it!=constEnd |