From 4d10a8d5d5c312d2be3eb7010c360e51b3cbab38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 18 Dec 2015 22:50:28 +0100 Subject: [PATCH] Code cleanup --- src/map.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index 6d0cffa3..7e0482c5 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -14,10 +14,9 @@ Map::Map(const QString &name, const QString &url) connect(&Downloader::instance(), SIGNAL(finished()), this, SLOT(emitLoaded())); - if (!QDir::home().mkpath(QString(TILES_DIR"/%1").arg(_name))) - fprintf(stderr, "Error creating tiles dir: %s\n", - qPrintable(QDir::home().absolutePath() + QString("/"TILES_DIR"/%1") - .arg(_name))); + QString path = QString(TILES_DIR"/") + _name; + if (!QDir::home().mkpath(path)) + fprintf(stderr, "Error creating tiles dir: %s\n", qPrintable(path)); } void Map::emitLoaded()