aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Patrick Valsecchi <patrick@thus.ch>2013-12-26 15:02:58 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-26 08:42:20 -0800
commit06875c7cbd7ea58b947817416d02a604a79a765b (patch)
treed3ed1f90104c9e8850a3f084c8aba4656f62d0c4
parent3fb3bd60b6e3b9cc0671439f5afafb141c497ebb (diff)
downloadsubsurface-06875c7cbd7ea58b947817416d02a604a79a765b.tar.gz
Small code simplification
Use QStringList::contains instead of iterating the list. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/globe.cpp9
1 files changed, 1 insertions, 8 deletions
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);