Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/qt3support/network/network.pri

    r2 r561  
    2727win32:SOURCES +=  network/q3socketdevice_win.cpp
    2828unix:SOURCES += network/q3socketdevice_unix.cpp
    29 mac:LIBS += -lresolv
     29mac:LIBS_PRIVATE += -lresolv
    3030
  • trunk/src/qt3support/network/q3dns.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    17391739            while( (dom=it.current()) != 0 ) {
    17401740                ++it;
    1741                 n.append( l.lower() + QLatin1String(".") + QLatin1String(dom) );
     1741                n.append( l.lower() + QLatin1Char('.') + QLatin1String(dom) );
    17421742            }
    17431743        }
     
    19031903        uint b = 0;
    19041904        while( b < 16 ) {
    1905             s = QString::number( i.c[b]%16, 16 ) + QLatin1String(".") +
    1906                 QString::number( i.c[b]/16, 16 ) + QLatin1String(".") + s;
     1905            s = QString::number( i.c[b]%16, 16 ) + QLatin1Char('.') +
     1906                QString::number( i.c[b]/16, 16 ) + QLatin1Char('.') + s;
    19071907            b++;
    19081908        }
     
    22432243
    22442244// ### FIXME: this code is duplicated in qfiledialog.cpp
    2245 static QString getWindowsRegString( HKEY key, const QString &subKey )
     2245static QString getWindowsRegString(HKEY key, const QString &subKey)
    22462246{
    22472247    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
    22752262    return s;
    22762263}
    22772264
    22782265static bool getDnsParamsFromRegistry( const QString &path,
    2279         QString *domainName, QString *nameServer, QString *searchList )
     2266    QString *domainName, QString *nameServer, QString *searchList )
    22802267{
    22812268    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 );
    22922270
    22932271    if ( r == ERROR_SUCCESS ) {
     
    23222300    // try the API call GetNetworkParams() first and use registry lookup only
    23232301    // 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" );
    23292303    if ( hinstLib != 0 ) {
    23302304#ifdef Q_OS_WINCE
    2331         GNP getNetworkParams = (GNP) GetProcAddressW( hinstLib, L"GetNetworkParams" );
     2305        GNP getNetworkParams = (GNP) GetProcAddress( hinstLib, L"GetNetworkParams" );
    23322306#else
    23332307        GNP getNetworkParams = (GNP) GetProcAddress( hinstLib, "GetNetworkParams" );
     
    23482322                        dnsServer = dnsServer->Next;
    23492323                        if ( dnsServer != 0 )
    2350                             nameServer += QLatin1String(" ");
     2324                            nameServer += QLatin1Char(' ');
    23512325                    }
    23522326                    searchList = QLatin1String("");
     
    23612335    if ( !gotNetworkParams ) {
    23622336        if ( getDnsParamsFromRegistry(
    2363             QString( QLatin1String("System\\CurrentControlSet\\Services\\Tcpip\\Parameters") ),
     2337            QLatin1String("System\\CurrentControlSet\\Services\\Tcpip\\Parameters"),
    23642338                    &domainName, &nameServer, &searchList )) {
    2365             // for NT
    23662339            separator = ' ';
    2367         } else if ( getDnsParamsFromRegistry(
    2368             QString( QLatin1String("System\\CurrentControlSet\\Services\\VxD\\MSTCP") ),
    2369                     &domainName, &nameServer, &searchList )) {
    2370             // for Windows 98
    2371             separator = ',';
    23722340        } else {
    23732341            // Could not access the TCP/IP parameters
     
    23962364    }
    23972365
    2398     searchList = searchList + QLatin1String(" ") + domainName;
     2366    searchList += QLatin1Char(' ') + domainName;
    23992367    searchList = searchList.simplifyWhiteSpace().lower();
    24002368    first = 0;
     
    24892457            line = stream.readLine();
    24902458            QStringList list = QStringList::split( QLatin1String(" "), line );
    2491             if( line.startsWith( QLatin1String("#") ) || list.size() < 2 )
     2459            if( line.startsWith( QLatin1Char('#') ) || list.size() < 2 )
    24922460               continue;
    24932461            const QString type = list[0].lower();
  • trunk/src/qt3support/network/q3dns.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3ftp.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    486486    dateStr += QLatin1Char(' ');
    487487
    488     if ( lst[ 7 ].contains( QLatin1String(":") ) ) {
     488    if ( lst[ 7 ].contains( QLatin1Char(':') ) ) {
    489489        time = QTime( lst[ 7 ].left( 2 ).toInt(), lst[ 7 ].right( 2 ).toInt() );
    490490        dateStr += QString::number( QDate::currentDate().year() );
     
    496496    info->setLastModified( QDateTime( date, time ) );
    497497
    498     if ( lst[ 7 ].contains( QLatin1String(":") ) ) {
     498    if ( lst[ 7 ].contains( QLatin1Char(':') ) ) {
    499499        const int futureTolerance = 600;
    500500        if( info->lastModified().secsTo( QDateTime::currentDateTime() ) < -futureTolerance ) {
     
    513513        QString n;
    514514        for ( uint i = 8; i < (uint) lst.count(); ++i )
    515             n += lst[ i ] + QLatin1String(" ");
     515            n += lst[ i ] + QLatin1Char(' ');
    516516        n = n.stripWhiteSpace();
    517517        info->setName( n );
     
    898898        } else {
    899899            QStringList lst = addrPortPattern.capturedTexts();
    900             QString host = lst[1] + QLatin1String(".") + lst[2] + QLatin1String(".") + lst[3] + QLatin1String(".") + lst[4];
     900            QString host = lst[1] + QLatin1Char('.') + lst[2] + QLatin1Char('.') + lst[3] + QLatin1Char('.') + lst[4];
    901901            Q_UINT16 port = ( lst[5].toUInt() << 8 ) + lst[6].toUInt();
    902902            waitForDtpToConnect = true;
     
    11451145    their results.
    11461146
    1147     Example: If you want to download the INSTALL file from Trolltech's
     1147    Example: If you want to download the INSTALL file from the Qt
    11481148    FTP server, you would write this:
    11491149
     
    14361436{
    14371437    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") );
    14401440    return addCommand( new Q3FtpCommand( Login, cmds ) );
    14411441}
     
    20962096    op->setState( StInProgress );
    20972097
    2098     cd( ( url()->path().isEmpty() ? QString( QLatin1String("/") ) : url()->path() ) );
     2098    cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) );
    20992099    list();
    21002100    emit start( op );
     
    21162116    op->setState( StInProgress );
    21172117
    2118     cd( ( url()->path().isEmpty() ? QString( QLatin1String("/") ) : url()->path() ) );
     2118    cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) );
    21192119    remove( Q3Url( op->arg( 0 ) ).path() );
    21202120}
     
    21262126    op->setState( StInProgress );
    21272127
    2128     cd( ( url()->path().isEmpty() ? QString( QLatin1String("/") ) : url()->path() ) );
     2128    cd( ( url()->path().isEmpty() ? QString::fromLatin1("/") : url()->path() ) );
    21292129    rename( op->arg( 0 ), op->arg( 1 ));
    21302130}
     
    21802180                break;
    21812181        }
    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();
    21842184        login( user, pass );
    21852185    }
  • trunk/src/qt3support/network/q3ftp.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3http.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    4343#include "q3http.h"
    4444
    45 #ifndef QT_NO_NETWORKPROTOCOL_HTTP
     45#ifndef QT_NO_HTTP
    4646
    4747#include "q3socket.h"
     
    469469            if ( (*it)[0].isSpace() ) {
    470470                if ( !lines.isEmpty() ) {
    471                     lines.last() += QLatin1String(" ");
     471                    lines.last() += QLatin1Char(' ');
    472472                    lines.last() += (*it).stripWhiteSpace();
    473473                }
     
    563563bool Q3HttpHeader::parseLine( const QString& line, int )
    564564{
    565     int i = line.find( QLatin1String(":") );
     565    int i = line.find( QLatin1Char(':') );
    566566    if ( i == -1 )
    567567        return false;
     
    627627
    628628/*!
    629     Returns true if the header has an entry for the the special HTTP
     629    Returns true if the header has an entry for the special HTTP
    630630    header field \c content-type; otherwise returns false.
    631631
     
    648648        return QString();
    649649
    650     int pos = type.find( QLatin1String(";") );
     650    int pos = type.find( QLatin1Char(';') );
    651651    if ( pos == -1 )
    652652        return type;
     
    786786}
    787787
    788 /*! \reimp
     788/*! \internal
    789789*/
    790790bool Q3HttpResponseHeader::parseLine( const QString& line, int number )
     
    953953}
    954954
    955 /*! \reimp
     955/*! \internal
    956956*/
    957957bool Q3HttpRequestHeader::parseLine( const QString& line, int number )
     
    10491049    To make an HTTP request you must set up suitable HTTP headers. The
    10501050    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):
    10531052
    10541053    \snippet doc/src/snippets/code/src_qt3support_network_q3http.cpp 3
     
    15361535
    15371536    \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.
    15391538
    15401539    If the IO device \a to is 0 the readyRead() signal is emitted
     
    15691568
    15701569    \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.
    15721571
    15731572    The incoming data comes via the \a data IO device.
     
    16161615
    16171616    \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.
    16191618
    16201619    The function does not block and returns immediately. The request
     
    22112210            op->setState( StFailed );
    22122211            op->setProtocolDetail(
    2213                     QString(QLatin1String("%1 %2")).arg(rep.statusCode()).arg(rep.reasonPhrase())
     2212            QString::fromLatin1("%1 %2").arg(rep.statusCode()).arg(rep.reasonPhrase())
    22142213                                                    );
    22152214            switch ( rep.statusCode() ) {
  • trunk/src/qt3support/network/q3http.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    5353
    5454QT_MODULE(Qt3Support)
    55 
    56 #ifndef QT_NO_NETWORKPROTOCOL_HTTP
     55#ifndef QT_NO_HTTP
    5756
    5857class Q3Socket;
     
    270269};
    271270
    272 #endif // QT_NO_NETWORKPROTOCOL_HTTP
     271#endif // QT_NO_HTTP
    273272
    274273QT_END_NAMESPACE
  • trunk/src/qt3support/network/q3localfs.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3localfs.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3network.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    6464    Q3NetworkProtocol::registerNetworkProtocol( QLatin1String("ftp"), new Q3NetworkProtocolFactory< Q3Ftp > );
    6565#endif
    66 #ifndef QT_NO_NETWORKPROTOCOL_HTTP
     66#ifndef QT_NO_HTTP
    6767    Q3NetworkProtocol::registerNetworkProtocol( QLatin1String("http"), new Q3NetworkProtocolFactory< Q3Http > );
    6868#endif
  • trunk/src/qt3support/network/q3network.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3networkprotocol.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3networkprotocol.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3serversocket.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3serversocket.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3socket.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3socket.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3socketdevice.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3socketdevice.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3socketdevice_unix.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3socketdevice_win.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    4848#include <string.h>
    4949
     50#  include <qt_windows.h>
    5051#if defined (QT_NO_IPV6)
    51 #  include <windows.h>
    5252#  include <winsock.h>
    5353#else
    5454#  if defined (Q_CC_BOR) || defined (Q_CC_GNU)
    5555#    include <winsock2.h>
    56 #  elif defined (Q_CC_INTEL)
     56#  else
    5757#    include <winsock.h>
    58 #  else
    59 #    include <windows.h>
    60 #  if defined(Q_OS_WINCE)
    61 #    include <winsock.h>
    62 #  endif
    6358#  endif
    6459// Use our own defines and structs which we know are correct
  • trunk/src/qt3support/network/q3url.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    110110    Example:
    111111
    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>
    113113
    114114    \table
    115115    \header \i Function     \i Returns
    116116    \row \i \l protocol()   \i "http"
    117     \row \i \l host()       \i "qtsoftware.com"
     117    \row \i \l host()       \i "example.com"
    118118    \row \i \l port()       \i 80
    119119    \row \i \l path()       \i "/cgi-bin/test&nbsp;me.pl"
     
    124124    Example:
    125125
    126     <tt>http://doc.trolltech.com/qdockarea.html#lines</tt>
     126    <tt>http://qt.nokia.com/doc/qdockarea.html#lines</tt>
    127127
    128128    \table
    129129    \header \i Function     \i Returns
    130130    \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"
    133133    \row \i \l ref()        \i "lines"
    134134    \endtable
     
    212212bool Q3Url::isRelativeUrl( const QString &url )
    213213{
    214     int colon = url.find( QLatin1String(":") );
    215     int slash = url.find( QLatin1String("/") );
     214    int colon = url.find( QLatin1Char(':') );
     215    int slash = url.find( QLatin1Char('/') );
    216216
    217217    return ( slash != 0 && ( colon == -1 || ( slash != -1 && colon > slash ) ) );
     
    229229    On the other hand,
    230230    \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",
    232232    because "/usr/local" isn't relative.
    233233
     
    281281                        p = QLatin1String("/");
    282282                }
    283                 if ( !p.isEmpty() && p.right(1)!=QLatin1String("/") )
    284                     p += QLatin1String("/");
     283                if ( !p.isEmpty() && !p.endsWith(QLatin1Char('/')) )
     284                    p += QLatin1Char('/');
    285285                p += rel;
    286286                d->path = p;
     
    679679        while ( url_[ cs ] == QLatin1Char('/') )
    680680            ++cs;
    681         int slash = url_.find( QLatin1String("/"), cs );
     681        int slash = url_.find( QLatin1Char('/'), cs );
    682682        if ( slash == -1 )
    683683            slash = url_.length() - 1;
     
    687687
    688688            // look for the @ in this part
    689             int at = tmp.find( QLatin1String("@") );
     689            int at = tmp.find( QLatin1Char('@') );
    690690            if ( at != -1 )
    691691                at += cs;
     
    794794    // hack for windows
    795795    if ( d->path.length() == 2 && d->path[ 1 ] == QLatin1Char(':') )
    796         d->path += QLatin1String("/");
     796        d->path += QLatin1Char('/');
    797797
    798798    // #### do some corrections, should be done nicer too
     
    809809            d->path.remove( (uint)0, 1 );
    810810        if ( d->path[ 0 ] != QLatin1Char('/') && !relPath && d->path[ 1 ] != QLatin1Char(':') )
    811             d->path.prepend( QLatin1String("/") );
     811            d->path.prepend( QLatin1Char('/') );
    812812    }
    813813    if ( !d->refEncoded.isEmpty() && d->refEncoded[ 0 ] == QLatin1Char('#') )
     
    821821    // hack for windows file://machine/path syntax
    822822    if ( d->protocol == QLatin1String("file") ) {
    823         if ( url.left( 7 ) == QLatin1String("file://") &&
     823        if ( url.startsWith(QLatin1String("file://")) &&
    824824             d->path.length() > 1 && d->path[ 1 ] != QLatin1Char(':') )
    825                  d->path.prepend( QLatin1String("/") );
     825                 d->path.prepend( QLatin1Char('/') );
    826826    }
    827827#endif
     
    943943    p += fn;
    944944    if ( !d->queryEncoded.isEmpty() )
    945         p += QLatin1String("?") + d->queryEncoded;
     945        p += QLatin1Char('?') + d->queryEncoded;
    946946    setEncodedPathAndQuery( p );
    947947}
     
    962962
    963963    if ( !d->queryEncoded.isEmpty() ) {
    964         p += QLatin1String("?");
     964        p += QLatin1Char('?');
    965965        p += d->queryEncoded;
    966966    }
     
    10121012#if defined(Q_OS_WIN32)
    10131013            // 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('\\')) ) &&
    10151015                 d->path.length() > 1 ) {
    10161016                d->cleanPath = d->path;
     
    10221022                    check = false;
    10231023                    while (d->cleanPath.at(0) != QLatin1Char('/') || d->cleanPath.at(1) != QLatin1Char('/'))
    1024                         d->cleanPath.prepend(QLatin1String("/"));
     1024                        d->cleanPath.prepend(QLatin1Char('/'));
    10251025                }
    10261026            }
     
    10371037                    else
    10381038                       dir = QDir::cleanDirPath( QDir( d->path ).absPath() );
    1039                     dir += QLatin1String("/");
     1039                    dir += QLatin1Char('/');
    10401040                    if ( dir == QLatin1String("//") )
    10411041                        d->cleanPath = QLatin1String("/");
     
    10471047                                            fi.dir().canonicalPath() :
    10481048                                            fi.dir().absPath()) );
    1049                     d->cleanPath = p + QLatin1String("/") + fi.fileName();
     1049                    d->cleanPath = p + QLatin1Char('/') + fi.fileName();
    10501050                }
    10511051            }
    10521052        } else {
    1053             if ( d->path != QLatin1String("/") && d->path[ (int)d->path.length() - 1 ] == QLatin1Char('/') )
    1054                 d->cleanPath = QDir::cleanDirPath( d->path ) + QLatin1String("/");
    1055             else
    10561053                d->cleanPath = QDir::cleanDirPath( d->path );
     1054            if ( d->path.length() > 1 && d->path.endsWith(QLatin1Char('/')) )
     1055                d->cleanPath += QLatin1Char('/');
    10571056        }
    10581057
     
    10851084QString Q3Url::fileName() const
    10861085{
    1087     if ( d->path.isEmpty() || d->path.endsWith( QLatin1String("/") )
     1086    if ( d->path.isEmpty() || d->path.endsWith( QLatin1Char('/') )
    10881087#ifdef Q_WS_WIN
    1089         || d->path.endsWith( QLatin1String("\\") )
     1088        || d->path.endsWith( QLatin1Char('\\') )
    10901089#endif
    10911090        )
     
    11111110    if ( path().isEmpty() ) {
    11121111        if ( p[ 0 ] != QLatin1Char( '/' ) )
    1113             d->path = QLatin1String("/") + p;
     1112            d->path = QLatin1Char('/') + p;
    11141113        else
    11151114            d->path = p;
    11161115    } else {
    11171116        if ( p[ 0 ] != QLatin1Char( '/' ) && d->path[ (int)d->path.length() - 1 ] != QLatin1Char('/') )
    1118             d->path += QLatin1String("/") + p;
     1117            d->path += QLatin1Char('/') + p;
    11191118        else
    11201119            d->path += p;
     
    12511250    if ( isLocalFile() ) {
    12521251        if ( forcePrependProtocol )
    1253             res = d->protocol + QLatin1String(":") + p;
     1252            res = d->protocol + QLatin1Char(':') + p;
    12541253        else
    12551254            res = p;
    12561255    } else if ( d->protocol == QLatin1String("mailto") ) {
    1257         res = d->protocol + QLatin1String(":") + p;
     1256        res = d->protocol + QLatin1Char(':') + p;
    12581257    } else {
    12591258        res = d->protocol + QLatin1String("://");
     
    12681267                tmp = d->pass;
    12691268                encode( tmp );
    1270                 res += QLatin1String(":") + tmp;
     1269                res += QLatin1Char(':') + tmp;
    12711270            }
    1272             res += QLatin1String("@");
     1271            res += QLatin1Char('@');
    12731272        }
    12741273        res += d->host;
    12751274        if ( d->port != -1 )
    1276             res += QLatin1String(":") + QString( QLatin1String("%1") ).arg( d->port );
     1275        res += QLatin1Char(':') + QString::number( d->port );
    12771276        if ( !p.isEmpty() ) {
    12781277            if ( !d->host.isEmpty() && p[0]!= QLatin1Char( '/' ) )
    1279                 res += QLatin1String("/");
     1278                res += QLatin1Char('/');
    12801279            res += p;
    12811280        }
     
    12831282
    12841283    if ( !d->refEncoded.isEmpty() )
    1285         res += QLatin1String("#") + d->refEncoded;
     1284        res += QLatin1Char('#') + d->refEncoded;
    12861285    if ( !d->queryEncoded.isEmpty() )
    1287         res += QLatin1String("?") + d->queryEncoded;
     1286        res += QLatin1Char('?') + d->queryEncoded;
    12881287
    12891288    return res;
  • trunk/src/qt3support/network/q3url.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/qt3support/network/q3urloperator.cpp

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
     
    544544    through the Q3UrlOperator. The number of transferred bytes and the
    545545    total bytes that you receive as arguments in this signal do not
    546     relate to the the whole copy operation; they relate first to the
     546    relate to the whole copy operation; they relate first to the
    547547    get() and then to the put() operation. Always check what type of
    548548    operation the signal comes from; this is given in the signal's
     
    580580         return ops;
    581581   
    582     file.prepend( QLatin1String("/") );
     582    file.prepend( QLatin1Char('/') );
    583583
    584584    // uFrom and uTo are deleted when the Q3NetworkProtocol deletes itself via
  • trunk/src/qt3support/network/q3urloperator.h

    r2 r561  
    22**
    33** 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)
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** 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.
    3838** $QT_END_LICENSE$
    3939**
Note: See TracChangeset for help on using the changeset viewer.