logic: reduce access to filesystem while indexing

* use canonical filepath cache in cxx indexer
* made constructors of FilePath explicit
* use FilePath at more places instead of string
* forward declares FilePath wherever possible
This commit is contained in:
malte_langkabel
2017-05-04 10:55:16 +02:00
parent 55d3f9c189
commit 054b8fab17
156 changed files with 656 additions and 444 deletions
+6 -6
View File
@@ -519,7 +519,7 @@ GraphViewStyle::NodeStyle GraphViewStyle::getStyleOfBundleNode(bool isFocused)
style.color = getNodeColor("bundle", isFocused);
addIcon(Node::NODE_ENUM, false, &style);
style.iconPath = ResourcePaths::getGuiPath() + "graph_view/images/bundle.png";
style.iconPath = ResourcePaths::getGuiPath().str() + "graph_view/images/bundle.png";
return style;
}
@@ -712,23 +712,23 @@ void GraphViewStyle::addIcon(Node::NodeType type, bool hasChildren, NodeStyle* s
{
case Node::NODE_NAMESPACE:
case Node::NODE_PACKAGE:
style->iconPath = ResourcePaths::getGuiPath() + "graph_view/images/namespace.png";
style->iconPath = ResourcePaths::getGuiPath().str() + "graph_view/images/namespace.png";
style->iconSize = s_fontSize - 4;
style->iconOffset.x = -1;
style->iconOffset.y = 5;
return;
case Node::NODE_ENUM:
style->iconPath = ResourcePaths::getGuiPath() + "graph_view/images/enum.png";
style->iconPath = ResourcePaths::getGuiPath().str() + "graph_view/images/enum.png";
break;
case Node::NODE_TYPEDEF:
style->iconPath = ResourcePaths::getGuiPath() + "graph_view/images/typedef.png";
style->iconPath = ResourcePaths::getGuiPath().str() + "graph_view/images/typedef.png";
break;
case Node::NODE_MACRO:
style->iconPath = ResourcePaths::getGuiPath() + "graph_view/images/macro.png";
style->iconPath = ResourcePaths::getGuiPath().str() + "graph_view/images/macro.png";
break;
case Node::NODE_FILE:
style->iconPath = ResourcePaths::getGuiPath() + "graph_view/images/file.png";
style->iconPath = ResourcePaths::getGuiPath().str() + "graph_view/images/file.png";
break;
default:
return;