[Webkit-unassigned] [Bug 30118] [Qt] QWebPage autotest crash: createViewlessPlugin
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 8 05:56:52 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=30118
Simon Hausmann <hausmann at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #40861|review? |review-
Flag| |
--- Comment #6 from Simon Hausmann <hausmann at webkit.org> 2009-10-08 05:56:52 PDT ---
(From update of attachment 40861)
> diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
> index dbaa5a2..bd956ed 100644
> --- a/WebKit/qt/ChangeLog
> +++ b/WebKit/qt/ChangeLog
> @@ -1,3 +1,28 @@
> +2009-10-08 Jedrzej Nowacki <jedrzej.nowacki at nokia.com>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + QWebPage's createViewlessPlugin autotest crash fix.
> +
> + A plug-ins returning widgets (QWidget or QGraphicsWidget) might be
> + created even in a viewless applications. The plug-ins won't be fully
I suggest to start the first sentence with "It is possible that plugins that
are QWidgets or QGraphicsWidgets
are created before a view has been assigned to a QWebPage".
> + functional, as by design, they should visualise something, but they
> + won't crash and will stay, work in memory.
> +
> + Autotest was developped to cover a viewless applications that create
> + a plug-ins based on the QGraphicsWidget class.
Typo: developed with one p. How about "An autotest is included that covers
this use-case." ? :)
> -class PluginTrackedPage : public QWebPage
> +class PluginTrackedPageWidget : public QWebPage
> {
> public:
>
> int count;
> QPointer<QWidget> widget;
>
> - PluginTrackedPage(QWidget *parent = 0) : QWebPage(parent), count(0) {
> + PluginTrackedPageWidget(QWidget *parent = 0) : QWebPage(parent), count(0) {
> settings()->setAttribute(QWebSettings::PluginsEnabled, true);
> }
>
> @@ -640,9 +641,28 @@ public:
> }
> };
>
> +class PluginTrackedPageGraphicsWidget : public QWebPage
> +{
> +public:
> +
> + int count;
> + QPointer<QGraphicsWidget> widget;
> +
> + PluginTrackedPageGraphicsWidget(QWidget *parent = 0) : QWebPage(parent), count(0) {
> + settings()->setAttribute(QWebSettings::PluginsEnabled, true);
> + }
Coding style: In function definitions place each brace on its own line.
> + virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&) {
> + count++;
> + QGraphicsWidget *w = new QGraphicsWidget;
Coding style: * placement
> + widget = w;
> + return w;
Why not simply write it in two lines? :)
widget = new QGraphicsWidget;
return widget;
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list