summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-05-19 03:29:33 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-05-19 12:43:40 +0200
commit15a66b0dbb10bba8c6733cd456a6e4c4f3219e82 (patch)
tree12639310d749f4baccc3428fca045fb23ada60f0
parentMerge branch 'master' of gitorious.org:rekonq/mainline (diff)
downloadrekonq-15a66b0dbb10bba8c6733cd456a6e4c4f3219e82.tar.xz
Moving the UriFilter pointer variable to be static to fast up url resolving
-rw-r--r--src/filterurljob.cpp9
-rw-r--r--src/filterurljob.h3
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;
};