Fixed bug with Insight QApplication object being created too soon, which in turn caused issues with signal capturing.

Also ensured that we only initialise the Insight object when the user has enabled Insight in their config.
This commit is contained in:
Nav
2021-08-11 00:07:12 +01:00
parent bf7233e01b
commit 7a6dcdcbfd
4 changed files with 31 additions and 9 deletions

View File

@@ -1,7 +1,8 @@
#include "Insight.hpp"
#include <typeindex>
#include <QTimer>
#include "Insight.hpp"
#include "InsightWorker.hpp"
#include "src/Helpers/Paths.hpp"
#include "src/Logger/Logger.hpp"
@@ -54,8 +55,6 @@ void Insight::startup() {
#ifndef BLOOM_DEBUG_BUILD
QCoreApplication::addLibraryPath(QString::fromStdString(Paths::applicationDirPath() + "/plugins"));
#endif
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
this->application.setQuitOnLastWindowClosed(true);
qRegisterMetaType<Bloom::Targets::TargetDescriptor>();
qRegisterMetaType<Bloom::Targets::TargetPinDescriptor>();