summaryrefslogtreecommitdiffstats
path: root/ktouch/src/ktouchstatisticsdata.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /ktouch/src/ktouchstatisticsdata.cpp
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
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
Diffstat (limited to 'ktouch/src/ktouchstatisticsdata.cpp')
-rw-r--r--ktouch/src/ktouchstatisticsdata.cpp36
1 files changed, 18 insertions, 18 deletions
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<KTouchCharStats>::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<KTouchCharStats&>(*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<KTouchCharStats&>(*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<unsigned int>::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<KTouchCharStats>::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<KTouchCharStats&>(*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<KTouchCharStats&>(*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 );