src: more bug fixes
* fixed snippets added twice on token reactivation for errors and fulltext search results * fixed colorscheme gets refreshed when cancelling preferences * scroll to first line in errors table after indexing and showing view * fixed file not properly expanded when snippet covers full file * fixed project type naming in project setup * fixed set delimiter of NameHierarchy for projects that can't be loaded yet * changed language order for project setup
This commit is contained in:
@@ -366,7 +366,8 @@ void CodeController::handleMessage(MessageShowErrors* message)
|
||||
|
||||
view->clear();
|
||||
view->setErrorInfos(errors);
|
||||
view->showCodeSnippets(snippets, std::vector<Id>(), !message->errorId);
|
||||
view->showCodeSnippets(
|
||||
snippets, std::vector<Id>(), !message->errorId && (!message->isReplayed() || message->isReplayCleared()));
|
||||
|
||||
showContents(message);
|
||||
}
|
||||
@@ -385,7 +386,8 @@ void CodeController::handleMessage(MessageSearchFullText* message)
|
||||
view->clear();
|
||||
|
||||
m_collection = m_storageAccess->getFullTextSearchLocations(message->searchTerm, message->caseSensitive);
|
||||
view->showCodeSnippets(getSnippetsForCollection(m_collection, true), std::vector<Id>(), true);
|
||||
view->showCodeSnippets(
|
||||
getSnippetsForCollection(m_collection, true), std::vector<Id>(), !message->isReplayed() || message->isReplayCleared());
|
||||
|
||||
showContents(message);
|
||||
}
|
||||
|
||||
@@ -40,12 +40,11 @@ void ErrorController::handleMessage(MessageShowErrors* message)
|
||||
clear();
|
||||
|
||||
std::vector<ErrorInfo> errors = m_storageAccess->getErrors();
|
||||
getView()->addErrors(errors, false);
|
||||
|
||||
if (errors.size())
|
||||
{
|
||||
getView()->showDockWidget();
|
||||
}
|
||||
getView()->addErrors(errors, false);
|
||||
}
|
||||
|
||||
ErrorView* ErrorController::getView() const
|
||||
|
||||
@@ -151,11 +151,6 @@ std::shared_ptr<SourceLocationFile> SourceLocationFile::getFilteredByLines(size_
|
||||
}
|
||||
}
|
||||
|
||||
if (isWhole() && ret->getSourceLocationCount() == getSourceLocationCount())
|
||||
{
|
||||
ret->setIsWhole(true);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -171,11 +166,6 @@ std::shared_ptr<SourceLocationFile> SourceLocationFile::getFilteredByType(Locati
|
||||
}
|
||||
}
|
||||
|
||||
if (isWhole() && ret->getSourceLocationCount() == getSourceLocationCount())
|
||||
{
|
||||
ret->setIsWhole(true);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -224,14 +224,14 @@ void Project::load()
|
||||
canLoad = true;
|
||||
}
|
||||
|
||||
m_sourceGroups = SourceGroupFactory::getInstance()->createSourceGroups(m_settings->getAllSourceGroupSettings());
|
||||
if (!m_sourceGroups.empty())
|
||||
{
|
||||
NameHierarchy::setDelimiter(getSymbolNameDelimiterForLanguage(m_sourceGroups.front()->getLanguage()));
|
||||
}
|
||||
|
||||
if (canLoad)
|
||||
{
|
||||
m_sourceGroups = SourceGroupFactory::getInstance()->createSourceGroups(m_settings->getAllSourceGroupSettings());
|
||||
if (!m_sourceGroups.empty())
|
||||
{
|
||||
NameHierarchy::setDelimiter(getSymbolNameDelimiterForLanguage(m_sourceGroups.front()->getLanguage()));
|
||||
}
|
||||
|
||||
m_storage->setMode(SqliteStorage::STORAGE_MODE_READ);
|
||||
m_storage->buildCaches();
|
||||
m_storageAccessProxy->setSubject(m_storage.get());
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
enum LanguageType
|
||||
{
|
||||
LANGUAGE_C,
|
||||
LANGUAGE_CPP,
|
||||
LANGUAGE_C,
|
||||
LANGUAGE_JAVA,
|
||||
LANGUAGE_UNKNOWN
|
||||
};
|
||||
|
||||
@@ -22,6 +22,28 @@ std::string sourceGroupTypeToString(SourceGroupType v)
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
std::string sourceGroupTypeToProjectSetupString(SourceGroupType v)
|
||||
{
|
||||
switch (v)
|
||||
{
|
||||
case SOURCE_GROUP_C_EMPTY:
|
||||
return "Empty C Project";
|
||||
case SOURCE_GROUP_CPP_EMPTY:
|
||||
return "Empty C++ Project";
|
||||
case SOURCE_GROUP_CXX_CDB:
|
||||
return "C/C++ from Compilation Database";
|
||||
case SOURCE_GROUP_CXX_VS:
|
||||
return "C/C++ from Visual Studio";
|
||||
case SOURCE_GROUP_JAVA_EMPTY:
|
||||
return "Empty Java Project";
|
||||
case SOURCE_GROUP_JAVA_MAVEN:
|
||||
return "Java Project from Maven";
|
||||
case SOURCE_GROUP_UNKNOWN:
|
||||
break;
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
SourceGroupType stringToSourceGroupType(std::string v)
|
||||
{
|
||||
if (v == sourceGroupTypeToString(SOURCE_GROUP_C_EMPTY))
|
||||
|
||||
@@ -15,6 +15,7 @@ enum SourceGroupType
|
||||
};
|
||||
|
||||
std::string sourceGroupTypeToString(SourceGroupType v);
|
||||
std::string sourceGroupTypeToProjectSetupString(SourceGroupType v);
|
||||
SourceGroupType stringToSourceGroupType(std::string v);
|
||||
|
||||
#endif // SOURCE_GROUP_TYPE_H
|
||||
|
||||
Reference in New Issue
Block a user