From 9b7a41ad4ed4eda18763af9e583b7b91fe786c89 Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 25 Oct 2022 22:53:10 +0200 Subject: [PATCH] MainWindow: move CommandKeyReceiver at an earlier stage in the constructor. Fixes #1485 --- sdrgui/mainwindow.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index 765af5416..249c4c608 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -107,6 +107,7 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse m_mainCore(MainCore::instance()), m_dspEngine(DSPEngine::instance()), m_lastEngineState(DeviceAPI::StNotStarted), + m_commandKeyReceiver(nullptr), m_fftWisdomProcess(nullptr) { qDebug() << "MainWindow::MainWindow: start"; @@ -185,6 +186,11 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse m_pluginManager->loadPlugins(QString("plugins")); m_pluginManager->loadPluginsNonDiscoverable(m_mainCore->m_settings.getDeviceUserArgs()); + splash->showStatusMessage("Add command key receiver...", Qt::white); + m_commandKeyReceiver = new CommandKeyReceiver(); + m_commandKeyReceiver->setRelease(true); + this->installEventFilter(m_commandKeyReceiver); + splash->showStatusMessage("Add unique feature set...", Qt::white); addFeatureSet(); // Create the uniuefeature set m_apiAdapter = new WebAPIAdapter(); @@ -225,10 +231,6 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse m_apiServer = new WebAPIServer(m_apiHost, m_apiPort, m_requestMapper); m_apiServer->start(); - m_commandKeyReceiver = new CommandKeyReceiver(); - m_commandKeyReceiver->setRelease(true); - this->installEventFilter(m_commandKeyReceiver); - m_dspEngine->setMIMOSupport(true); delete splash;