diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/filterurljob.cpp | 9 | ||||
-rw-r--r-- | src/filterurljob.h | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/filterurljob.cpp b/src/filterurljob.cpp index c887ac62..b27df74c 100644 --- a/src/filterurljob.cpp +++ b/src/filterurljob.cpp @@ -30,12 +30,17 @@ // KDE Includes #include <KUriFilterData> + +KUriFilter *FilterUrlJob::s_uriFilter; + + FilterUrlJob::FilterUrlJob(WebView *view, const QString &urlString, QObject *parent) : Job(parent) , _view(view) , _urlString(urlString) { - uriFilter = KUriFilter::self(); + if(!s_uriFilter) + s_uriFilter = KUriFilter::self(); } @@ -58,7 +63,7 @@ void FilterUrlJob::run() KUriFilterData data(_urlString); data.setCheckForExecutables(false); // if true, queries like "rekonq" or "dolphin" are considered as executables - if (uriFilter->filterUri(data) && data.uriType() != KUriFilterData::Error) + if (s_uriFilter->filterUri(data) && data.uriType() != KUriFilterData::Error) { QString tempUrlString = data.uri().url(); _url = KUrl(tempUrlString); diff --git a/src/filterurljob.h b/src/filterurljob.h index c10c5e35..0955c969 100644 --- a/src/filterurljob.h +++ b/src/filterurljob.h @@ -60,7 +60,8 @@ private: WebView *_view; QString _urlString; KUrl _url; - KUriFilter *uriFilter; + + static KUriFilter *s_uriFilter; }; |