| Paste number 82947: | untitled |
| Pasted by: | icefox |
| When: | 2 years, 7 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+1S03 |
| Channel: | None |
| Paste contents: |
From fef4835bc58a39e69b9762dddcf0dfc7201ba8af Mon Sep 17 00:00:00 2001
From: Benjamin C Meyer <benjamin.meyer@torchmobile.com>
Date: Tue, 3 Mar 2009 10:45:08 -0500
Subject: [PATCH] Add new action to qwebpage to reload without cache.
---
WebKit/qt/Api/qwebpage.cpp | 10 +++++++++-
WebKit/qt/Api/qwebpage.h | 1 +
WebKit/qt/ChangeLog | 12 ++++++++++++
3 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 376b03b..cc66bef 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -182,6 +182,7 @@ static const char* editorCommandWebActions[] =
"InsertLineBreak", // InsertLineSeparator
"SelectAll", // SelectAll
+ 0, // ReloadAndBypassCache,
"PasteAndMatchStyle", // PasteAndMatchStyle
"RemoveFormat", // RemoveFormat
@@ -460,6 +461,7 @@ void QWebPagePrivate::updateAction(QWebPage::WebAction action)
enabled = loader->isLoading();
break;
case QWebPage::Reload:
+ case QWebPage::ReloadAndBypassCache:
enabled = !loader->isLoading();
break;
#ifndef QT_NO_UNDOSTACK
@@ -505,6 +507,7 @@ void QWebPagePrivate::updateNavigationActions()
updateAction(QWebPage::Forward);
updateAction(QWebPage::Stop);
updateAction(QWebPage::Reload);
+ updateAction(QWebPage::ReloadAndBypassCache);
}
void QWebPagePrivate::updateEditorActions()
@@ -1149,6 +1152,8 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
\value Forward Navigate forward in the history of navigated links.
\value Stop Stop loading the current page.
\value Reload Reload the current page.
+ \value ReloadAndBypassCache Reload the current page, but do not use any local cache.
+ \since 4.6
\value Cut Cut the content currently selected into the clipboard.
\value Copy Copy the content currently selected into the clipboard.
\value Paste Paste content from the clipboard.
@@ -1551,7 +1556,10 @@ void QWebPage::triggerAction(WebAction action, bool checked)
mainFrame()->d->frame->loader()->stopForUserCancel();
break;
case Reload:
- mainFrame()->d->frame->loader()->reload();
+ mainFrame()->d->frame->loader()->reload(/*endtoendreload*/false);
+ break;
+ case ReloadAndBypassCache:
+ mainFrame()->d->frame->loader()->reload(/*endtoendreload*/true);
break;
case SetTextDirectionDefault:
editor->setBaseWritingDirection(NaturalWritingDirection);
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index a481f36..a6eb5f4 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -149,6 +149,7 @@ public:
InsertLineSeparator,
SelectAll,
+ ReloadAndBypassCache,
PasteAndMatchStyle,
RemoveFormat,
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 8c5c618..a08d7ec 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,15 @@
+2009-07-03 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ Add new action to qwebpage to reload without cache.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::updateAction):
+ (QWebPagePrivate::updateNavigationActions):
+ (QWebPage::triggerAction):
+ * Api/qwebpage.h:
+
2009-07-02 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Ariya Hidayat.
--
1.6.0.4
This paste has no annotations.