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
@@ -23,7 +23,7 @@ QtBookmarkCategory::QtBookmarkCategory()
m_expandButton->setObjectName("category_expand_button");
m_expandButton->setToolTip("Show/Hide bookmarks in this category");
m_expandButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);
m_expandButton->setIcon(QPixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/arrow_down.png").c_str()));
m_expandButton->setIcon(QPixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/arrow_down.png").c_str()));
m_expandButton->setIconSize(QSize(8, 8));
layout->addWidget(m_expandButton);
@@ -40,7 +40,7 @@ QtBookmarkCategory::QtBookmarkCategory()
m_deleteButton->setToolTip("Delete this Bookmark Category and the containing Bookmarks");
m_deleteButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);
m_deleteButton->setIconSize(QSize(20, 20));
m_deleteButton->setIcon(QPixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/bookmark_delete_icon.png").c_str()));
m_deleteButton->setIcon(QPixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/bookmark_delete_icon.png").c_str()));
utility::setWidgetRetainsSpaceWhenHidden(m_deleteButton);
m_deleteButton->hide();
layout->addWidget(m_deleteButton);
@@ -83,12 +83,12 @@ void QtBookmarkCategory::updateArrow()
{
if (m_treeItem->isExpanded())
{
QPixmap pixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/arrow_down.png").c_str());
QPixmap pixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/arrow_down.png").c_str());
m_expandButton->setIcon(QIcon(utility::colorizePixmap(pixmap, "black")));
}
else
{
QPixmap pixmap((ResourcePaths::getGuiPath() + "bookmark_view/images/arrow_right.png").c_str());
QPixmap pixmap((ResourcePaths::getGuiPath().str() + "bookmark_view/images/arrow_right.png").c_str());
m_expandButton->setIcon(QIcon(utility::colorizePixmap(pixmap, "black")));
}
}