KIO

localdomainurifilter.h
1/*
2 localdomainurifilter.h
3
4 This file is part of the KDE project
5 SPDX-FileCopyrightText: 2002 Lubos Lunak <llunak@suse.cz>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#ifndef LOCALDOMAINURIFILTER_H
11#define LOCALDOMAINURIFILTER_H
12
13#include "kurifilterplugin_p.h"
14#include <QRegularExpression>
15
16/**
17 This filter takes care of hostnames in the local search domain.
18 If you're in domain domain.org which has a host intranet.domain.org
19 and the typed URI is just intranet, check if there's a host
20 intranet.domain.org and if yes, it's a network URI.
21*/
22class LocalDomainUriFilter : public KUriFilterPlugin
23{
24 Q_OBJECT
25
26public:
27 using KUriFilterPlugin::KUriFilterPlugin;
28 bool filterUri(KUriFilterData &data) const override;
29
30private:
31 bool exists(const QString &) const;
32
33 const QRegularExpression m_hostPortPattern{
34 QRegularExpression::anchoredPattern(uR"--([a-zA-Z0-9][a-zA-Z0-9+-]*(?:\:[0-9]{1,5})?(?:/[\w:@&=+$,-.!~*'()]*)*)--"),
35 };
36};
37
38#endif
This class is a basic messaging class used to exchange filtering information between the filter plugi...
Definition kurifilter.h:153
This filter takes care of hostnames in the local search domain.
QString anchoredPattern(QStringView expression)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:50:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.