Changeset View
Changeset View
Standalone View
Standalone View
src/tagsfileitemactionplugin/tagsfileitemaction.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 61 | } else { | |||
---|---|---|---|---|---|
64 | newTags.removeAll(action->text().remove(0,1)); | 64 | newTags.removeAll(action->text().remove(0,1)); | ||
65 | m_metaData->setTags(newTags); | 65 | m_metaData->setTags(newTags); | ||
66 | } | 66 | } | ||
67 | }); | 67 | }); | ||
68 | } | 68 | } | ||
69 | }); | 69 | }); | ||
70 | 70 | | |||
71 | QAction* newAction = new QAction(i18n("Create New...")); | 71 | QAction* newAction = new QAction(i18n("Create New...")); | ||
72 | newAction->setIcon(QIcon::fromTheme(QStringLiteral("tag"))); | 72 | newAction->setIcon(QIcon::fromTheme(QStringLiteral("tag-new"))); | ||
73 | 73 | | |||
74 | connect(newAction, &QAction::triggered, this, [this] { | 74 | connect(newAction, &QAction::triggered, this, [this] { | ||
75 | QString newTag = QInputDialog::getText(m_menu, i18n("New tag"), i18n("New tag:"), QLineEdit::Normal); | 75 | QString newTag = QInputDialog::getText(m_menu, i18n("New tag"), i18n("New tag:"), QLineEdit::Normal); | ||
76 | QStringList tags = m_metaData->tags(); | 76 | QStringList tags = m_metaData->tags(); | ||
77 | tags.append(newTag); | 77 | tags.append(newTag); | ||
78 | m_metaData->setTags(tags); | 78 | m_metaData->setTags(tags); | ||
79 | }); | 79 | }); | ||
80 | 80 | | |||
Show All 25 Lines |