- if ( link == QLatin1String( "changeTags" ) ) {
- KEditTagsDialog dialog(m_tags, this, Qt::Dialog);
- KConfigGroup dialogConfig(KGlobal::config(), "Nepomuk KEditTagsDialog");
- dialog.restoreDialogSize(dialogConfig);
-
- if (dialog.exec() == QDialog::Accepted) {
- const QList<Nepomuk::Tag> oldTags = m_tags;
- m_tags = dialog.tags();
-
- if (oldTags.count() != m_tags.count()) {
- emit tagsChanged(m_tags);
- } else {
- // The number of tags is equal. Check whether the
- // content of the tags are also equal:
- const int tagsCount = m_tags.count();
- for (int i = 0; i < tagsCount; ++i) {
- if (oldTags[i].genericLabel() != m_tags[i].genericLabel()) {
- // at least one tag has been changed
- emit tagsChanged(m_tags);
- break;
- }
+ if (link != QLatin1String("changeTags")) {
+ emit tagActivated(Nepomuk::Tag(KUrl(link)));
+ return;
+ }
+
+ KEditTagsDialog dialog(m_tags, this, Qt::Dialog);
+ KConfigGroup dialogConfig(KGlobal::config(), "Nepomuk KEditTagsDialog");
+ dialog.restoreDialogSize(dialogConfig);
+
+ if (dialog.exec() == QDialog::Accepted) {
+ const QList<Nepomuk::Tag> oldTags = m_tags;
+ m_tags = dialog.tags();
+
+ if (oldTags.count() != m_tags.count()) {
+ emit tagsChanged(m_tags);
+ } else {
+ // The number of tags is equal. Check whether the
+ // content of the tags are also equal:
+ const int tagsCount = m_tags.count();
+ for (int i = 0; i < tagsCount; ++i) {
+ if (oldTags[i].genericLabel() != m_tags[i].genericLabel()) {
+ // at least one tag has been changed
+ emit tagsChanged(m_tags);
+ break;