]> Git trees. - libqmvoc.git/commitdiff
don't look twice in the hashmap
authorPino Toscano <pino@kde.org>
Fri, 16 Feb 2007 16:47:22 +0000 (16:47 +0000)
committerPino Toscano <pino@kde.org>
Fri, 16 Feb 2007 16:47:22 +0000 (16:47 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=634220

kdeeduplot/kplotwidget.cpp

index 5670b50317891820ec0955dcb9b4c2e5e555d3dd..83a290de9e779fca84da70328fc8d2adad64af3c 100644 (file)
@@ -273,12 +273,14 @@ void KPlotWidget::setShowObjectToolTips( bool show )
 
 
 KPlotAxis* KPlotWidget::axis( Axis a ) {
-       return mAxes.contains( a ) ? mAxes[a] : 0;
+    QHash<Axis, KPlotAxis*>::Iterator it = mAxes.find( a );
+    return it != mAxes.end() ? it.value() : 0;
 }
 
 const KPlotAxis* KPlotWidget::axis( Axis a ) const
 {
-    return mAxes.contains( a ) ? mAxes[a] : 0;
+    QHash<Axis, KPlotAxis*>::ConstIterator it = mAxes.find( a );
+    return it != mAxes.end() ? it.value() : 0;
 }
 
 QList<KPlotPoint*> KPlotWidget::pointsUnderPoint( const QPoint& p ) const {