diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-15 15:08:51 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-15 15:08:51 -0600 |
commit | fb652a2be46ce1a2081e5dde268cd9f4ebe6fdd0 (patch) | |
tree | a01fcd88aa65a77c2b2e12ba1a55851ddfe5afcc /tdecore | |
parent | 3fbca5d9a4bd057ed5f9df138333e6c16dbdcc62 (diff) | |
download | tdelibs-fb652a2be46ce1a2081e5dde268cd9f4ebe6fdd0.tar.gz tdelibs-fb652a2be46ce1a2081e5dde268cd9f4ebe6fdd0.zip |
Fix kdelibs FTBFS on native TQt3
Diffstat (limited to 'tdecore')
-rw-r--r-- | tdecore/kapplication.cpp | 8 | ||||
-rw-r--r-- | tdecore/kurl.cpp | 100 |
2 files changed, 54 insertions, 54 deletions
diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp index b56f683ea..5338cfccd 100644 --- a/tdecore/kapplication.cpp +++ b/tdecore/kapplication.cpp @@ -1774,7 +1774,7 @@ KApplication::~KApplication() #ifdef Q_WS_X11 -class KAppX11HackWidget: public QWidget +class KAppX11HackWidget: public TQWidget { public: bool publicx11Event( XEvent * e) { return x11Event( e ); } @@ -2786,14 +2786,14 @@ void KApplication::invokeMailer(const TQString &_to, const TQString &_cc, const // put the whole address lists into RFC2047 encoded blobs; technically // this isn't correct, but KMail understands it nonetheless to = TQString( "=?utf8?b?%1?=" ) - .arg( QString(KCodecs::base64Encode( _to.utf8(), false )) ); + .arg( TQString(KCodecs::base64Encode( _to.utf8(), false )) ); } if ( !_cc.isEmpty() ) cc = TQString( "=?utf8?b?%1?=" ) - .arg( QString(KCodecs::base64Encode( _cc.utf8(), false )) ); + .arg( TQString(KCodecs::base64Encode( _cc.utf8(), false )) ); if ( !_bcc.isEmpty() ) bcc = TQString( "=?utf8?b?%1?=" ) - .arg( QString(KCodecs::base64Encode( _bcc.utf8(), false )) ); + .arg( TQString(KCodecs::base64Encode( _bcc.utf8(), false )) ); } else { to = _to; cc = _cc; diff --git a/tdecore/kurl.cpp b/tdecore/kurl.cpp index 52c8a807a..f6c3fd19b 100644 --- a/tdecore/kurl.cpp +++ b/tdecore/kurl.cpp @@ -112,7 +112,7 @@ static TQString encode( const TQString& segment, int encoding_offset, int encodi } else - new_segment[ new_length++ ] = (QChar)local[i]; + new_segment[ new_length++ ] = (TQChar)local[i]; } TQString result = TQString(new_segment, new_length); @@ -183,7 +183,7 @@ static TQString lazy_encode( const TQString& segment, bool encodeAt=true ) (character == '?') || // Start of query delimiter ((character == '@') && encodeAt) || // Username delimiter (character == '#') || // Start of reference delimiter - ((character == 32) && (i+1 == old_length || segment[i+1] == (QChar)' '))) // A trailing space + ((character == 32) && (i+1 == old_length || segment[i+1] == (TQChar)' '))) // A trailing space { new_segment[ new_length++ ] = '%'; @@ -657,7 +657,7 @@ void KURL::parse( const TQString& _url, int encoding_hint ) goto NodeErr; if (alpha && buf[pos]==':' && (len==2 || (len>2 && (buf[pos+1]=='/' || buf[pos+1]=='\\')))) #else - if ( x == (QChar)'/' ) + if ( x == (TQChar)'/' ) #endif { // A slash means we immediately proceed to parse it as a file URL. @@ -673,9 +673,9 @@ void KURL::parse( const TQString& _url, int encoding_hint ) // '.' is not currently accepted, because current KURL may be confused. // Proceed with :// :/ or : while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) || - buf[pos] == (QChar)'+' || buf[pos] == (QChar)'-')) pos++; + buf[pos] == (TQChar)'+' || buf[pos] == (TQChar)'-')) pos++; - if (pos < len && buf[pos] == (QChar)':' ) + if (pos < len && buf[pos] == (TQChar)':' ) { m_strProtocol = TQString( orig, pos ).lower(); if ( m_iUriMode == Auto ) @@ -715,10 +715,10 @@ void KURL::parseRawURI( const TQString& _url, int encoding_hint ) // '.' is not currently accepted, because current KURL may be confused. // Proceed with : while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) || - buf[pos] == (QChar)'+' || buf[pos] == (QChar)'-')) pos++; + buf[pos] == (TQChar)'+' || buf[pos] == (TQChar)'-')) pos++; // Note that m_strProtocol is already set here, so we just skip over the protocol. - if (pos < len && buf[pos] == (QChar)':' ) + if (pos < len && buf[pos] == (TQChar)':' ) pos++; else { // can't happen, the caller checked all this already reset(); @@ -776,9 +776,9 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) const bool alpha = isalpha((int)x); if (alpha && len<2) goto NodeErr; - if (alpha && buf[pos]==(QChar)':' && (len==2 || (len>2 && (buf[pos+1]==(QChar)'/' || buf[pos+1]==(QChar)'\\')))) + if (alpha && buf[pos]==(TQChar)':' && (len==2 || (len>2 && (buf[pos+1]==(TQChar)'/' || buf[pos+1]==(TQChar)'\\')))) #else - if ( x == (QChar)'/' ) + if ( x == (TQChar)'/' ) #endif goto Node9; if ( !isalpha( (int)x ) ) @@ -788,14 +788,14 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) // '.' is not currently accepted, because current KURL may be confused. // Proceed with :// :/ or : while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) || - buf[pos] == (QChar)'+' || buf[pos] == (QChar)'-')) pos++; + buf[pos] == (TQChar)'+' || buf[pos] == (TQChar)'-')) pos++; // Note that m_strProtocol is already set here, so we just skip over the protocol. - if ( pos+2 < len && buf[pos] == (QChar)':' && buf[pos+1] == (QChar)'/' && buf[pos+2] == (QChar)'/' ) + if ( pos+2 < len && buf[pos] == (TQChar)':' && buf[pos+1] == (TQChar)'/' && buf[pos+2] == (TQChar)'/' ) { pos += 3; } - else if (pos+1 < len && buf[pos] == (QChar)':' ) // Need to always compare length()-1 otherwise KURL passes "http:" as legal!! + else if (pos+1 < len && buf[pos] == (TQChar)':' ) // Need to always compare length()-1 otherwise KURL passes "http:" as legal!! { pos++; start = pos; @@ -810,13 +810,13 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) start = pos; // Node 4: Accept any amount of characters. - if (buf[pos] == (QChar)'[') // An IPv6 host follows. + if (buf[pos] == (TQChar)'[') // An IPv6 host follows. goto Node8; // Terminate on / or @ or ? or # or " or ; or < x = buf[pos]; - while( (x != (QChar)':') && (x != (QChar)'@') && (x != (QChar)'/') && (x != (QChar)'?') && (x != (QChar)'#') ) + while( (x != (TQChar)':') && (x != (TQChar)'@') && (x != (TQChar)'/') && (x != (TQChar)'?') && (x != (TQChar)'#') ) { - if ((x == (QChar)'\"') || (x == (QChar)';') || (x == (QChar)'<')) + if ((x == (TQChar)'\"') || (x == (TQChar)';') || (x == (TQChar)'<')) badHostName = true; if (++pos == len) break; @@ -830,13 +830,13 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) setHost(decode(TQString( buf + start, pos - start ), encoding_hint)); goto NodeOk; } - if ( x == (QChar)'@' ) + if ( x == (TQChar)'@' ) { m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint); pos++; goto Node7; } - else if ( (x == (QChar)'/') || (x == (QChar)'?') || (x == (QChar)'#')) + else if ( (x == (TQChar)'/') || (x == (TQChar)'?') || (x == (TQChar)'#')) { if (badHostName) goto NodeErr; @@ -845,7 +845,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) start = pos; goto Node9; } - else if ( x != (QChar)':' ) + else if ( x != (TQChar)':' ) goto NodeErr; m_strUser = decode(TQString( buf + start, pos - start ), encoding_hint); pos++; @@ -857,13 +857,13 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) // Node 6: Read everything until @, /, ? or # while( (pos < len) && - (buf[pos] != (QChar)'@') && - (buf[pos] != (QChar)'/') && - (buf[pos] != (QChar)'?') && - (buf[pos] != (QChar)'#')) pos++; + (buf[pos] != (TQChar)'@') && + (buf[pos] != (TQChar)'/') && + (buf[pos] != (TQChar)'?') && + (buf[pos] != (TQChar)'#')) pos++; // If we now have a '@' the ':' seperates user and password. // Otherwise it seperates host and port. - if ( (pos == len) || (buf[pos] != (QChar)'@') ) + if ( (pos == len) || (buf[pos] != (TQChar)'@') ) { // Ok the : was used to separate host and port if (badHostName) @@ -877,10 +877,10 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) goto NodeOk; // there is more after the digits pos -= strlen(endptr); - if ((buf[pos] != (QChar)'@') && - (buf[pos] != (QChar)'/') && - (buf[pos] != (QChar)'?') && - (buf[pos] != (QChar)'#')) + if ((buf[pos] != (TQChar)'@') && + (buf[pos] != (TQChar)'/') && + (buf[pos] != (TQChar)'?') && + (buf[pos] != (TQChar)'#')) goto NodeErr; start = pos; @@ -895,7 +895,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) goto NodeErr; Node8: - if (buf[pos] == (QChar)'[') + if (buf[pos] == (TQChar)'[') { // IPv6 address start = ++pos; // Skip '[' @@ -908,9 +908,9 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) // Node 8a: Read everything until ] or terminate badHostName = false; x = buf[pos]; - while( (x != (QChar)']') ) + while( (x != (TQChar)']') ) { - if ((x == (QChar)'\"') || (x == (QChar)';') || (x == (QChar)'<')) + if ((x == (TQChar)'\"') || (x == (TQChar)';') || (x == (TQChar)'<')) badHostName = true; if (++pos == len) { @@ -934,9 +934,9 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) // Node 8b: Read everything until / : or terminate badHostName = false; x = buf[pos]; - while( (x != (QChar)':') && (x != (QChar)'@') && (x != (QChar)'/') && (x != (QChar)'?') && (x != (QChar)'#') ) + while( (x != (TQChar)':') && (x != (TQChar)'@') && (x != (TQChar)'/') && (x != (TQChar)'?') && (x != (TQChar)'#') ) { - if ((x == (QChar)'\"') || (x == (QChar)';') || (x == (QChar)'<')) + if ((x == (TQChar)'\"') || (x == (TQChar)';') || (x == (TQChar)'<')) badHostName = true; if (++pos == len) break; @@ -952,12 +952,12 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) setHost(decode(TQString( buf + start, pos - start ), encoding_hint)); } x = buf[pos]; - if ( x == (QChar)'/' || x == (QChar)'#' || x == (QChar)'?' ) + if ( x == (TQChar)'/' || x == (TQChar)'#' || x == (TQChar)'?' ) { start = pos; goto Node9; } - else if ( x != (QChar)':' ) + else if ( x != (TQChar)':' ) goto NodeErr; pos++; @@ -978,7 +978,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) Node9: // parse path until query or reference reached - while( pos < len && buf[pos] != (QChar)'#' && buf[pos]!=(QChar)'?' ) pos++; + while( pos < len && buf[pos] != (TQChar)'#' && buf[pos]!=(TQChar)'?' ) pos++; tmp = TQString( buf + start, pos - start ); //kdDebug(126)<<" setting encoded path to:"<<tmp<<endl; @@ -988,14 +988,14 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) goto NodeOk; //Node10: // parse query or reference depending on what comes first - delim = (buf[pos++]==(QChar)'#'?(QChar)'?':(QChar)'#'); + delim = (buf[pos++]==(TQChar)'#'?(TQChar)'?':(TQChar)'#'); start = pos; while(pos < len && buf[pos]!=delim ) pos++; tmp = TQString(buf + start, pos - start); - if (delim==(QChar)'#') + if (delim==(TQChar)'#') _setQuery(tmp, encoding_hint); else m_strRef_encoded = tmp; @@ -1005,7 +1005,7 @@ void KURL::parseURL( const TQString& _url, int encoding_hint ) //Node11: // feed the rest into the remaining variable tmp = TQString( buf + pos + 1, len - pos - 1); - if (delim == (QChar)'#') + if (delim == (TQChar)'#') m_strRef_encoded = tmp; else _setQuery(tmp, encoding_hint); @@ -1219,7 +1219,7 @@ void KURL::setFileName( const TQString& _txt ) { m_strRef_encoded = TQString::null; int i = 0; - while( _txt[i] == (QChar)'/' ) ++i; + while( _txt[i] == (TQChar)'/' ) ++i; TQString tmp; if ( i ) tmp = _txt.mid( i ); @@ -1271,7 +1271,7 @@ static TQString trailingSlash( int _trailing, const TQString &path ) else if ( _trailing == 1 ) { int len = result.length(); - if ( (len == 0) || (result[ len - 1 ] != (QChar)'/') ) + if ( (len == 0) || (result[ len - 1 ] != (TQChar)'/') ) result += "/"; return result; } @@ -1280,7 +1280,7 @@ static TQString trailingSlash( int _trailing, const TQString &path ) if ( result == "/" ) return result; int len = result.length(); - while (len > 1 && result[ len - 1 ] == (QChar)'/') + while (len > 1 && result[ len - 1 ] == (TQChar)'/') { len--; } @@ -1749,14 +1749,14 @@ void KURL::addPath( const TQString& _txt ) int i = 0; int len = m_strPath.length(); // Add the trailing '/' if it is missing - if ( _txt[0] != (QChar)'/' && ( len == 0 || m_strPath[ len - 1 ] != (QChar)'/' ) ) + if ( _txt[0] != (TQChar)'/' && ( len == 0 || m_strPath[ len - 1 ] != (TQChar)'/' ) ) m_strPath += "/"; // No double '/' characters i = 0; - if ( len != 0 && m_strPath[ len - 1 ] == (QChar)'/' ) + if ( len != 0 && m_strPath[ len - 1 ] == (TQChar)'/' ) { - while( _txt[i] == (QChar)'/' ) + while( _txt[i] == (TQChar)'/' ) ++i; } @@ -1812,7 +1812,7 @@ bool KURL::cd( const TQString& _dir ) } // absolute path ? - if ( _dir[0] == (QChar)'/' ) + if ( _dir[0] == (TQChar)'/' ) { m_strPath_encoded = TQString::null; m_strPath = _dir; @@ -1822,7 +1822,7 @@ bool KURL::cd( const TQString& _dir ) } // Users home directory on the local disk ? - if ( ( _dir[0] == (QChar)'~' ) && ( m_strProtocol == fileProt )) + if ( ( _dir[0] == (TQChar)'~' ) && ( m_strProtocol == fileProt )) { m_strPath_encoded = TQString::null; m_strPath = TQDir::homeDirPath(); @@ -2011,7 +2011,7 @@ void KURL::setDirectory( const TQString &dir) void KURL::setQuery( const TQString &_txt, int encoding_hint) { - if (_txt[0] == (QChar)'?') + if (_txt[0] == (TQChar)'?') _setQuery( _txt.length() > 1 ? _txt.mid(1) : "" /*empty, not null*/, encoding_hint ); else _setQuery( _txt, encoding_hint ); @@ -2249,7 +2249,7 @@ KURL KURL::fromPathOrURL( const TQString& text ) static TQString _relativePath(const TQString &base_dir, const TQString &path, bool &isParent) { TQString _base_dir(TQDir::cleanDirPath(base_dir)); - TQString _path(TQDir::cleanDirPath(path.isEmpty() || (path[0] != (QChar)'/') ? _base_dir+"/"+path : path)); + TQString _path(TQDir::cleanDirPath(path.isEmpty() || (path[0] != (TQChar)'/') ? _base_dir+"/"+path : path)); if (_base_dir.isEmpty()) return _path; @@ -2262,7 +2262,7 @@ static TQString _relativePath(const TQString &base_dir, const TQString &path, bo // Find where they meet uint level = 0; - uint maxLevel = QMIN(list1.count(), list2.count()); + uint maxLevel = TQMIN(list1.count(), list2.count()); while((level < maxLevel) && (list1[level] == list2[level])) level++; TQString result; @@ -2274,7 +2274,7 @@ static TQString _relativePath(const TQString &base_dir, const TQString &path, bo for(uint i = level; i < list2.count(); i++) result.append(list2[i]).append("/"); - if ((level < list2.count()) && (path[path.length()-1] != (QChar)'/')) + if ((level < list2.count()) && (path[path.length()-1] != (TQChar)'/')) result.truncate(result.length()-1); isParent = (level == list1.count()); |