mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-21 09:20:13 +00:00
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
This commit is contained in:
parent
6d242cac0a
commit
29636baff0
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue