aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck/cppchecktextmark.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-09-01 12:28:51 +0200
committerhjk <hjk@qt.io>2023-09-01 14:03:33 +0000
commit67212a31ee4cc5c026b677329ace9f1fdaa3320c (patch)
tree043d67f6794df00ed5395d99443bee14a065c346 /src/plugins/cppcheck/cppchecktextmark.cpp
parentc2a69683cf3728f1fd9468dd8e036670b8713162 (diff)
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>
Diffstat (limited to 'src/plugins/cppcheck/cppchecktextmark.cpp')
-rw-r--r--src/plugins/cppcheck/cppchecktextmark.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppcheck/cppchecktextmark.cpp b/src/plugins/cppcheck/cppchecktextmark.cpp
index 774d09bde76..f4e7802cee2 100644
--- a/src/plugins/cppcheck/cppchecktextmark.cpp
+++ b/src/plugins/cppcheck/cppchecktextmark.cpp
@@ -65,7 +65,7 @@ CppcheckTextMark::CppcheckTextMark(const Diagnostic &diagnostic)
setActionsProvider([diagnostic] {
// Copy to clipboard action
QAction *action = new QAction;
- action->setIcon(QIcon::fromTheme("edit-copy", Icons::COPY.icon()));
+ action->setIcon(Icon::fromTheme("edit-copy"));
action->setToolTip(TextEditor::Tr::tr("Copy to Clipboard"));
QObject::connect(action, &QAction::triggered, [diagnostic]() {
const QString text = QString("%1:%2: %3")