src: miscellaneous bug fixes for upcoming release

* only randomize parsing order of source files for multithreaded indexing
* fixed overview not displayed when switching projects due to MessageScrollCode being dispatched
* avoid adding duplicate TokenLocations that causes highlighting to break in QtCodeArea
* clear all controllers when switching project
* maximize unindexed file when clicking title instead of activating it
This commit is contained in:
Eberhard Graether
2016-06-09 12:30:00 +02:00
parent 5173400b8d
commit 7e3b2622ec
33 changed files with 210 additions and 90 deletions
+3 -7
View File
@@ -869,9 +869,7 @@ std::shared_ptr<TokenLocationCollection> PersistentStorage::getTokenLocationsFor
for (Id fileId: fileIds)
{
StorageFile storageFile = m_sqliteStorage.getFileById(fileId);
collection->addTokenLocationFileAsPlainCopy(
m_sqliteStorage.getTokenLocationsForFile(storageFile.filePath).get()
);
collection->addTokenLocationFile(m_sqliteStorage.getTokenLocationsForFile(storageFile.filePath));
}
std::vector<StorageSourceLocation> locations = m_sqliteStorage.getTokenLocationsForElementIds(nonFileIds);
@@ -923,16 +921,14 @@ std::shared_ptr<TokenLocationCollection> PersistentStorage::getTokenLocationsFor
std::shared_ptr<TokenLocationFile> PersistentStorage::getTokenLocationsForFile(const std::string& filePath) const
{
std::shared_ptr<TokenLocationFile> locationFile = m_sqliteStorage.getTokenLocationsForFile(filePath);
locationFile->isWholeCopy = true;
return locationFile;
return m_sqliteStorage.getTokenLocationsForFile(filePath);
}
std::shared_ptr<TokenLocationFile> PersistentStorage::getTokenLocationsForLinesInFile(
const std::string& filePath, uint firstLineNumber, uint lastLineNumber
) const
{
return m_sqliteStorage.getTokenLocationsForFile(filePath)->getFilteredByLines(firstLineNumber, lastLineNumber);
return getTokenLocationsForFile(filePath)->getFilteredByLines(firstLineNumber, lastLineNumber);
}
std::shared_ptr<TokenLocationCollection> PersistentStorage::getErrorTokenLocations(std::vector<ErrorInfo>* errors) const