Kaydet (Commit) 3b36855e authored tarafından Michael Weghorn's avatar Michael Weghorn

tdf#120261 gtk3_kde5: Read IPC cmds in own thread on kde5 side

Move reading IPC commands and arguments to those commands
to a separate thread and use the signal/slot mechanism
to notify 'FilePickerIpc' whenever a new command and its
arguments have been read.

This allows to handle the events of other commands that have been
received while the dialog is being executed.
This will be needed by a subsequent change that will modify
how IPC is handled on the gtk3 side.

Change-Id: Ia77b21045b0196710cbe164fb640b36a128d5081
Reviewed-on: https://gerrit.libreoffice.org/61252
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Weghorn <m.weghorn@posteo.de>
üst 307c29ec
......@@ -19,8 +19,13 @@
#pragma once
#include <memory>
#include <thread>
#include <QObject>
#include "filepicker_ipc_commands.hxx"
class KDE5FilePicker;
class WinIdEmbedder;
class QSocketNotifier;
......@@ -32,14 +37,15 @@ public:
explicit FilePickerIpc(KDE5FilePicker* filePicker, QObject* parent = nullptr);
~FilePickerIpc() override;
private Q_SLOTS:
void readCommands();
bool readCommand();
KDE5FilePicker* m_filePicker = nullptr;
QSocketNotifier* m_stdinNotifier = nullptr;
std::unique_ptr<std::thread> m_ipcReaderThread;
private Q_SLOTS:
bool handleCommand(uint64_t messageId, Commands command, QList<QVariant> args);
bool commandReceived(uint64_t messageId, Commands command, QList<QVariant> args);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment