Bug 25233

Summary: [Qt] WebKit Qt build fails on Qt 4.4.x
Product: WebKit Reporter: Erik L. Bunce <elbunce>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: hausmann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.5   
Attachments:
Description Flags
Fix to make tst_qwebelement.cpp build under Qt 4.4.x. none

Description Erik L. Bunce 2009-04-16 04:39:19 PDT
Compile error in tst_qwebelement.cpp when compiled with Qt 4.4.2:

/Users/erik/work/webkit-qt44/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp: In member function ‘void tst_QWebElement::iteration()’:
/Users/erik/work/webkit-qt44/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp:304: error: ‘class QList<QWebElement>’ has no member named ‘length’
/Users/erik/work/webkit-qt44/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp:305: error: ‘class QList<QWebElement>’ has no member named ‘length’
/Users/erik/work/webkit-qt44/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp:305: error: ‘class QList<QWebElement>’ has no member named ‘length’
/Users/erik/work/webkit-qt44/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp:313: error: ‘class QList<QWebElement>’ has no member named ‘length’
/Users/erik/work/webkit-qt44/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp:314: error: ‘class QList<QWebElement>’ has no member named ‘length’
/Users/erik/work/webkit-qt44/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp:314: error: ‘class QList<QWebElement>’ has no member named ‘length’

This is because QList::length() was added as an alias to QList::count() in Qt 4.5.0.
Comment 1 Erik L. Bunce 2009-04-16 04:42:31 PDT
Created attachment 29534 [details]
Fix to make tst_qwebelement.cpp build under Qt 4.4.x.

replaces QList::length() with QList::count() which exists in both Qt 4.4 and 4.5.
Comment 2 Simon Hausmann 2009-04-17 01:50:58 PDT
Sorry Erik, I saw Laszlo's patch first :)

*** This bug has been marked as a duplicate of 25242 ***