-rw-r--r-- | microkde/kurl.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/microkde/kurl.cpp b/microkde/kurl.cpp index 2574e25..122ad71 100644 --- a/microkde/kurl.cpp +++ b/microkde/kurl.cpp | |||
@@ -36,3 +36,3 @@ | |||
36 | #endif | 36 | #endif |
37 | #include <qurl.h> | 37 | #include <q3url.h> |
38 | #include <qdir.h> | 38 | #include <qdir.h> |
@@ -43,2 +43,4 @@ | |||
43 | #include <qtextcodec.h> | 43 | #include <qtextcodec.h> |
44 | //Added by qt3to4: | ||
45 | #include <Q3CString> | ||
44 | 46 | ||
@@ -59,3 +61,3 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h | |||
59 | 61 | ||
60 | QCString local; | 62 | Q3CString local; |
61 | if (encoding_hint==0) | 63 | if (encoding_hint==0) |
@@ -102,3 +104,3 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h | |||
102 | else | 104 | else |
103 | new_segment[ new_length++ ] = local[i]; | 105 | new_segment[ new_length++ ] = character; |
104 | } | 106 | } |
@@ -207,3 +209,3 @@ static void decode( const QString& segment, QString &decoded, QString &encoded, | |||
207 | 209 | ||
208 | QCString csegment = textCodec->fromUnicode(segment); | 210 | Q3CString csegment = textCodec->fromUnicode(segment); |
209 | // Check if everything went ok | 211 | // Check if everything went ok |
@@ -280,3 +282,3 @@ static void decode( const QString& segment, QString &decoded, QString &encoded, | |||
280 | array.resetRawData(new_segment, new_length); | 282 | array.resetRawData(new_segment, new_length); |
281 | QCString validate = textCodec->fromUnicode(decoded); | 283 | Q3CString validate = textCodec->fromUnicode(decoded); |
282 | 284 | ||
@@ -421,3 +423,3 @@ KURL::KURL( const char * url, int encoding_hint ) | |||
421 | 423 | ||
422 | KURL::KURL( const QCString& url, int encoding_hint ) | 424 | KURL::KURL( const Q3CString& url, int encoding_hint ) |
423 | { | 425 | { |
@@ -462,3 +464,3 @@ QDataStream & operator>> (QDataStream & s, KURL & a) | |||
462 | #ifndef QT_NO_NETWORKPROTOCOL | 464 | #ifndef QT_NO_NETWORKPROTOCOL |
463 | KURL::KURL( const QUrl &u ) | 465 | KURL::KURL( const Q3Url &u ) |
464 | { | 466 | { |
@@ -591,3 +593,3 @@ void KURL::parse( const QString& _url, int encoding_hint ) | |||
591 | goto Node9; | 593 | goto Node9; |
592 | if ( !isalpha( (int)x ) ) | 594 | if ( !x.isLetter() ) |
593 | goto NodeErr; | 595 | goto NodeErr; |
@@ -597,3 +599,3 @@ void KURL::parse( const QString& _url, int encoding_hint ) | |||
597 | // Proceed with :// :/ or : | 599 | // Proceed with :// :/ or : |
598 | while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) || | 600 | while( pos < len && ( buf[pos].isLetter() || buf[pos].isDigit() || |
599 | buf[pos] == '+' || buf[pos] == '-')) pos++; | 601 | buf[pos] == '+' || buf[pos] == '-')) pos++; |
@@ -771,3 +773,3 @@ void KURL::parse( const QString& _url, int encoding_hint ) | |||
771 | start = pos; | 773 | start = pos; |
772 | if ( !isdigit( buf[pos++] ) ) | 774 | if ( !buf[pos++].isDigit() ) |
773 | goto NodeErr; | 775 | goto NodeErr; |
@@ -775,3 +777,3 @@ void KURL::parse( const QString& _url, int encoding_hint ) | |||
775 | // Node 8b: Accept any amount of digits | 777 | // Node 8b: Accept any amount of digits |
776 | while( pos < len && isdigit( buf[pos] ) ) pos++; | 778 | while( pos < len && buf[pos].isDigit() ) pos++; |
777 | port = QString( buf + start, pos - start ); | 779 | port = QString( buf + start, pos - start ); |
@@ -850,3 +852,3 @@ KURL& KURL::operator=( const char * _url ) | |||
850 | #ifndef QT_NO_NETWORKPROTOCOL | 852 | #ifndef QT_NO_NETWORKPROTOCOL |
851 | KURL& KURL::operator=( const QUrl & u ) | 853 | KURL& KURL::operator=( const Q3Url & u ) |
852 | { | 854 | { |
@@ -1376,3 +1378,3 @@ KURL KURL::join( const KURL::List & lst ) | |||
1376 | { | 1378 | { |
1377 | if (!u.m_strRef_encoded) u.m_strRef_encoded = tmp.url(); | 1379 | if (u.m_strRef_encoded.isEmpty()) u.m_strRef_encoded = tmp.url(); |
1378 | else u.m_strRef_encoded += "#" + tmp.url(); // Support more than one suburl thingy | 1380 | else u.m_strRef_encoded += "#" + tmp.url(); // Support more than one suburl thingy |
@@ -1420,3 +1422,3 @@ QString KURL::fileName( bool _strip_trailing_slash ) const | |||
1420 | QString fileName_encoded = m_strPath_encoded.mid(i+1); | 1422 | QString fileName_encoded = m_strPath_encoded.mid(i+1); |
1421 | n += fileName_encoded.contains("%2f", false); | 1423 | n += fileName_encoded.count("%2f", Qt::CaseInsensitive); |
1422 | } | 1424 | } |