#include #include #include #include "board.h" #include "boardmanager.h" BoardManager::BoardManager(QObject *parent) : QObject(parent) { } Board* BoardManager::getBoard(const QString &url) { QHash::iterator i = _boards.find(url); if (i != _boards.end()) { return i.value(); } Board *db = new Board(url, this); _boards.insert(url, db); return db; } QString BoardManager::getCachePath() const { QString path = QDesktopServices::storageLocation(QDesktopServices::CacheLocation); if (!QDir().mkpath(path)) { qWarning() << "Failed to create directory for databases:" << path; } return path; }