From 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 00:15:53 +0000 Subject: TQt4 port piklab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/data/syntax_xml_generator.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/data/syntax_xml_generator.cpp') diff --git a/src/data/syntax_xml_generator.cpp b/src/data/syntax_xml_generator.cpp index 9f3553e..d1d44b5 100644 --- a/src/data/syntax_xml_generator.cpp +++ b/src/data/syntax_xml_generator.cpp @@ -10,8 +10,8 @@ // this program generate xml files for kate highlighting // the original syntax file was created by Alain Gibaud -#include -#include +#include +#include const char * const DIRECTIVES[] = { "__badram", "__config", "__idlocs", "__maxram", @@ -58,28 +58,28 @@ const char * const INSTRUCTIONS[] = { "tris", "tblrd", "tblwt", "xorlw", "xorwf", 0 }; -QTextStream *initFile(QFile &file) +TQTextStream *initFile(TQFile &file) { if ( !file.open(IO_WriteOnly) ) qFatal("Cannot create \"%s\".", file.name().latin1()); - QTextStream *s = new QTextStream(&file); + TQTextStream *s = new TQTextStream(&file); (*s) << "" << endl; (*s) << "" << endl; (*s) << "" << endl; return s; } -void addList(QTextStream &s, const QString &name, const char * const *items, bool upper) +void addList(TQTextStream &s, const TQString &name, const char * const *items, bool upper) { s << " " << endl; for (uint i=0; items[i]; i++) { s << " " << items[i] << ""; - if (upper) s << "" << QString(items[i]).upper() << ""; + if (upper) s << "" << TQString(items[i]).upper() << ""; s << endl; }; s <<" " << endl; } -void addCommon(QTextStream &s) +void addCommon(TQTextStream &s) { addList(s, "instructions", INSTRUCTIONS, true); s << endl; @@ -106,7 +106,7 @@ void addCommon(QTextStream &s) s << " " << endl; } -void addAsmContexts(QTextStream &s) +void addAsmContexts(TQTextStream &s) { s << " " << endl; s << " " << endl; @@ -161,7 +161,7 @@ void addAsmContexts(QTextStream &s) s << " " << endl; } -void endFile(QTextStream &s) +void endFile(TQTextStream &s) { s << " " << endl; s << "" << endl; @@ -178,8 +178,8 @@ void endFile(QTextStream &s) int main(int, char **) { - QFile afile("asm-pic.xml"); - QTextStream *s = initFile(afile); + TQFile afile("asm-pic.xml"); + TQTextStream *s = initFile(afile); (*s) << "" << endl; @@ -194,7 +194,7 @@ int main(int, char **) addAsmContexts(*s); endFile(*s); - QFile cfile("coff-pic.xml"); + TQFile cfile("coff-pic.xml"); s = initFile(cfile); (*s) << "" << endl; (*s) << endl; -- cgit v1.2.1