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>
This commit is contained in:
Patrick Valsecchi 2013-12-26 15:02:58 +01:00 committed by Dirk Hohndel
parent 3fb3bd60b6
commit 06875c7cbd

View file

@ -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);