#!/bin/bash

#find ./ -type f -iname "*.c*" -exec sed -i 's/Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzDE]\)/TQ\1\2\3/g' {} \;
#find ./ -type f -iname "*.h*" -exec sed -i 's/Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzDE]\)/TQ\1\2\3/g' {} \;

find ./ -type f -iname "*.c*" -exec sed -i 's/Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/TQ\1\2/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/TQ\1\2/g' {} \;

find ./ -type f -iname "*.c*" -exec sed -i 's/Qt/TQt/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/Qt/TQt/g' {} \;

find ./ -type f -iname "*.h*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TTQ/TQ/g' {} \;

find ./ -type f -iname "*.c*" -exec sed -i 's/\([^_]\)METHOD\([( ]\)/\1TQT_METHOD\2/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/\([^_]\)METHOD\([( ]\)/\1TQT_METHOD\2/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/\([^_]\)SLOT\([( ]\)/\1TQT_SLOT\2/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/\([^_]\)SLOT\([( ]\)/\1TQT_SLOT\2/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/\([^_]\)SIGNAL\([( ]\)/\1TQT_SIGNAL\2/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/\([^_]\)SIGNAL\([( ]\)/\1TQT_SIGNAL\2/g' {} \;

find ./ -type f -iname "*.h*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;

find ./ -type f -iname "*.c*" -exec sed -i 's/qRound/tqRound/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qRound/tqRound/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qstrlen/tqstrlen/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qstrlen/tqstrlen/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qstrncmp/tqstrncmp/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qstrncmp/tqstrncmp/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qUncompress/tqUncompress/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qUncompress/tqUncompress/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qCopy/tqCopy/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qCopy/tqCopy/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qEqual/tqEqual/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qEqual/tqEqual/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qFill/tqFill/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qFill/tqFill/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qFind/tqFind/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qFind/tqFind/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qCount/tqCount/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qCount/tqCount/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qSwap/tqSwap/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qSwap/tqSwap/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qSystemWarning/tqSystemWarning/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qSystemWarning/tqSystemWarning/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/qSuppressObsoleteWarnings/tqSuppressObsoleteWarnings/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/qSuppressObsoleteWarnings/tqSuppressObsoleteWarnings/g' {} \;

find ./ -type f -iname "*" -exec sed -i 's/moc/tqmoc/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/tqtqmoc/tqmoc/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/tqtqmoc/tqmoc/g' {} \;

find ./ -type f -iname "*" -exec sed -i 's/MOC/TQMOC/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQTQMOC/TQMOC/g' {} \;

find ./ -type f -iname "*" -exec sed -i 's/RGB_MASK/TQRGB_MASK/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQTQRGB_MASK/TQRGB_MASK/g' {} \;

find ./ -type f -iname "*" -exec sed -i 's/qRed/tqRed/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qGreen/tqGreen/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qBlue/tqBlue/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qAlpha/tqAlpha/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qRgb/tqRgb/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qRgba/tqRgba/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qGray/tqGray/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qCompress/tqCompress/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qInstallMsgHandler/tqInstallMsgHandler/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/parentWidget/tqparentWidget/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/childAt/tqchildAt/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qAppName/tqAppName/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/qApp/tqApp/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/ttq/tq/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/ttq/tq/g' {} \;

find ./ -type f -iname "*" -exec sed -i 's/CursorShape/tqCursorShape/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/shape/tqshape/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/Status/tqStatus/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/metaObject/tqmetaObject/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/find/tqfind/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/children/tqchildren/g' {} \;
#find ./ -type f -iname "*" -exec sed -i 's/setObjectName/tqsetObjectName/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/topLevelWidget/tqtopLevelWidget/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/parent/tqparent/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/mask/tqmask/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/focusWidget/tqfocusWidget/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/contains/tqcontains/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/unicode/tqunicode/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/replace/tqreplace/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/signals/tqsignals/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/slots/tqslots/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/worldMatrix/tqworldMatrix/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/sizeHint/tqsizeHint/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/minimumSize/tqminimumSize/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/maximumSize/tqmaximumSize/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/geometry/tqgeometry/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/spacerItem/tqspacerItem/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/layout/tqlayout/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/setAlignment/tqsetAlignment/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/invalidate/tqinvalidate/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/alignment/tqalignment/g' {} \;
#find ./ -type f -iname "*" -exec sed -i 's/device/tqdevice/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/fromLatin1/tqfromLatin1/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/receivers/tqreceivers/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/encodedData/tqencodedData/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/currentDate/tqcurrentDate/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/styleHint/tqstyleHint/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/itemRect/tqitemRect/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/visualRect/tqvisualRect/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/drawControl/tqdrawControl/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/setSizePolicy/tqsetSizePolicy/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/pixelMetric/tqpixelMetric/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/drawComplexControl/tqdrawComplexControl/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/repaint/tqrepaint/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/colorGroup/tqcolorGroup/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/drawTextItem/tqdrawTextItem/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/setLibraryPaths/tqsetLibraryPaths/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/tqtq/tq/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/tqtq/tq/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/retqparent/reparent/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/tqshape.h/shape.h/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/XIMtqStatus/XIMStatus/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/xtqshape.test/xshape.test/g' {} \;

find ./ -type f -iname "*" -exec sed -i 's/::mapper/::wmapper()/g' {} \;

find ./ -type f -iname "*" -exec sed -i 's/TQImage::ScaleFree/TQ_ScaleFree/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQImage::ScaleMin/TQ_ScaleMin/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQImage::ScaleMax/TQ_ScaleMax/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQWidget::StrongFocus/TQ_StrongFocus/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQWidget::NoFocus/TQ_NoFocus/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQWidget::WheelFocus/TQ_WheelFocus/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQWidget::ClickFocus/TQ_ClickFocus/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQWidget::TabFocus/TQ_TabFocus/g' {} \;

find ./ -type f -iname "*" -exec sed -i 's/tqslots/Q_SLOTS/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/tqsignals/Q_SIGNALS/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/Q_SIGNALSlotimp\.h/tqsignalslotimp\.h/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQ_SLOTS/Q_SLOTS/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQ_SIGNALS/Q_SIGNALS/g' {} \;

find ./ -type f -iname "*.c*" -exec sed -i 's/Q_/TQ_/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/Q_/TQ_/g' {} \;
