Several fixes of warnings/clang tidy
This commit is contained in:
parent
2f527a8380
commit
880903db5f
15 changed files with 58 additions and 67 deletions
|
|
@ -15,7 +15,7 @@ void IconColumnDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
|
|||
const QModelIndex &index) const
|
||||
{
|
||||
if (index.data().canConvert<QString>()) {
|
||||
QString icon_name = qvariant_cast<QString>(index.data());
|
||||
auto icon_name = qvariant_cast<QString>(index.data());
|
||||
|
||||
|
||||
QIcon* icon = IconColumnDelegate::getIcon(icon_name);
|
||||
|
|
@ -51,7 +51,7 @@ QIcon* IconColumnDelegate::getIcon(const QString &name) const
|
|||
auto fr = m_Icons.find(name);
|
||||
if (fr == m_Icons.end()) {
|
||||
// load and insert icon
|
||||
QIcon *icon = new QIcon(name);
|
||||
auto icon = new QIcon(name);
|
||||
fr = m_Icons.emplace(name, icon).first;
|
||||
}
|
||||
return fr->second;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue