Initialize PathUtils and logging in constructor

This commit is contained in:
Dale Glass 2023-11-11 19:34:52 +01:00
parent a4e79ff806
commit 57e1c99fff
2 changed files with 12 additions and 2 deletions

View file

@ -725,7 +725,7 @@ extern InputPluginList getInputPlugins();
extern void saveInputPluginSettings(const InputPluginList& plugins);
bool setupEssentials(const QCommandLineParser& parser, bool runningMarkerExisted) {
qInstallMessageHandler(messageHandler);
const int listenPort = parser.isSet("listenPort") ? parser.value("listenPort").toInt() : INVALID_PORT;
@ -765,7 +765,7 @@ bool setupEssentials(const QCommandLineParser& parser, bool runningMarkerExisted
}
// Tell the plugin manager about our statically linked plugins
DependencyManager::set<PathUtils>();
DependencyManager::set<ScriptInitializers>();
DependencyManager::set<PluginManager>();
auto pluginManager = PluginManager::getInstance();
@ -1035,6 +1035,13 @@ Application::Application(
LogHandler::getInstance().moveToThread(thread());
LogHandler::getInstance().setupRepeatedMessageFlusher();
qInstallMessageHandler(messageHandler);
DependencyManager::set<PathUtils>();
}
void Application::initializePlugins() {
}
void Application::initialize(const QCommandLineParser &parser) {

View file

@ -123,6 +123,9 @@ class Application : public QApplication,
friend class OctreePacketProcessor;
public:
void initializePlugins();
/**
* @brief Initialize everything
*