Commit 20a75a7b authored by Dennis Nienhüser's avatar Dennis Nienhüser

Favor non-deprecated QStyleOptionViewItem to QStyleOptionViewItemV4

Fixes compilation with pedantic and Qt 5.7.
parent 7255d06e
......@@ -106,7 +106,7 @@ MapItemDelegate::MapItemDelegate( QListView *view , NewstuffModel *newstuffModel
void MapItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const
{
QStyleOptionViewItemV4 styleOption = option;
QStyleOptionViewItem styleOption = option;
styleOption.text = QString();
QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &styleOption, painter);
......
......@@ -36,7 +36,7 @@ MapViewItemDelegate::MapViewItemDelegate( QListView *view ) :
void MapViewItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const
{
QStyleOptionViewItemV4 styleOption = option;
QStyleOptionViewItem styleOption = option;
initStyleOption( &styleOption, index );
styleOption.text = QString();
styleOption.icon = QIcon();
......
......@@ -46,7 +46,7 @@ TourItemDelegate::TourItemDelegate( QListView* view, MarbleWidget* widget, TourW
void TourItemDelegate::paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const
{
QStyleOptionViewItemV4 styleOption = option;
QStyleOptionViewItem styleOption = option;
styleOption.text = QString();
QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &styleOption, painter);
......
......@@ -24,7 +24,7 @@ RouteItemDelegate::RouteItemDelegate( QListView *view, CloudRouteModel *model )
void RouteItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
QStyleOptionViewItemV4 styleOption = option;
QStyleOptionViewItem styleOption = option;
styleOption.text = QString();
QApplication::style()->drawControl( QStyle::CE_ItemViewItem, &styleOption, painter );
......
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