summaryrefslogtreecommitdiffstats
path: root/kiten/dict.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 /kiten/dict.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 'kiten/dict.cpp')
-rw-r--r--kiten/dict.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/kiten/dict.cpp b/kiten/dict.cpp
index 23da1a9e..7d01fbd2 100644
--- a/kiten/dict.cpp
+++ b/kiten/dict.cpp
@@ -37,11 +37,11 @@
namespace
{
-void msgerr(const TQString &msg, const TQString &dict = TQString::null)
+void msgerr(const TQString &msg, const TQString &dict = TQString())
{
TQString output = msg;
if (!dict.isNull())
- output = msg.arg(dict);
+ output = msg.tqarg(dict);
KMessageBox::error(0, output);
}
}
@@ -50,7 +50,7 @@ using namespace Dict;
TextType Dict::textType(const TQString &text)
{
- ushort first = text.at(0).unicode();
+ ushort first = text.tqat(0).tqunicode();
if (first < 0x3000)
return Text_Latin;
@@ -198,7 +198,7 @@ TQCString File::lookup(unsigned i)
// get the whole word
while(pos <= size && dictPtr[pos] != 0 && dictPtr[pos] != 0x0a)
++pos;
- // put the word in the QCString
+ // put the word in the TQCString
TQCString retval((const char *)(dictPtr + start), pos - start);
// tack on a null
char null = 0;
@@ -342,7 +342,7 @@ SearchResult Index::scanResults(TQRegExp regexp, TQStringList results, bool comm
if (found >= 0)
{
++fullNum;
- if ((*itr).find(TQString("(P)")) >= 0 || !common)
+ if ((*itr).tqfind(TQString("(P)")) >= 0 || !common)
{
// we append HERE, so we get the exact
// results we have in ret.list
@@ -398,7 +398,7 @@ SearchResult Index::scanKanjiResults(TQRegExp regexp, TQStringList results, bool
++fullNum;
// common entries have G[1-8] (jouyou)
TQRegExp comregexp(jmyCount ? "G[1-9]" : "G[1-8]");
- if ((*itr).find(comregexp) >= 0 || !common)
+ if ((*itr).tqfind(comregexp) >= 0 || !common)
{
ret.list.append(kanjiParse(*itr));
++num;
@@ -487,7 +487,7 @@ TQRegExp Dict::Index::createRegExp(SearchType type, const TQString &text, Dictio
regExp = "%1";
}
- return TQRegExp(regExp.arg(text), caseSensitive);
+ return TQRegExp(regExp.tqarg(text), caseSensitive);
}
int Index::stringCompare(File &file, int index, TQCString str)
@@ -769,8 +769,8 @@ TQString Dict::firstEntryText(Dict::SearchResult result)
///////////////////////////////////////////////////////////////
Entry::Entry(const TQString & kanji, const TQString & reading, const TQStringList &meanings)
- : DictName(TQString::fromLatin1("__NOTSET"))
- , Header(TQString::fromLatin1("__NOTSET"))
+ : DictName(TQString::tqfromLatin1("__NOTSET"))
+ , Header(TQString::tqfromLatin1("__NOTSET"))
, Meanings(meanings)
, Kanji(kanji)
, KanaOnly(reading.isEmpty())
@@ -784,8 +784,8 @@ Entry::Entry(const TQString & kanji, const TQString & reading, const TQStringLis
}
Entry::Entry(const TQString &kanji, TQStringList &readings, TQStringList &meanings, unsigned int grade, unsigned int freq, unsigned int strokes, unsigned int miscount)
- : DictName(TQString::fromLatin1("__NOTSET"))
- , Header(TQString::fromLatin1("__NOTSET"))
+ : DictName(TQString::tqfromLatin1("__NOTSET"))
+ , Header(TQString::tqfromLatin1("__NOTSET"))
, Meanings(meanings)
, Kanji(kanji)
, KanaOnly(false)
@@ -806,7 +806,7 @@ Entry::Entry(const TQString &dictname)
}
Entry::Entry(const TQString &headername, bool)
- : DictName(TQString::fromLatin1("__NOTSET"))
+ : DictName(TQString::tqfromLatin1("__NOTSET"))
, Header(headername)
, KanaOnly(true)
, ExtendedKanjiInfo(false)