diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-08-01 17:46:50 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:48:04 +0100 |
commit | d2fdce46263a6cee66c4adee9ea7366d085a1729 (patch) | |
tree | c50747e1d05bc43dddd1fef2b651a6f1a37cd81a /src/webtab | |
parent | Remove a lot of application calls by refactoring code (diff) | |
download | rekonq-d2fdce46263a6cee66c4adee9ea7366d085a1729.tar.xz |
Urlbar, first code ported to the new API
Diffstat (limited to 'src/webtab')
-rw-r--r-- | src/webtab/webtab.cpp | 18 | ||||
-rw-r--r-- | src/webtab/webtab.h | 3 |
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(); |