improved split header menu button

This commit is contained in:
fourtf
2018-08-07 09:38:18 +02:00
parent f34063213c
commit 5df231f072
5 changed files with 92 additions and 34 deletions
+17
View File
@@ -0,0 +1,17 @@
#include "FunctionEventFilter.hpp"
namespace chatterino {
FunctionEventFilter::FunctionEventFilter(
QObject *parent, std::function<bool(QObject *, QEvent *)> function)
: QObject(parent)
, function_(std::move(function))
{
}
bool FunctionEventFilter::eventFilter(QObject *watched, QEvent *event)
{
return this->function_(watched, event);
}
} // namespace chatterino