mirror of
https://github.com/status-im/dotherside.git
synced 2025-02-12 04:26:43 +00:00
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
25 lines
489 B
C++
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
|