forked from qt-creator/qt-creator
Todo: Avoid deprecation warnings
Change-Id: I8698d02c7b09e72a25d7ef18fb4cd040767b1a1c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -116,7 +116,7 @@ void OptionsDialog::editKeyword(QListWidgetItem *item)
|
||||
Keyword keyword;
|
||||
keyword.name = item->text();
|
||||
keyword.iconType = static_cast<IconType>(item->data(Qt::UserRole).toInt());
|
||||
keyword.color = item->textColor();
|
||||
keyword.color = item->foreground().color();
|
||||
|
||||
QSet<QString> keywordNamesButThis = keywordNames();
|
||||
keywordNamesButThis.remove(keyword.name);
|
||||
@@ -127,7 +127,7 @@ void OptionsDialog::editKeyword(QListWidgetItem *item)
|
||||
item->setIcon(icon(keyword.iconType));
|
||||
item->setText(keyword.name);
|
||||
item->setData(Qt::UserRole, static_cast<int>(keyword.iconType));
|
||||
item->setTextColor(keyword.color);
|
||||
item->setForeground(keyword.color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user