Changeset 561 for trunk/src/qt3support/network
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/qt3support/network/network.pri
r2 r561 27 27 win32:SOURCES += network/q3socketdevice_win.cpp 28 28 unix:SOURCES += network/q3socketdevice_unix.cpp 29 mac:LIBS += -lresolv29 mac:LIBS_PRIVATE += -lresolv 30 30 -
trunk/src/qt3support/network/q3dns.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 1739 1739 while( (dom=it.current()) != 0 ) { 1740 1740 ++it; 1741 n.append( l.lower() + QLatin1 String(".") + QLatin1String(dom) );1741 n.append( l.lower() + QLatin1Char('.') + QLatin1String(dom) ); 1742 1742 } 1743 1743 } … … 1903 1903 uint b = 0; 1904 1904 while( b < 16 ) { 1905 s = QString::number( i.c[b]%16, 16 ) + QLatin1 String(".") +1906 QString::number( i.c[b]/16, 16 ) + QLatin1 String(".") + s;1905 s = QString::number( i.c[b]%16, 16 ) + QLatin1Char('.') + 1906 QString::number( i.c[b]/16, 16 ) + QLatin1Char('.') + s; 1907 1907 b++; 1908 1908 } … … 2243 2243 2244 2244 // ### FIXME: this code is duplicated in qfiledialog.cpp 2245 static QString getWindowsRegString( HKEY key, const QString &subKey)2245 static QString getWindowsRegString(HKEY key, const QString &subKey) 2246 2246 { 2247 2247 QString s; 2248 QT_WA( { 2249 char buf[1024]; 2250 DWORD bsz = sizeof(buf); 2251 int r = RegQueryValueEx( key, (TCHAR*)subKey.ucs2(), 0, 0, (LPBYTE)buf, &bsz ); 2252 if ( r == ERROR_SUCCESS ) { 2253 s = QString::fromUcs2( (unsigned short *)buf ); 2254 } else if ( r == ERROR_MORE_DATA ) { 2255 char *ptr = new char[bsz+1]; 2256 r = RegQueryValueEx( key, (TCHAR*)subKey.ucs2(), 0, 0, (LPBYTE)ptr, &bsz ); 2257 if ( r == ERROR_SUCCESS ) 2258 s = QLatin1String(ptr); 2259 delete [] ptr; 2260 } 2261 } , { 2262 char buf[512]; 2263 DWORD bsz = sizeof(buf); 2264 int r = RegQueryValueExA( key, subKey.local8Bit(), 0, 0, (LPBYTE)buf, &bsz ); 2265 if ( r == ERROR_SUCCESS ) { 2266 s = QLatin1String(buf); 2267 } else if ( r == ERROR_MORE_DATA ) { 2268 char *ptr = new char[bsz+1]; 2269 r = RegQueryValueExA( key, subKey.local8Bit(), 0, 0, (LPBYTE)ptr, &bsz ); 2270 if ( r == ERROR_SUCCESS ) 2271 s = QLatin1String(ptr); 2272 delete [] ptr; 2273 } 2274 } ); 2248 2249 wchar_t buf[1024]; 2250 DWORD bsz = sizeof(buf) / sizeof(wchar_t); 2251 int r = RegQueryValueEx(key, (wchar_t*)subKey.utf16(), 0, 0, (LPBYTE)buf, &bsz); 2252 if (r == ERROR_SUCCESS) { 2253 s = QString::fromWCharArray(buf); 2254 } else if (r == ERROR_MORE_DATA) { 2255 char *ptr = new char[bsz+1]; 2256 r = RegQueryValueEx(key, (wchar_t*)subKey.utf16(), 0, 0, (LPBYTE)ptr, &bsz); 2257 if (r == ERROR_SUCCESS) 2258 s = QLatin1String(ptr); 2259 delete [] ptr; 2260 } 2261 2275 2262 return s; 2276 2263 } 2277 2264 2278 2265 static bool getDnsParamsFromRegistry( const QString &path, 2279 2266 QString *domainName, QString *nameServer, QString *searchList ) 2280 2267 { 2281 2268 HKEY k; 2282 int r; 2283 QT_WA( { 2284 r = RegOpenKeyEx( HKEY_LOCAL_MACHINE, 2285 (TCHAR*)path.ucs2(), 2286 0, KEY_READ, &k ); 2287 } , { 2288 r = RegOpenKeyExA( HKEY_LOCAL_MACHINE, 2289 path.latin1(), 2290 0, KEY_READ, &k ); 2291 } ); 2269 int r = RegOpenKeyEx( HKEY_LOCAL_MACHINE, (wchar_t*)path.utf16(), 0, KEY_READ, &k ); 2292 2270 2293 2271 if ( r == ERROR_SUCCESS ) { … … 2322 2300 // try the API call GetNetworkParams() first and use registry lookup only 2323 2301 // as a fallback 2324 #ifdef Q_OS_WINCE 2325 HINSTANCE hinstLib = LoadLibraryW( L"iphlpapi" ); 2326 #else 2327 HINSTANCE hinstLib = LoadLibraryA( "iphlpapi" ); 2328 #endif 2302 HINSTANCE hinstLib = LoadLibrary( L"iphlpapi" ); 2329 2303 if ( hinstLib != 0 ) { 2330 2304 #ifdef Q_OS_WINCE 2331 GNP getNetworkParams = (GNP) GetProcAddress W( hinstLib, L"GetNetworkParams" );2305 GNP getNetworkParams = (GNP) GetProcAddress( hinstLib, L"GetNetworkParams" ); 2332 2306 #else 2333 2307 GNP getNetworkParams = (GNP) GetProcAddress( hinstLib, "GetNetworkParams" ); … … 2348 2322 dnsServer = dnsServer->Next; 2349 2323 if ( dnsServer != 0 ) 2350 nameServer += QLatin1 String(" ");2324 nameServer += QLatin1Char(' '); 2351 2325 } 2352 2326 searchList = QLatin1String(""); … … 2361 2335 if ( !gotNetworkParams ) { 2362 2336 if ( getDnsParamsFromRegistry( 2363 Q String( QLatin1String("System\\CurrentControlSet\\Services\\Tcpip\\Parameters")),2337 QLatin1String("System\\CurrentControlSet\\Services\\Tcpip\\Parameters"), 2364 2338 &domainName, &nameServer, &searchList )) { 2365 // for NT2366 2339 separator = ' '; 2367 } else if ( getDnsParamsFromRegistry(2368 QString( QLatin1String("System\\CurrentControlSet\\Services\\VxD\\MSTCP") ),2369 &domainName, &nameServer, &searchList )) {2370 // for Windows 982371 separator = ',';2372 2340 } else { 2373 2341 // Could not access the TCP/IP parameters … … 2396 2364 } 2397 2365 2398 searchList = searchList + QLatin1String(" ") + domainName;2366 searchList += QLatin1Char(' ') + domainName; 2399 2367 searchList = searchList.simplifyWhiteSpace().lower(); 2400 2368 first = 0; … … 2489 2457 line = stream.readLine(); 2490 2458 QStringList list = QStringList::split( QLatin1String(" "), line ); 2491 if( line.startsWith( QLatin1 String("#") ) || list.size() < 2 )2459 if( line.startsWith( QLatin1Char('#') ) || list.size() < 2 ) 2492 2460 continue; 2493 2461 const QString type = list[0].lower(); -
trunk/src/qt3support/network/q3dns.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3ftp.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 486 486 dateStr += QLatin1Char(' '); 487 487 488 if ( lst[ 7 ].contains( QLatin1 String(":") ) ) {488 if ( lst[ 7 ].contains( QLatin1Char(':') ) ) { 489 489 time = QTime( lst[ 7 ].left( 2 ).toInt(), lst[ 7 ].right( 2 ).toInt() ); 490 490 dateStr += QString::number( QDate::currentDate().year() ); … … 496 496 info->setLastModified( QDateTime( date, time ) ); 497 497 498 if ( lst[ 7 ].contains( QLatin1 String(":") ) ) {498 if ( lst[ 7 ].contains( QLatin1Char(':') ) ) { 499 499 const int futureTolerance = 600; 500 500 if( info->lastModified().secsTo( QDateTime::currentDateTime() ) < -futureTolerance ) { … … 513 513 QString n; 514 514 for ( uint i = 8; i < (uint) lst.count(); ++i ) 515 n += lst[ i ] + QLatin1 String(" ");515 n += lst[ i ] + QLatin1Char(' '); 516 516 n = n.stripWhiteSpace(); 517 517 info->setName( n ); … … 898 898 } else { 899 899 QStringList lst = addrPortPattern.capturedTexts(); 900 QString host = lst[1] + QLatin1 String(".") + lst[2] + QLatin1String(".") + lst[3] + QLatin1String(".") + lst[4];900 QString host = lst[1] + QLatin1Char('.') + lst[2] + QLatin1Char('.') + lst[3] + QLatin1Char('.') + lst[4]; 901 901 Q_UINT16 port = ( lst[5].toUInt() << 8 ) + lst[6].toUInt(); 902 902 waitForDtpToConnect = true; … … 1145 1145 their results. 1146 1146 1147 Example: If you want to download the INSTALL file from Trolltech's1147 Example: If you want to download the INSTALL file from the Qt 1148 1148 FTP server, you would write this: 1149 1149 … … 1436 1436 { 1437 1437 QStringList cmds; 1438 cmds << ( QString (QLatin1String("USER ")) + ( user.isNull() ? QString(QLatin1String("anonymous")) : user ) + QLatin1String("\r\n") );1439 cmds << ( QString (QLatin1String("PASS ")) + ( password.isNull() ? QString(QLatin1String("anonymous@")) : password ) + QLatin1String("\r\n") );1438 cmds << ( QString::fromLatin1("USER ") + ( user.isNull() ? QString::fromLatin1("anonymous") : user ) + QLatin1String("\r\n") ); 1439 cmds << ( QString::fromLatin1("PASS ") + ( password.isNull() ? QString::fromLatin1("anonymous@") : password ) + QLatin1String("\r\n") ); 1440 1440 return addCommand( new Q3FtpCommand( Login, cmds ) ); 1441 1441 } … … 2096 2096 op->setState( StInProgress ); 2097 2097 2098 cd( ( url()->path().isEmpty() ? QString ( QLatin1String("/")) : url()->path() ) );2098 cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) ); 2099 2099 list(); 2100 2100 emit start( op ); … … 2116 2116 op->setState( StInProgress ); 2117 2117 2118 cd( ( url()->path().isEmpty() ? QString ( QLatin1String("/")) : url()->path() ) );2118 cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) ); 2119 2119 remove( Q3Url( op->arg( 0 ) ).path() ); 2120 2120 } … … 2126 2126 op->setState( StInProgress ); 2127 2127 2128 cd( ( url()->path().isEmpty() ? QString ( QLatin1String("/")) : url()->path() ) );2128 cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) ); 2129 2129 rename( op->arg( 0 ), op->arg( 1 )); 2130 2130 } … … 2180 2180 break; 2181 2181 } 2182 QString user = url()->user().isEmpty() ? QString( QLatin1String("anonymous")) : url()->user();2183 QString pass = url()->password().isEmpty() ? QString( QLatin1String("anonymous@")) : url()->password();2182 QString user = url()->user().isEmpty() ? QString::fromLatin1("anonymous") : url()->user(); 2183 QString pass = url()->password().isEmpty() ? QString::fromLatin1("anonymous@") : url()->password(); 2184 2184 login( user, pass ); 2185 2185 } -
trunk/src/qt3support/network/q3ftp.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3http.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 43 43 #include "q3http.h" 44 44 45 #ifndef QT_NO_ NETWORKPROTOCOL_HTTP45 #ifndef QT_NO_HTTP 46 46 47 47 #include "q3socket.h" … … 469 469 if ( (*it)[0].isSpace() ) { 470 470 if ( !lines.isEmpty() ) { 471 lines.last() += QLatin1 String(" ");471 lines.last() += QLatin1Char(' '); 472 472 lines.last() += (*it).stripWhiteSpace(); 473 473 } … … 563 563 bool Q3HttpHeader::parseLine( const QString& line, int ) 564 564 { 565 int i = line.find( QLatin1 String(":") );565 int i = line.find( QLatin1Char(':') ); 566 566 if ( i == -1 ) 567 567 return false; … … 627 627 628 628 /*! 629 Returns true if the header has an entry for the thespecial HTTP629 Returns true if the header has an entry for the special HTTP 630 630 header field \c content-type; otherwise returns false. 631 631 … … 648 648 return QString(); 649 649 650 int pos = type.find( QLatin1 String(";") );650 int pos = type.find( QLatin1Char(';') ); 651 651 if ( pos == -1 ) 652 652 return type; … … 786 786 } 787 787 788 /*! \ reimp788 /*! \internal 789 789 */ 790 790 bool Q3HttpResponseHeader::parseLine( const QString& line, int number ) … … 953 953 } 954 954 955 /*! \ reimp955 /*! \internal 956 956 */ 957 957 bool Q3HttpRequestHeader::parseLine( const QString& line, int number ) … … 1049 1049 To make an HTTP request you must set up suitable HTTP headers. The 1050 1050 following example demonstrates, how to request the main HTML page 1051 from the Trolltech home page (i.e. the URL 1052 http://qtsoftware.com/index.html): 1051 from the Qt website (i.e. the URL \c http://qt.nokia.com/index.html): 1053 1052 1054 1053 \snippet doc/src/snippets/code/src_qt3support_network_q3http.cpp 3 … … 1536 1535 1537 1536 \a path must be an absolute path like \c /index.html or an 1538 absolute URI like \c http:// qtsoftware.com/index.html.1537 absolute URI like \c http://example.com/index.html. 1539 1538 1540 1539 If the IO device \a to is 0 the readyRead() signal is emitted … … 1569 1568 1570 1569 \a path must be an absolute path like \c /index.html or an 1571 absolute URI like \c http:// qtsoftware.com/index.html.1570 absolute URI like \c http://example.com/index.html. 1572 1571 1573 1572 The incoming data comes via the \a data IO device. … … 1616 1615 1617 1616 \a path must be an absolute path like \c /index.html or an 1618 absolute URI like \c http:// qtsoftware.com/index.html.1617 absolute URI like \c http://example.com/index.html. 1619 1618 1620 1619 The function does not block and returns immediately. The request … … 2211 2210 op->setState( StFailed ); 2212 2211 op->setProtocolDetail( 2213 QString(QLatin1String("%1 %2")).arg(rep.statusCode()).arg(rep.reasonPhrase())2212 QString::fromLatin1("%1 %2").arg(rep.statusCode()).arg(rep.reasonPhrase()) 2214 2213 ); 2215 2214 switch ( rep.statusCode() ) { -
trunk/src/qt3support/network/q3http.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 53 53 54 54 QT_MODULE(Qt3Support) 55 56 #ifndef QT_NO_NETWORKPROTOCOL_HTTP 55 #ifndef QT_NO_HTTP 57 56 58 57 class Q3Socket; … … 270 269 }; 271 270 272 #endif // QT_NO_ NETWORKPROTOCOL_HTTP271 #endif // QT_NO_HTTP 273 272 274 273 QT_END_NAMESPACE -
trunk/src/qt3support/network/q3localfs.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3localfs.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3network.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 64 64 Q3NetworkProtocol::registerNetworkProtocol( QLatin1String("ftp"), new Q3NetworkProtocolFactory< Q3Ftp > ); 65 65 #endif 66 #ifndef QT_NO_ NETWORKPROTOCOL_HTTP66 #ifndef QT_NO_HTTP 67 67 Q3NetworkProtocol::registerNetworkProtocol( QLatin1String("http"), new Q3NetworkProtocolFactory< Q3Http > ); 68 68 #endif -
trunk/src/qt3support/network/q3network.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3networkprotocol.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3networkprotocol.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3serversocket.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3serversocket.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3socket.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3socket.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3socketdevice.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3socketdevice.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3socketdevice_unix.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3socketdevice_win.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 48 48 #include <string.h> 49 49 50 # include <qt_windows.h> 50 51 #if defined (QT_NO_IPV6) 51 # include <windows.h>52 52 # include <winsock.h> 53 53 #else 54 54 # if defined (Q_CC_BOR) || defined (Q_CC_GNU) 55 55 # include <winsock2.h> 56 # el if defined (Q_CC_INTEL)56 # else 57 57 # include <winsock.h> 58 # else59 # include <windows.h>60 # if defined(Q_OS_WINCE)61 # include <winsock.h>62 # endif63 58 # endif 64 59 // Use our own defines and structs which we know are correct -
trunk/src/qt3support/network/q3url.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 110 110 Example: 111 111 112 <tt>http:// qtsoftware.com:80/cgi-bin/test%20me.pl?cmd=Hello%20you</tt>112 <tt>http://example.com:80/cgi-bin/test%20me.pl?cmd=Hello%20you</tt> 113 113 114 114 \table 115 115 \header \i Function \i Returns 116 116 \row \i \l protocol() \i "http" 117 \row \i \l host() \i " qtsoftware.com"117 \row \i \l host() \i "example.com" 118 118 \row \i \l port() \i 80 119 119 \row \i \l path() \i "/cgi-bin/test me.pl" … … 124 124 Example: 125 125 126 <tt>http:// doc.trolltech.com/qdockarea.html#lines</tt>126 <tt>http://qt.nokia.com/doc/qdockarea.html#lines</tt> 127 127 128 128 \table 129 129 \header \i Function \i Returns 130 130 \row \i \l protocol() \i "http" 131 \row \i \l host() \i " doc.trolltech.com"132 \row \i \l fileName() \i " qdockarea.html"131 \row \i \l host() \i "qt.nokia.com" 132 \row \i \l fileName() \i "doc/qdockarea.html" 133 133 \row \i \l ref() \i "lines" 134 134 \endtable … … 212 212 bool Q3Url::isRelativeUrl( const QString &url ) 213 213 { 214 int colon = url.find( QLatin1 String(":") );215 int slash = url.find( QLatin1 String("/") );214 int colon = url.find( QLatin1Char(':') ); 215 int slash = url.find( QLatin1Char('/') ); 216 216 217 217 return ( slash != 0 && ( colon == -1 || ( slash != -1 && colon > slash ) ) ); … … 229 229 On the other hand, 230 230 \snippet doc/src/snippets/code/src_qt3support_network_q3url.cpp 3 231 will result in a new URL, "ftp://ftp. trolltech.com/usr/local",231 will result in a new URL, "ftp://ftp.qt.nokia.com/usr/local", 232 232 because "/usr/local" isn't relative. 233 233 … … 281 281 p = QLatin1String("/"); 282 282 } 283 if ( !p.isEmpty() && p.right(1)!=QLatin1String("/") )284 p += QLatin1 String("/");283 if ( !p.isEmpty() && !p.endsWith(QLatin1Char('/')) ) 284 p += QLatin1Char('/'); 285 285 p += rel; 286 286 d->path = p; … … 679 679 while ( url_[ cs ] == QLatin1Char('/') ) 680 680 ++cs; 681 int slash = url_.find( QLatin1 String("/"), cs );681 int slash = url_.find( QLatin1Char('/'), cs ); 682 682 if ( slash == -1 ) 683 683 slash = url_.length() - 1; … … 687 687 688 688 // look for the @ in this part 689 int at = tmp.find( QLatin1 String("@") );689 int at = tmp.find( QLatin1Char('@') ); 690 690 if ( at != -1 ) 691 691 at += cs; … … 794 794 // hack for windows 795 795 if ( d->path.length() == 2 && d->path[ 1 ] == QLatin1Char(':') ) 796 d->path += QLatin1 String("/");796 d->path += QLatin1Char('/'); 797 797 798 798 // #### do some corrections, should be done nicer too … … 809 809 d->path.remove( (uint)0, 1 ); 810 810 if ( d->path[ 0 ] != QLatin1Char('/') && !relPath && d->path[ 1 ] != QLatin1Char(':') ) 811 d->path.prepend( QLatin1 String("/") );811 d->path.prepend( QLatin1Char('/') ); 812 812 } 813 813 if ( !d->refEncoded.isEmpty() && d->refEncoded[ 0 ] == QLatin1Char('#') ) … … 821 821 // hack for windows file://machine/path syntax 822 822 if ( d->protocol == QLatin1String("file") ) { 823 if ( url. left( 7 ) == QLatin1String("file://") &&823 if ( url.startsWith(QLatin1String("file://")) && 824 824 d->path.length() > 1 && d->path[ 1 ] != QLatin1Char(':') ) 825 d->path.prepend( QLatin1 String("/") );825 d->path.prepend( QLatin1Char('/') ); 826 826 } 827 827 #endif … … 943 943 p += fn; 944 944 if ( !d->queryEncoded.isEmpty() ) 945 p += QLatin1 String("?") + d->queryEncoded;945 p += QLatin1Char('?') + d->queryEncoded; 946 946 setEncodedPathAndQuery( p ); 947 947 } … … 962 962 963 963 if ( !d->queryEncoded.isEmpty() ) { 964 p += QLatin1 String("?");964 p += QLatin1Char('?'); 965 965 p += d->queryEncoded; 966 966 } … … 1012 1012 #if defined(Q_OS_WIN32) 1013 1013 // hack for stuff like \\machine\path and //machine/path on windows 1014 if ( ( d->path. left( 1 ) == QLatin1String("/") || d->path.left( 1 ) == QLatin1String("\\") ) &&1014 if ( ( d->path.startsWith(QLatin1Char('/')) || d->path.startsWith(QLatin1Char('\\')) ) && 1015 1015 d->path.length() > 1 ) { 1016 1016 d->cleanPath = d->path; … … 1022 1022 check = false; 1023 1023 while (d->cleanPath.at(0) != QLatin1Char('/') || d->cleanPath.at(1) != QLatin1Char('/')) 1024 d->cleanPath.prepend(QLatin1 String("/"));1024 d->cleanPath.prepend(QLatin1Char('/')); 1025 1025 } 1026 1026 } … … 1037 1037 else 1038 1038 dir = QDir::cleanDirPath( QDir( d->path ).absPath() ); 1039 dir += QLatin1 String("/");1039 dir += QLatin1Char('/'); 1040 1040 if ( dir == QLatin1String("//") ) 1041 1041 d->cleanPath = QLatin1String("/"); … … 1047 1047 fi.dir().canonicalPath() : 1048 1048 fi.dir().absPath()) ); 1049 d->cleanPath = p + QLatin1 String("/") + fi.fileName();1049 d->cleanPath = p + QLatin1Char('/') + fi.fileName(); 1050 1050 } 1051 1051 } 1052 1052 } else { 1053 if ( d->path != QLatin1String("/") && d->path[ (int)d->path.length() - 1 ] == QLatin1Char('/') )1054 d->cleanPath = QDir::cleanDirPath( d->path ) + QLatin1String("/");1055 else1056 1053 d->cleanPath = QDir::cleanDirPath( d->path ); 1054 if ( d->path.length() > 1 && d->path.endsWith(QLatin1Char('/')) ) 1055 d->cleanPath += QLatin1Char('/'); 1057 1056 } 1058 1057 … … 1085 1084 QString Q3Url::fileName() const 1086 1085 { 1087 if ( d->path.isEmpty() || d->path.endsWith( QLatin1 String("/") )1086 if ( d->path.isEmpty() || d->path.endsWith( QLatin1Char('/') ) 1088 1087 #ifdef Q_WS_WIN 1089 || d->path.endsWith( QLatin1 String("\\") )1088 || d->path.endsWith( QLatin1Char('\\') ) 1090 1089 #endif 1091 1090 ) … … 1111 1110 if ( path().isEmpty() ) { 1112 1111 if ( p[ 0 ] != QLatin1Char( '/' ) ) 1113 d->path = QLatin1 String("/") + p;1112 d->path = QLatin1Char('/') + p; 1114 1113 else 1115 1114 d->path = p; 1116 1115 } else { 1117 1116 if ( p[ 0 ] != QLatin1Char( '/' ) && d->path[ (int)d->path.length() - 1 ] != QLatin1Char('/') ) 1118 d->path += QLatin1 String("/") + p;1117 d->path += QLatin1Char('/') + p; 1119 1118 else 1120 1119 d->path += p; … … 1251 1250 if ( isLocalFile() ) { 1252 1251 if ( forcePrependProtocol ) 1253 res = d->protocol + QLatin1 String(":") + p;1252 res = d->protocol + QLatin1Char(':') + p; 1254 1253 else 1255 1254 res = p; 1256 1255 } else if ( d->protocol == QLatin1String("mailto") ) { 1257 res = d->protocol + QLatin1 String(":") + p;1256 res = d->protocol + QLatin1Char(':') + p; 1258 1257 } else { 1259 1258 res = d->protocol + QLatin1String("://"); … … 1268 1267 tmp = d->pass; 1269 1268 encode( tmp ); 1270 res += QLatin1 String(":") + tmp;1269 res += QLatin1Char(':') + tmp; 1271 1270 } 1272 res += QLatin1 String("@");1271 res += QLatin1Char('@'); 1273 1272 } 1274 1273 res += d->host; 1275 1274 if ( d->port != -1 ) 1276 res += QLatin1String(":") + QString( QLatin1String("%1") ).arg( d->port );1275 res += QLatin1Char(':') + QString::number( d->port ); 1277 1276 if ( !p.isEmpty() ) { 1278 1277 if ( !d->host.isEmpty() && p[0]!= QLatin1Char( '/' ) ) 1279 res += QLatin1 String("/");1278 res += QLatin1Char('/'); 1280 1279 res += p; 1281 1280 } … … 1283 1282 1284 1283 if ( !d->refEncoded.isEmpty() ) 1285 res += QLatin1 String("#") + d->refEncoded;1284 res += QLatin1Char('#') + d->refEncoded; 1286 1285 if ( !d->queryEncoded.isEmpty() ) 1287 res += QLatin1 String("?") + d->queryEncoded;1286 res += QLatin1Char('?') + d->queryEncoded; 1288 1287 1289 1288 return res; -
trunk/src/qt3support/network/q3url.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** -
trunk/src/qt3support/network/q3urloperator.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 544 544 through the Q3UrlOperator. The number of transferred bytes and the 545 545 total bytes that you receive as arguments in this signal do not 546 relate to the thewhole copy operation; they relate first to the546 relate to the whole copy operation; they relate first to the 547 547 get() and then to the put() operation. Always check what type of 548 548 operation the signal comes from; this is given in the signal's … … 580 580 return ops; 581 581 582 file.prepend( QLatin1 String("/") );582 file.prepend( QLatin1Char('/') ); 583 583 584 584 // uFrom and uTo are deleted when the Q3NetworkProtocol deletes itself via -
trunk/src/qt3support/network/q3urloperator.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the Qt3Support module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 **
Note:
See TracChangeset
for help on using the changeset viewer.