summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <[email protected]>2016-07-09 03:55:49 +0200
committerFriedrich W. H. Kossebau <[email protected]>2016-07-09 03:55:49 +0200
commitb081d936b780a3d69f53a690a84e08bcaf9dd5f6 (patch)
tree09f405e5af58505654914b3ebedab8877a7bed58
parent567575e9656609791423081e07e751aee0168eb1 (diff)
Avoid repeated conversion to QPointF in loop
-rw-r--r--src/lib/marble/AbstractDataPluginModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/marble/AbstractDataPluginModel.cpp b/src/lib/marble/AbstractDataPluginModel.cpp
index 95c72a5..94c815b 100644
--- a/src/lib/marble/AbstractDataPluginModel.cpp
+++ b/src/lib/marble/AbstractDataPluginModel.cpp
@@ -358,10 +358,12 @@ QList<AbstractDataPluginItem*> AbstractDataPluginModel::items( const ViewportPar
QList<AbstractDataPluginItem *> AbstractDataPluginModel::whichItemAt( const QPoint& curpos )
{
QList<AbstractDataPluginItem *> itemsAt;
-
+
+ const QPointF curposF(curpos);
foreach( AbstractDataPluginItem* item, d->m_displayedItems ) {
- if( item && item->contains( QPointF( curpos ) ) )
+ if (item && item->contains(curposF)) {
itemsAt.append( item );
+ }
}
return itemsAt;