┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmael Asensio <[email protected]>2021-05-09 21:10:44 +0200
committerIsmael Asensio <[email protected]>2021-05-10 14:05:35 +0200
commit29636baff0f0cf8d769aa75b1c458b96cf83b828 (patch)
tree3e497bde5643e549986a5987d945c11d6ab335fc
parent6d242cac0a48c10ee13a31e40c9701f922e6b075 (diff)
search/facetswidget: Check for protocol before trying to fetch tags
This was causing an error when trying to list items from the non-existent `tags:` protocol. BUG: 435586 FIXED-IN: 21.04.1
-rw-r--r--src/search/dolphinfacetswidget.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp
index d4079f1eb..e8a43101f 100644
--- a/src/search/dolphinfacetswidget.cpp
+++ b/src/search/dolphinfacetswidget.cpp
@@ -8,6 +8,7 @@
#include "dolphinfacetswidget.h"
#include <KLocalizedString>
+#include <KProtocolInfo>
#include <QComboBox>
#include <QDate>
@@ -245,7 +246,9 @@ void DolphinFacetsWidget::updateTagsSelector()
void DolphinFacetsWidget::updateTagsMenu()
{
updateTagsMenuItems({}, {});
- m_tagsLister.openUrl(QUrl(QStringLiteral("tags:/")), KCoreDirLister::OpenUrlFlag::Reload);
+ if (KProtocolInfo::isKnownProtocol(QStringLiteral("tags"))) {
+ m_tagsLister.openUrl(QUrl(QStringLiteral("tags:/")), KCoreDirLister::OpenUrlFlag::Reload);
+ }
}
void DolphinFacetsWidget::updateTagsMenuItems(const QUrl&, const KFileItemList& items)