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

pull/1487/head
f4exb 2022-10-25 22:53:10 +02:00
rodzic 94a465b210
commit 9b7a41ad4e
1 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

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