WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
29017
[Qt] Use the declaration order in initializer lists
https://bugs.webkit.org/show_bug.cgi?id=29017
Summary
[Qt] Use the declaration order in initializer lists
Laszlo Gombos
Reported
2009-09-07 12:16:29 PDT
Class members are initialised in the order they are declared, not the order they appear in initialiser lists. It is a good practice to put the elements of the member initialization list in the same order as the data members of the class. This practice seems to be followed WebKit, let's bring this to QtWebKit port as well. This is sometimes reported as a compiler warning for some compilers (e.g. gcc with high enough warning level).
Attachments
proposed patch
(3.26 KB, patch)
2009-09-07 12:21 PDT
,
Laszlo Gombos
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Laszlo Gombos
Comment 1
2009-09-07 12:21:06 PDT
Created
attachment 39160
[details]
proposed patch
Laszlo Gombos
Comment 2
2009-09-07 12:30:26 PDT
gcc warning (with elevated warning level) for reference: WebCore/platform/graphics/qt/FontCacheQt.cpp: In constructor 'WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey(const WebCore::FontDescription&)': WebCore/platform/graphics/qt/FontCacheQt.cpp:136: warning: 'WebCore::FontPlatformDataCacheKey::m_bold' will be initialized after WebCore/platform/graphics/qt/FontCacheQt.cpp:135: warning: 'int WebCore::FontPlatformDataCacheKey::m_size' WebCore/platform/graphics/qt/FontCacheQt.cpp:59: warning: when initialized here WebKit/qt/Api/qwebframe_p.h: In constructor 'QWebFramePrivate::QWebFramePrivate()': WebKit/qt/Api/qwebframe_p.h:90: warning: 'QWebFramePrivate::q' will be initialized after WebKit/qt/Api/qwebframe_p.h:82: warning: 'Qt::ScrollBarPolicy QWebFramePrivate::horizontalScrollBarPolicy' WebKit/qt/Api/qwebframe_p.h:63: warning: when initialized here WebCore/platform/network/qt/QNetworkReplyHandler.h: In constructor 'WebCore::QNetworkReplyHandler::QNetworkReplyHandler(WebCore::ResourceHandle*, WebCore::QNetworkR eplyHandler::LoadMode)': WebCore/platform/network/qt/QNetworkReplyHandler.h:73: warning: 'WebCore::QNetworkReplyHandler::m_resourceHandle' will be initialized after WebCore/platform/network/qt/QNetworkReplyHandler.h:72: warning: 'QNetworkReply* WebCore::QNetworkReplyHandler::m_reply' WebCore/platform/network/qt/QNetworkReplyHandler.cpp:132: warning: when initialized here
Eric Seidel (no email)
Comment 3
2009-09-08 10:30:14 PDT
Comment on
attachment 39160
[details]
proposed patch Clearing flags on attachment: 39160 Committed
r48164
: <
http://trac.webkit.org/changeset/48164
>
Eric Seidel (no email)
Comment 4
2009-09-08 10:30:19 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug