fix: 修复可能出现的应用名称前后含有空格问题

后端的接口传递过来的数据可能有部分空白信息,这里提前做一下处理,防止出异常

Log: 修复可能出现的应用名称前后含有空格问题
Task: https://pms.uniontech.com/zentao/task-view-64795.html
Change-Id: Ia2dea4a4d24b7ef152cb8ad3123cf1a94c8e5220
This commit is contained in:
范朋程 2021-03-08 10:08:52 +08:00 committed by fanpengcheng
parent 7e97570fc6
commit 8b07039f5e

View File

@ -550,9 +550,9 @@ QWidget *AppItem::popupTips()
if (!m_windowInfos.isEmpty()) {
const quint32 currentWindow = m_itemEntryInter->currentWindow();
Q_ASSERT(m_windowInfos.contains(currentWindow));
m_appNameTips->setText(m_windowInfos[currentWindow].title);
m_appNameTips->setText(m_windowInfos[currentWindow].title.simplified());
} else {
m_appNameTips->setText(m_itemEntryInter->name());
m_appNameTips->setText(m_itemEntryInter->name().simplified());
}
return m_appNameTips;