[Marble-commits] KDE/kdeedu/marble/src/lib

Dirk Mueller mueller at kde.org
Mon Jul 19 13:13:44 CEST 2010


SVN commit 1151693 by mueller:

always return something


 M  +4 -4      GeoDataTreeModel.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/GeoDataTreeModel.cpp #1151692:1151693
@@ -139,10 +139,7 @@
 QVariant GeoDataTreeModel::headerData(int section, Qt::Orientation orientation,
                             int role) const
 {
-    if (role != Qt::DisplayRole)
-         return QVariant();
-
-    if ( orientation == Qt::Horizontal )
+    if ( role == Qt::DisplayRole && orientation == Qt::Horizontal )
     {
         switch ( section ) {
         case 0:
@@ -159,6 +156,7 @@
             break;
         }
     }
+    return QVariant();
 }
 
 QVariant GeoDataTreeModel::data( const QModelIndex &index, int role ) const
@@ -336,6 +334,8 @@
             return true;
         }
     }
+
+    return false;
 }
 
 Qt::ItemFlags GeoDataTreeModel::flags ( const QModelIndex & index ) const


More information about the Marble-commits mailing list