GH-1308 remove use of static data (translations) and root (notifications.json) paths.

This commit is contained in:
Petr Mrázek
2015-12-27 03:34:03 +01:00
parent 7670d72bd9
commit e8063d193d
5 changed files with 8 additions and 29 deletions

View File

@ -134,7 +134,7 @@ void Env::registerVersionList(QString name, std::shared_ptr< BaseVersionList > v
}
void Env::initHttpMetaCache(QString rootPath, QString staticDataPath)
void Env::initHttpMetaCache()
{
m_metacache.reset(new HttpMetaCache("metacache"));
m_metacache->addBase("asset_indexes", QDir("assets/indexes").absolutePath());
@ -146,8 +146,8 @@ void Env::initHttpMetaCache(QString rootPath, QString staticDataPath)
m_metacache->addBase("liteloader", QDir("mods/liteloader").absolutePath());
m_metacache->addBase("general", QDir("cache").absolutePath());
m_metacache->addBase("skins", QDir("accounts/skins").absolutePath());
m_metacache->addBase("root", QDir(rootPath).absolutePath());
m_metacache->addBase("translations", QDir(staticDataPath + "/translations").absolutePath());
m_metacache->addBase("root", QDir::currentPath());
m_metacache->addBase("translations", QDir("translations").absolutePath());
m_metacache->addBase("icons", QDir("cache/icons").absolutePath());
m_metacache->Load();
}

View File

@ -35,7 +35,7 @@ public:
std::shared_ptr<IconList> icons();
/// init the cache. FIXME: possible future hook point
void initHttpMetaCache(QString rootPath, QString staticDataPath);
void initHttpMetaCache();
/// Updates the application proxy settings from the settings object.
void updateProxySettings(QString proxyTypeStr, QString addr, int port, QString user, QString password);