dotherside/lib/include/DOtherSide/StatusEvents/StatusDockShowAppEvent.h
Sale Djenic 11adba2283 fix(@desktop/general): Changing System Appearance on the fly is not working
This is corresponding dotherside part of the issue 1725.

So far we had kind of a memory leak, cause objects added to the filter were not
deleted ever. When the app is closing, it just removes filters, but doesn't
delete them.

I faced a logical issue, that we were sending qmlengine pointer to the
installEventFilter method, instead object which may or may not rely on the
qqmlengine instance, that is fixed also.

Fixes: #1725
2021-08-16 15:54:02 -04:00

25 lines
489 B
C++

#ifndef STATUS_DOCK_SHOW_APP_EVENT_H
#define STATUS_DOCK_SHOW_APP_EVENT_H
#include "../DOtherSideTypes.h"
#include <QObject>
#include <QQmlApplicationEngine>
class StatusDockShowAppEvent : public QObject
{
Q_OBJECT
public:
StatusDockShowAppEvent(DosQQmlApplicationEngine* vptr, QObject* parent = nullptr);
protected:
bool eventFilter(QObject* obj, QEvent* event) override;
private:
Qt::ApplicationState m_prevAppState;
QQmlApplicationEngine* m_engine;
};
#endif