summaryrefslogtreecommitdiff
path: root/src/webtab
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-08-01 17:46:50 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:04 +0100
commitd2fdce46263a6cee66c4adee9ea7366d085a1729 (patch)
treec50747e1d05bc43dddd1fef2b651a6f1a37cd81a /src/webtab
parentRemove a lot of application calls by refactoring code (diff)
downloadrekonq-d2fdce46263a6cee66c4adee9ea7366d085a1729.tar.xz
Urlbar, first code ported to the new API
Diffstat (limited to 'src/webtab')
-rw-r--r--src/webtab/webtab.cpp18
-rw-r--r--src/webtab/webtab.h3
2 files changed, 21 insertions, 0 deletions
diff --git a/src/webtab/webtab.cpp b/src/webtab/webtab.cpp
index 2dce52d4..27e711fd 100644
--- a/src/webtab/webtab.cpp
+++ b/src/webtab/webtab.cpp
@@ -168,6 +168,24 @@ bool WebTab::isPageLoading()
}
+bool WebTab::hasRSSInfo()
+{
+ QWebElementCollection col = page()->mainFrame()->findAllElements("link[type=\"application/rss+xml\"]");
+ col.append(page()->mainFrame()->findAllElements("link[type=\"application/atom+xml\"]"));
+ if (col.count() != 0)
+ return true;
+
+ return false;
+}
+
+
+bool WebTab::hasNewSearchEngine()
+{
+ QWebElement e = page()->mainFrame()->findFirstElement(QL1S("head >link[rel=\"search\"][ type=\"application/opensearchdescription+xml\"]"));
+ return !e.isNull(); // FIXME && !rApp->opensearchManager()->engineExists(extractOpensearchUrl(e));
+}
+
+
void WebTab::createWalletBar(const QString &key, const QUrl &url)
{
// check if the url is in the wallet blacklist
diff --git a/src/webtab/webtab.h b/src/webtab/webtab.h
index f875071d..5984ea53 100644
--- a/src/webtab/webtab.h
+++ b/src/webtab/webtab.h
@@ -70,6 +70,9 @@ public:
KUrl url();
+ bool hasRSSInfo();
+ bool hasNewSearchEngine();
+
void createPreviewSelectorBar(int index);
void hideSelectorBar();