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:
@@ -3,8 +3,9 @@
|
||||
#include "utility/file/FileManager.h"
|
||||
#include "utility/file/FileSystem.h"
|
||||
|
||||
FileRegister::FileRegister(const FileManager* fileManager)
|
||||
FileRegister::FileRegister(const FileManager* fileManager, bool randomizeParseOrder)
|
||||
: m_fileManager(fileManager)
|
||||
, m_randomizeParseOrder(randomizeParseOrder)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -144,7 +145,14 @@ FilePath FileRegister::consumeSourceFile()
|
||||
|
||||
if (paths.size())
|
||||
{
|
||||
path = paths[rand() % paths.size()];
|
||||
if (m_randomizeParseOrder)
|
||||
{
|
||||
path = paths[rand() % paths.size()];
|
||||
}
|
||||
else
|
||||
{
|
||||
path = paths[0];
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_sourceFileMutex);
|
||||
m_sourceFilePaths[path] = STATE_PARSING;
|
||||
|
||||
Reference in New Issue
Block a user