Bug 51981

Summary: [Qt] [Symbian] Fix building NPAPI support
Product: WebKit Reporter: Laszlo Gombos <laszlo.gombos>
Component: Plug-insAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, andersca, brettw, commit-queue, eric, fishd
Priority: P3 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
proposed patch none

Description Laszlo Gombos 2011-01-05 21:54:42 PST
The build failure reported is the following:

 compile    : WebKit2\Shared\Plugins\Netscape\NetscapePluginModule.cpp

   "Y:/epoc32/include/mw/QtCore/qsize.h", line 88: Error:  #338: more than one instance of overloaded function "operator*" has "C" linkage
         friend inline const QSize operator*(qreal, const QSize &);
                                   ^
   "Y:/epoc32/include/mw/QtCore/qsize.h", line 95: Error:  #800: this declaration may not have extern "C" linkage
     Q_DECLARE_TYPEINFO(QSize, Q_MOVABLE_TYPE);
     ^

It seems that the "C" linkage declaration is not used consistently and the following section of the npapi.h is included both with and without the "C" linkage declaration (depending the ordering of the include files).

#if defined(XP_SYMBIAN)
#include <QEvent>
#include <QRegion>
#endif
Comment 1 Laszlo Gombos 2011-01-05 22:11:52 PST
Created attachment 78096 [details]
proposed patch
Comment 2 Eric Seidel (no email) 2011-01-10 13:39:11 PST
I'm trying to think who knows npapi.h these days.
Comment 3 Simon Hausmann 2011-01-17 00:07:40 PST
Comment on attachment 78096 [details]
proposed patch

I think this change is correct. A header file should not rely on extern "C" being set but declare it itself. Plus npapi.h already has the extern "C" declarations a bit further down the file.
Comment 4 WebKit Commit Bot 2011-01-17 00:28:36 PST
Comment on attachment 78096 [details]
proposed patch

Clearing flags on attachment: 78096

Committed r75925: <http://trac.webkit.org/changeset/75925>
Comment 5 WebKit Commit Bot 2011-01-17 00:28:43 PST
All reviewed patches have been landed.  Closing bug.