Commit 5416a1a7 authored by Laurent Montel's avatar Laurent Montel 😁

Don't use deprecated type

parent de020726
......@@ -143,7 +143,7 @@ void ConfigAgentDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
cg = QPalette::Inactive;
}
QStyleOptionViewItemV4 opt(option);
QStyleOptionViewItem opt(option);
opt.showDecorationSelected = true;
QApplication::style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter);
painter->save();
......
......@@ -210,7 +210,7 @@ public:
return;
}
QStyleOptionViewItemV4 optionCopy(*static_cast<const QStyleOptionViewItemV4 *>(&option));
QStyleOptionViewItem optionCopy(*static_cast<const QStyleOptionViewItem *>(&option));
optionCopy.decorationPosition = QStyleOptionViewItem::Top;
optionCopy.decorationSize = QSize(mNavigator->iconSize(), mNavigator->iconSize());
optionCopy.textElideMode = Qt::ElideNone;
......@@ -223,7 +223,7 @@ public:
return QSize();
}
QStyleOptionViewItemV4 optionCopy(*static_cast<const QStyleOptionViewItemV4 *>(&option));
QStyleOptionViewItem optionCopy(*static_cast<const QStyleOptionViewItem *>(&option));
optionCopy.decorationPosition = QStyleOptionViewItem::Top;
optionCopy.decorationSize =
mNavigator->showIcons() ? QSize(mNavigator->iconSize(), mNavigator->iconSize()) : QSize();
......
......@@ -67,7 +67,7 @@ static QStyle *style(const QStyleOptionViewItem &option)
return style;
}
static QStyleOptionButton buttonOpt(const QStyleOptionViewItemV4 &opt, const QPixmap &pixmap, int pos = 1)
static QStyleOptionButton buttonOpt(const QStyleOptionViewItem &opt, const QPixmap &pixmap, int pos = 1)
{
QStyleOptionButton option;
option.icon = pixmap;
......@@ -155,7 +155,7 @@ void StyledCalendarDelegate::paint(QPainter *painter, const QStyleOptionViewItem
// const bool enabled = col.shouldList(Akonadi::Collection::ListDisplay);
Qt::CheckState enabled = static_cast<Qt::CheckState>(index.data(EnabledRole).toInt());
QStyleOptionViewItemV4 opt = option;
QStyleOptionViewItem opt = option;
initStyleOption(&opt, index);
QStyledItemDelegate::paint(painter, opt, index);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment