OSDN Git Service

scripts cleanup
authorIvailo Monev <xakepa10@laimg.moc>
Sat, 1 Jun 2019 14:29:41 +0000 (14:29 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sat, 1 Jun 2019 14:29:41 +0000 (14:29 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
scripts/genman.py
scripts/incfsck.py
scripts/pragmafsck.py

index 1670348..0667f2b 100755 (executable)
@@ -15,18 +15,18 @@ if not pod2man:
     sys.stderr.write('Perl is not installed\n')
     sys.exit(1)
 
-sys.stdout.write('Generating man pages for Katie...\n')
+sys.stdout.write('Generating man pages...\n')
 for root, sdir, lfiles in os.walk('%s/../src/tools' % cwd):
     for sfile in lfiles:
         if sfile.endswith('.pod'):
-            ffile = '%s/%s' % (root, sfile)
-            ofile = ffile.replace('.pod', '.1')
+            ifile = '%s/%s' % (root, sfile)
+            ofile = ifile.replace('.pod', '.1')
             subprocess.check_call(
                 (pod2man,
                 '--release=Katie 4.9.0',
                 '--center=Katie Manual',
                 '--section=1',
                 '--utf8',
-                ffile,
+                ifile,
                 ofile)
             )
index b86d5df..a2edbe0 100755 (executable)
@@ -4,264 +4,326 @@ import sys, os, re
 
 incmap = {
     'QtCore': {
-        'QtGlobal': 'qglobal.h',
-        'QModelIndex': 'qabstractitemmodel.h',
-        'QModelIndexList': 'qabstractitemmodel.h',
-        'QGenericArgument': 'qobjectdefs.h',
-        'QProcessEnvironment': 'qprocess.h',
-        'QMutableHashIterator': 'qhash.h',
-        'QObjectList': 'qobject.h',
-        'QMapIterator': 'qmap.h',
-        'QMutexLocker': 'qmutex.h',
-        'QScopedArrayPointer': 'qscopedpointer.h',
-        'QWeakPointer': 'qsharedpointer.h',
+        'QAbstractListModel': 'qabstractitemmodel.h',
+        'QAbstractTableModel': 'qabstractitemmodel.h',
         'QArgument': 'qobjectdefs.h',
-        'QByteRef': 'qbytearray.h',
-        'QChildEvent': 'qcoreevent.h',
-        'QMultiMap': 'qmap.h',
-        'QMetaEnum': 'qmetaobject.h',
-        'QLatin1String': 'qstring.h',
-        'QPointF': 'qpoint.h',
-        'QTimerEvent': 'qcoreevent.h',
-        'QExplicitlySharedDataPointer': 'qsharedpointer.h',
-        'QAtomicPointer': 'qatomic.h',
-        'QReadLocker': 'qreadwritelock.h',
-        'QWriteLocker': 'qreadwritelock.h',
         'QAtomicInt': 'qatomic.h',
-        'QRectF': 'qrect.h',
-        'QSizeF': 'qsize.h',
-        'QLineF': 'qline.h',
+        'QAtomicPointer': 'qatomic.h',
+        'QBasicAtomicInt': 'qbasicatomic.h',
         'QBitRef': 'qbitarray.h',
-        'QtAlgorithms': 'qalgorithms.h',
-        'QAbstractListModel': 'qabstractitemmodel.h',
-        'QTime': 'qdatetime.h',
-        'QDate': 'qdatetime.h',
-        'QMetaProperty': 'qmetaobject.h',
-        'QMutableListIterator': 'qlist.h',
-        'QSharedDataPointer': 'qshareddata.h',
-        'QMetaMethod': 'qmetaobject.h',
-        'QLatin1Char': 'qchar.h',
-        'QtPlugin': 'qplugin.h',
-        'QCharRef': 'qstring.h',
         'QBool': 'qglobal.h',
-        'QMutableStringListIterator': 'qstringlist.h',
-        'QtDebug': 'qdebug.h',
-        'QtEndian': 'qendian.h',
-        'QBasicAtomicInt': 'qbasicatomic.h',
-        'Q_PID': 'qprocess.h',
-        'QMetaClassInfo': 'qmetaobject.h',
+        'QByteRef': 'qbytearray.h',
+        'QCharRef': 'qstring.h',
+        'QChildEvent': 'qcoreevent.h',
+        'QDate': 'qdatetime.h',
+        'QDynamicPropertyChangeEvent': 'qcoreevent.h',
+        'QExplicitlySharedDataPointer': 'qsharedpointer.h',
+        'QFileInfoList': 'qfileinfo.h',
         'QFlag': 'qglobal.h',
         'QFlags': 'qglobal.h',
-        'QPersistentModelIndex': 'qabstractitemmodel.h',
-        'QSysInfo': 'qglobal.h',
-        'QMutableVectorIterator': 'qvector.h',
-        'Qt': 'qnamespace.h',
-        'QAbstractTableModel': 'qabstractitemmodel.h',
+        'QGenericArgument': 'qobjectdefs.h',
+        'QGlobalStatic': 'qglobal.h',
         'QHashIterator': 'qhash.h',
+        'QJsonParseError': 'qjsondocument.h',
+        'QLatin1Char': 'qchar.h',
+        'QLatin1String': 'qstring.h',
+        'QLineF': 'qline.h',
+        'QListIterator': 'qlist.h',
+        'QMapIterator': 'qmap.h',
+        'QMetaClassInfo': 'qmetaobject.h',
+        'QMetaEnum': 'qmetaobject.h',
+        'QMetaMethod': 'qmetaobject.h',
+        'QMetaProperty': 'qmetaobject.h',
+        'QModelIndex': 'qabstractitemmodel.h',
+        'QModelIndexList': 'qabstractitemmodel.h',
         'QMultiHash': 'qhash.h',
+        'QMultiMap': 'qmap.h',
+        'QMutableHashIterator': 'qhash.h',
+        'QMutableLinkedListIterator': 'qlist.h',
+        'QMutableListIterator': 'qlist.h',
         'QMutableMapIterator': 'qmap.h',
-        'QListIterator': 'qlist.h',
-        'QVariantMap': 'qvariant.h',
-        'QVariantList': 'qvariant.h',
-        'QVariantHash': 'qvariant.h',
-        'QFileInfoList': 'qfileinfo.h',
-        'QGlobalStatic': 'qglobal.h',
         'QMutableSetIterator': 'qset.h',
-        'QDynamicPropertyChangeEvent': 'qcoreevent.h',
-        'QMutableLinkedListIterator': 'qlist.h',
+        'QMutableStringListIterator': 'qstringlist.h',
+        'QMutableVectorIterator': 'qvector.h',
+        'QMutexLocker': 'qmutex.h',
+        'QObjectList': 'qobject.h',
+        'QPersistentModelIndex': 'qabstractitemmodel.h',
+        'QPointF': 'qpoint.h',
+        'QProcessEnvironment': 'qprocess.h',
+        'QReadLocker': 'qreadwritelock.h',
+        'QRectF': 'qrect.h',
+        'QScopedArrayPointer': 'qscopedpointer.h',
+        'QSharedDataPointer': 'qshareddata.h',
+        'QSizeF': 'qsize.h',
+        'QSysInfo': 'qglobal.h',
         'QTextDecoder': 'qtextcodec.h',
-        'QJsonParseError': 'qjsondocument.h',
-        },
+        'QTime': 'qdatetime.h',
+        'QTimerEvent': 'qcoreevent.h',
+        'QVariantHash': 'qvariant.h',
+        'QVariantList': 'qvariant.h',
+        'QVariantMap': 'qvariant.h',
+        'QWeakPointer': 'qsharedpointer.h',
+        'QWriteLocker': 'qreadwritelock.h',
+        'Q_PID': 'qprocess.h',
+        'Qt': 'qnamespace.h',
+        'QtAlgorithms': 'qalgorithms.h',
+        'QtDebug': 'qdebug.h',
+        'QtEndian': 'qendian.h',
+        'QtGlobal': 'qglobal.h',
+        'QtPlugin': 'qplugin.h',
+    },
+    'QtDBus': {
+        'QDBusAbstractInterfaceBase': 'qdbusabstractinterface.h',
+        'QDBusObjectPath': 'qdbusextratypes.h',
+        'QDBusPendingCallWatcher': 'qdbuspendingcall.h',
+        'QDBusPendingReplyData': 'qdbuspendingreply.h',
+        'QDBusSignature': 'qdbusextratypes.h',
+        'QDBusVariant': 'qdbusextratypes.h',
+    },
+    'QtDeclarative': {
+        'QDeclarativeListProperty': 'qdeclarativelist.h',
+    },
+    'QtDesigner': {
+        'QAbstractFormBuilder': 'abstractformbuilder.h',
+        'QDesignerActionEditorInterface': 'abstractactioneditor.h',
+        'QDesignerBrushManagerInterface': 'abstractbrushmanager.h',
+        'QDesignerComponents': 'qdesigner_components.h',
+        'QDesignerContainerExtension': 'container.h',
+        'QDesignerCustomWidgetCollectionInterface': 'customwidget.h',
+        'QDesignerCustomWidgetInterface': 'customwidget.h',
+        'QDesignerDnDItemInterface': 'abstractdnditem.h',
+        'QDesignerDynamicPropertySheetExtension': 'dynamicpropertysheet.h',
+        'QDesignerExtraInfoExtension': 'extrainfo.h',
+        'QDesignerFormEditorInterface': 'abstractformeditor.h',
+        'QDesignerFormEditorPluginInterface': 'abstractformeditorplugin.h',
+        'QDesignerFormWindowCursorInterface': 'abstractformwindowcursor.h',
+        'QDesignerFormWindowInterface': 'abstractformwindow.h',
+        'QDesignerFormWindowManagerInterface': 'abstractformwindowmanager.h',
+        'QDesignerFormWindowToolInterface': 'abstractformwindowtool.h',
+        'QDesignerIconCacheInterface': 'abstracticoncache.h',
+        'QDesignerIntegrationInterface': 'abstractintegration.h',
+        'QDesignerLanguageExtension': 'abstractlanguage.h',
+        'QDesignerLayoutDecorationExtension': 'layoutdecoration.h',
+        'QDesignerMemberSheetExtension': 'membersheet.h',
+        'QDesignerMetaDataBaseInterface': 'abstractmetadatabase.h',
+        'QDesignerMetaDataBaseItemInterface': 'abstractmetadatabase.h',
+        'QDesignerObjectInspectorInterface': 'abstractobjectinspector.h',
+        'QDesignerPromotionInterface': 'abstractpromotioninterface.h',
+        'QDesignerPropertyEditorInterface': 'abstractpropertyeditor.h',
+        'QDesignerPropertySheetExtension': 'propertysheet.h',
+        'QDesignerResourceBrowserInterface': 'abstractresourcebrowser.h',
+        'QDesignerTaskMenuExtension': 'taskmenu.h',
+        'QDesignerWidgetBoxInterface': 'abstractwidgetbox.h',
+        'QDesignerWidgetDataBaseInterface': 'abstractwidgetdatabase.h',
+        'QDesignerWidgetDataBaseItemInterface': 'abstractwidgetdatabase.h',
+        'QDesignerWidgetFactoryInterface': 'abstractwidgetfactory.h',
+        'QExtensionFactory': 'default_extensionfactory.h',
+    },
     'QtGui': {
-        'QHBoxLayout': 'qboxlayout.h',
-        'QVBoxLayout': 'qboxlayout.h',
-        'QSpacerItem': 'qlayoutitem.h',
-        'QTextTableCell': 'qtexttable.h',
-        'QPainterPathStroker': 'qpainterpath.h',
-        'QGraphicsPolygonItem': 'qgraphicsitem.h',
-        'QGraphicsEllipseItem': 'qgraphicsitem.h',
-        'QSplitterHandle': 'qsplitter.h',
+        'QAbstractGraphicsShapeItem': 'qgraphicsitem.h',
+        'QAbstractUndoItem': 'qtextdocument.h',
+        'QAccessible2Interface': 'qaccessible2.h',
+        'QAccessibleActionInterface': 'qaccessible2.h',
+        'QAccessibleApplication': 'qaccessibleobject.h',
+        'QAccessibleBridgeFactoryInterface': 'qaccessiblebridge.h',
+        'QAccessibleBridgePlugin': 'qaccessiblebridge.h',
+        'QAccessibleEditableTextInterface': 'qaccessible2.h',
+        'QAccessibleEvent': 'qaccessible.h',
+        'QAccessibleFactoryInterface': 'qaccessibleplugin.h',
+        'QAccessibleImageInterface': 'qaccessible2.h',
+        'QAccessibleInterface': 'qaccessible.h',
+        'QAccessibleInterfaceEx': 'qaccessible.h',
+        'QAccessibleObjectEx': 'qaccessibleobject.h',
+        'QAccessibleSimpleEditableTextInterface': 'qaccessible2.h',
+        'QAccessibleTable2CellInterface': 'qaccessible2.h',
+        'QAccessibleTable2Interface': 'qaccessible2.h',
+        'QAccessibleTableInterface': 'qaccessible2.h',
+        'QActionEvent': 'qevent.h',
+        'QCloseEvent': 'qevent.h',
+        'QConicalGradient': 'qbrush.h',
+        'QContextMenuEvent': 'qevent.h',
+        'QDateEdit': 'qdatetimeedit.h',
+        'QDoubleSpinBox': 'qspinbox.h',
+        'QDoubleValidator': 'qvalidator.h',
+        'QDragEnterEvent': 'qevent.h',
+        'QDragLeaveEvent': 'qevent.h',
+        'QDragMoveEvent': 'qevent.h',
+        'QDropEvent': 'qevent.h',
+        'QFileOpenEvent': 'qevent.h',
+        'QFocusEvent': 'qevent.h',
+        'QFontMetricsF': 'qfontmetrics.h',
+        'QGestureEvent': 'qevent.h',
+        'QGradient': 'qbrush.h',
         'QGraphicsDropShadowEffect': 'qgraphicseffect.h',
-        'QGraphicsPixmapItem': 'qgraphicsitem.h',
-        'QGraphicsRectItem': 'qgraphicsitem.h',
-        'QGraphicsScale': 'qgraphicstransform.h',
+        'QGraphicsEllipseItem': 'qgraphicsitem.h',
         'QGraphicsItemGroup': 'qgraphicsitem.h',
         'QGraphicsLineItem': 'qgraphicsitem.h',
-        'QGraphicsPathItem': 'qgraphicsitem.h',
-        'QConicalGradient': 'qbrush.h',
-        'QPlainTextDocumentLayout': 'qplaintextedit.h',
+        'QGraphicsObject': 'qgraphicsitem.h',
         'QGraphicsOpacityEffect': 'qgraphicseffect.h',
-        'QPinchGesture': 'qgesture.h',
-        'QGestureEvent': 'qevent.h',
+        'QGraphicsPathItem': 'qgraphicsitem.h',
+        'QGraphicsPixmapItem': 'qgraphicsitem.h',
+        'QGraphicsPolygonItem': 'qgraphicsitem.h',
+        'QGraphicsRectItem': 'qgraphicsitem.h',
+        'QGraphicsRotation': 'qgraphicstransform.h',
+        'QGraphicsScale': 'qgraphicstransform.h',
+        'QGraphicsSceneContextMenuEvent': 'qgraphicssceneevent.h',
+        'QGraphicsSceneDragDropEvent': 'qgraphicssceneevent.h',
+        'QGraphicsSceneHelpEvent': 'qgraphicssceneevent.h',
+        'QGraphicsSceneHoverEvent': 'qgraphicssceneevent.h',
+        'QGraphicsSceneMouseEvent': 'qgraphicssceneevent.h',
+        'QGraphicsSceneMoveEvent': 'qgraphicssceneevent.h',
+        'QGraphicsSceneResizeEvent': 'qgraphicssceneevent.h',
+        'QGraphicsSceneWheelEvent': 'qgraphicssceneevent.h',
+        'QGraphicsSimpleTextItem': 'qgraphicsitem.h',
+        'QGraphicsTextItem': 'qgraphicsitem.h',
+        'QHBoxLayout': 'qboxlayout.h',
+        'QHelpEvent': 'qevent.h',
+        'QHideEvent': 'qevent.h',
+        'QHoverEvent': 'qevent.h',
         'QIconDragEvent': 'qevent.h',
         'QIconEngineFactoryInterface': 'qiconengineplugin.h',
         'QIconEngineFactoryInterfaceV2': 'qiconengineplugin.h',
         'QIconEnginePluginV2': 'qiconengineplugin.h',
+        'QIconEngineV2': 'qiconengine.h',
         'QImageIOHandlerFactoryInterface': 'qimageiohandler.h',
+        'QImageIOPlugin': 'qimageiohandler.h',
         'QInputContextFactoryInterface': 'qinputcontextplugin.h',
+        'QInputEvent': 'qevent.h',
         'QInputMethodEvent': 'qevent.h',
+        'QIntValidator': 'qvalidator.h',
         'QItemEditorCreator': 'qitemeditorfactory.h',
         'QItemEditorCreatorBase': 'qitemeditorfactory.h',
-        'QGraphicsSceneHoverEvent': 'qgraphicssceneevent.h',
-        'QGraphicsSceneResizeEvent': 'qgraphicssceneevent.h',
-        'QGraphicsSceneDragDropEvent': 'qgraphicssceneevent.h',
-        'QGraphicsSceneContextMenuEvent': 'qgraphicssceneevent.h',
-        'QGraphicsSceneHelpEvent': 'qgraphicssceneevent.h',
-        'QGraphicsSceneMoveEvent': 'qgraphicssceneevent.h',
-        'QGraphicsTextItem': 'qgraphicsitem.h',
-        'QGraphicsSimpleTextItem': 'qgraphicsitem.h',
-        'QGraphicsRotation': 'qgraphicstransform.h',
-        'QGraphicsObject': 'qgraphicsitem.h',
-        'QIntValidator': 'qvalidator.h',
-        'QPolygonF': 'qpolygon.h',
-        'QGraphicsSceneWheelEvent': 'qgraphicssceneevent.h',
-        'QGraphicsSceneMouseEvent': 'qgraphicssceneevent.h',
-        'QResizeEvent': 'qevent.h',
-        'QMouseEvent': 'qevent.h',
+        'QItemSelection': 'qitemselectionmodel.h',
+        'QItemSelectionRange': 'qitemselectionmodel.h',
         'QKeyEvent': 'qevent.h',
-        'QWheelEvent': 'qevent.h',
-        'QDragEnterEvent': 'qevent.h',
-        'QWindowStateChangeEvent': 'qevent.h',
-        'QtEvents': 'qevent.h',
-        'QTextLine': 'qtextlayout.h',
-        'QTextFrame': 'qtextobject.h',
-        'QTextCharFormat': 'qtextformat.h',
-        'QTextBlockFormat': 'qtextformat.h',
-        'QTextTableFormat': 'qtextformat.h',
-        'QUndoCommand': 'qundostack.h',
-        'QTouchEvent': 'qevent.h',
-        'QDropEvent': 'qevent.h',
+        'QLinearGradient': 'qbrush.h',
+        'QListWidgetItem': 'qlistwidget.h',
+        'QMouseEvent': 'qevent.h',
         'QMoveEvent': 'qevent.h',
+        'QPaintEvent': 'qevent.h',
+        'QPainterPathStroker': 'qpainterpath.h',
+        'QPinchGesture': 'qgesture.h',
+        'QPlainTextDocumentLayout': 'qplaintextedit.h',
+        'QPolygonF': 'qpolygon.h',
+        'QRadialGradient': 'qbrush.h',
+        'QRegExpValidator': 'qvalidator.h',
+        'QResizeEvent': 'qevent.h',
+        'QShortcutEvent': 'qevent.h',
+        'QShowEvent': 'qevent.h',
+        'QSpacerItem': 'qlayoutitem.h',
+        'QSplitterHandle': 'qsplitter.h',
+        'QStandardItem': 'qstandarditemmodel.h',
         'QStyleHintReturnMask': 'qstyleoption.h',
-        'QStyleOptionGroupBox': 'qstyleoption.h',
+        'QStyleOptionButton': 'qstyleoption.h',
         'QStyleOptionComboBox': 'qstyleoption.h',
-        'QStyleOptionSpinBox': 'qstyleoption.h',
         'QStyleOptionComplex': 'qstyleoption.h',
-        'QStyleOptionButton': 'qstyleoption.h',
+        'QStyleOptionDockWidget': 'qstyleoption.h',
+        'QStyleOptionDockWidgetV2': 'qstyleoption.h',
+        'QStyleOptionFocusRect': 'qstyleoption.h',
         'QStyleOptionFrame': 'qstyleoption.h',
         'QStyleOptionFrameV2': 'qstyleoption.h',
         'QStyleOptionFrameV3': 'qstyleoption.h',
+        'QStyleOptionGraphicsItem': 'qstyleoption.h',
+        'QStyleOptionGroupBox': 'qstyleoption.h',
+        'QStyleOptionHeader': 'qstyleoption.h',
+        'QStyleOptionMenuItem': 'qstyleoption.h',
         'QStyleOptionProgressBar': 'qstyleoption.h',
         'QStyleOptionProgressBarV2': 'qstyleoption.h',
-        'QStyleOptionToolBar': 'qstyleoption.h',
-        'QStyleOptionSlider': 'qstyleoption.h',
-        'QStyleOptionToolButton': 'qstyleoption.h',
         'QStyleOptionRubberBand': 'qstyleoption.h',
+        'QStyleOptionSlider': 'qstyleoption.h',
+        'QStyleOptionSpinBox': 'qstyleoption.h',
         'QStyleOptionTab': 'qstyleoption.h',
+        'QStyleOptionTabBarBase': 'qstyleoption.h',
         'QStyleOptionTabV2': 'qstyleoption.h',
         'QStyleOptionTabV3': 'qstyleoption.h',
-        'QStyleOptionTabBarBase': 'qstyleoption.h',
         'QStyleOptionTabWidgetFrame': 'qstyleoption.h',
         'QStyleOptionTabWidgetFrameV2': 'qstyleoption.h',
-        'QTextListFormat': 'qtextformat.h',
-        'QGradient': 'qbrush.h',
-        'QFontMetricsF': 'qfontmetrics.h',
         'QStyleOptionTitleBar': 'qstyleoption.h',
-        'QStyleOptionFocusRect': 'qstyleoption.h',
-        'QWidgetItem': 'qlayoutitem.h',
-        'QShortcutEvent': 'qevent.h',
-        'QActionEvent': 'qevent.h',
-        'QStandardItem': 'qstandarditemmodel.h',
-        'QAbstractUndoItem': 'qtextdocument.h',
-        'QWidgetList': 'qwindowdefs.h',
-        'QListWidgetItem': 'qlistwidget.h',
-        'QCloseEvent': 'qevent.h',
-        'QHideEvent': 'qevent.h',
-        'QShowEvent': 'qevent.h',
-        'QDragMoveEvent': 'qevent.h',
-        'QHelpEvent': 'qevent.h',
-        'QDoubleValidator': 'qvalidator.h',
-        'QTreeWidgetItem': 'qtreewidget.h',
-        'QTextTableFormat': 'qtextformat.h',
-        'QIconEngineV2': 'qiconengine.h',
-        'QItemSelection': 'qitemselectionmodel.h',
-        'QContextMenuEvent': 'qevent.h',
-        'QPaintEvent': 'qevent.h',
-        'QHoverEvent': 'qevent.h',
-        'QInputEvent': 'qevent.h',
-        'QDragLeaveEvent': 'qevent.h',
-        'QFileOpenEvent': 'qevent.h',
-        'QAbstractGraphicsShapeItem': 'qgraphicsitem.h',
-        'QItemSelectionRange': 'qitemselectionmodel.h',
-        'QImageIOPlugin': 'qimageiohandler.h',
-        'QFocusEvent': 'qevent.h',
-        'QLinearGradient': 'qbrush.h',
-        'QDoubleSpinBox': 'qspinbox.h',
+        'QStyleOptionToolBar': 'qstyleoption.h',
+        'QStyleOptionToolButton': 'qstyleoption.h',
         'QStyleOptionViewItem': 'qstyleoption.h',
         'QStyleOptionViewItemV2': 'qstyleoption.h',
         'QStyleOptionViewItemV3': 'qstyleoption.h',
         'QStyleOptionViewItemV4': 'qstyleoption.h',
-        'QStyleOptionDockWidget': 'qstyleoption.h',
-        'QStyleOptionDockWidgetV2': 'qstyleoption.h',
-        'QStyleOptionHeader': 'qstyleoption.h',
-        'QTimeEdit': 'qdatetimeedit.h',
-        'QStyleOptionMenuItem': 'qstyleoption.h',
-        'QStyleOptionGraphicsItem': 'qstyleoption.h',
+        'QTableWidgetItem': 'qtablewidget.h',
         'QTextBlock': 'qtextobject.h',
+        'QTextBlockFormat': 'qtextformat.h',
         'QTextBlockUserData': 'qtextobject.h',
-        'QTableWidgetItem': 'qtablewidget.h',
-        'QDateEdit': 'qdatetimeedit.h',
-        'QWizardPage': 'qwizard.h',
-        'QRadialGradient': 'qbrush.h',
-        'QRegExpValidator': 'qvalidator.h',
-        'QAccessible2Interface': 'qaccessible2.h',
-        'QAccessibleActionInterface': 'qaccessible2.h',
-        'QAccessibleApplication': 'qaccessibleobject.h',
-        'QAccessibleBridgeFactoryInterface': 'qaccessiblebridge.h',
-        'QAccessibleBridgePlugin': 'qaccessiblebridge.h',
-        'QAccessibleEditableTextInterface': 'qaccessible2.h',
-        'QAccessibleFactoryInterface': 'qaccessibleplugin.h',
-        'QAccessibleImageInterface': 'qaccessible2.h',
-        'QAccessibleEvent': 'qaccessible.h',
-        'QAccessibleInterface': 'qaccessible.h',
-        'QAccessibleInterfaceEx': 'qaccessible.h',
-        'QAccessibleObjectEx': 'qaccessibleobject.h',
-        'QAccessibleSimpleEditableTextInterface': 'qaccessible2.h',
-        'QAccessibleTable2CellInterface': 'qaccessible2.h',
-        'QAccessibleTable2Interface': 'qaccessible2.h',
-        'QAccessibleTableInterface': 'qaccessible2.h',
+        'QTextCharFormat': 'qtextformat.h',
+        'QTextFrame': 'qtextobject.h',
         'QTextLength': 'qtextformat.h',
-        },
-    'QtDBus': {
-        'QDBusPendingCallWatcher': 'qdbuspendingcall.h',
-        'QDBusObjectPath': 'qdbusextratypes.h',
-        'QDBusAbstractInterfaceBase': 'qdbusabstractinterface.h',
-        'QDBusPendingReplyData': 'qdbuspendingreply.h',
-        'QDBusSignature': 'qdbusextratypes.h',
-        'QDBusVariant': 'qdbusextratypes.h',
-        },
+        'QTextLine': 'qtextlayout.h',
+        'QTextListFormat': 'qtextformat.h',
+        'QTextTableCell': 'qtexttable.h',
+        'QTextTableFormat': 'qtextformat.h',
+        'QTimeEdit': 'qdatetimeedit.h',
+        'QTouchEvent': 'qevent.h',
+        'QTreeWidgetItem': 'qtreewidget.h',
+        'QUndoCommand': 'qundostack.h',
+        'QVBoxLayout': 'qboxlayout.h',
+        'QWheelEvent': 'qevent.h',
+        'QWidgetItem': 'qlayoutitem.h',
+        'QWidgetList': 'qwindowdefs.h',
+        'QWindowStateChangeEvent': 'qevent.h',
+        'QWizardPage': 'qwizard.h',
+        'QtEvents': 'qevent.h',
+    },
+    'QtNetwork': {
+        'QHttpHeader': 'qhttp.h',
+        'QHttpPart': 'qhttpmultipart.h',
+        'QHttpRequestHeader': 'qhttp.h',
+        'QHttpResponseHeader': 'qhttp.h',
+        'QNetworkAddressEntry': 'qnetworkinterface.h',
+        'QNetworkCacheMetaData': 'qabstractnetworkcache.h',
+        'QNetworkConfigurationManager': 'qnetworkconfigmanager.h',
+        'QNetworkProxyFactory': 'qnetworkproxy.h',
+        'QNetworkProxyQuery': 'qnetworkproxy.h',
+    },
+    'QtTest': {
+        'QEventSizeOfChecker': 'qtestspontaneevent.h',
+        'QSpontaneKeyEvent': 'qtestspontaneevent.h',
+        'QTestAccessibility': 'qtestaccessible.h',
+        'QTestAccessibilityEvent': 'qtestaccessible.h',
+        'QTestDelayEvent': 'qtestevent.h',
+        'QTestEventList': 'qtestevent.h',
+        'QTestKeyClicksEvent': 'qtestevent.h',
+        'QTestKeyEvent': 'qtestevent.h',
+        'QTestMouseEvent': 'qtestevent.h',
+        'QtTestGui': 'qtest_gui.h',
+    },
     'QtXml': {
         'QDomAttr': 'qdom.h',
-        'QDomDocument': 'qdom.h',
-        'QDomElement': 'qdom.h',
-        'QDomNode': 'qdom.h',
-        'QDomNodeList': 'qdom.h',
         'QDomCDATASection': 'qdom.h',
         'QDomCharacterData': 'qdom.h',
         'QDomComment': 'qdom.h',
+        'QDomDocument': 'qdom.h',
         'QDomDocumentFragment': 'qdom.h',
         'QDomDocumentType': 'qdom.h',
+        'QDomElement': 'qdom.h',
         'QDomEntity': 'qdom.h',
         'QDomEntityReference': 'qdom.h',
         'QDomImplementation': 'qdom.h',
         'QDomNamedNodeMap': 'qdom.h',
+        'QDomNode': 'qdom.h',
+        'QDomNodeList': 'qdom.h',
         'QDomNotation': 'qdom.h',
         'QDomProcessingInstruction': 'qdom.h',
         'QDomText': 'qdom.h',
-        'QXmlDeclHandler': 'qxml.h',
+        'QXmlAttributes': 'qxml.h',
+        'QXmlContentHandler': 'qxml.h',
         'QXmlDTDHandler': 'qxml.h',
+        'QXmlDeclHandler': 'qxml.h',
+        'QXmlDefaultHandler': 'qxml.h',
         'QXmlEntityResolver': 'qxml.h',
         'QXmlErrorHandler': 'qxml.h',
+        'QXmlInputSource': 'qxml.h',
         'QXmlLexicalHandler': 'qxml.h',
         'QXmlLocator': 'qxml.h',
         'QXmlNamespaceSupport': 'qxml.h',
+        'QXmlParseException': 'qxml.h',
         'QXmlReader': 'qxml.h',
         'QXmlSimpleReader': 'qxml.h',
-        'QXmlAttributes': 'qxml.h',
-        'QXmlDefaultHandler': 'qxml.h',
-        'QXmlParseException': 'qxml.h',
-        'QXmlContentHandler': 'qxml.h',
-        'QXmlInputSource': 'qxml.h',
+        'QXmlStreamAttribute': 'qxmlstream.h',
         'QXmlStreamAttributes': 'qxmlstream.h',
         'QXmlStreamEntityDeclaration': 'qxmlstream.h',
         'QXmlStreamEntityDeclarations': 'qxmlstream.h',
@@ -272,77 +334,21 @@ incmap = {
         'QXmlStreamNotationDeclarations': 'qxmlstream.h',
         'QXmlStreamReader': 'qxmlstream.h',
         'QXmlStreamWriter': 'qxmlstream.h',
-        'QXmlStreamAttribute': 'qxmlstream.h',
-        },
-    'QtDeclarative': {
-        'QDeclarativeListProperty': 'qdeclarativelist.h',
-        },
-    'QtNetwork': {
-        'QNetworkProxyFactory': 'qnetworkproxy.h',
-        'QNetworkProxyQuery': 'qnetworkproxy.h',
-        'QHttpRequestHeader': 'qhttp.h',
-        'QHttpResponseHeader': 'qhttp.h',
-        'QHttpHeader': 'qhttp.h',
-        'QHttpPart': 'qhttpmultipart.h',
-        'QNetworkConfigurationManager': 'qnetworkconfigmanager.h',
-        'QNetworkAddressEntry': 'qnetworkinterface.h',
-        'QNetworkCacheMetaData': 'qabstractnetworkcache.h',
-        },
-    'QtTest': {
-        'QEventSizeOfChecker': 'qtestspontaneevent.h',
-        'QSpontaneKeyEvent': 'qtestspontaneevent.h',
-        'QTestAccessibility': 'qtestaccessible.h',
-        'QTestAccessibilityEvent': 'qtestaccessible.h',
-        'QTestDelayEvent': 'qtestevent.h',
-        'QTestEventList': 'qtestevent.h',
-        'QTestKeyClicksEvent': 'qtestevent.h',
-        'QTestKeyEvent': 'qtestevent.h',
-        'QTestMouseEvent': 'qtestevent.h',
-        'QtTestGui': 'qtest_gui.h',
-        },
-    'QtDesigner': {
-        'QDesignerWidgetBoxInterface': 'abstractwidgetbox.h',
-        'QDesignerPropertyEditorInterface': 'abstractpropertyeditor.h',
-        'QDesignerFormWindowManagerInterface': 'abstractformwindowmanager.h',
-        'QDesignerMetaDataBaseInterface': 'abstractmetadatabase.h',
-        'QDesignerWidgetDataBaseInterface': 'abstractwidgetdatabase.h',
-        'QDesignerWidgetFactoryInterface': 'abstractwidgetfactory.h',
-        'QDesignerObjectInspectorInterface': 'abstractobjectinspector.h',
-        'QDesignerIntegrationInterface': 'abstractintegration.h',
-        'QDesignerFormEditorInterface': 'abstractformeditor.h',
-        'QDesignerPromotionInterface': 'abstractpromotioninterface.h',
-        'QDesignerFormWindowInterface': 'abstractformwindow.h',
-        'QDesignerLayoutDecorationExtension': 'layoutdecoration.h',
-        'QDesignerBrushManagerInterface': 'abstractbrushmanager.h',
-        'QAbstractFormBuilder': 'abstractformbuilder.h',
-        'QDesignerIconCacheInterface': 'abstracticoncache.h',
-        'QDesignerPropertySheetExtension': 'propertysheet.h',
-        'QDesignerContainerExtension': 'container.h',
-        'QDesignerActionEditorInterface': 'abstractactioneditor.h',
-        'QDesignerCustomWidgetInterface': 'customwidget.h',
-        'QDesignerLanguageExtension': 'abstractlanguage.h',
-        'QDesignerResourceBrowserInterface': 'abstractresourcebrowser.h',
-        'QDesignerMemberSheetExtension': 'membersheet.h',
-        'QDesignerTaskMenuExtension': 'taskmenu.h',
-        'QDesignerFormWindowCursorInterface': 'abstractformwindowcursor.h',
-        'QDesignerWidgetDataBaseItemInterface': 'abstractwidgetdatabase.h',
-        'QDesignerCustomWidgetCollectionInterface': 'customwidget.h',
-        'QDesignerDynamicPropertySheetExtension': 'dynamicpropertysheet.h',
-        'QDesignerFormEditorPluginInterface': 'abstractformeditorplugin.h',
-        'QDesignerFormWindowToolInterface': 'abstractformwindowtool.h',
-        'QDesignerExtraInfoExtension': 'extrainfo.h',
-        'QExtensionFactory': 'default_extensionfactory.h',
-        'QDesignerMetaDataBaseItemInterface': 'abstractmetadatabase.h',
-        'QDesignerDnDItemInterface': 'abstractdnditem.h',
-        'QDesignerComponents': 'qdesigner_components.h',
-        },
-    }
+    },
+}
 
 if '--printmap' in sys.argv:
-    for component in sorted(incmap):
+    for component in incmap:
         for key in incmap[component]:
             print('katie_generate_obsolete(%s.h %s %s)' % (key.lower(), component, incmap[component][key]))
     sys.exit(0)
+elif '--sortmap' in sys.argv:
+    for component in sorted(incmap):
+        print("    '%s': {" % component)
+        for key in sorted(incmap[component]):
+            print("        '%s': '%s'," % (key, incmap[component][key]))
+        print("    },")
+    sys.exit(0)
 
 cppfiles = []
 for root, dirs, files in os.walk(os.curdir):
index b129fcb..20df7fc 100755 (executable)
@@ -2,7 +2,7 @@
 
 import sys, os, re
 
-regex = re.compile('(#ifndef (.*)_H\n#define .*$)', re.MULTILINE)
+regex = re.compile('(#ifndef (?:.*)_H\n#define .*$)', re.MULTILINE)
 
 cppfiles = []
 for root, dirs, files in os.walk(os.curdir):
@@ -16,7 +16,7 @@ for cpp in cppfiles:
         cppcontent = f.read()
     if '#pragma once' in cppcontent:
         continue
-    for match, guard in regex.findall(cppcontent):
+    for match in regex.findall(cppcontent):
         with open(cpp, 'w') as f:
             print('adding pragma once to: %s' % cpp)
             cppcontent = cppcontent.replace(match, '#pragma once\n\n%s' % match)