forked from qt-creator/qt-creator
Utils: Cache theme icon access
These trigger over 120k file exist check on my machine on startup, just for a handful icons. Change-Id: Ic73f0783142ed329c2f8c8b852f622e69fc306da Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#include <utils/mimeutils.h>
|
||||
#include <utils/process.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/utilsicons.h>
|
||||
#include <utils/icon.h>
|
||||
|
||||
#include <projectexplorer/projecttree.h>
|
||||
|
||||
@@ -516,8 +516,7 @@ FolderNode *createSourceGroupNode(const QString &sourceGroupName,
|
||||
if (!existingNode) {
|
||||
auto node = createCMakeVFolder(sourceDirectory, Node::DefaultFolderPriority + 5, p);
|
||||
node->setListInProject(false);
|
||||
node->setIcon(
|
||||
[] { return QIcon::fromTheme("edit-copy", ::Utils::Icons::COPY.icon()); });
|
||||
node->setIcon([] { return Icon::fromTheme("edit-copy"); });
|
||||
|
||||
existingNode = node.get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user