diff options
Diffstat (limited to 'postproc')
-rwxr-xr-x | postproc | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -7,7 +7,7 @@ import sys, getopt, os, os.path, fnmatch, string, StringIO FALSE = 0 TRUE = not FALSE -ops = ['tr', 'qtNoTr', 'shpix', 'notify', 'varhier', 'appQuit', "kjsfix", "fixQVariant", "fixSignal"] +ops = ['tr', 'qtNoTr', 'shpix', 'notify', 'varhier', 'appQuit', "kjsfix", "fixTQVariant", "fixSignal"] operation = '' opPath = '' pattern = '' @@ -86,7 +86,7 @@ def getFilelist (): # removes sipDo_<classname>_tr and table reference ('sipName_qt_tr') # because KDE2 is compiled with QT_NO_TRANSLATION defined (which also -# makes QObject::tr methods invisible to any KDE2 QObject descendants) +# makes TQObject::tr methods invisible to any KDE2 TQObject descendants) def trFix (filelist): for fn in filelist: @@ -179,8 +179,8 @@ def qtNoTr (filelist): return TRUE -# changes QPaintDevice to KPixmap for two method calls -# gcc reports QPaintDevice as "ambiguous" +# changes TQPaintDevice to KPixmap for two method calls +# gcc reports TQPaintDevice as "ambiguous" def shpix (): # if concatenated, the sip*.cpp file doesn't exist @@ -219,9 +219,9 @@ def shpix (): ln = ln + 1 line = buff [ln] if state == "res": - buff [ln] = string.replace (line, "QPaintDevice::resolution", "KPixmap::resolution") + buff [ln] = string.replace (line, "TQPaintDevice::resolution", "KPixmap::resolution") elif state == "setRes": - buff [ln] = string.replace (line, "QPaintDevice::setResolution", "KPixmap::setResolution") + buff [ln] = string.replace (line, "TQPaintDevice::setResolution", "KPixmap::setResolution") tmpfile = open (os.path.join (opPath, tmpname), 'w') for line in buff: @@ -247,7 +247,7 @@ def notify (): if string.find (line, "class KNotify:") >= 0: flag = 1 - elif flag == 1 and string.find (line, "class KNotifyWidgetBase(QWidget):") >= 0: + elif flag == 1 and string.find (line, "class KNotifyWidgetBase(TQWidget):") >= 0: flag = 2 elif flag == 2 and string.find (line, "class KNotifyWidget(KNotifyWidgetBase):") >= 0: @@ -324,7 +324,7 @@ def appQuit (filelist): tmp.write (buff [i]) i = i + 1 - tmp.write (buff [i] + "\nfrom qt import QCloseEvent") + tmp.write (buff [i] + "\nfrom qt import TQCloseEvent") i = i + 1 while (i < nLines) and (string.find (buff [i], "class KApplication") < 0): @@ -344,7 +344,7 @@ def appQuit (filelist): tmp.write (\ """\tdef quit (self): \t\tk = KApplication.kApplication () -\t\te = QCloseEvent () +\t\te = TQCloseEvent () \t\tfor w in k.topLevelWidgets (): \t\t\tif w.inherits ("KMainWindow"): @@ -352,7 +352,7 @@ def appQuit (filelist): \t\t\t\tif not e.isAccepted (): \t\t\t\t\treturn -\t\tQApplication.quit (self) +\t\tTQApplication.quit (self) """) while (i < nLines): @@ -368,7 +368,7 @@ def appQuit (filelist): return True -def fixQVariant (): +def fixTQVariant (): infile = os.path.join (opPath, "siptdecorecmodule.cpp") if not os.path.exists (infile): infile = os.path.join (opPath, "siptdecorepart0.cpp") @@ -381,7 +381,7 @@ def fixQVariant (): for line in m: if looking and line.find ("sipAPItdecore.h") > 0: n.write (line) - n.write ('\n#include "sipqtQVariant.h"\n\n') + n.write ('\n#include "sipqtTQVariant.h"\n\n') looking = False continue @@ -507,9 +507,9 @@ elif operation == "kjsfix": print "operation error -- kjsfix" sys.exit (-1) -elif operation == "fixQVariant": - """if not fixQVariant (): - print "operation error -- fixQVariant" +elif operation == "fixTQVariant": + """if not fixTQVariant (): + print "operation error -- fixTQVariant" sys.exit (-1)""" elif operation == "fixSignal": |