5 cwd = os.path.dirname(__file__)
6 regex = re.compile('(QT_HAVE_[\w]+)')
9 for root, subdirs, files in os.walk('%s/../src' % cwd):
11 if sfile.endswith(('.cpp', '.h')):
12 sfull = '%s/%s' % (root, sfile)
13 with open(sfull, 'rb') as f:
15 scontent = scontent.decode('utf-8')
16 for smatch in regex.findall(scontent):
17 smatch = smatch.strip('"\'')
18 if not smatch in lmatches:
19 lmatches.append(smatch)
21 print('\n'.join(sorted(lmatches)))