[Webkit-unassigned] [Bug 49343] New: Use qobject_cast instead of static_cast when using the platform plugin extensions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 10 14:19:21 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=49343

           Summary: Use qobject_cast instead of static_cast when using the
                    platform plugin extensions
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andre.pedralho at gmail.com
                CC: andre.pedralho at gmail.com


In WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp we are casting the plugin extensions using static_cast and the docs recommends to use qobject_cast.

For example:

QWebTouchModifier* QtPlatformPlugin::createTouchModifier()
{
    QWebKitPlatformPlugin* p = plugin();
-    return p ? static_cast<QWebTouchModifier*>(p->createExtension(QWebKitPlatformPlugin::TouchInteraction)) : 0;
+    return p ? qobject_cast<QWebTouchModifier*>(p->createExtension(QWebKitPlatformPlugin::TouchInteraction)) : 0;
}

-- 
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