1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 10:05:46 -05:00

MainWindow: move CommandKeyReceiver at an earlier stage in the constructor. Fixes #1485

This commit is contained in:
f4exb 2022-10-25 22:53:10 +02:00
parent 94a465b210
commit 9b7a41ad4e

View File

@ -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;