[Containment Interface] No need for values() as contains() looks up keys
Avoids creating a temporary list for no reason. Also use value() which is always const compared to operator[] Differential Revision: https://phabricator.kde.org/D4348
This commit is contained in:
parent
8d60a8f1f5
commit
fe39905560
@ -562,8 +562,8 @@ void ContainmentInterface::mimeTypeRetrieved(KIO::Job *job, const QString &mimet
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
QPoint posi; // will be overwritten with the event's position
|
QPoint posi; // will be overwritten with the event's position
|
||||||
if (m_dropPoints.keys().contains(tjob)) {
|
if (m_dropPoints.contains(tjob)) {
|
||||||
posi = m_dropPoints[tjob];
|
posi = m_dropPoints.value(tjob);
|
||||||
qDebug() << "Received a suitable dropEvent at" << posi;
|
qDebug() << "Received a suitable dropEvent at" << posi;
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Bailing out. Cannot find associated dropEvent related to the TransferJob";
|
qDebug() << "Bailing out. Cannot find associated dropEvent related to the TransferJob";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user