Skip to content

Commit

Permalink
Merge pull request #3375 from poelzi/fix-events
Browse files Browse the repository at this point in the history
Fix event/eventfilter warnings from clazy 1.8
  • Loading branch information
daschuer authored Nov 27, 2020
2 parents 46c86c2 + 24a09c6 commit 8697917
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/mixxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1514,9 +1514,12 @@ bool MixxxMainWindow::eventFilter(QObject* obj, QEvent* event) {
// return true for no tool tips
switch (m_toolTipsCfg) {
case mixxx::TooltipsPreference::TOOLTIPS_ONLY_IN_LIBRARY:
return dynamic_cast<WBaseWidget*>(obj) != nullptr;
if (dynamic_cast<WBaseWidget*>(obj) != nullptr) {
return true;
}
break;
case mixxx::TooltipsPreference::TOOLTIPS_ON:
return false;
break;
case mixxx::TooltipsPreference::TOOLTIPS_OFF:
return true;
default:
Expand All @@ -1525,7 +1528,7 @@ bool MixxxMainWindow::eventFilter(QObject* obj, QEvent* event) {
}
}
// standard event processing
return QObject::eventFilter(obj, event);
return QMainWindow::eventFilter(obj, event);
}

void MixxxMainWindow::closeEvent(QCloseEvent *event) {
Expand Down
2 changes: 1 addition & 1 deletion src/widget/weffectselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ bool WEffectSelector::event(QEvent* pEvent) {
populate();
} else if (pEvent->type() == QEvent::Wheel && !hasFocus()) {
// don't change effect by scrolling hovered effect selector
return false;
return true;
}

return QComboBox::event(pEvent);
Expand Down

0 comments on commit 8697917

Please sign in to comment.