Map::Map(const QString &name, const QString &url) { _name = name; _url = url; connect(&Downloader::instance(), SIGNAL(finished()), this, SLOT(emitLoaded())); QDir::home().mkpath(QString(TILES_DIR"/%1").arg(_name)); }
Map::Map(QObject *parent, const QString &name, const QString &url) : QObject(parent) { _name = name; _url = url; connect(&Downloader::instance(), SIGNAL(finished()), this, SLOT(emitLoaded())); QString path = TILES_DIR + QString("/") + _name; if (!QDir().mkpath(path)) fprintf(stderr, "Error creating tiles dir: %s\n", qPrintable(path)); }