Changeset 74344 in webkit


Ignore:
Timestamp:
Dec 20, 2010 6:57:30 AM (13 years ago)
Author:
benjamin.poulain@nokia.com
Message:

[Qt] Improve the readability of FrameLoaderClientQt::createPlugin()
https://bugs.webkit.org/show_bug.cgi?id=51330

Reviewed by Andreas Kling.

Redefine the scopes to improve readability. Objects are now created in
the scope they are used in.

  • WebCoreSupport/FrameLoaderClientQt.cpp:

(WebCore::FrameLoaderClientQt::createPlugin):

Location:
trunk/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r74271 r74344  
     12010-12-20  Benjamin Poulain  <benjamin.poulain@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Improve the readability of FrameLoaderClientQt::createPlugin()
     6        https://bugs.webkit.org/show_bug.cgi?id=51330
     7
     8        Redefine the scopes to improve readability. Objects are now created in
     9        the scope they are used in.
     10
     11        * WebCoreSupport/FrameLoaderClientQt.cpp:
     12        (WebCore::FrameLoaderClientQt::createPlugin):
     13
    1142010-12-17  Ariya Hidayat  <ariya@sencha.com>
    215
  • trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r74057 r74344  
    14671467    QUrl qurl = urlStr;
    14681468
    1469     QObject* object = 0;
    1470 
    14711469    if (mimeType == "application/x-qt-plugin" || mimeType == "application/x-qt-styled-widget") {
    1472         object = m_webFrame->page()->createPlugin(classid, qurl, params, values);
     1470        QObject* object = m_webFrame->page()->createPlugin(classid, qurl, params, values);
    14731471#ifndef QT_NO_STYLE_STYLESHEET
    14741472        QWidget* widget = qobject_cast<QWidget*>(object);
     
    14911489        }
    14921490#endif // QT_NO_STYLE_STYLESHEET
    1493     }
    14941491
    14951492        if (!object) {
     
    15001497
    15011498        if (object) {
    1502             QWidget* widget = qobject_cast<QWidget*>(object);
    1503             if (widget) {
     1499            if (QWidget* widget = qobject_cast<QWidget*>(object)) {
    15041500                QWidget* parentWidget = 0;
    15051501                if (m_webFrame->page()->d->client)
     
    15151511            }
    15161512
    1517             QGraphicsWidget* graphicsWidget = qobject_cast<QGraphicsWidget*>(object);
    1518             if (graphicsWidget) {
     1513            if (QGraphicsWidget* graphicsWidget = qobject_cast<QGraphicsWidget*>(object)) {
    15191514                QGraphicsObject* parentWidget = 0;
    15201515                if (m_webFrame->page()->d->client)
     
    15311526            // FIXME: make things work for widgetless plugins as well
    15321527            delete object;
     1528        }
    15331529    }
    15341530#if ENABLE(NETSCAPE_PLUGIN_API)
Note: See TracChangeset for help on using the changeset viewer.