Bug 47427

Summary: [Qt] build error in WebKit/qt/Api/qwebpage.cpp in Qt 4.7.0
Product: WebKit Reporter: Pierre Rossi <pierre.rossi>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Major CC: benjamin, commit-queue, forummails
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Pierre Rossi 2010-10-08 11:52:31 PDT
This bug report is copied from http://bugreports.qt.nokia.com/browse/QTWEBKIT-281.

---Original report---

I'm trying to compile Qt 4.7.0 and its failing on this:

../WebKit/qt/Api/qwebpage.cpp: In member function 'void QWebPagePrivate::touchEvent(QTouchEvent*)':
../WebKit/qt/Api/qwebpage.cpp:1571: error: 'class WebCore::EventHandler' has no member named 'handleTouchEvent'
../WebKit/qt/Api/qwebpage.cpp:1571: error: invalid use of undefined type 'struct WebCore::PlatformTouchEvent'
page/EventHandler.h:62: error: forward declaration of 'struct WebCore::PlatformTouchEvent'

Can you tell me what I can do to get around it? I was searching out on the web and see that there has been some changes to qwebpage.cpp today. So maybe there is already a patch for this?

Thanks!

---Comment---

I'm also getting a compile error for webkit/JavaScriptCore/interpreter/Interpreter.cpp:

interpreter/Interpreter.cpp(2992): error: in "goto *expr", expr must have type "void *"
NEXT_INSTRUCTION();
Comment 1 Benjamin Poulain 2010-10-08 11:54:38 PDT
Looks like a bug in your compiler. I have no problem building 4.7.0.
Comment 2 Bastian 2010-11-05 10:42:19 PDT
When compiling qt 4.7.0 webkit has not been build. I ran into the same issue, when starting make in src/3rdparty/webkit.

Compiler used: 

$ g++ --version
g++ (Debian 4.3.2-1.1) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



What compilers are recommended for building the qt webkit?
Comment 3 Bastian 2010-11-06 11:39:42 PDT
WebKit/qt/Api/qwebpage.ccp 1571:
bool accepted = frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event));

                         ^^^ Method is only available, if marco TOUCH_EVENTS is available, see WebCore/page/EventHandler.h 209:
#if ENABLE(TOUCH_EVENTS)
    bool handleTouchEvent(const PlatformTouchEvent&);
#endif


For my understanding, my compiler is correctly complaining, when TOUCH_EVENTS is not set:
../WebKit/qt/Api/qwebpage.cpp:1571: error: 'class WebCore::EventHandler' has no member named 'handleTouchEvent'
Comment 4 Benjamin Poulain 2010-11-08 01:05:47 PST
(In reply to comment #2)
> What compilers are recommended for building the qt webkit?

GCC >= 4.2 should do fine.

(In reply to comment #3)
> For my understanding, my compiler is correctly complaining, when TOUCH_EVENTS is not set:
> ../WebKit/qt/Api/qwebpage.cpp:1571: error: 'class WebCore::EventHandler' has no member named 'handleTouchEvent'

I will testthe missing guards for touch events. However, with Qt, TOUCH_EVENTS should always be defined (we don't support versions prior to 4.6). Have you disabled TOUCH_EVENTS manually?
Comment 5 Benjamin Poulain 2010-11-08 01:36:23 PST
Created attachment 73226 [details]
Patch

Add the missing guard to the Qt port.

In the patch:
+#else
+    event->ignore();

The call to ignore() is mandatory because touch event are accepted by default.
Comment 6 Andreas Kling 2010-11-08 03:12:31 PST
Comment on attachment 73226 [details]
Patch

r=me
Comment 7 Bastian 2010-11-08 07:26:14 PST
(In reply to comment #4)
> However, with Qt, TOUCH_EVENTS should always be defined (we don't support versions prior to 4.6). Have you disabled TOUCH_EVENTS manually?

Not intentionally. I only did:
.../qt-everywhere-opensource-src-4.7.0 $ ./configure -plugin-sql-mysql -release -prefix /opt/qt47/ -nomake tools -nomake examples -nomake demos -nomake docs -nomake translations -make libs -webkit

This did not enable TOUCH_EVENTS for me (missing lib?). Too bad, I can't find logs from configure run.


Thanks for the patch.
Comment 8 WebKit Commit Bot 2010-11-08 18:15:56 PST
Comment on attachment 73226 [details]
Patch

Clearing flags on attachment: 73226

Committed r71593: <http://trac.webkit.org/changeset/71593>
Comment 9 WebKit Commit Bot 2010-11-08 18:16:01 PST
All reviewed patches have been landed.  Closing bug.