From a374efce3a207b39514be3c52264091400ce297e Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:44:41 +0000 Subject: TQt4 port kdeedu This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ktouch/src/ktouchstatisticsdata.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'ktouch/src/ktouchstatisticsdata.cpp') diff --git a/ktouch/src/ktouchstatisticsdata.cpp b/ktouch/src/ktouchstatisticsdata.cpp index 08fdff35..b58802fd 100644 --- a/ktouch/src/ktouchstatisticsdata.cpp +++ b/ktouch/src/ktouchstatisticsdata.cpp @@ -41,7 +41,7 @@ int KTouchCharStats::missHitRatio() const { // ---------------------------------------------------------------------------- TQTextStream& operator<<(TQTextStream &out, const KTouchCharStats &ch) { - return (out << ch.m_char.unicode() << " " << ch.m_correctCount << " " << ch.m_wrongCount); + return (out << ch.m_char.tqunicode() << " " << ch.m_correctCount << " " << ch.m_wrongCount); } // ---------------------------------------------------------------------------- @@ -98,7 +98,7 @@ bool KTouchLevelStats::read(TQDomNode in) { n = in.namedItem("Time"); if (!n.isNull()) { TQString timestring = n.firstChild().nodeValue(); - if (timestring != TQString::null) + if (timestring != TQString()) m_timeRecorded = TQDateTime::fromString(timestring, Qt::ISODate); } // read characters @@ -135,10 +135,10 @@ void KTouchLevelStats::write(TQDomDocument& doc, TQDomElement& root) const { level.appendChild(e); // add char stats TQString char_data; - // we append for each missed char the char-unicode and the counters + // we append for each missed char the char-tqunicode and the counters for (std::set::const_iterator it=m_charStats.begin(); it!=m_charStats.end(); ++it) - char_data += TQString(" %1 %2 %3").arg(it->m_char.unicode()) - .arg(it->m_correctCount).arg(it->m_wrongCount); + char_data += TQString(" %1 %2 %3").tqarg(it->m_char.tqunicode()) + .tqarg(it->m_correctCount).tqarg(it->m_wrongCount); e = doc.createElement("CharStats"); tn = doc.createTextNode(char_data); e.appendChild(tn); @@ -157,7 +157,7 @@ void KTouchLevelStats::addCorrectChar(TQChar key) { else ++(const_cast(*it).m_correctCount); // this const_cast is necessary because the current gcc 3.2 has a bug in the - // implementation of set::find(). The non-const overload is missing and find() always + // implementation of set::tqfind(). The non-const overload is missing and tqfind() always // returns a const object. Maybe in the next release this will be fixed. Until then // the const_cast helps. } @@ -179,7 +179,7 @@ void KTouchLevelStats::addWrongChar(TQChar key) { else ++(const_cast(*it).m_wrongCount); // this const_cast is necessary because the current gcc 3.2 has a bug in the - // implementation of set::find(). The non-const overload is missing and find() always + // implementation of set::tqfind(). The non-const overload is missing and tqfind() always // returns a const object. Maybe in the next release this will be fixed. Until then // the const_cast helps. } @@ -244,7 +244,7 @@ bool KTouchSessionStats::read(TQDomNode in) { n = in.namedItem("Time"); if (!n.isNull()) { TQString timestring = n.firstChild().nodeValue(); - if (timestring != TQString::null) + if (timestring != TQString()) m_timeRecorded = TQDateTime::fromString(timestring, Qt::ISODate); } // read level numbers @@ -295,17 +295,17 @@ void KTouchSessionStats::write(TQDomDocument& doc, TQDomElement& root) const { // add levels TQString level_nums; for (std::set::const_iterator it = m_levelNums.begin(); it != m_levelNums.end(); ++it) - level_nums += TQString( " %1").arg(*it); + level_nums += TQString( " %1").tqarg(*it); e = doc.createElement("LevelNums"); tn = doc.createTextNode(level_nums); e.appendChild(tn); session.appendChild(e); // add char data TQString char_data; - // we append for each missed char the char-unicode and the counters + // we append for each missed char the char-tqunicode and the counters for (std::set::const_iterator it=m_charStats.begin(); it!=m_charStats.end(); ++it) - char_data += TQString(" %1 %2 %3").arg(it->m_char.unicode()) - .arg(it->m_correctCount).arg(it->m_wrongCount); + char_data += TQString(" %1 %2 %3").tqarg(it->m_char.tqunicode()) + .tqarg(it->m_correctCount).tqarg(it->m_wrongCount); e = doc.createElement("CharStats"); tn = doc.createTextNode(char_data); e.appendChild(tn); @@ -324,7 +324,7 @@ void KTouchSessionStats::addCorrectChar(TQChar key) { else ++(const_cast(*it).m_correctCount); // this const_cast is necessary because the current gcc 3.2 has a bug in the - // implementation of set::find(). The non-const overload is missing and find() always + // implementation of set::tqfind(). The non-const overload is missing and tqfind() always // returns a const object. Maybe in the next release this will be fixed. Until then // the const_cast helps. } @@ -346,7 +346,7 @@ void KTouchSessionStats::addWrongChar(TQChar key) { else ++(const_cast(*it).m_wrongCount); // this const_cast is necessary because the current gcc 3.2 has a bug in the - // implementation of set::find(). The non-const overload is missing and find() always + // implementation of set::tqfind(). The non-const overload is missing and tqfind() always // returns a const object. Maybe in the next release this will be fixed. Until then // the const_cast helps. } @@ -357,8 +357,8 @@ void KTouchSessionStats::addWrongChar(TQChar key) { // *** KTouchLectureStats *** void KTouchLectureStats::clear() { - m_lectureTitle = TQString::null; - m_lectureURL = TQString::null; + m_lectureTitle = TQString(); + m_lectureURL = TQString(); m_levelStats.clear(); m_sessionStats.clear(); } @@ -464,7 +464,7 @@ bool KTouchStatisticsData::read(TQWidget * window, const KURL& url) { #ifdef COMPRESSED_XML_STATISTICS TQByteArray array; array = infile.readAll(); - array = qUncompress(array); + array = tqUncompress(array); doc.setContent( array ); #else doc.setContent( &infile ); @@ -503,7 +503,7 @@ bool KTouchStatisticsData::write(TQWidget * window, const KURL& url) const { TQByteArray array; TQTextStream out(array, IO_WriteOnly); out << doc.toString(); - array = qCompress(array); + array = tqCompress(array); outfile.writeBlock(array); #else TQTextStream out( &outfile ); -- cgit v1.2.1