CWorldTreeModel: Make static icon instances const

Prevents modifications from occurring.
This commit is contained in:
Lioncash 2020-07-03 06:31:01 -04:00
parent 8634d9b29e
commit 32041a843d
1 changed files with 2 additions and 2 deletions

View File

@ -95,8 +95,8 @@ QVariant CWorldTreeModel::data(const QModelIndex& rkIndex, int Role) const
else if (Role == Qt::DecorationRole)
{
static QIcon sWorldIcon = QIcon(QStringLiteral(":/icons/World_16px.svg"));
static QIcon sAreaIcon = QIcon(QStringLiteral(":/icons/New_16px.svg"));
static const QIcon sWorldIcon = QIcon(QStringLiteral(":/icons/World_16px.svg"));
static const QIcon sAreaIcon = QIcon(QStringLiteral(":/icons/New_16px.svg"));
if (rkIndex.column() == 1)
return QVariant::Invalid;