aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eventemitter.cpp7
-rw-r--r--eventemitter.h3
-rw-r--r--qml/main.qml1
3 files changed, 2 insertions, 9 deletions
diff --git a/eventemitter.cpp b/eventemitter.cpp
index 7c4d928..2265429 100644
--- a/eventemitter.cpp
+++ b/eventemitter.cpp
@@ -33,13 +33,6 @@ DcAccountsEventEmitter::start()
}
void
-DcAccountsEventEmitter::stop()
-{
- qInfo("Stopping event emitter");
- dc_accounts_event_emitter_unref(m_accounts_event_emitter);
-}
-
-void
DcAccountsEventEmitter::processEvent(DcEvent *event)
{
emit incomingEvent();
diff --git a/eventemitter.h b/eventemitter.h
index 0b18a8e..21a8af1 100644
--- a/eventemitter.h
+++ b/eventemitter.h
@@ -17,6 +17,8 @@ class EventLoopThread : public QThread
while((event = dc_accounts_get_next_event(m_eventEmitter))) {
emit emitEvent(new DcEvent{event});
}
+ dc_accounts_event_emitter_unref(m_eventEmitter);
+
std::cout << "NO MORE EVENTS!" << std::endl;
}
public:
@@ -44,7 +46,6 @@ public:
~DcAccountsEventEmitter();
Q_INVOKABLE void start();
- Q_INVOKABLE void stop();
Q_INVOKABLE void processEvent(DcEvent *event);
signals:
diff --git a/qml/main.qml b/qml/main.qml
index e5b6aee..73abec6 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -53,6 +53,5 @@ Kirigami.ApplicationWindow {
console.log('stopping')
pageStack.pop(null)
delete root.accountsModel
- eventEmitter.stop()
}
}