Changeset View
Changeset View
Standalone View
Standalone View
src/urifilters/shorturi/kshorturifilter.h
Show All 18 Lines | 1 | /* | |||
---|---|---|---|---|---|
19 | along with this program; if not, write to the Free Software | 19 | along with this program; if not, write to the Free Software | ||
20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | #ifndef KSHORTURIFILTER_H | 23 | #ifndef KSHORTURIFILTER_H | ||
24 | #define KSHORTURIFILTER_H | 24 | #define KSHORTURIFILTER_H | ||
25 | 25 | | |||
26 | #include <QList> | 26 | #include <QList> | ||
27 | #include <QRegExp> | 27 | #include <QRegularExpression> | ||
28 | #include <QVariant> | 28 | #include <QVariant> | ||
29 | 29 | | |||
30 | #include <kurifilter.h> | 30 | #include <kurifilter.h> | ||
31 | 31 | | |||
32 | /** | 32 | /** | ||
33 | * This is short URL filter class. | 33 | * This is short URL filter class. | ||
34 | * | 34 | * | ||
35 | * @short A filter that converts short URLs into fully qualified ones. | 35 | * @short A filter that converts short URLs into fully qualified ones. | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 92 | private: | |||
93 | 93 | | |||
94 | struct URLHint | 94 | struct URLHint | ||
95 | { | 95 | { | ||
96 | URLHint() | 96 | URLHint() | ||
97 | { | 97 | { | ||
98 | } | 98 | } | ||
99 | 99 | | |||
100 | URLHint(const QString &r, const QString &p, KUriFilterData::UriTypes t = KUriFilterData::NetProtocol) | 100 | URLHint(const QString &r, const QString &p, KUriFilterData::UriTypes t = KUriFilterData::NetProtocol) | ||
101 | : regexp(QRegExp(r)) | 101 | : hintRe(r) | ||
dfaure: (pre-existing) `hintRe(r)` would be enough | |||||
102 | , prepend(p) | 102 | , prepend(p) | ||
103 | , type(t) | 103 | , type(t) | ||
104 | { | 104 | { | ||
105 | } | 105 | } | ||
106 | 106 | | |||
107 | QRegExp regexp; // if this matches, then... | 107 | QRegularExpression hintRe; // if this matches, then... | ||
108 | QString prepend; // ...prepend this to the url | 108 | QString prepend; // ...prepend this to the url | ||
109 | KUriFilterData::UriTypes type; | 109 | KUriFilterData::UriTypes type; | ||
110 | }; | 110 | }; | ||
111 | 111 | | |||
112 | QList<URLHint> m_urlHints; | 112 | QList<URLHint> m_urlHints; | ||
113 | QString m_strDefaultUrlScheme; | 113 | QString m_strDefaultUrlScheme; | ||
114 | }; | 114 | }; | ||
115 | 115 | | |||
116 | #endif | 116 | #endif |
(pre-existing) hintRe(r) would be enough