[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
vestbo at webkit.org
vestbo at webkit.org
Thu Dec 3 13:29:14 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 7504574b41396beefe2f0a6900a6a45c064f35eb
Author: vestbo at webkit.org <vestbo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 9 12:31:27 2009 +0000
Removed the interactive property of QGraphicsWebView.
Patch by Simon Hausmann <hausmann at webkit.org> on 2009-11-04
Reviewed by Tor Arne Vestbø.
There are clearly use-cases for this feature, but it will require
more work to make this fully work with an enum to have fine-grained
control over the interactivity levels. For now it is easy to achieve
in user-code what the boolean property did.
* Api/qgraphicswebview.cpp:
(QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
(QGraphicsWebView::hoverMoveEvent):
(QGraphicsWebView::mouseMoveEvent):
(QGraphicsWebView::mousePressEvent):
(QGraphicsWebView::mouseReleaseEvent):
(QGraphicsWebView::mouseDoubleClickEvent):
(QGraphicsWebView::keyPressEvent):
(QGraphicsWebView::keyReleaseEvent):
(QGraphicsWebView::dragLeaveEvent):
(QGraphicsWebView::dragMoveEvent):
(QGraphicsWebView::dropEvent):
(QGraphicsWebView::wheelEvent):
(QGraphicsWebView::inputMethodEvent):
* Api/qgraphicswebview.h:
* tests/qgraphicswebview/tst_qgraphicswebview.cpp:
(tst_QGraphicsWebView::qgraphicswebview):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index afc20dc..042096c 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -39,7 +39,6 @@ public:
QGraphicsWebViewPrivate(QGraphicsWebView* parent)
: q(parent)
, page(0)
- , interactive(true)
{}
virtual void scroll(int dx, int dy, const QRect&);
@@ -64,8 +63,6 @@ public:
QGraphicsWebView* q;
QWebPage* page;
-
- bool interactive;
};
void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success)
@@ -580,25 +577,6 @@ QWebHistory* QGraphicsWebView::history() const
}
/*!
- \property QGraphicsWebView::interactive
- \brief controls whether the item responds to mouse and key events.
-*/
-
-bool QGraphicsWebView::isInteractive() const
-{
- return d->interactive;
-}
-
-void QGraphicsWebView::setInteractive(bool allowed)
-{
- if (d->interactive == allowed)
- return;
-
- d->interactive = allowed;
- emit interactivityChanged();
-}
-
-/*!
\property QGraphicsWebView::modified
\brief whether the document was modified by the user
@@ -632,7 +610,7 @@ QWebSettings* QGraphicsWebView::settings() const
*/
void QGraphicsWebView::hoverMoveEvent(QGraphicsSceneHoverEvent* ev)
{
- if (d->interactive && d->page) {
+ if (d->page) {
const bool accepted = ev->isAccepted();
QMouseEvent me = QMouseEvent(QEvent::MouseMove,
ev->pos().toPoint(), Qt::NoButton,
@@ -656,7 +634,7 @@ void QGraphicsWebView::hoverLeaveEvent(QGraphicsSceneHoverEvent* ev)
*/
void QGraphicsWebView::mouseMoveEvent(QGraphicsSceneMouseEvent* ev)
{
- if (d->interactive && d->page) {
+ if (d->page) {
const bool accepted = ev->isAccepted();
d->page->event(ev);
ev->setAccepted(accepted);
@@ -670,7 +648,7 @@ void QGraphicsWebView::mouseMoveEvent(QGraphicsSceneMouseEvent* ev)
*/
void QGraphicsWebView::mousePressEvent(QGraphicsSceneMouseEvent* ev)
{
- if (d->interactive && d->page) {
+ if (d->page) {
const bool accepted = ev->isAccepted();
d->page->event(ev);
ev->setAccepted(accepted);
@@ -684,7 +662,7 @@ void QGraphicsWebView::mousePressEvent(QGraphicsSceneMouseEvent* ev)
*/
void QGraphicsWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev)
{
- if (d->interactive && d->page) {
+ if (d->page) {
const bool accepted = ev->isAccepted();
d->page->event(ev);
ev->setAccepted(accepted);
@@ -698,7 +676,7 @@ void QGraphicsWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev)
*/
void QGraphicsWebView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* ev)
{
- if (d->interactive && d->page) {
+ if (d->page) {
const bool accepted = ev->isAccepted();
d->page->event(ev);
ev->setAccepted(accepted);
@@ -712,7 +690,7 @@ void QGraphicsWebView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* ev)
*/
void QGraphicsWebView::keyPressEvent(QKeyEvent* ev)
{
- if (d->interactive && d->page)
+ if (d->page)
d->page->event(ev);
if (!ev->isAccepted())
@@ -723,7 +701,7 @@ void QGraphicsWebView::keyPressEvent(QKeyEvent* ev)
*/
void QGraphicsWebView::keyReleaseEvent(QKeyEvent* ev)
{
- if (d->interactive && d->page)
+ if (d->page)
d->page->event(ev);
if (!ev->isAccepted())
@@ -779,7 +757,7 @@ void QGraphicsWebView::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
void QGraphicsWebView::dragLeaveEvent(QGraphicsSceneDragDropEvent* ev)
{
#ifndef QT_NO_DRAGANDDROP
- if (d->interactive && d->page) {
+ if (d->page) {
const bool accepted = ev->isAccepted();
d->page->event(ev);
ev->setAccepted(accepted);
@@ -797,7 +775,7 @@ void QGraphicsWebView::dragLeaveEvent(QGraphicsSceneDragDropEvent* ev)
void QGraphicsWebView::dragMoveEvent(QGraphicsSceneDragDropEvent* ev)
{
#ifndef QT_NO_DRAGANDDROP
- if (d->interactive && d->page) {
+ if (d->page) {
const bool accepted = ev->isAccepted();
d->page->event(ev);
ev->setAccepted(accepted);
@@ -815,7 +793,7 @@ void QGraphicsWebView::dragMoveEvent(QGraphicsSceneDragDropEvent* ev)
void QGraphicsWebView::dropEvent(QGraphicsSceneDragDropEvent* ev)
{
#ifndef QT_NO_DRAGANDDROP
- if (d->interactive && d->page) {
+ if (d->page) {
const bool accepted = ev->isAccepted();
d->page->event(ev);
ev->setAccepted(accepted);
@@ -846,7 +824,7 @@ void QGraphicsWebView::contextMenuEvent(QGraphicsSceneContextMenuEvent* ev)
*/
void QGraphicsWebView::wheelEvent(QGraphicsSceneWheelEvent* ev)
{
- if (d->interactive && d->page) {
+ if (d->page) {
const bool accepted = ev->isAccepted();
d->page->event(ev);
ev->setAccepted(accepted);
@@ -861,7 +839,7 @@ void QGraphicsWebView::wheelEvent(QGraphicsSceneWheelEvent* ev)
*/
void QGraphicsWebView::inputMethodEvent(QInputMethodEvent* ev)
{
- if (d->interactive && d->page)
+ if (d->page)
d->page->event(ev);
if (!ev->isAccepted())
diff --git a/WebKit/qt/Api/qgraphicswebview.h b/WebKit/qt/Api/qgraphicswebview.h
index 4db8067..acdc753 100644
--- a/WebKit/qt/Api/qgraphicswebview.h
+++ b/WebKit/qt/Api/qgraphicswebview.h
@@ -44,8 +44,6 @@ class QWEBKIT_EXPORT QGraphicsWebView : public QGraphicsWidget {
Q_PROPERTY(QString html READ toHtml WRITE setHtml)
Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged)
- Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactivityChanged)
-
Q_PROPERTY(bool modified READ isModified)
public:
@@ -64,9 +62,6 @@ public:
qreal zoomFactor() const;
void setZoomFactor(qreal);
- bool isInteractive() const;
- void setInteractive(bool);
-
bool isModified() const;
void load(const QUrl &url);
@@ -97,7 +92,6 @@ Q_SIGNALS:
void loadFinished(bool);
void loadProgress(int progress);
- void interactivityChanged();
void urlChanged(const QUrl&);
void titleChanged(const QString&);
void iconChanged();
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 0a2d219..eacab98 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -2,6 +2,35 @@
Reviewed by Tor Arne Vestbø.
+ Removed the interactive property of QGraphicsWebView.
+
+ There are clearly use-cases for this feature, but it will require
+ more work to make this fully work with an enum to have fine-grained
+ control over the interactivity levels. For now it is easy to achieve
+ in user-code what the boolean property did.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
+ (QGraphicsWebView::hoverMoveEvent):
+ (QGraphicsWebView::mouseMoveEvent):
+ (QGraphicsWebView::mousePressEvent):
+ (QGraphicsWebView::mouseReleaseEvent):
+ (QGraphicsWebView::mouseDoubleClickEvent):
+ (QGraphicsWebView::keyPressEvent):
+ (QGraphicsWebView::keyReleaseEvent):
+ (QGraphicsWebView::dragLeaveEvent):
+ (QGraphicsWebView::dragMoveEvent):
+ (QGraphicsWebView::dropEvent):
+ (QGraphicsWebView::wheelEvent):
+ (QGraphicsWebView::inputMethodEvent):
+ * Api/qgraphicswebview.h:
+ * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
+ (tst_QGraphicsWebView::qgraphicswebview):
+
+2009-11-04 Simon Hausmann <hausmann at webkit.org>
+
+ Reviewed by Tor Arne Vestbø.
+
Make the QGraphicsWebView constructor explicit.
* Api/qgraphicswebview.h:
diff --git a/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index 9fd147f..b714070 100644
--- a/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -63,7 +63,6 @@ void tst_QGraphicsWebView::qgraphicswebview()
item.title();
item.icon();
item.zoomFactor();
- item.isInteractive();
item.toHtml();
item.history();
item.settings();
@@ -72,7 +71,6 @@ void tst_QGraphicsWebView::qgraphicswebview()
item.page();
item.setUrl(QUrl());
item.setZoomFactor(0);
- item.setInteractive(true);
item.load(QUrl());
item.setHtml(QString());
item.setContent(QByteArray());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list