File indexing completed on 2024-05-12 16:40:37

0001 #!/bin/sh
0002 #
0003 # Shows all headers for custom (promoted) widgets in UI files of specified directory
0004 # Why is it useful?
0005 # To make sure global KF5 includes are used, i.e. <KLineEdit>, not "klineedit.h".
0006 # The latter can pick up an old header from kdelibs4.
0007 #
0008 # So it should be like:
0009 # <header location="global">KLineEdit</header>
0010 #
0011 # And not like:
0012 # <header>klineedit.h</header>
0013 #
0014 # Instead of altering that in Designer, you can edit the file by hand.
0015 #
0016 # PS: The UI file format: https://doc.qt.io/qt-5.4/designer-ui-file-format.html
0017 # Relevant part:
0018 #      <xs:complexType name="Header" mixed="true" >
0019 #         <xs:attribute name="location" type="xs:string" />  <!-- local or global -->
0020 #      </xs:complexType>
0021 #
0022 
0023 grep "\<header\>" `find $1 -name "*.ui"`