Skip to content

Commit

Permalink
Merge pull request #519 from f3nix/qt5-warnings-1
Browse files Browse the repository at this point in the history
Fix some Qt5 build warnings
  • Loading branch information
wwmayer committed Feb 12, 2017
2 parents d925db1 + d7541bc commit ec00893
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Gui/DAGView/DAGRectItem.cpp
Expand Up @@ -46,7 +46,11 @@ void RectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
Q_UNUSED(widget);
painter->save();

#if QT_VERSION >= 0x050000
QStyleOptionViewItem styleOption;
#else
QStyleOptionViewItemV4 styleOption;
#endif

styleOption.backgroundBrush = backgroundBrush;
if (editing)
Expand Down
4 changes: 4 additions & 0 deletions src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp
Expand Up @@ -320,7 +320,11 @@ class ExpressionDelegate : public QStyledItemDelegate
}

void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const {
#if QT_VERSION >= 0x050000
QStyleOptionViewItem options = option;
#else
QStyleOptionViewItemV4 options = option;
#endif
initStyleOption(&options, index);

options.widget->style()->drawControl(QStyle::CE_ItemViewItem, &options, painter);
Expand Down

0 comments on commit ec00893

Please sign in to comment.