qt -> tqt conversion:

QT_NO_ASCII_CAST -> TQT_NO_ASCII_CAST
QT_NO_STL -> TQT_NO_STL
QT_NO_COMPAT -> TQT_NO_COMPAT
QT_NO_TRANSLATION -> TQT_NO_TRANSLATION

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 6 years ago
parent 7847ebf44e
commit 5514eaadfa
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -641,7 +641,7 @@ def generate_code(mname, imports=None, extra_cflags=None, extra_cxxflags=None, e
# finally, run SIP and generate the C++ code # finally, run SIP and generate the C++ code
os.system (string.join(argv)) os.system (string.join(argv))
# post process the C++ code for QT_NO_TRANSLATION # post process the C++ code for TQT_NO_TRANSLATION
if os.system (string.join ([sys.executable, srcPath("postproc")] + ['-p', mname, "-o", "tr", "*.cpp"])) != 0: if os.system (string.join ([sys.executable, srcPath("postproc")] + ['-p', mname, "-o", "tr", "*.cpp"])) != 0:
sipconfig.error ("Post processing of C++ code failed %s (tr)" % mname) sipconfig.error ("Post processing of C++ code failed %s (tr)" % mname)

@ -323,10 +323,10 @@ one TQt class.</P
In a normal TQt installation, every descendant of TQObject inherits two methods In a normal TQt installation, every descendant of TQObject inherits two methods
(tr (const char *) and tr (const char *, const char *) from TQObject explicitly (tr (const char *) and tr (const char *, const char *) from TQObject explicitly
and also overloads these methods via the moc mechanism (by defining Q_OBJECT and also overloads these methods via the moc mechanism (by defining Q_OBJECT
in the class declaration). KDE however is compiled with -DQT_NO_TRANSLATION, in the class declaration). KDE however is compiled with -DTQT_NO_TRANSLATION,
which prevents moc from creating the overloading tr() methods, and also produces which prevents moc from creating the overloading tr() methods, and also produces
side-effects with a normal TQt installation which was compiled without the side-effects with a normal TQt installation which was compiled without the
-DQT_NO_TRANSLATION switch. -DTQT_NO_TRANSLATION switch.
</P> </P>
<P> <P>
PyKDE handles this situation by NOT providing tr() methods (either the inherited PyKDE handles this situation by NOT providing tr() methods (either the inherited

@ -85,7 +85,7 @@ def getFilelist ():
# --------- operations ---------- # --------- operations ----------
# removes sipDo_<classname>_tr and table reference ('sipName_qt_tr') # removes sipDo_<classname>_tr and table reference ('sipName_qt_tr')
# because KDE2 is compiled with QT_NO_TRANSLATION defined (which also # because KDE2 is compiled with TQT_NO_TRANSLATION defined (which also
# makes TQObject::tr methods invisible to any KDE2 TQObject descendants) # makes TQObject::tr methods invisible to any KDE2 TQObject descendants)
def trFix (filelist): def trFix (filelist):
@ -164,7 +164,7 @@ def qtNoTr (filelist):
tmp.write (buff [i]) tmp.write (buff [i])
i = i + 1 i = i + 1
tmp.write ("#define QT_NO_TRANSLATION\n") tmp.write ("#define TQT_NO_TRANSLATION\n")
while (i < nLines): while (i < nLines):
tmp.write (buff [i]) tmp.write (buff [i])

Loading…
Cancel
Save