Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/network/ssl/qsslsocket.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    211211    signal. This mode is the default for clients.
    212212
    213     \value AutoVerifyPeer QSslSocket will automaticaly use QueryPeer for
     213    \value AutoVerifyPeer QSslSocket will automatically use QueryPeer for
    214214    server sockets and VerifyPeer for client sockets.
    215215
     
    297297#include <QtCore/qdebug.h>
    298298#include <QtCore/qdir.h>
    299 #include <QtCore/qdatetime.h>
    300299#include <QtCore/qmutex.h>
     300#include <QtCore/qelapsedtimer.h>
    301301#include <QtNetwork/qhostaddress.h>
    302302#include <QtNetwork/qhostinfo.h>
     
    575575
    576576    The default mode is AutoVerifyPeer, which tells QSslSocket to use
    577     VerifyPeer for clients, QueryPeer for clients.
     577    VerifyPeer for clients and QueryPeer for servers.
    578578
    579579    \sa setPeerVerifyMode(), peerVerifyDepth(), mode()
     
    595595
    596596    The default mode is AutoVerifyPeer, which tells QSslSocket to use
    597     VerifyPeer for clients, QueryPeer for clients.
     597    VerifyPeer for clients and QueryPeer for servers.
    598598
    599599    Setting this mode after encryption has started has no effect on the
     
    13301330    Returns the current default CA certificate database. This database
    13311331    is originally set to your system's default CA certificate database.
    1332     If no system default database is found, Qt will provide its own
    1333     default database. You can override the default CA certificate database
     1332    If no system default database is found, an empty database will be
     1333    returned. You can override the default CA certificate database
    13341334    with your own CA certificate database using setDefaultCaCertificates().
    13351335
     
    13451345
    13461346/*!
    1347     This function provides a default CA certificate database
    1348     shipped together with Qt. The CA certificate database
     1347    This function provides the CA certificate database
     1348    provided by the operating system. The CA certificate database
    13491349    returned by this function is used to initialize the database
    13501350    returned by defaultCaCertificates(). You can replace that database
     
    13551355QList<QSslCertificate> QSslSocket::systemCaCertificates()
    13561356{
    1357     QSslSocketPrivate::ensureInitialized();
     1357    // we are calling ensureInitialized() in the method below
    13581358    return QSslSocketPrivate::systemCaCertificates();
    13591359}
     
    14041404        return false;
    14051405
    1406     QTime stopWatch;
     1406    QElapsedTimer stopWatch;
    14071407    stopWatch.start();
    14081408
     
    14441444    d->readyReadEmittedPointer = &readyReadEmitted;
    14451445
    1446     QTime stopWatch;
     1446    QElapsedTimer stopWatch;
    14471447    stopWatch.start();
    14481448
     
    14811481        return d->plainSocket->waitForBytesWritten(msecs);
    14821482
    1483     QTime stopWatch;
     1483    QElapsedTimer stopWatch;
    14841484    stopWatch.start();
    14851485
     
    15191519        return d->plainSocket->waitForDisconnected(msecs);
    15201520
    1521     QTime stopWatch;
     1521    QElapsedTimer stopWatch;
    15221522    stopWatch.start();
    15231523
     
    15571557bool QSslSocket::supportsSsl()
    15581558{
    1559     return QSslSocketPrivate::ensureInitialized();
     1559    return QSslSocketPrivate::supportsSsl();
    15601560}
    15611561
     
    19661966    QMutexLocker locker(&globalData()->mutex);
    19671967    const QSslConfigurationPrivate *global = globalData()->config.constData();
     1968
     1969    if (!global) {
     1970        ptr = 0;
     1971        return;
     1972    }
    19681973
    19691974    ptr->ref = 1;
     
    20312036}
    20322037
     2038void QSslSocketPrivate::pauseSocketNotifiers(QSslSocket *socket)
     2039{
     2040    if (!socket->d_func()->plainSocket)
     2041        return;
     2042    QAbstractSocketPrivate::pauseSocketNotifiers(socket->d_func()->plainSocket);
     2043}
     2044
     2045void QSslSocketPrivate::resumeSocketNotifiers(QSslSocket *socket)
     2046{
     2047    if (!socket->d_func()->plainSocket)
     2048        return;
     2049    QAbstractSocketPrivate::resumeSocketNotifiers(socket->d_func()->plainSocket);
     2050}
     2051
    20332052/*!
    20342053    \internal
Note: See TracChangeset for help on using the changeset viewer.