Bug 37622

Summary: [Qt] Moving setViewMode from DumpRenderTreeSupportQt to qwebpage.cpp
Product: WebKit Reporter: Luiz Agostini <luiz>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hausmann
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
patch 1 none

Description Luiz Agostini 2010-04-14 16:16:02 PDT
Method qt_wrt_setViewMode was removed from qwebpage.cpp by mistake in r57433 (bug 35844).
Moving it back.
Comment 1 Luiz Agostini 2010-04-14 16:21:58 PDT
Created attachment 53383 [details]
patch 1
Comment 2 Simon Hausmann 2010-04-14 16:55:25 PDT
A nicer way of achieving the same kind of private "API" would be to use dynamic properties. So instead of using a private function

    QWebPage* page = ...
    qt_wrt_setViewMode(page, "foobar");

the client could would be much simpler:

    page->setProperty("wrt_viewMode", "foobar");


and QWebPage would receiver a QEvent::DynamicPropertyChange where the QEvent* is actually a QDynamicPropertyChangeEvent.

Here's a link to the docs:
    http://doc.qt.nokia.com/4.6/qobject.html#setProperty
Comment 3 WebKit Commit Bot 2010-04-14 20:34:52 PDT
Comment on attachment 53383 [details]
patch 1

Clearing flags on attachment: 53383

Committed r57629: <http://trac.webkit.org/changeset/57629>
Comment 4 WebKit Commit Bot 2010-04-14 20:34:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Simon Hausmann 2010-04-20 12:37:27 PDT
Right now the function in question is still present in the qtwebkit-2.0 branch, so I'm removing this as a blocker