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:
@@ -265,7 +265,7 @@ ClangdTextMark::ClangdTextMark(TextEditor::TextDocument *doc,
|
||||
// Copy to clipboard action
|
||||
QList<QAction *> actions;
|
||||
QAction *action = new QAction();
|
||||
action->setIcon(QIcon::fromTheme("edit-copy", Icons::COPY.icon()));
|
||||
action->setIcon(Icon::fromTheme("edit-copy"));
|
||||
action->setToolTip(Tr::tr("Copy to Clipboard", "Clang Code Model Marks"));
|
||||
QObject::connect(action, &QAction::triggered, [diag] {
|
||||
const QString text = ClangDiagnosticWidget::createText({diag},
|
||||
|
||||
Reference in New Issue
Block a user