From ed22399f4bf55611d34aae54a7d661c84f4ec46f Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 28 Feb 2022 12:16:43 +0600 Subject: [PATCH] qt: Actually make client-side Unix manager functional --- src/qt/qt_main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index a8d9e2387..7ec4930d2 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -241,6 +241,16 @@ int main(int argc, char* argv[]) { UnixManagerSocket socket; if (qgetenv("86BOX_MANAGER_SOCKET").size()) { + QObject::connect(&socket, &UnixManagerSocket::showsettings, main_window, &MainWindow::showSettings); + QObject::connect(&socket, &UnixManagerSocket::pause, main_window, &MainWindow::togglePause); + QObject::connect(&socket, &UnixManagerSocket::reset, main_window, &MainWindow::hardReset); + QObject::connect(&socket, &UnixManagerSocket::request_shutdown, main_window, &MainWindow::close); + QObject::connect(&socket, &UnixManagerSocket::force_shutdown, [](){ + do_stop(); + emit main_window->close(); + }); + QObject::connect(&socket, &UnixManagerSocket::ctrlaltdel, [](){ pc_send_cad(); }); + main_window->installEventFilter(&socket); socket.connectToServer(qgetenv("86BOX_MANAGER_SOCKET")); } pc_reset_hard_init();