summaryrefslogtreecommitdiff
path: root/src/webtab
diff options
context:
space:
mode:
Diffstat (limited to 'src/webtab')
-rw-r--r--src/webtab/networkaccessmanager.cpp2
-rw-r--r--src/webtab/webpage.cpp80
-rw-r--r--src/webtab/webpage.h2
-rw-r--r--src/webtab/webtab.cpp18
-rw-r--r--src/webtab/webtab.h6
-rw-r--r--src/webtab/webview.cpp22
-rw-r--r--src/webtab/webview.h2
7 files changed, 68 insertions, 64 deletions
diff --git a/src/webtab/networkaccessmanager.cpp b/src/webtab/networkaccessmanager.cpp
index ce10e10d..95bfa47d 100644
--- a/src/webtab/networkaccessmanager.cpp
+++ b/src/webtab/networkaccessmanager.cpp
@@ -181,5 +181,5 @@ void NetworkAccessManager::slotFinished(bool ok)
collection += frame->parentFrame()->findAllElements(HIDABLE_ELEMENTS);
Q_FOREACH(const QUrl & url, urls)
- hideBlockedElements(url, collection);
+ hideBlockedElements(url, collection);
}
diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp
index ca2a23b2..171e7113 100644
--- a/src/webtab/webpage.cpp
+++ b/src/webtab/webpage.cpp
@@ -297,9 +297,11 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
// Make sure nothing is cached when private browsing mode is enabled...
if (settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled))
{
- if (manager) {
+ if (manager)
+ {
KIO::Integration::CookieJar *cookieJar = manager ? qobject_cast<KIO::Integration::CookieJar*>(manager->cookieJar()) : 0;
- if (cookieJar) {
+ if (cookieJar)
+ {
cookieJar->setDisableCookieStorage(true);
kDebug() << "COOKIE DISABLED -------------------------------------------------------------";
}
@@ -308,15 +310,17 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
}
else
{
- if (manager) {
+ if (manager)
+ {
KIO::Integration::CookieJar *cookieJar = manager ? qobject_cast<KIO::Integration::CookieJar*>(manager->cookieJar()) : 0;
- if (cookieJar) {
+ if (cookieJar)
+ {
cookieJar->setDisableCookieStorage(false);
}
}
removeSessionMetaData(QL1S("no-cache"));
}
-
+
return KWebPage::acceptNavigationRequest(frame, request, type);
}
@@ -376,12 +380,12 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
return;
}
- DownloadManager::self()->downloadResource( reply->url(),
- KIO::MetaData(),
- view(),
- false,
- _suggestedFileName,
- !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
+ DownloadManager::self()->downloadResource(reply->url(),
+ KIO::MetaData(),
+ view(),
+ false,
+ _suggestedFileName,
+ !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
return;
}
@@ -397,12 +401,12 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
return;
}
- DownloadManager::self()->downloadResource( reply->url(),
- KIO::MetaData(),
- view(),
- false,
- _suggestedFileName,
- !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
+ DownloadManager::self()->downloadResource(reply->url(),
+ KIO::MetaData(),
+ view(),
+ false,
+ _suggestedFileName,
+ !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
return;
}
@@ -428,12 +432,12 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
switch (dlg.askEmbedOrSave())
{
case KParts::BrowserOpenOrSaveQuestion::Save:
- DownloadManager::self()->downloadResource( reply->url(),
- KIO::MetaData(),
- view(),
- !hideDialog,
- _suggestedFileName,
- !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
+ DownloadManager::self()->downloadResource(reply->url(),
+ KIO::MetaData(),
+ view(),
+ !hideDialog,
+ _suggestedFileName,
+ !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
return;
case KParts::BrowserOpenOrSaveQuestion::Cancel:
@@ -617,7 +621,7 @@ QString WebPage::errorPage(QNetworkReply *reply)
QString msg;
// test to see if networking is enabled on the system
- if(Solid::Networking::status() != Solid::Networking::Connected)
+ if (Solid::Networking::status() != Solid::Networking::Connected)
{
msg += QL1S("<h2>") + i18n("Network is NOT available") + QL1S("</h2>");
@@ -629,8 +633,8 @@ QString WebPage::errorPage(QNetworkReply *reply)
msg += QL1S("<p>");
- msg += i18n("Maybe you are having problems with your network settings.<br />Try checking your <a href=\"%1\">network connections</a>, your <a href=\"%2\">proxy settings</a> and your <a href=\"%3\">firewall</a>.<br /><br />Then <a href=\"%4\">try again</a>.<br />",QL1S("about:settings/network"), QL1S("about:settings/proxy"),QL1S("about:settings/firewall"), urlString );
-
+ msg += i18n("Maybe you are having problems with your network settings.<br />Try checking your <a href=\"%1\">network connections</a>, your <a href=\"%2\">proxy settings</a> and your <a href=\"%3\">firewall</a>.<br /><br />Then <a href=\"%4\">try again</a>.<br />", QL1S("about:settings/network"), QL1S("about:settings/proxy"), QL1S("about:settings/firewall"), urlString);
+
msg += QL1S("</p>");
msg += QL1S("</td></tr></table>");
@@ -694,23 +698,23 @@ QString WebPage::errorPage(QNetworkReply *reply)
void WebPage::downloadRequest(const QNetworkRequest &request)
{
- DownloadManager::self()->downloadResource( request.url(),
- request.attribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::MetaData)).toMap(),
- view(),
- false,
- _suggestedFileName,
- !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
+ DownloadManager::self()->downloadResource(request.url(),
+ request.attribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::MetaData)).toMap(),
+ view(),
+ false,
+ _suggestedFileName,
+ !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
}
void WebPage::downloadUrl(const KUrl &url)
{
- DownloadManager::self()->downloadResource( url,
- KIO::MetaData(),
- view(),
- false,
- QString(),
- !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
+ DownloadManager::self()->downloadResource(url,
+ KIO::MetaData(),
+ view(),
+ false,
+ QString(),
+ !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
}
diff --git a/src/webtab/webpage.h b/src/webtab/webpage.h
index 96cc5634..0ce95ae1 100644
--- a/src/webtab/webpage.h
+++ b/src/webtab/webpage.h
@@ -53,7 +53,7 @@ public:
~WebPage();
void setWindow(QWidget *);
-
+
bool isOnRekonqPage() const;
void setIsOnRekonqPage(bool b);
diff --git a/src/webtab/webtab.cpp b/src/webtab/webtab.cpp
index 2622a96a..1d80198c 100644
--- a/src/webtab/webtab.cpp
+++ b/src/webtab/webtab.cpp
@@ -86,15 +86,15 @@ WebTab::WebTab(QWidget *parent)
// NOTE: this line of code moves the web inspector in the usual position,
// BUT my wife prefers it on the right part. Following hint about.
- // Let's hear people comments about...
+ // Let's hear people comments about...
// m_splitter->setOrientation(Qt::Vertical);
-
+
l->addWidget(m_splitter);
// fix focus handling
setFocusProxy(view());
-
+
KWebWallet *wallet = page()->wallet();
if (wallet)
@@ -116,7 +116,7 @@ WebTab::WebTab(QWidget *parent)
connect(view(), SIGNAL(titleChanged(QString)), this, SLOT(webAppTitleChanged(QString)));
connect(view(), SIGNAL(iconChanged()), this, SLOT(webAppIconChanged()));
}
-
+
// Session Manager
connect(view(), SIGNAL(loadFinished(bool)), SessionManager::self(), SLOT(saveSession()));
}
@@ -306,7 +306,7 @@ void WebTab::setPart(KParts::ReadOnlyPart *p, const KUrl &u)
void WebTab::showCrashMessageBar()
{
CrashMessageBar *msgBar = new CrashMessageBar(i18n("It seems rekonq was not closed properly. Do you want "
- "to restore the last saved session?"), this);
+ "to restore the last saved session?"), this);
qobject_cast<QVBoxLayout *>(layout())->insertWidget(0, msgBar);
msgBar->animatedShow();
@@ -383,9 +383,9 @@ void WebTab::zoomIn()
emit infoToShow(i18n("Max zoom reached: ") + QString::number(m_zoomFactor * 10) + QL1S("%"));
return;
}
-
+
if (m_zoomFactor >= 20)
- m_zoomFactor+=5;
+ m_zoomFactor += 5;
else
m_zoomFactor++;
@@ -451,9 +451,9 @@ void WebTab::toggleInspector(bool on)
m_inspector.data()->show();
return;
- }
+ }
// else
-
+
m_inspector.data()->hide();
page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, on);
diff --git a/src/webtab/webtab.h b/src/webtab/webtab.h
index 75f975d8..d016e6b2 100644
--- a/src/webtab/webtab.h
+++ b/src/webtab/webtab.h
@@ -105,7 +105,7 @@ private Q_SLOTS:
void webAppIconChanged();
void toggleInspector(bool);
-
+
Q_SIGNALS:
void loadProgressing();
void titleChanged(const QString &);
@@ -113,7 +113,7 @@ Q_SIGNALS:
void triggerPartPrint();
void infoToShow(QString);
-
+
private:
WebView *m_webView;
@@ -122,7 +122,7 @@ private:
QWeakPointer<WalletBar> m_walletBar;
QWeakPointer<PreviewSelectorBar> m_previewSelectorBar;
QWeakPointer<QWebInspector> m_inspector;
-
+
KParts::ReadOnlyPart *m_part;
int m_zoomFactor;
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index fa2676e0..e61c1986 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -167,7 +167,7 @@ void WebView::setPage(WebPage *pg)
WebWindow *w = m_parentTab->webWindow();
if (w && w->window())
pg->setWindow(w->window());
-}
+}
bool WebView::popupSpellMenu(QContextMenuEvent *event)
@@ -274,7 +274,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
if (popupSpellMenu(event))
return;
}
-
+
WebWindow *webwin = m_parentTab->webWindow();
KMenu menu(this);
@@ -374,7 +374,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
a->setData(m_contextMenuHitResult.linkUrl());
connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewTab()));
menu.addAction(a);
-
+
a = new KAction(KIcon("window-new"), i18n("Open in New &Window"), &menu);
a->setData(m_contextMenuHitResult.linkUrl());
connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInNewWindow()));
@@ -387,7 +387,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
connect(a, SIGNAL(triggered(bool)), this, SLOT(openLinkInPrivateWindow()));
menu.addAction(a);
}
-
+
menu.addSeparator();
// Don't show dots if we are NOT going to ask for download path
@@ -541,7 +541,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(a);
}
}
-
+
menu.addAction(sendByMailAction);
if (webwin)
@@ -1495,10 +1495,10 @@ void WebView::saveImage()
KAction *a = qobject_cast<KAction*>(sender());
KUrl imageUrl(a->data().toUrl());
- DownloadManager::self()->downloadResource( imageUrl,
- KIO::MetaData(),
- this,
- true,
- QString(),
- !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
+ DownloadManager::self()->downloadResource(imageUrl,
+ KIO::MetaData(),
+ this,
+ true,
+ QString(),
+ !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
}
diff --git a/src/webtab/webview.h b/src/webtab/webview.h
index 161d8c65..9d3a16dc 100644
--- a/src/webtab/webview.h
+++ b/src/webtab/webview.h
@@ -70,7 +70,7 @@ public:
void setPage(WebPage *);
WebTab *parentTab();
-
+
void load(const QUrl &url);
void load(const QNetworkRequest &req,
QNetworkAccessManager::Operation op = QNetworkAccessManager::GetOperation,