diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-08-09 22:25:47 -0500 |
commit | 03256f3cd5149f3ff5f5f45765b0b0659db4e036 (patch) | |
tree | caabe9e1c0e3edfd06ea5aefd4d7279664cd9ede /experimental/tqtinterface/qt4/src/kernel/tqdragobject.cpp | |
parent | 0594950f65a713c2d12e8eb6ddd3f5f9b306ec08 (diff) | |
download | tde-03256f3cd5149f3ff5f5f45765b0b0659db4e036.tar.gz tde-03256f3cd5149f3ff5f5f45765b0b0659db4e036.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
Diffstat (limited to 'experimental/tqtinterface/qt4/src/kernel/tqdragobject.cpp')
-rw-r--r-- | experimental/tqtinterface/qt4/src/kernel/tqdragobject.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/experimental/tqtinterface/qt4/src/kernel/tqdragobject.cpp b/experimental/tqtinterface/qt4/src/kernel/tqdragobject.cpp index 5a4d2fee7..579eab8cf 100644 --- a/experimental/tqtinterface/qt4/src/kernel/tqdragobject.cpp +++ b/experimental/tqtinterface/qt4/src/kernel/tqdragobject.cpp @@ -2034,7 +2034,7 @@ TQPixmap *TQDragObject::cursor( DragMode m ) const copy of the dragged data (but see target()); otherwise returns FALSE. - If the drag tqcontains \e references to information (e.g. file names + If the drag contains \e references to information (e.g. file names in a TQUriDrag are references) then the return value should always be ignored, as the target is expected to manipulate the referred-to content directly. On X11 the return value should @@ -2174,7 +2174,7 @@ static void stripws(TQCString& s) { int f; - while ( (f=s.tqfind(' ')) >= 0 ) + while ( (f=s.find(' ')) >= 0 ) s.remove(f,1); } @@ -2324,13 +2324,13 @@ const char * TQTextDrag::format(int i) const return d->fmt[i]; } -TQTextCodec* qt_tqfindcharset(const TQCString& mimetype) +TQTextCodec* qt_findcharset(const TQCString& mimetype) { - int i=mimetype.tqfind("charset="); + int i=mimetype.find("charset="); if ( i >= 0 ) { TQCString cs = mimetype.mid(i+8); stripws(cs); - i = cs.tqfind(';'); + i = cs.find(';'); if ( i >= 0 ) cs = cs.left(i); // win98 often has charset=utf16, and we need to get the correct codec for @@ -2361,13 +2361,13 @@ static TQTextCodec *codecForHTML(const TQCString &ba) mib = 106; // utf-8 } else { pos = 0; - while ((pos = ba.tqfind("<meta http-equiv=", pos, FALSE)) != -1) { - int end = ba.tqfind('>', pos+1); + while ((pos = ba.find("<meta http-equiv=", pos, FALSE)) != -1) { + int end = ba.find('>', pos+1); if (end == -1) break; - pos = ba.tqfind("charset=", pos, FALSE) + (int)strlen("charset="); + pos = ba.find("charset=", pos, FALSE) + (int)strlen("charset="); if (pos != -1 && pos < end) { - int pos2 = ba.tqfind('\"', pos+1); + int pos2 = ba.find('\"', pos+1); TQCString cs = ba.mid(pos, pos2-pos); c = TQTextCodec::codecForName(cs); if (c) @@ -2383,7 +2383,7 @@ static TQTextCodec *codecForHTML(const TQCString &ba) } static -TQTextCodec* tqfindcodec(const TQMimeSource* e) +TQTextCodec* findcodec(const TQMimeSource* e) { TQTextCodec* r = 0; const char* f; @@ -2393,7 +2393,7 @@ TQTextCodec* tqfindcodec(const TQMimeSource* e) if (html) r = codecForHTML(TQCString(e->tqencodedData(f))); if (!r) - r = qt_tqfindcharset(TQCString(f).lower()); + r = qt_findcharset(TQCString(f).lower()); if (r) return r; } @@ -2411,15 +2411,15 @@ TQByteArray TQTextDrag::tqencodedData(const char* mime) const if ( 0==qstrnicmp(mime,"text/",5) ) { TQCString m(mime); m = m.lower(); - TQTextCodec *codec = qt_tqfindcharset(m); + TQTextCodec *codec = qt_findcharset(m); if ( !codec ) return r; TQString text( d->txt ); #if defined(TQ_WS_WIN) - int index = text.tqfind( TQString::tqfromLatin1("\r\n"), 0 ); + int index = text.find( TQString::tqfromLatin1("\r\n"), 0 ); while ( index != -1 ) { - text.tqreplace( index, 2, TQChar('\n') ); - index = text.tqfind( "\r\n", index ); + text.replace( index, 2, TQChar('\n') ); + index = text.find( "\r\n", index ); } #endif r = codec->fromUnicode(text); @@ -2448,7 +2448,7 @@ bool TQTextDrag::canDecode( const TQMimeSource* e ) const char* f; for (int i=0; (f=e->format(i)); i++) { if ( 0==qstrnicmp(f,"text/",5) ) { - return tqfindcodec(e) != 0; + return findcodec(e) != 0; } } return 0; @@ -2490,7 +2490,7 @@ bool TQTextDrag::decode( const TQMimeSource* e, TQString& str, TQCString& subtyp if ( 0==qstrnicmp(mime,"text/",5) ) { TQCString m(mime); m = m.lower(); - int semi = m.tqfind(';'); + int semi = m.find(';'); if ( semi < 0 ) semi = m.length(); TQCString foundst = m.mid(5,semi-5); @@ -2503,7 +2503,7 @@ bool TQTextDrag::decode( const TQMimeSource* e, TQString& str, TQCString& subtyp codec = codecForHTML(TQCString(bytes.data(), bytes.size())); } if (!codec) - codec = qt_tqfindcharset(m); + codec = qt_findcharset(m); if ( codec ) { TQByteArray payload; @@ -2847,7 +2847,7 @@ void TQStoredDrag::setEncodedData( const TQByteArray & tqencodedData ) } /*! - Returns the stored data. \a m tqcontains the data's format. + Returns the stored data. \a m contains the data's format. \sa setEncodedData() */ @@ -3095,7 +3095,7 @@ TQCString TQUriDrag::localFileToUri(const TQString& filename) // Slosh -> Slash int slosh; - while ( (slosh=r.tqfind('\\')) >= 0 ) { + while ( (slosh=r.find('\\')) >= 0 ) { r[slosh] = '/'; } @@ -3165,7 +3165,7 @@ TQString TQUriDrag::uriToLocalFile(const char* uri) return file; if (0==qstrnicmp(uri,"file:/",6)) // It is a local file uri uri += 6; - else if (TQString(uri).tqfind(":/") != -1) // It is a different scheme uri + else if (TQString(uri).find(":/") != -1) // It is a different scheme uri return file; bool local = uri[0] != '/' || ( uri[0] != '\0' && uri[1] == '/' ); |