From ba9319d7f6b5098004f2c5356390e1329891d8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 18 Dec 2015 22:44:26 +0100 Subject: [PATCH] Code cleanup --- src/map.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index 6d0cffa3..ca7deb19 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -4,7 +4,7 @@ #include "ll.h" #include "config.h" #include "map.h" - +#include Map::Map(const QString &name, const QString &url) { @@ -14,10 +14,10 @@ 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; +qDebug() << path; + if (!QDir::home().mkpath(path)) + fprintf(stderr, "Error creating tiles dir: %s\n", qPrintable(path)); } void Map::emitLoaded()