From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdecore/kshell.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'kdecore/kshell.cpp') diff --git a/kdecore/kshell.cpp b/kdecore/kshell.cpp index 5b92b1d5e..f7ab97683 100644 --- a/kdecore/kshell.cpp +++ b/kdecore/kshell.cpp @@ -72,7 +72,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) do { if (pos >= args.length()) goto okret; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; } while (c.isSpace()); TQString cret; if ((flags & TildeExpand) && c == (QChar)'~') { @@ -80,7 +80,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) for (; ; pos++) { if (pos >= args.length()) break; - c = args.unicode()[pos]; + c = args.tqunicode()[pos]; if (c == (QChar)'/' || c.isSpace()) break; if (isQuoteMeta( c )) { @@ -91,7 +91,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) if ((flags & AbortOnMeta) && isMeta( c )) goto metaerr; } - TQString ccret = homeDir( TQConstString( args.unicode() + opos, pos - opos ).string() ); + TQString ccret = homeDir( TQConstString( args.tqunicode() + opos, pos - opos ).string() ); if (ccret.isEmpty()) { pos = opos; c = (QChar)'~'; @@ -129,20 +129,20 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) do { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; } while (c != (QChar)'\''); - cret += TQConstString( args.unicode() + spos, pos - spos - 1 ).string(); + cret += TQConstString( args.tqunicode() + spos, pos - spos - 1 ).string(); } else if (c == (QChar)'"') { for (;;) { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; if (c == (QChar)'"') break; if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; if (c != (QChar)'"' && c != (QChar)'\\' && !((flags & AbortOnMeta) && (c == (QChar)'$' || c == (QChar)'`'))) cret += (QChar)'\\'; @@ -155,13 +155,13 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) for (;;) { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; if (c == (QChar)'\'') break; if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; switch (c) { case 'a': cret += (QChar)'\a'; break; case 'b': cret += (QChar)'\b'; break; @@ -212,7 +212,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; if (!c.isSpace() && !((flags & AbortOnMeta) ? isMeta( c ) : isQuoteMeta( c ))) cret += '\\'; @@ -222,7 +222,7 @@ TQStringList KShell::splitArgs( const TQString &args, int flags, int *err ) } if (pos >= args.length()) break; - c = args.unicode()[pos++]; + c = args.tqunicode()[pos++]; } while (!c.isSpace()); ret += cret; firstword = false; @@ -265,9 +265,9 @@ TQString KShell::joinArgs( const TQStringList &args ) ret.append( q ).append( q ); else { for (uint i = 0; i < (*it).length(); i++) - if (isSpecial((*it).unicode()[i])) { + if (isSpecial((*it).tqunicode()[i])) { TQString tmp(*it); - tmp.replace( q, "'\\''" ); + tmp.tqreplace( q, "'\\''" ); ret += q; tmp += q; ret += tmp; @@ -294,8 +294,8 @@ TQString KShell::joinArgs( const char * const *args, int nargs ) else { TQString tmp( TQFile::decodeName( *argp ) ); for (uint i = 0; i < tmp.length(); i++) - if (isSpecial(tmp.unicode()[i])) { - tmp.replace( q, "'\\''" ); + if (isSpecial(tmp.tqunicode()[i])) { + tmp.tqreplace( q, "'\\''" ); ret += q; tmp += q; ret += tmp; @@ -319,10 +319,10 @@ TQString KShell::joinArgsDQ( const TQStringList &args ) ret.append( q ).append( q ); else { for (uint i = 0; i < (*it).length(); i++) - if (isSpecial((*it).unicode()[i])) { + if (isSpecial((*it).tqunicode()[i])) { ret.append( '$' ).append( q ); for (uint pos = 0; pos < (*it).length(); pos++) { - int c = (*it).unicode()[pos]; + int c = (*it).tqunicode()[pos]; if (c < 32) { ret += bs; switch (c) { @@ -355,12 +355,12 @@ TQString KShell::joinArgsDQ( const TQStringList &args ) TQString KShell::tildeExpand( const TQString &fname ) { if (fname[0] == (QChar)'~') { - int pos = fname.find( '/' ); + int pos = fname.tqfind( '/' ); if (pos < 0) - return homeDir( TQConstString( fname.unicode() + 1, fname.length() - 1 ).string() ); - TQString ret = homeDir( TQConstString( fname.unicode() + 1, pos - 1 ).string() ); + return homeDir( TQConstString( fname.tqunicode() + 1, fname.length() - 1 ).string() ); + TQString ret = homeDir( TQConstString( fname.tqunicode() + 1, pos - 1 ).string() ); if (!ret.isNull()) - ret += TQConstString( fname.unicode() + pos, fname.length() - pos ).string(); + ret += TQConstString( fname.tqunicode() + pos, fname.length() - pos ).string(); return ret; } return fname; -- cgit v1.2.1