diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:22:15 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:22:15 -0600 |
commit | 1180237ab336226ad932d767a6cb56208314988f (patch) | |
tree | 0a29b4d5d237f445dc87cb65b00d604ad4aa686d /tdecore | |
parent | a51cd9949c4e6c726a84a61de3cfadd30cefb5c7 (diff) | |
download | tdelibs-1180237ab336226ad932d767a6cb56208314988f.tar.gz tdelibs-1180237ab336226ad932d767a6cb56208314988f.zip |
Rename obsolete tq methods to standard names
Diffstat (limited to 'tdecore')
-rw-r--r-- | tdecore/kcalendarsystemhebrew.cpp | 8 | ||||
-rw-r--r-- | tdecore/kcharsets.cpp | 16 | ||||
-rw-r--r-- | tdecore/kclipboard.cpp | 8 | ||||
-rw-r--r-- | tdecore/kcompletion.h | 2 | ||||
-rw-r--r-- | tdecore/kconfig_compiler/kconfig_compiler.cpp | 2 | ||||
-rw-r--r-- | tdecore/kdebug.cpp | 2 | ||||
-rw-r--r-- | tdecore/kkeyserver_x11.cpp | 14 | ||||
-rw-r--r-- | tdecore/klibloader.cpp | 14 | ||||
-rw-r--r-- | tdecore/klocale.cpp | 10 | ||||
-rw-r--r-- | tdecore/kmacroexpander.cpp | 26 | ||||
-rw-r--r-- | tdecore/kprocio.h | 2 | ||||
-rw-r--r-- | tdecore/kregexp.h | 4 | ||||
-rw-r--r-- | tdecore/kshell.cpp | 36 | ||||
-rw-r--r-- | tdecore/kstringhandler.cpp | 14 | ||||
-rw-r--r-- | tdecore/ksycoca.cpp | 2 | ||||
-rw-r--r-- | tdecore/ksycocadict.cpp | 2 | ||||
-rw-r--r-- | tdecore/kurl.cpp | 14 | ||||
-rw-r--r-- | tdecore/kurl.h | 6 | ||||
-rw-r--r-- | tdecore/kurldrag.h | 2 | ||||
-rw-r--r-- | tdecore/network/kresolver.cpp | 20 | ||||
-rw-r--r-- | tdecore/network/kresolver.h | 4 |
21 files changed, 104 insertions, 104 deletions
diff --git a/tdecore/kcalendarsystemhebrew.cpp b/tdecore/kcalendarsystemhebrew.cpp index 9c04942a5..2824445bb 100644 --- a/tdecore/kcalendarsystemhebrew.cpp +++ b/tdecore/kcalendarsystemhebrew.cpp @@ -684,9 +684,9 @@ static int heb2num(const TQString& str, int & iLength) { { if (s.length() > pos && s[pos + 1] >= TQChar(0x05D0) && s[pos + 1] <= TQChar(0x05EA)) - result += (c.tqunicode() - 0x05D0 + 1) * 1000; + result += (c.unicode() - 0x05D0 + 1) * 1000; else - result += c.tqunicode() - 0x05D0 + 1; + result += c.unicode() - 0x05D0 + 1; } else if (c == TQChar(0x05D8)) { @@ -702,11 +702,11 @@ static int heb2num(const TQString& str, int & iLength) { if (s.length() > pos && s[pos + 1] >= TQChar(0x05D9)) return -1; else - result += decadeValues[c.tqunicode() - 0x05D9]; + result += decadeValues[c.unicode() - 0x05D9]; } else if (c >= TQChar(0x05E7) && c <= TQChar(0x05EA)) { - result += (c.tqunicode() - 0x05E7 + 1) * 100; + result += (c.unicode() - 0x05E7 + 1) * 100; } else { diff --git a/tdecore/kcharsets.cpp b/tdecore/kcharsets.cpp index 491eeb64c..52cf87849 100644 --- a/tdecore/kcharsets.cpp +++ b/tdecore/kcharsets.cpp @@ -202,7 +202,7 @@ static struct Builtin { "ascii", "iso 8859-1" }, { "x-utf-8", "utf-8" }, { "x-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt - { "tqunicode-1-1-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt + { "unicode-1-1-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt { "utf-16", "iso-10646-ucs-2" }, { "utf16", "iso-10646-ucs-2" }, { "ucs2", "iso-10646-ucs-2" }, @@ -381,11 +381,11 @@ TQChar KCharsets::fromEntity(const TQString &str) if (str[pos] == (QChar)'x' || str[pos] == (QChar)'X') { pos++; // '�', hexadeciaml character reference - TQString tmp(str.tqunicode()+pos, str.length()-pos); + TQString tmp(str.unicode()+pos, str.length()-pos); res = tmp.toInt(&ok, 16); } else { // '�', decimal character reference - TQString tmp(str.tqunicode()+pos, str.length()-pos); + TQString tmp(str.unicode()+pos, str.length()-pos); res = tmp.toInt(&ok, 10); } return res; @@ -422,14 +422,14 @@ TQChar KCharsets::fromEntity(const TQString &str, int &len) TQString KCharsets::toEntity(const TQChar &ch) { TQString ent; - ent.sprintf("�x%x;", ch.tqunicode()); + ent.sprintf("�x%x;", ch.unicode()); return ent; } TQString KCharsets::resolveEntities( const TQString &input ) { TQString text = input; - const TQChar *p = text.tqunicode(); + const TQChar *p = text.unicode(); const TQChar *end = p + text.length(); const TQChar *ampersand = 0; bool scanForSemicolon = false; @@ -460,12 +460,12 @@ TQString KCharsets::resolveEntities( const TQString &input ) if ( entityValue.isNull() ) continue; - const uint ampersandPos = ampersand - text.tqunicode(); + const uint ampersandPos = ampersand - text.unicode(); text[ (int)ampersandPos ] = entityValue; text.remove( ampersandPos + 1, entityLength + 1 ); - p = text.tqunicode() + ampersandPos; - end = text.tqunicode() + text.length(); + p = text.unicode() + ampersandPos; + end = text.unicode() + text.length(); ampersand = 0; } diff --git a/tdecore/kclipboard.cpp b/tdecore/kclipboard.cpp index f3c5b2840..48b76f7ce 100644 --- a/tdecore/kclipboard.cpp +++ b/tdecore/kclipboard.cpp @@ -123,7 +123,7 @@ KClipboardSynchronizer::~KClipboardSynchronizer() void KClipboardSynchronizer::setupSignals() { - TQClipboard *clip = TQApplication::tqclipboard(); + TQClipboard *clip = TQApplication::clipboard(); disconnect( clip, NULL, this, NULL ); if( s_sync ) connect( clip, TQT_SIGNAL( selectionChanged() ), @@ -135,7 +135,7 @@ void KClipboardSynchronizer::setupSignals() void KClipboardSynchronizer::slotSelectionChanged() { - TQClipboard *clip = TQApplication::tqclipboard(); + TQClipboard *clip = TQApplication::clipboard(); // qDebug("*** sel changed: %i", s_blocked); if ( s_blocked || !clip->ownsSelection() ) @@ -147,7 +147,7 @@ void KClipboardSynchronizer::slotSelectionChanged() void KClipboardSynchronizer::slotClipboardChanged() { - TQClipboard *clip = TQApplication::tqclipboard(); + TQClipboard *clip = TQApplication::clipboard(); // qDebug("*** clip changed : %i (implicit: %i, ownz: clip: %i, selection: %i)", s_blocked, s_implicitSelection, clip->ownsClipboard(), clip->ownsSelection()); if ( s_blocked || !clip->ownsClipboard() ) @@ -161,7 +161,7 @@ void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode { // qDebug("---> setting clipboard: %p", data); - TQClipboard *clip = TQApplication::tqclipboard(); + TQClipboard *clip = TQApplication::clipboard(); s_blocked = true; diff --git a/tdecore/kcompletion.h b/tdecore/kcompletion.h index 703f2c958..aead92f77 100644 --- a/tdecore/kcompletion.h +++ b/tdecore/kcompletion.h @@ -119,7 +119,7 @@ class TQPopupMenu; * tell the user) where a completion comes from. * * Note: KCompletion does not work with strings that contain 0x0 characters - * (tqunicode nul), as this is used internally as a delimiter. + * (unicode nul), as this is used internally as a delimiter. * * You may inherit from KCompletion and override makeCompletion() in * special cases (like reading directories/urls and then supplying the diff --git a/tdecore/kconfig_compiler/kconfig_compiler.cpp b/tdecore/kconfig_compiler/kconfig_compiler.cpp index b75d7e05d..3ff9f9aa3 100644 --- a/tdecore/kconfig_compiler/kconfig_compiler.cpp +++ b/tdecore/kconfig_compiler/kconfig_compiler.cpp @@ -262,7 +262,7 @@ static TQString literalString( const TQString &s ) { bool isAscii = true; for(int i = s.length(); i--;) - if (s[i].tqunicode() > 127) isAscii = false; + if (s[i].unicode() > 127) isAscii = false; if (isAscii) return "TQString::fromLatin1( " + quoteString(s) + " )"; diff --git a/tdecore/kdebug.cpp b/tdecore/kdebug.cpp index 44a45245c..f87458688 100644 --- a/tdecore/kdebug.cpp +++ b/tdecore/kdebug.cpp @@ -373,7 +373,7 @@ kdbgstream& kdbgstream::operator << (TQChar ch) { if (!print) return *this; if (!ch.isPrint()) - output += "\\x" + TQString::number( ch.tqunicode(), 16 ).rightJustify(2, '0'); + output += "\\x" + TQString::number( ch.unicode(), 16 ).rightJustify(2, '0'); else { output += ch; if (ch == (QChar)'\n') flush(); diff --git a/tdecore/kkeyserver_x11.cpp b/tdecore/kkeyserver_x11.cpp index 440fbb5e3..8fa37ebcf 100644 --- a/tdecore/kkeyserver_x11.cpp +++ b/tdecore/kkeyserver_x11.cpp @@ -406,7 +406,7 @@ bool Sym::initQt( int keyQt ) int symQt = keyQt & 0xffff; if( (keyQt & Qt::UNICODE_ACCEL) || symQt < 0x1000 ) { - m_sym = TQChar(symQt).lower().tqunicode(); + m_sym = TQChar(symQt).lower().unicode(); return true; } @@ -434,9 +434,9 @@ bool Sym::initQt( int keyQt ) bool Sym::init( const TQString& s ) { - // If it's a single character, get tqunicode value. + // If it's a single character, get unicode value. if( s.length() == 1 ) { - m_sym = s[0].lower().tqunicode(); + m_sym = s[0].lower().unicode(); return true; } @@ -498,7 +498,7 @@ TQString Sym::toString( bool bUserSpace ) const if( m_sym == 0 ) return TQString::null; - // If it's a tqunicode character, + // If it's a unicode character, #ifdef Q_WS_WIN else if( m_sym < 0x1000 ) { #else @@ -542,7 +542,7 @@ uint Sym::getModsRequired() const if( m_sym < 0x3000 ) { TQChar c(m_sym); - if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().tqunicode() ) + if( c.isLetter() && c.lower() != c.upper() && m_sym == c.upper().unicode() ) return KKey::SHIFT; } @@ -823,7 +823,7 @@ uint stringUserToMod( const TQString& mod ) // Get code of just the primary key keySymQt = keyCombQt & 0xffff; - // If tqunicode value beneath 0x1000 (special Qt codes begin thereafter), + // If unicode value beneath 0x1000 (special Qt codes begin thereafter), if( keySymQt < 0x1000 ) { // For reasons unbeknownst to me, Qt converts 'a-z' to 'A-Z'. // So convert it back to lowercase if SHIFT isn't held down. @@ -1041,7 +1041,7 @@ void KKey::simplify() // If this is a letter, don't remove any modifiers. if( m_sym < 0x3000 && TQChar(m_sym).isLetter() ) - m_sym = TQChar(m_sym).lower().tqunicode(); + m_sym = TQChar(m_sym).lower().unicode(); // Remove modifers from modifier list which are implicit in the symbol. // Ex. Shift+Plus => Plus (en) diff --git a/tdecore/klibloader.cpp b/tdecore/klibloader.cpp index 290e23154..4577dc7a6 100644 --- a/tdecore/klibloader.cpp +++ b/tdecore/klibloader.cpp @@ -549,17 +549,17 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) We need to make sure to clear the clipboard before unloading a DSO because the DSO could have defined an object derived from QMimeSource and placed that on the clipboard. */ - /*kapp->tqclipboard()->clear();*/ + /*kapp->clipboard()->clear();*/ /* Well.. let's do something more subtle... convert the clipboard context to text. That should be safe as it only uses objects defined by Qt. */ - if( kapp->tqclipboard()->ownsSelection()) { - kapp->tqclipboard()->setText( - kapp->tqclipboard()->text( TQClipboard::Selection ), TQClipboard::Selection ); + if( kapp->clipboard()->ownsSelection()) { + kapp->clipboard()->setText( + kapp->clipboard()->text( TQClipboard::Selection ), TQClipboard::Selection ); } - if( kapp->tqclipboard()->ownsClipboard()) { - kapp->tqclipboard()->setText( - kapp->tqclipboard()->text( TQClipboard::Clipboard ), TQClipboard::Clipboard ); + if( kapp->clipboard()->ownsClipboard()) { + kapp->clipboard()->setText( + kapp->clipboard()->text( TQClipboard::Clipboard ), TQClipboard::Clipboard ); } } diff --git a/tdecore/klocale.cpp b/tdecore/klocale.cpp index f0e3b1f21..90bf27d66 100644 --- a/tdecore/klocale.cpp +++ b/tdecore/klocale.cpp @@ -1352,14 +1352,14 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const { if ( !escape ) { - if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' ) + if ( (TQChar(rst.at( format_index )).unicode()) == '%' ) escape = true; else buffer.append(rst.at(format_index)); } else { - switch ( TQChar(rst.at( format_index )).tqunicode() ) + switch ( TQChar(rst.at( format_index )).unicode() ) { case '%': buffer.append('%'); @@ -1876,14 +1876,14 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat { if ( !escape ) { - if ( (TQChar(rst.at( format_index )).tqunicode()) == '%' ) + if ( (TQChar(rst.at( format_index )).unicode()) == '%' ) escape = true; else buffer[index++] = rst.at( format_index ); } else { - switch ( TQChar(rst.at( format_index )).tqunicode() ) + switch ( TQChar(rst.at( format_index )).unicode() ) { case '%': buffer[index++] = (QChar)'%'; @@ -1915,7 +1915,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat number = pTime.hour(); case 'l': // to share the code - if ( (TQChar(rst.at( format_index )).tqunicode()) == 'l' ) + if ( (TQChar(rst.at( format_index )).unicode()) == 'l' ) number = isDuration ? pTime.hour() : (pTime.hour() + 11) % 12 + 1; if ( number / 10 ) buffer[index++] = number / 10 + '0'; diff --git a/tdecore/kmacroexpander.cpp b/tdecore/kmacroexpander.cpp index c7717029c..2a997deaa 100644 --- a/tdecore/kmacroexpander.cpp +++ b/tdecore/kmacroexpander.cpp @@ -56,7 +56,7 @@ void KMacroExpanderBase::expandMacros( TQString &str ) for (pos = 0; pos < str.length(); ) { if (ec != (QChar)0) { - if (str.tqunicode()[pos] != ec) + if (str.unicode()[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.tqunicode()[pos] ); + TQChar cc( str.unicode()[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.tqunicode()[pos2]; + cc = str.unicode()[pos2]; if (cc == (QChar)'`') break; if (cc == (QChar)'\\') { @@ -383,14 +383,14 @@ template<class VT> int KMacroMapExpander<TQString,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - if (isIdentifier( str[pos - 1].tqunicode() )) + if (isIdentifier( str[pos - 1].unicode() )) return 0; uint sl; - for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); + for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++); if (!sl) return 0; TQMapConstIterator<TQString,VT> it = - macromap.find( TQConstString( str.tqunicode() + pos, sl ).string() ); + macromap.find( TQConstString( str.unicode() + pos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return sl; @@ -415,13 +415,13 @@ KMacroMapExpander<TQString,VT>::expandEscapedMacro( const TQString &str, uint po rsl = sl + 3; } else { rpos = pos + 1; - for (sl = 0; isIdentifier( str[rpos + sl].tqunicode() ); sl++); + for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++); rsl = sl + 1; } if (!sl) return 0; TQMapConstIterator<TQString,VT> it = - macromap.find( TQConstString( str.tqunicode() + rpos, sl ).string() ); + macromap.find( TQConstString( str.unicode() + 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].tqunicode() )) + if (isIdentifier( str[pos - 1].unicode() )) return 0; uint sl; - for (sl = 0; isIdentifier( str[pos + sl].tqunicode() ); sl++); + for (sl = 0; isIdentifier( str[pos + sl].unicode() ); sl++); if (!sl) return 0; - if (expandMacro( TQConstString( str.tqunicode() + pos, sl ).string(), ret )) + if (expandMacro( TQConstString( str.unicode() + 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].tqunicode() ); sl++); + for (sl = 0; isIdentifier( str[rpos + sl].unicode() ); sl++); rsl = sl + 1; } if (!sl) return 0; - if (expandMacro( TQConstString( str.tqunicode() + rpos, sl ).string(), ret )) + if (expandMacro( TQConstString( str.unicode() + rpos, sl ).string(), ret )) return rsl; return 0; } diff --git a/tdecore/kprocio.h b/tdecore/kprocio.h index 6c3d482bb..3dceb9c1b 100644 --- a/tdecore/kprocio.h +++ b/tdecore/kprocio.h @@ -35,7 +35,7 @@ class TQTextCodec; * buffer and maintained/freed appropriately. There is no need * to be concerned with wroteStdin() signals _at_all_. * @li readln() reads a line of data and buffers any leftovers. - * @li Conversion from/to tqunicode. + * @li Conversion from/to unicode. * * Basically, KProcIO gives you buffered I/O similar to fgets()/fputs(). * diff --git a/tdecore/kregexp.h b/tdecore/kregexp.h index 8e6baac98..cc5ff0ea6 100644 --- a/tdecore/kregexp.h +++ b/tdecore/kregexp.h @@ -30,7 +30,7 @@ class KRegExpPrivate; * * This was implemented * because TQRegExp did not support back-references. It now does and - * is recommended over KRegExp because of the tqunicode support and the + * is recommended over KRegExp because of the unicode support and the * more powerful API. * * Back-references are parts of a regexp grouped with parentheses. If a @@ -53,7 +53,7 @@ class KRegExpPrivate; * Weis * \endcode * - * Please notice that KRegExp does @em not support tqunicode. + * Please notice that KRegExp does @em not support unicode. * * @author Torben Weis <weis@kde.org> */ diff --git a/tdecore/kshell.cpp b/tdecore/kshell.cpp index 9a9aacfbe..7e4eda947 100644 --- a/tdecore/kshell.cpp +++ b/tdecore/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.tqunicode()[pos++]; + c = args.unicode()[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.tqunicode()[pos]; + c = args.unicode()[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.tqunicode() + opos, pos - opos ).string() ); + TQString ccret = homeDir( TQConstString( args.unicode() + 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.tqunicode()[pos++]; + c = args.unicode()[pos++]; } while (c != (QChar)'\''); - cret += TQConstString( args.tqunicode() + spos, pos - spos - 1 ).string(); + cret += TQConstString( args.unicode() + spos, pos - spos - 1 ).string(); } else if (c == (QChar)'"') { for (;;) { if (pos >= args.length()) goto quoteerr; - c = args.tqunicode()[pos++]; + c = args.unicode()[pos++]; if (c == (QChar)'"') break; if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.tqunicode()[pos++]; + c = args.unicode()[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.tqunicode()[pos++]; + c = args.unicode()[pos++]; if (c == (QChar)'\'') break; if (c == (QChar)'\\') { if (pos >= args.length()) goto quoteerr; - c = args.tqunicode()[pos++]; + c = args.unicode()[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.tqunicode()[pos++]; + c = args.unicode()[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.tqunicode()[pos++]; + c = args.unicode()[pos++]; } while (!c.isSpace()); ret += cret; firstword = false; @@ -265,7 +265,7 @@ TQString KShell::joinArgs( const TQStringList &args ) ret.append( q ).append( q ); else { for (uint i = 0; i < (*it).length(); i++) - if (isSpecial((*it).tqunicode()[i])) { + if (isSpecial((*it).unicode()[i])) { TQString tmp(*it); tmp.replace( q, "'\\''" ); ret += q; @@ -294,7 +294,7 @@ 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.tqunicode()[i])) { + if (isSpecial(tmp.unicode()[i])) { tmp.replace( q, "'\\''" ); ret += q; tmp += q; @@ -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).tqunicode()[i])) { + if (isSpecial((*it).unicode()[i])) { ret.append( '$' ).append( q ); for (uint pos = 0; pos < (*it).length(); pos++) { - int c = (*it).tqunicode()[pos]; + int c = (*it).unicode()[pos]; if (c < 32) { ret += bs; switch (c) { @@ -357,10 +357,10 @@ TQString KShell::tildeExpand( const TQString &fname ) if (fname[0] == (QChar)'~') { int pos = fname.find( '/' ); if (pos < 0) - return homeDir( TQConstString( fname.tqunicode() + 1, fname.length() - 1 ).string() ); - TQString ret = homeDir( TQConstString( fname.tqunicode() + 1, pos - 1 ).string() ); + return homeDir( TQConstString( fname.unicode() + 1, fname.length() - 1 ).string() ); + TQString ret = homeDir( TQConstString( fname.unicode() + 1, pos - 1 ).string() ); if (!ret.isNull()) - ret += TQConstString( fname.tqunicode() + pos, fname.length() - pos ).string(); + ret += TQConstString( fname.unicode() + pos, fname.length() - pos ).string(); return ret; } return fname; diff --git a/tdecore/kstringhandler.cpp b/tdecore/kstringhandler.cpp index 2af77edf1..d33c3c924 100644 --- a/tdecore/kstringhandler.cpp +++ b/tdecore/kstringhandler.cpp @@ -425,8 +425,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa return filename.find(pattern.mid(1, pattern_len - 2)) != -1; } - const TQChar *c1 = pattern.tqunicode(); - const TQChar *c2 = filename.tqunicode(); + const TQChar *c1 = pattern.unicode(); + const TQChar *c2 = filename.unicode(); int cnt = 1; while ( cnt < pattern_len && *c1++ == *c2++ ) ++cnt; @@ -436,8 +436,8 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa // Patterns like "*~", "*.extension" if ( pattern[ 0 ] == (QChar)'*' && len + 1 >= pattern_len ) { - const TQChar *c1 = pattern.tqunicode() + pattern_len - 1; - const TQChar *c2 = filename.tqunicode() + len - 1; + const TQChar *c1 = pattern.unicode() + pattern_len - 1; + const TQChar *c2 = filename.unicode() + len - 1; int cnt = 1; while ( cnt < pattern_len && *c1-- == *c2-- ) ++cnt; @@ -556,10 +556,10 @@ KStringHandler::tagURLs( const TQString& text ) TQString KStringHandler::obscure( const TQString &str ) { TQString result; - const TQChar *tqunicode = str.tqunicode(); + const TQChar *unicode = str.unicode(); for ( uint i = 0; i < str.length(); ++i ) - result += ( tqunicode[ i ].tqunicode() < 0x21 ) ? tqunicode[ i ] : - TQChar( 0x1001F - tqunicode[ i ].tqunicode() ); + result += ( unicode[ i ].unicode() < 0x21 ) ? unicode[ i ] : + TQChar( 0x1001F - unicode[ i ].unicode() ); return result; } diff --git a/tdecore/ksycoca.cpp b/tdecore/ksycoca.cpp index 09ad97224..441f6d530 100644 --- a/tdecore/ksycoca.cpp +++ b/tdecore/ksycoca.cpp @@ -483,7 +483,7 @@ void KSycocaEntry::read( TQDataStream &s, TQString &str ) else if ( bytes > 0 ) { // not empty int bt = bytes/2; str.setLength( bt ); - TQChar* ch = (TQChar *) str.tqunicode(); + TQChar* ch = (TQChar *) str.unicode(); char t[8192]; char *b = t; s.readRawBytes( b, bytes ); diff --git a/tdecore/ksycocadict.cpp b/tdecore/ksycocadict.cpp index e58b81e5f..d1deb609b 100644 --- a/tdecore/ksycocadict.cpp +++ b/tdecore/ksycocadict.cpp @@ -29,7 +29,7 @@ namespace { struct string_entry { string_entry(TQString _key, KSycocaEntry *_payload) - { keyStr = _key; key = keyStr.tqunicode(); length = keyStr.length(); payload = _payload; hash = 0; } + { keyStr = _key; key = keyStr.unicode(); length = keyStr.length(); payload = _payload; hash = 0; } uint hash; int length; const TQChar *key; diff --git a/tdecore/kurl.cpp b/tdecore/kurl.cpp index e8b2e2dd8..7817742bc 100644 --- a/tdecore/kurl.cpp +++ b/tdecore/kurl.cpp @@ -172,14 +172,14 @@ static TQString lazy_encode( const TQString& segment, bool encodeAt=true ) for ( int i = 0; i < old_length; i++ ) { - unsigned int character = segment[i].tqunicode(); // Don't use latin1() + unsigned int character = segment[i].unicode(); // Don't use latin1() // It returns 0 for non-latin1 values // Small set of really ambiguous chars if ((character < 32) || // Low ASCII ((character == '%') && // The escape character itself (i+2 < old_length) && // But only if part of a valid escape sequence! - (hex2int(segment[i+1].tqunicode())!= -1) && - (hex2int(segment[i+2].tqunicode())!= -1)) || + (hex2int(segment[i+1].unicode())!= -1) && + (hex2int(segment[i+2].unicode())!= -1)) || (character == '?') || // Start of query delimiter ((character == '@') && encodeAt) || // Username delimiter (character == '#') || // Start of reference delimiter @@ -404,7 +404,7 @@ bool KURL::isRelativeURL(const TQString &_url) { int len = _url.length(); if (!len) return true; // Very short relative URL. - const TQChar *str = _url.tqunicode(); + const TQChar *str = _url.unicode(); // Absolute URL must start with alpha-character if (!isalpha(str[0].latin1())) @@ -643,7 +643,7 @@ void KURL::parse( const TQString& _url, int encoding_hint ) return; } - const TQChar* buf = _url.tqunicode(); + const TQChar* buf = _url.unicode(); const TQChar* orig = buf; uint len = _url.length(); uint pos = 0; @@ -707,7 +707,7 @@ NodeErr: void KURL::parseRawURI( const TQString& _url, int encoding_hint ) { uint len = _url.length(); - const TQChar* buf = _url.tqunicode(); + const TQChar* buf = _url.unicode(); uint pos = 0; @@ -762,7 +762,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) bool badHostName = false; int start = 0; uint len = _url.length(); - const TQChar* buf = _url.tqunicode(); + const TQChar* buf = _url.unicode(); TQChar delim; TQString tmp; diff --git a/tdecore/kurl.h b/tdecore/kurl.h index 6ed5dc652..ef454f60f 100644 --- a/tdecore/kurl.h +++ b/tdecore/kurl.h @@ -1586,7 +1586,7 @@ public: * * Convenience function. * - * Convert tqunicoded string to local encoding and use %%-style + * Convert unicoded string to local encoding and use %%-style * encoding for all common delimiters / non-ascii characters. * * @param str the string to encode (can be @c TQString::null) @@ -1605,7 +1605,7 @@ public: * * Convenience function. * - * Convert tqunicoded string to local encoding and use %%-style + * Convert unicoded string to local encoding and use %%-style * encoding for all common delimiters and non-ascii characters * as well as the slash @c '/'. * @@ -1623,7 +1623,7 @@ public: * * Convenience function. * - * Decode %-style encoding and convert from local encoding to tqunicode. + * Decode %-style encoding and convert from local encoding to unicode. * * Reverse of encode_string() * diff --git a/tdecore/kurldrag.h b/tdecore/kurldrag.h index aee9d83b9..45a0e5945 100644 --- a/tdecore/kurldrag.h +++ b/tdecore/kurldrag.h @@ -30,7 +30,7 @@ class KURLDragPrivate; /** * This class is to be used instead of TQUriDrag when using KURL. * The reason is: TQUriDrag (and the XDND/W3C standards) expect URLs to - * be encoded in UTF-8 (tqunicode), but KURL uses the current locale + * be encoded in UTF-8 (unicode), but KURL uses the current locale * by default. * The other reasons for using this class are: * @li it exports text/plain (for dropping/pasting into lineedits, mails etc.) diff --git a/tdecore/network/kresolver.cpp b/tdecore/network/kresolver.cpp index 1a2b062c4..6271fe7f6 100644 --- a/tdecore/network/kresolver.cpp +++ b/tdecore/network/kresolver.cpp @@ -934,7 +934,7 @@ TQString KResolver::localHostName() // forward declaration -static TQStringList splitLabels(const TQString& tqunicodeDomain); +static TQStringList splitLabels(const TQString& unicodeDomain); static TQCString ToASCII(const TQString& label); static TQString ToUnicode(const TQString& label); @@ -947,7 +947,7 @@ static TQStringList *KResolver_initIdnDomains() } // implement the ToAscii function, as described by IDN documents -TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) +TQCString KResolver::domainToAscii(const TQString& unicodeDomain) { if (!idnDomains) idnDomains = KResolver_initIdnDomains(); @@ -958,7 +958,7 @@ TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) // 2) split the domain into individual labels, without // separators. - TQStringList input = splitLabels(tqunicodeDomain); + TQStringList input = splitLabels(unicodeDomain); // Do we allow IDN names for this TLD? if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) @@ -1048,7 +1048,7 @@ void KResolver::virtual_hook( int, void* ) // RFC 3492 - Punycode: A Bootstring encoding of Unicode // for Internationalized Domain Names in Applications (IDNA) -static TQStringList splitLabels(const TQString& tqunicodeDomain) +static TQStringList splitLabels(const TQString& unicodeDomain) { // From RFC 3490 section 3.1: // "Whenever dots are used as label separators, the following characters @@ -1060,9 +1060,9 @@ static TQStringList splitLabels(const TQString& tqunicodeDomain) TQStringList lst; int start = 0; uint i; - for (i = 0; i < tqunicodeDomain.length(); i++) + for (i = 0; i < unicodeDomain.length(); i++) { - unsigned int c = tqunicodeDomain[i].tqunicode(); + unsigned int c = unicodeDomain[i].unicode(); if (c == separators[0] || c == separators[1] || @@ -1070,13 +1070,13 @@ static TQStringList splitLabels(const TQString& tqunicodeDomain) c == separators[3]) { // found a separator! - lst << tqunicodeDomain.mid(start, i - start); + lst << unicodeDomain.mid(start, i - start); start = i + 1; } } if ((long)i >= start) // there is still one left - lst << tqunicodeDomain.mid(start, i - start); + lst << unicodeDomain.mid(start, i - start); return lst; } @@ -1101,7 +1101,7 @@ static TQCString ToASCII(const TQString& label) uint i; for (i = 0; i < label.length(); i++) - ucs4[i] = (unsigned long)label[i].tqunicode(); + ucs4[i] = (unsigned long)label[i].unicode(); ucs4[i] = 0; // terminate with NUL, just to be on the safe side if (idna_to_ascii_4i(ucs4, label.length(), buf, 0) == IDNA_SUCCESS) @@ -1126,7 +1126,7 @@ static TQString ToUnicode(const TQString& label) ucs4_input = new TQ_UINT32[label.length() + 1]; for (uint i = 0; i < label.length(); i++) - ucs4_input[i] = (unsigned long)label[i].tqunicode(); + ucs4_input[i] = (unsigned long)label[i].unicode(); // try the same length for output ucs4_output = new TQ_UINT32[outlen = label.length()]; diff --git a/tdecore/network/kresolver.h b/tdecore/network/kresolver.h index 1b13d676b..e2e08623b 100644 --- a/tdecore/network/kresolver.h +++ b/tdecore/network/kresolver.h @@ -796,11 +796,11 @@ public: * Note that the encoding is illegible and, thus, should not be presented * to the user, except if requested. * - * @param tqunicodeDomain the domain name to be encoded + * @param unicodeDomain the domain name to be encoded * @return the ACE-encoded suitable for DNS queries if successful, a null * TQCString if failure. */ - static TQCString domainToAscii(const TQString& tqunicodeDomain); + static TQCString domainToAscii(const TQString& unicodeDomain); /** * Does the inverse of @ref domainToAscii and return an Unicode domain |