Fetching the tags from the UserMetaData causes two syscalls typically,
repeating it for each known tag is unnecessary work.
Details
Details
- Reviewers
nicolasfella ngraham elvisangelaccio - Group Reviewers
Baloo Dolphin - Commits
- R824:ce21c0be3834: [TagsFileItemAction] Move expensive tag retrieval out of the loop
Diff Detail
Diff Detail
- Repository
- R824 Baloo Widgets
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
arc patch fails for me, but the patch looks sane
INFO Base commit is not in local repository; trying to fetch. Created and checked out branch arcpatch-D20856. This diff is against commit 021605253fb22071e8fb8646d087d4f7de4a1ab6, but the commit is nowhere in the working copy. Try to apply it against the current working copy state? (9cda8c72b8244b623680ddb26f5b4e60d636259d) [Y/n] y Checking patch src/tagsfileitemactionplugin/tagsfileitemaction.cpp... error: while searching for: connect(&m_tagsLister, &KCoreDirLister::itemsAdded, this, [this](const QUrl&, const KFileItemList& items) { for (const KFileItem &item: items) { const QString name = item.name(); QAction* action = m_menu->addAction(QIcon::fromTheme(QStringLiteral("tag")), name); action->setCheckable(true); action->setChecked(m_metaData->tags().contains(name)); connect(action, &QAction::triggered, this, [this, name](bool isChecked) { QStringList newTags = m_metaData->tags(); error: patch failed: src/tagsfileitemactionplugin/tagsfileitemaction.cpp:45 Applying patch src/tagsfileitemactionplugin/tagsfileitemaction.cpp with 1 reject... Rejected hunk #1. Patch Failed! Usage Exception: Unable to apply patch!
src/tagsfileitemactionplugin/tagsfileitemaction.cpp | ||
---|---|---|
48 | Missing const |