@@ -82,13 +82,16 @@ def scan_for_bad_import(file_path, all_pat, good_pats):
8282 return bool(errors)
8383
8484# Flickable matches
85−flickable_pat = re.compile(r'.*\ Flickable {')
86−listview_pat = re.compile(r'.*\ ListView {')
87−gridview_pat = re.compile(r'.*\ GridView {')
85+flickable_pat = re.compile(r'.*\s*Flickable\s*{')
86+listview_pat = re.compile(r'.*\s*ListView\s*{')
87+gridview_pat = re.compile(r'.*\s*GridView\s*{')
8888flickable_pats = [flickable_pat, listview_pat, gridview_pat]
8989unity_components_pat = re.compile(r'.*import ".*Components"')
9090components_import_pat = re.compile(r'.*import "."')
9191components_path = re.compile(r'.*qml/Components.*')
92+skip_components_flickable_path = re.compile(r'.*qml/Components/Flickable.qml')
93+skip_components_listview_path = re.compile(r'.*qml/Components/ListView.qml')
94+skip_components_gridview_path = re.compile(r'.*qml/Components/GridView.qml')
9295
9396def scan_for_flickable_imports(file_path, component_pats, qtquick_pat, unitycomponents_pat):
9497 errors = []
@@ -163,8 +166,11 @@ try:
163166 if scan_for_flickable_imports(path, flickable_pats, quick_good_pat, unity_components_pat):
164167 found_bad_import = True
165168 else:
166− if scan_for_flickable_imports(path, flickable_pats, quick_good_pat, components_import_pat):
167− found_bad_import = True
169+ if not skip_components_flickable_path.match(path) and \
170+ not skip_components_listview_path.match(path) and \
171+ not skip_components_gridview_path.match(path):
172+ if scan_for_flickable_imports(path, flickable_pats, quick_good_pat, components_import_pat):
173+ found_bad_import = True
168174
169175except OSError as e:
170176 error("cannot create file list for \"" + dir + "\": " + e.strerror)