From 06875c7cbd7ea58b947817416d02a604a79a765b Mon Sep 17 00:00:00 2001 From: Patrick Valsecchi Date: Thu, 26 Dec 2013 15:02:58 +0100 Subject: Small code simplification Use QStringList::contains instead of iterating the list. Signed-off-by: Patrick Valsecchi Signed-off-by: Dirk Hohndel --- qt-ui/globe.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'qt-ui/globe.cpp') diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 9662d88e2..bbd103432 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -32,14 +32,7 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0), edit QStringList list = mtm.mapThemeIds(); QString subsurfaceDataPath; QDir marble; - bool foundGoogleMap = false; - Q_FOREACH(const QString& theme, list){ - if (theme == "earth/googlesat/googlesat.dgml"){ - foundGoogleMap = true; - break; - } - } - if (!foundGoogleMap) { + if (!list.contains("earth/googlesat/googlesat.dgml")) { subsurfaceDataPath = getSubsurfaceDataPath("marbledata"); if (subsurfaceDataPath != "") { MarbleDirs::setMarbleDataPath(subsurfaceDataPath); -- cgit v1.2.3-70-g09d2