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/socket/qabstractsocket.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)
     
    366366
    367367#include <qabstracteventdispatcher.h>
    368 #include <qdatetime.h>
    369368#include <qhostaddress.h>
    370369#include <qhostinfo.h>
     
    372371#include <qpointer.h>
    373372#include <qtimer.h>
     373#include <qelapsedtimer.h>
    374374
    375375#ifndef QT_NO_OPENSSL
     
    12131213}
    12141214
     1215
     1216void QAbstractSocketPrivate::pauseSocketNotifiers(QAbstractSocket *socket)
     1217{
     1218    QAbstractSocketEngine *socketEngine = socket->d_func()->socketEngine;
     1219    if (!socketEngine)
     1220        return;
     1221    socket->d_func()->prePauseReadSocketNotifierState = socketEngine->isReadNotificationEnabled();
     1222    socket->d_func()->prePauseWriteSocketNotifierState = socketEngine->isWriteNotificationEnabled();
     1223    socket->d_func()->prePauseExceptionSocketNotifierState = socketEngine->isExceptionNotificationEnabled();
     1224    socketEngine->setReadNotificationEnabled(false);
     1225    socketEngine->setWriteNotificationEnabled(false);
     1226    socketEngine->setExceptionNotificationEnabled(false);
     1227}
     1228
     1229void QAbstractSocketPrivate::resumeSocketNotifiers(QAbstractSocket *socket)
     1230{
     1231    QAbstractSocketEngine *socketEngine = socket->d_func()->socketEngine;
     1232    if (!socketEngine)
     1233        return;
     1234    socketEngine->setReadNotificationEnabled(socket->d_func()->prePauseReadSocketNotifierState);
     1235    socketEngine->setWriteNotificationEnabled(socket->d_func()->prePauseWriteSocketNotifierState);
     1236    socketEngine->setExceptionNotificationEnabled(socket->d_func()->prePauseExceptionSocketNotifierState);
     1237}
     1238
     1239QAbstractSocketEngine* QAbstractSocketPrivate::getSocketEngine(QAbstractSocket *socket)
     1240{
     1241    return socket->d_func()->socketEngine;
     1242}
     1243
     1244
    12151245/*! \internal
    12161246
     
    13811411    } else {
    13821412        if (d->threadData->eventDispatcher) {
    1383             // this internal API for QHostInfo either immediatly gives us the desired
     1413            // this internal API for QHostInfo either immediately gives us the desired
    13841414            // QHostInfo from cache or later calls the _q_startConnecting slot.
    13851415            bool immediateResultValid = false;
     
    17391769    bool wasPendingClose = d->pendingClose;
    17401770    d->pendingClose = false;
    1741     QTime stopWatch;
     1771    QElapsedTimer stopWatch;
    17421772    stopWatch.start();
    17431773
     
    18201850    }
    18211851
    1822     QTime stopWatch;
     1852    QElapsedTimer stopWatch;
    18231853    stopWatch.start();
    18241854
     
    18791909        return false;
    18801910
    1881     QTime stopWatch;
     1911    QElapsedTimer stopWatch;
    18821912    stopWatch.start();
    18831913
     
    19611991    }
    19621992
    1963     QTime stopWatch;
     1993    QElapsedTimer stopWatch;
    19641994    stopWatch.start();
    19651995
Note: See TracChangeset for help on using the changeset viewer.