[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Wed Jan 6 00:10:19 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 6cc236e62b00d80e013a739d7fa086802651b221
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 29 23:06:30 2009 +0000
2009-12-29 Chang Shu <Chang.Shu at nokia.com>
Reviewed by Adam Barth.
[Qt] Move logic that handles Qt headers before primary headers
so that Qt headers won't be treated as primary headers by mistake.
https://bugs.webkit.org/show_bug.cgi?id=32991
* Scripts/modules/cpp_style.py:
* Scripts/modules/cpp_style_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ab5c663..65d4c02 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2009-12-29 Chang Shu <Chang.Shu at nokia.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Move logic that handles Qt headers before primary headers
+ so that Qt headers won't be treated as primary headers by mistake.
+ https://bugs.webkit.org/show_bug.cgi?id=32991
+
+ * Scripts/modules/cpp_style.py:
+ * Scripts/modules/cpp_style_unittest.py:
+
2009-12-29 Eric Seidel <eric at webkit.org>
Reviewed by Adam Barth.
diff --git a/WebKitTools/Scripts/modules/cpp_style.py b/WebKitTools/Scripts/modules/cpp_style.py
index a0e4022..05c592e 100644
--- a/WebKitTools/Scripts/modules/cpp_style.py
+++ b/WebKitTools/Scripts/modules/cpp_style.py
@@ -2216,6 +2216,13 @@ def _classify_include(filename, include, is_system, include_state):
if filename.endswith('.h') and filename != include:
return _OTHER_HEADER;
+ # Qt's moc files do not follow the naming and ordering rules, so they should be skipped
+ if include.startswith('moc_') and include.endswith('.cpp'):
+ return _MOC_HEADER
+
+ if include.endswith('.moc'):
+ return _MOC_HEADER
+
# If the target file basename starts with the include we're checking
# then we consider it the primary header.
target_base = FileInfo(filename).base_name()
@@ -2230,13 +2237,6 @@ def _classify_include(filename, include, is_system, include_state):
elif include_state.visited_primary_section() and target_base == include_base:
return _PRIMARY_HEADER
- # Qt's moc files do not follow the naming and ordering rules, so they should be skipped
- if include.startswith('moc_') and include.endswith('.cpp'):
- return _MOC_HEADER
-
- if include.endswith('.moc'):
- return _MOC_HEADER
-
return _OTHER_HEADER
diff --git a/WebKitTools/Scripts/modules/cpp_style_unittest.py b/WebKitTools/Scripts/modules/cpp_style_unittest.py
index 8b1b17d..d567a47 100644
--- a/WebKitTools/Scripts/modules/cpp_style_unittest.py
+++ b/WebKitTools/Scripts/modules/cpp_style_unittest.py
@@ -2221,6 +2221,14 @@ class OrderOfIncludesTest(CppStyleTestBase):
classify_include('PrefixFooCustom.cpp',
'Foo.h',
False, include_state))
+ self.assertEqual(cpp_style._MOC_HEADER,
+ classify_include('foo.cpp',
+ 'foo.moc',
+ False, include_state))
+ self.assertEqual(cpp_style._MOC_HEADER,
+ classify_include('foo.cpp',
+ 'moc_foo.cpp',
+ False, include_state))
# Tricky example where both includes might be classified as primary.
self.assert_language_rules_check('ScrollbarThemeWince.cpp',
'#include "config.h"\n'
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list