[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Dec 18 18:58:13 UTC 2018
vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit f6b061883a9bc3589375f65a4a283421b590e133
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Tue Dec 4 14:42:31 2018 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Dec 18 19:57:52 2018 +0100
tdf#121399 Join cmd reading thread in gtk3_kde5
Stop reading commands from the pipe on kde5 side once
the "Quit" command has been sent, in order to have
the thread that is reading commands from stdin finish
properly.
Join the thread in the 'FilePickerIpc' destructor, rather than
just deleting it while it may still be running, which
resulted in 'terminate()' being called.
Change-Id: Ia184987e7994cc1de0208ff2757a3cf06c8b7194
Reviewed-on: https://gerrit.libreoffice.org/63835
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit 93815c2b04f1905e43c695caf5cc2c594bb897ce)
Reviewed-on: https://gerrit.libreoffice.org/65362
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index 261fe001795d..d0d5116ad3da 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
@@ -192,6 +192,12 @@ void readCommands(FilePickerIpc* ipc)
readCommandArgs(command, args);
emit ipc->commandReceived(messageId, command, args);
+
+ // stop processing once 'Quit' command has been sent
+ if (command == Commands::Quit)
+ {
+ return;
+ }
}
}
@@ -211,7 +217,11 @@ FilePickerIpc::FilePickerIpc(KDE5FilePicker* filePicker, QObject* _parent)
m_ipcReaderThread = std::unique_ptr<std::thread>{ new std::thread(readCommands, this) };
}
-FilePickerIpc::~FilePickerIpc() = default;
+FilePickerIpc::~FilePickerIpc()
+{
+ // join thread that reads commands
+ m_ipcReaderThread->join();
+};
bool FilePickerIpc::handleCommand(uint64_t messageId, Commands command, QList<QVariant> args)
{
More information about the Libreoffice-commits
mailing list