From 4f5a03a67d42a11a4ed6e2463790b1277def0f79 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 28 Aug 2021 21:28:11 +0000 Subject: Show account import progress --- eventemitter.cpp | 4 ++++ eventemitter.h | 1 + qml/ConfigurePage.qml | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/eventemitter.cpp b/eventemitter.cpp index 5d8c763..a5f78bf 100644 --- a/eventemitter.cpp +++ b/eventemitter.cpp @@ -84,6 +84,10 @@ DcAccountsEventEmitter::processEvent(DcEvent *event) event->getData1Int(), event->getData2Str()); break; + case DC_EVENT_IMEX_PROGRESS: + emit imexProgress(event->getAccountId(), + event->getData1Int()); + break; default: std::cout << "Not processing " << event->getId() << std::endl; } diff --git a/eventemitter.h b/eventemitter.h index 4923e21..bc3bb87 100644 --- a/eventemitter.h +++ b/eventemitter.h @@ -51,6 +51,7 @@ public: signals: void chatModified(uint32_t accountId, int chatId); void configureProgress(uint32_t accountId, int progress, QString comment); + void imexProgress(uint32_t accountId, int progress); void incomingMessage(uint32_t accountId, int chatId, int msgId); void messagesChanged(uint32_t accountId, int chatId, int msgId); void messagesNoticed(uint32_t accountId, int chatId); diff --git a/qml/ConfigurePage.qml b/qml/ConfigurePage.qml index 5a28e91..a745348 100644 --- a/qml/ConfigurePage.qml +++ b/qml/ConfigurePage.qml @@ -167,5 +167,9 @@ Kirigami.Page { function onConfigureProgress(accountId, progress, comment) { progressBar.value = progress / 1000.0 } + + function onImexProgress(accountId, progress) { + progressBar.value = progress / 1000.0 + } } } -- cgit v1.2.3-54-g00ecf