Support of relative paths in branding.xml
This commit is contained in:
@@ -79,8 +79,14 @@ BitmapFactoryInst& BitmapFactoryInst::instance(void)
|
||||
_pcSingleton = new BitmapFactoryInst;
|
||||
std::map<std::string,std::string>::const_iterator it;
|
||||
it = App::GetApplication().Config().find("ProgramIcons");
|
||||
if (it != App::GetApplication().Config().end())
|
||||
_pcSingleton->addPath(QString::fromUtf8(it->second.c_str()));
|
||||
if (it != App::GetApplication().Config().end()) {
|
||||
QString home = QString::fromUtf8(App::GetApplication().GetHomePath());
|
||||
QString path = QString::fromUtf8(it->second.c_str());
|
||||
if (QDir(path).isRelative()) {
|
||||
path = QFileInfo(QDir(home), path).absoluteFilePath();
|
||||
}
|
||||
_pcSingleton->addPath(path);
|
||||
}
|
||||
_pcSingleton->addPath(QLatin1String(":/icons/"));
|
||||
_pcSingleton->addPath(QLatin1String(":/Icons/"));
|
||||
_pcSingleton->addPath(QString::fromUtf8(App::GetApplication().GetHomePath()));
|
||||
|
||||
Reference in New Issue
Block a user