Skip to content

Commit

Permalink
gcc/clang choke on inline in cpp (which VS puts there for some reas…
Browse files Browse the repository at this point in the history
…on when asked to create an implementation)
  • Loading branch information
cbielow committed Oct 19, 2023
1 parent f591e3c commit 10f545d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/openms_gui/include/OpenMS/VISUAL/TOPPASTreeView.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace OpenMS
/// Filter tree elements by name (case insensitive and partial=substring matches are valid)
/// An empty filter shows all elements.
/// If an element in a subtree is matched, all parents up to the root are also shown.
void filter(QString must_match);
void filter(const QString& must_match);

/// expand all subtrees, i.e. make them visible
void expandAll();
Expand Down
16 changes: 6 additions & 10 deletions src/openms_gui/source/VISUAL/TOPPASTreeView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ namespace OpenMS

TOPPASTreeView::~TOPPASTreeView() = default;

/// Filter tree elements by name
/// An empty filter shows all elements

inline void TOPPASTreeView::filter(QString must_match)
void TOPPASTreeView::filter(const QString& must_match)
{
// hide all
QTreeWidgetItemIterator it(this);
Expand Down Expand Up @@ -88,7 +85,7 @@ namespace OpenMS
}
}

void TOPPASTreeView::mousePressEvent(QMouseEvent * event)
void TOPPASTreeView::mousePressEvent(QMouseEvent* event)
{
QTreeWidget::mousePressEvent(event);

Expand All @@ -98,7 +95,7 @@ namespace OpenMS
}
}

void TOPPASTreeView::mouseMoveEvent(QMouseEvent * event)
void TOPPASTreeView::mouseMoveEvent(QMouseEvent* event)
{
QTreeWidget::mouseMoveEvent(event);

Expand Down Expand Up @@ -126,7 +123,7 @@ namespace OpenMS
drag->exec(Qt::CopyAction);
}

void TOPPASTreeView::keyPressEvent(QKeyEvent * e)
void TOPPASTreeView::keyPressEvent(QKeyEvent* e)
{
QTreeWidget::keyPressEvent(e);
if (currentItem() && e->key() == Qt::Key_Return)
Expand All @@ -140,14 +137,13 @@ namespace OpenMS
}
}

void TOPPASTreeView::enterEvent(QEvent * /*e*/)
void TOPPASTreeView::enterEvent(QEvent* /*e*/)
{
setFocus();
}

void TOPPASTreeView::leaveEvent(QEvent * /*e*/)
void TOPPASTreeView::leaveEvent(QEvent* /*e*/)
{

}

} //namespace OpenMS

0 comments on commit 10f545d

Please sign in to comment.