logic: Show error updates during custom command indexing

* fixed code view showing all locations when switching view mode while showing errors
This commit is contained in:
Eberhard Graether
2018-12-17 00:27:16 +01:00
parent dd4a880ec3
commit 797bf2fee5
6 changed files with 35 additions and 10 deletions
+17 -7
View File
@@ -195,13 +195,7 @@ const std::vector<StorageError>& PersistentStorage::getErrors() const
void PersistentStorage::startInjection()
{
m_preInjectionErrorCount = m_sqliteIndexStorage.getErrorCount();
if (!m_preIndexingErrorCountSet)
{
m_preIndexingErrorCount = m_preInjectionErrorCount;
m_preIndexingErrorCountSet = true;
}
beforeErrorRecording();
m_sqliteIndexStorage.beginTransaction();
}
@@ -210,6 +204,22 @@ void PersistentStorage::finishInjection()
{
m_sqliteIndexStorage.commitTransaction();
afterErrorRecording();
}
void PersistentStorage::beforeErrorRecording()
{
m_preInjectionErrorCount = m_sqliteIndexStorage.getErrorCount();
if (!m_preIndexingErrorCountSet)
{
m_preIndexingErrorCount = m_preInjectionErrorCount;
m_preIndexingErrorCountSet = true;
}
}
void PersistentStorage::afterErrorRecording()
{
std::vector<ErrorInfo> errors = m_sqliteIndexStorage.getAllErrorInfos();
if (m_preInjectionErrorCount < errors.size())
{