mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Do not use deprecated function
This commit is contained in:
parent
5455490ad2
commit
d9a1de0ec7
@ -110,7 +110,11 @@ void CSVWorld::EnumDelegate::paint (QPainter *painter, const QStyleOptionViewIte
|
||||
int valueIndex = getValueIndex(index);
|
||||
if (valueIndex != -1)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,7,0)
|
||||
QStyleOptionViewItem itemOption(option);
|
||||
#else
|
||||
QStyleOptionViewItemV4 itemOption(option);
|
||||
#endif
|
||||
itemOption.text = mValues.at(valueIndex).second;
|
||||
QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &itemOption, painter);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user