logic: multiple fixes and improvements
* showing project name in main window title * keep reference count visible when maximizing code file * show first node in db when no main function is available * log Storage stats after parse * fixed macro locations saved multiply * using NameHierarchy when retrieving ids
This commit is contained in:
@@ -18,8 +18,10 @@ void FileRegister::setFilePaths(const std::vector<FilePath>& filePaths)
|
||||
m_sourceFilePaths.clear();
|
||||
m_includeFilePaths.clear();
|
||||
|
||||
for (const FilePath& path : filePaths)
|
||||
for (const FilePath& p : filePaths)
|
||||
{
|
||||
FilePath path = p.exists() ? p.absolute() : p;
|
||||
|
||||
if (m_fileManager->hasSourceExtension(path))
|
||||
{
|
||||
m_sourceFilePaths.emplace(path, STATE_UNPARSED);
|
||||
@@ -41,6 +43,23 @@ std::vector<FilePath> FileRegister::getUnparsedIncludeFilePaths() const
|
||||
return getUnparsedFilePaths(m_includeFilePaths);
|
||||
}
|
||||
|
||||
bool FileRegister::fileIsParsed(const FilePath& filePath) const
|
||||
{
|
||||
std::map<FilePath, ParseState>::const_iterator it = m_includeFilePaths.find(filePath);
|
||||
if (it != m_includeFilePaths.end())
|
||||
{
|
||||
return it->second == STATE_PARSED;
|
||||
}
|
||||
|
||||
it = m_sourceFilePaths.find(filePath);
|
||||
if (it != m_sourceFilePaths.end())
|
||||
{
|
||||
return it->second == STATE_PARSED;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FileRegister::includeFileIsParsing(const FilePath& filePath) const
|
||||
{
|
||||
std::map<FilePath, ParseState>::const_iterator it = m_includeFilePaths.find(filePath);
|
||||
|
||||
@@ -21,6 +21,8 @@ public:
|
||||
std::vector<FilePath> getUnparsedSourceFilePaths() const;
|
||||
std::vector<FilePath> getUnparsedIncludeFilePaths() const;
|
||||
|
||||
bool fileIsParsed(const FilePath& filePath) const;
|
||||
|
||||
bool includeFileIsParsing(const FilePath& filePath) const;
|
||||
bool includeFileIsParsed(const FilePath& filePath) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user