Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jun 3, 2024
1 parent fc71493 commit bba5081
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Gui/Tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ class TreeWidgetItemDelegate: public QStyledItemDelegate {
// More information: https://github.com/FreeCAD/FreeCAD/pull/13807
QTreeView *artificial;

QRect calculateItemRect(const QStyleOptionViewItem &option, const QModelIndex &index) const;
QRect calculateItemRect(const QStyleOptionViewItem &option) const;

public:
explicit TreeWidgetItemDelegate(QObject* parent=nullptr);
Expand All @@ -437,7 +437,7 @@ TreeWidgetItemDelegate::TreeWidgetItemDelegate(QObject* parent)
}


QRect TreeWidgetItemDelegate::calculateItemRect(const QStyleOptionViewItem &option, const QModelIndex &index) const
QRect TreeWidgetItemDelegate::calculateItemRect(const QStyleOptionViewItem &option) const
{
auto tree = static_cast<TreeWidget*>(parent());
auto style = tree->style();
Expand Down Expand Up @@ -485,7 +485,7 @@ void TreeWidgetItemDelegate::paint(QPainter *painter,
&& (trimBG || (opt.backgroundBrush.style() == Qt::NoBrush
&& _TreeItemBackground.style() != Qt::NoBrush)))
{
QRect rect = calculateItemRect(option, index);
QRect rect = calculateItemRect(option);

if (trimBG && opt.backgroundBrush.style() == Qt::NoBrush) {
painter->fillRect(rect, _TreeItemBackground);
Expand Down Expand Up @@ -526,7 +526,7 @@ void TreeWidgetItemDelegate::initStyleOption(QStyleOptionViewItem *option,
}

if (TreeParams::getHideColumn()) {
option->rect = calculateItemRect(*option, index);
option->rect = calculateItemRect(*option);

// we need to extend this shape a bit, 3px on each side
// this value was obtained experimentally
Expand Down

0 comments on commit bba5081

Please sign in to comment.