src: use wstring in tooltip and snippet

This commit is contained in:
mlangkabel
2018-02-06 15:54:09 +01:00
parent 3a6a22df2e
commit 6ae9c2eca5
15 changed files with 39 additions and 41 deletions
@@ -82,17 +82,15 @@ void QtCodeFileTitleButton::setIsComplete(bool isComplete)
}
}
void QtCodeFileTitleButton::setProject(const std::string& name)
void QtCodeFileTitleButton::setProject(const std::wstring& name)
{
m_filePath = FilePath();
setText(name.c_str());
setText(QString::fromStdWString(name));
setToolTip("edit project");
std::string text = ResourcePaths::getGuiPath().str() + "code_view/images/edit.png";
setIcon(utility::colorizePixmap(
QPixmap(text.c_str()),
QPixmap(QString::fromStdWString(ResourcePaths::getGuiPath().concatenate(L"code_view/images/edit.png").wstr())),
ColorScheme::getInstance()->getColor("code/file/title/icon").c_str()
));
}
@@ -131,7 +129,7 @@ void QtCodeFileTitleButton::updateFromOther(const QtCodeFileTitleButton* other)
}
else
{
setProject(other->text().toStdString());
setProject(other->text().toStdWString());
}
setModificationTime(other->m_modificationTime);