From f7e71d47719ab6094cf4a9fafffa5ea351973522 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 13 Jan 2011 08:32:36 +0000 Subject: Initial conversion for TQt for Qt4 3.4.0 TP2 This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdecore/kmacroexpander.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'kdecore/kmacroexpander.cpp') diff --git a/kdecore/kmacroexpander.cpp b/kdecore/kmacroexpander.cpp index 5516c1b61..89eb5c72f 100644 --- a/kdecore/kmacroexpander.cpp +++ b/kdecore/kmacroexpander.cpp @@ -40,7 +40,7 @@ KMacroExpanderBase::setEscapeChar( TQChar c ) escapechar = c; } -QChar +TQChar KMacroExpanderBase::escapeChar() const { return escapechar; @@ -56,7 +56,7 @@ void KMacroExpanderBase::expandMacros( TQString &str ) for (pos = 0; pos < str.length(); ) { if (ec != (QChar)0) { - if (str.unicode()[pos] != ec) + if (str.tqunicode()[pos] != ec) goto nohit; if (!(len = expandEscapedMacro( str, pos, rst ))) goto nohit; @@ -109,7 +109,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos ) TQString rsts; while (pos < str.length()) { - TQChar cc( str.unicode()[pos] ); + TQChar cc( str.tqunicode()[pos] ); if (ec != (QChar)0) { if (cc != ec) goto nohit; @@ -205,7 +205,7 @@ bool KMacroExpanderBase::expandMacrosShellQuote( TQString &str, uint &pos ) pos = pos2; return false; } - cc = str.unicode()[pos2]; + cc = str.tqunicode()[pos2]; if (cc == (QChar)'`') break; if (cc == (QChar)'\\') { @@ -339,7 +339,7 @@ template int KMacroMapExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - TQMapConstIterator it = macromap.find(str[pos]); + TQMapConstIterator it = macromap.tqfind(str[pos]); if (it != macromap.end()) { ret += it.data(); return 1; @@ -355,7 +355,7 @@ KMacroMapExpander::expandEscapedMacro( const TQString &str, uint pos, ret += TQString( escapeChar() ); return 2; } - TQMapConstIterator it = macromap.find(str[pos+1]); + TQMapConstIterator it = macromap.tqfind(str[pos+1]); if (it != macromap.end()) { ret += it.data(); return 2; @@ -383,14 +383,14 @@ template int KMacroMapExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - if (isIdentifier( str[pos - 1].unicode() )) + if (isIdentifier( str[pos - 1].tqunicode() )) return 0; uint sl; - for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++); + for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); if (!sl) return 0; TQMapConstIterator it = - macromap.find( TQConstString( str.unicode() + pos, sl ).string() ); + macromap.tqfind( TQConstString( str.tqunicode() + pos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return sl; @@ -415,13 +415,13 @@ KMacroMapExpander::expandEscapedMacro( const TQString &str, uint po rsl = sl + 3; } else { rpos = pos + 1; - for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++); + for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++); rsl = sl + 1; } if (!sl) return 0; TQMapConstIterator it = - macromap.find( TQConstString( str.unicode() + rpos, sl ).string() ); + macromap.tqfind( TQConstString( str.tqunicode() + rpos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return rsl; @@ -454,13 +454,13 @@ KCharMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL int KWordMacroExpander::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - if (isIdentifier( str[pos - 1].unicode() )) + if (isIdentifier( str[pos - 1].tqunicode() )) return 0; uint sl; - for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++); + for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); if (!sl) return 0; - if (expandMacro( TQConstString( str.unicode() + pos, sl ).string(), ret )) + if (expandMacro( TQConstString( str.tqunicode() + pos, sl ).string(), ret )) return sl; return 0; } @@ -481,12 +481,12 @@ KWordMacroExpander::expandEscapedMacro( const TQString &str, uint pos, TQStringL rsl = sl + 3; } else { rpos = pos + 1; - for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++); + for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++); rsl = sl + 1; } if (!sl) return 0; - if (expandMacro( TQConstString( str.unicode() + rpos, sl ).string(), ret )) + if (expandMacro( TQConstString( str.tqunicode() + rpos, sl ).string(), ret )) return rsl; return 0; } @@ -510,7 +510,7 @@ TexpandMacrosShellQuote( const TQString &ostr, const TQMap &map, TQChar c TQString str( ostr ); KMacroMapExpander kmx( map, c ); if (!kmx.expandMacrosShellQuote( str )) - return TQString::null; + return TQString(); return str; } -- cgit v1.2.1