mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Totally rewritten Web UI list refresh system (fixed memory leak)
This commit is contained in:
parent
a65cd5c39c
commit
0879f2c0ca
8 changed files with 115 additions and 419 deletions
|
@ -23,8 +23,7 @@
|
|||
#define EVENTMANAGER_H
|
||||
|
||||
#include "qtorrenthandle.h"
|
||||
#include <QLinkedList>
|
||||
#include <QPair>
|
||||
#include <QHash>
|
||||
#include <QVariant>
|
||||
|
||||
struct bittorrent;
|
||||
|
@ -33,9 +32,7 @@ class EventManager : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
ulong revision;
|
||||
QLinkedList<QPair <ulong, QVariantMap> > events;
|
||||
bool modify(QString hash, QString key, QVariant value);
|
||||
QHash<QString, QVariantMap> event_list;
|
||||
bittorrent* BTSession;
|
||||
|
||||
protected:
|
||||
|
@ -43,18 +40,12 @@ class EventManager : public QObject
|
|||
|
||||
public:
|
||||
EventManager(QObject *parent, bittorrent* BTSession);
|
||||
QVariant querySince(ulong r) const;
|
||||
bool isUpdated(ulong r) const;
|
||||
|
||||
signals:
|
||||
void updated();
|
||||
QVariant getEventList() const;
|
||||
|
||||
public slots:
|
||||
void addedTorrent(QTorrentHandle& h);
|
||||
void deletedTorrent(QString hash);
|
||||
void modifiedTorrent(QTorrentHandle h);
|
||||
void torrentSwitchedtoUnfinished(QString hash);
|
||||
void torrentSwitchedtoFinished(QString hash);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue