Remove usages of deprecated APIs

Replaced:
  QPalette::ColorRole::Background -> QPalette::ColorRole::Window
  QPalette::ColorRole::Foreground -> QPalette::ColorRole::WindowText
  Qt::ItemDataRole::TextColorRole -> Qt::ItemDataRole::ForegroundRole
  QFontMetrics::width() -> QFontMetrics::horizontalAdvance()

Task-number: QTBUG-76491
Change-Id: I1302e6b569e725daa6f7be1428ffe055657fc644
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Sona Kurazyan
2019-08-29 11:40:38 +02:00
parent 6f4aa0458c
commit 82bcf4e9f5
22 changed files with 52 additions and 59 deletions

View File

@@ -78,7 +78,7 @@ QVariant TodoItemsModel::data(const QModelIndex &index, int role) const
TodoItem item = m_todoItemsList->at(index.row());
if (role == Qt::TextColorRole)
if (role == Qt::ForegroundRole)
return item.color;
switch (index.column()) {