mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 08:14:47 -07:00
Deal with recent Qt methods deprecation (#3801)
* Deal with recent Qt methods deprecation * Use std::sort, std::less instead of qSort/qLess * Use QFontMetrics::horizontalAdvance instead of ::width * Use qApp->primaryScreen() instead of QDesktopWidget * use lambas instead of QSignalMapper * Use QTreeWidgetItem::setForeground instead of ::setTextColor * Use QDir::setPath instead of operator=(QString) * Use QList::swapItemsAt instead of ::swap * fix error
This commit is contained in:
parent
f54165025e
commit
b6df5a4ac3
17 changed files with 71 additions and 40 deletions
|
|
@ -176,10 +176,10 @@ void PlayerListWidget::setActivePlayer(int playerId)
|
|||
QTreeWidgetItem *twi = i.value();
|
||||
if (i.key() == playerId) {
|
||||
twi->setBackground(4, QColor(150, 255, 150));
|
||||
twi->setTextColor(4, QColor(0, 0, 0));
|
||||
twi->setForeground(4, QColor(0, 0, 0));
|
||||
} else {
|
||||
twi->setBackground(4, palette().base().color());
|
||||
twi->setTextColor(4, palette().text().color());
|
||||
twi->setForeground(4, palette().text().color());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue