[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/inc vcl/jsdialog
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 4 09:51:16 UTC 2021
vcl/inc/jsdialog/jsdialogbuilder.hxx | 1 +
vcl/jsdialog/jsdialogbuilder.cxx | 11 +++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit be688de877ad5e96836e7bd0a9d70b80d6dabdf2
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Feb 26 09:00:33 2021 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Mar 4 10:50:39 2021 +0100
jsdialog: stop idle on destruction
be sure timer is stopped after we destroy builder.
if we close abandon previous messages.
Change-Id: I8c5458d14c45660aadecb1559b87d30a32364ff6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111593
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index cb4a46ada304..c228967eb0f5 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -64,6 +64,7 @@ public:
void Invoke() override;
+ void clearQueue();
void forceUpdate();
void sendMessage(jsdialog::MessageType eType, VclPtr<vcl::Window> pWindow);
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 518a1ca25cf3..573c9a817310 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -174,10 +174,16 @@ void JSDialogNotifyIdle::Invoke()
}
}
- m_aMessageQueue.clear();
+ clearQueue();
}
-JSDialogSender::~JSDialogSender() { sendClose(); }
+void JSDialogNotifyIdle::clearQueue() { m_aMessageQueue.clear(); }
+
+JSDialogSender::~JSDialogSender()
+{
+ sendClose();
+ mpIdleNotify->Stop();
+}
void JSDialogSender::sendFullUpdate(bool bForce)
{
@@ -190,6 +196,7 @@ void JSDialogSender::sendFullUpdate(bool bForce)
void JSDialogSender::sendClose()
{
+ mpIdleNotify->clearQueue();
mpIdleNotify->sendMessage(jsdialog::MessageType::Close, nullptr);
flush();
}
More information about the Libreoffice-commits
mailing list