src: Removed ApplicationStateMonitor

This commit is contained in:
Eberhard Graether
2017-05-04 13:49:38 +02:00
parent 29b07473fe
commit 9beea94fd8
5 changed files with 0 additions and 138 deletions
-41
View File
@@ -1,5 +1,4 @@
#include "Application.h"
#include "ApplicationStateMonitor.h"
#include "data/indexer/IndexerFactory.h"
#include "data/indexer/IndexerFactoryModuleJava.h"
@@ -250,46 +249,6 @@ int main(int argc, char *argv[])
utility::loadFontsFromDirectory(ResourcePaths::getFontsPath(), ".otf");
utility::loadFontsFromDirectory(ResourcePaths::getFontsPath(), ".ttf");
const std::vector<FilePath> storedIndexingFiles = ApplicationStateMonitor::getStoredIndexingFiles();
if (storedIndexingFiles.size() > 0)
{
MessageStatus("The application crashed during last project indexing. Please follow the instructions to help us fix this problem.").dispatch();
ApplicationStateMonitor::clearStoredIndexingFiles();
if (storedIndexingFiles.size() > 1)
{
std::string fileStrings = "";
for (const FilePath& filePath: storedIndexingFiles)
{
fileStrings += "<li>" + filePath.str() + "</li>";
}
Application::getInstance()->handleDialog(
"<p>It seems that Sourcetrail shut down unexpectedly while indexing your project. We are sorry about that. "
"But let's go on and find out what exactly went wrong. The crash occurred while indexing one of these files:</p>"
"<ul>" +
fileStrings +
"</ul>"
"<p>First of all we need to figure out which of these files caused the crash. Please go ahead and create copy of your project. "
"Remove everything except the files mentioned above from the Project Paths. "
"Set the indexer thread count in the preferences to 1, force-refresh the project and wait for the crash to reoccur.</p>"
);
}
else
{
Application::getInstance()->handleDialog(
"<p>It seems that Sourcetrail shut down unexpectedly while indexing your project. We are really sorry about that. "
"At least we know which of your source files caused the crash:</p>"
"<ul>"
"<li>" + storedIndexingFiles.front().str() + "</li>" +
"</ul>"
"<p>To find out which part of the file caused the crash, please make sure to remove everything except this source file from your Project Paths. "
"Enable the option \"Indexer Logging\" in your preferences (this really slows down indexing performance) and force-refresh the project.</p>"
"<p>After the expected crash reoccurred please open the respective log file which now contains the portion of the abstract syntax tree that Sourcetrail managed to index, "
"including the node where the crash occurred. We hope that this information helps you figure out what caused the crash and tell us what we can do to reproduce it.</p>"
);
}
}
return qtApp.exec();
}
}