summaryrefslogtreecommitdiff
path: root/src/webtab
diff options
context:
space:
mode:
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();