diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-27 12:45:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-27 12:45:55 -0500 |
| commit | 892a19bfc613bbc6d157eced8356314026febbac (patch) | |
| tree | 90a9a40896a08e064cf0f5cfd27ace47b50ce65f /src/main.cpp | |
| parent | 146360542d4ba186ca38002f618e974ed1b1766a (diff) | |
| parent | 21cddd0ad3cef165c3860c2031b4cd00802c499d (diff) | |
Merge pull request #906 from isanae/various-fixes
Collection of small fixes
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 02347ee3..3cccf365 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -93,6 +93,7 @@ using namespace MOShared; void sanityChecks(const env::Environment& env); +int checkIncompatibleModule(const env::Module& m); bool createAndMakeWritable(const std::wstring &subPath) { QString const dataPath = qApp->property("dataPath").toString(); @@ -547,6 +548,11 @@ int runApplication(MOApplication &application, SingleInstance &instance, settings.dump(); sanityChecks(env); + const auto moduleNotification = env.onModuleLoaded(qApp, [](auto&& m) { + log::debug("loaded module {}", m.toString()); + checkIncompatibleModule(m); + }); + log::debug("initializing core"); OrganizerCore organizer(settings); if (!organizer.bootstrap()) { @@ -554,6 +560,20 @@ int runApplication(MOApplication &application, SingleInstance &instance, return 1; } + { + // log if there are any dmp files + const auto hasCrashDumps = + !QDir(QString::fromStdWString(organizer.crashDumpsPath())) + .entryList({"*.dmp"}, QDir::Files) + .empty(); + + if (hasCrashDumps) { + log::debug( + "there are crash dumps in '{}'", + QString::fromStdWString(organizer.crashDumpsPath())); + } + } + log::debug("initializing plugins"); PluginContainer pluginContainer(&organizer); pluginContainer.loadPlugins(); |
