Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix TabInformation equality operator signatures
  • Loading branch information
nyalldawson committed Jul 28, 2021
1 parent 202e481 commit b7b8444
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/gui/qgstabwidget.cpp
Expand Up @@ -154,7 +154,12 @@ QgsTabWidget::TabInformation QgsTabWidget::tabInfo( QWidget *widget )
return TabInformation();
}

bool QgsTabWidget::TabInformation::operator ==( const QgsTabWidget::TabInformation &other )
bool QgsTabWidget::TabInformation::operator ==( const QgsTabWidget::TabInformation &other ) const
{
return other.widget == widget && other.sourceIndex == sourceIndex;
}

bool QgsTabWidget::TabInformation::operator !=( const TabInformation &other ) const
{
return !( *this == other );
}
3 changes: 2 additions & 1 deletion src/gui/qgstabwidget.h
Expand Up @@ -100,7 +100,8 @@ class GUI_EXPORT QgsTabWidget : public QTabWidget
//! Constructor for TabInformation
TabInformation() = default;

bool operator ==( const TabInformation &other );
bool operator ==( const TabInformation &other ) const;
bool operator !=( const TabInformation &other ) const;

int sourceIndex = -1;
QWidget *widget = nullptr;
Expand Down

0 comments on commit b7b8444

Please sign in to comment.