diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/coff/xml | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip |
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
Diffstat (limited to 'src/coff/xml')
-rw-r--r-- | src/coff/xml/xml_coff_parser.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/coff/xml/xml_coff_parser.cpp b/src/coff/xml/xml_coff_parser.cpp index b6fa2d8..460df7d 100644 --- a/src/coff/xml/xml_coff_parser.cpp +++ b/src/coff/xml/xml_coff_parser.cpp @@ -24,17 +24,17 @@ public: XmlToData() : ExtXmlToData<Data>("coff", "Coff") {} private: - QMap<uint, bool> _ids; + TQMap<uint, bool> _ids; virtual bool hasFamilies() const { return false; } - virtual void parseData(QDomElement element, Data &data); - virtual void outputData(const Data &data, QTextStream &s) const; - virtual void outputFunctions(QTextStream &s) const; + virtual void parseData(TQDomElement element, Data &data); + virtual void outputData(const Data &data, TQTextStream &s) const; + virtual void outputFunctions(TQTextStream &s) const; virtual void parse(); }; -void Coff::XmlToData::parseData(QDomElement element, Data &data) +void Coff::XmlToData::parseData(TQDomElement element, Data &data) { - QStringList list = QStringList::split(' ', element.attribute("id")); + TQStringList list = TQStringList::split(' ', element.attribute("id")); if ( list.isEmpty() ) qFatal("Missing id"); if ( list.count()>MAX_NB_IDS ) qFatal("Please raise MAX_NB_IDS"); for (uint i=0; i<MAX_NB_IDS; i++) { @@ -42,13 +42,13 @@ void Coff::XmlToData::parseData(QDomElement element, Data &data) bool ok; data.ids[i] = fromHexLabel(list[i], 4, &ok); if ( !ok ) qFatal("Invalid id"); - //if ( _ids.contains(data.ids[i]) ) qFatal("Duplicated id"); + //if ( _ids.tqcontains(data.ids[i]) ) qFatal("Duplicated id"); //_ids[data.ids[i]] = true; } else data.ids[i] = 0; } } -void Coff::XmlToData::outputData(const Data &data, QTextStream &s) const +void Coff::XmlToData::outputData(const Data &data, TQTextStream &s) const { s << "{ "; for (uint i=0; i<MAX_NB_IDS; i++) { @@ -58,16 +58,16 @@ void Coff::XmlToData::outputData(const Data &data, QTextStream &s) const s << "}"; } -void Coff::XmlToData::outputFunctions(QTextStream &s) const +void Coff::XmlToData::outputFunctions(TQTextStream &s) const { ExtXmlToData<Data>::outputFunctions(s); - s << "QString findId(uint id)" << endl; + s << "TQString findId(uint id)" << endl; s << "{" << endl; s << " for (uint i=0; DATA_LIST[i]; i++) {" << endl; s << " for (uint k=0; k<MAX_NB_IDS; k++)" << endl; s << " if ( DATA_LIST[i]->data.ids[k]==id ) return DATA_LIST[i]->name;" << endl; s << " }" << endl; - s << " return QString::null;" << endl; + s << " return TQString();" << endl; s << "}" << endl; } @@ -98,14 +98,14 @@ void Coff::XmlToData::parse() // extract COFF id from gputils for (uint i=0; pics[i].tag!=no_processor; i++) { - _current = QString(pics[i].names[2]).upper(); + _current = TQString(pics[i].names[2]).upper(); if ( !Device::lister().isSupported(_current) ) continue; if ( !hasDevice(_current) ) qDebug(">> add new id %s: %s", _current.latin1(), toHexLabel(pics[i].coff_type, 4).latin1()); else { bool ok = false; for (uint k=0; k<MAX_NB_IDS; k++) if ( _map[_current].data.ids[k]==pics[i].coff_type ) ok = true; - if ( !ok ) qFatal(QString("Different ids")); + if ( !ok ) qFatal(TQString("Different ids")); } } } |