Todo: Avoid deprecation warnings

Change-Id: I8698d02c7b09e72a25d7ef18fb4cd040767b1a1c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-07-05 12:02:41 +02:00
parent 0764a9808b
commit 37000cde8f

View File

@@ -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);
}
}