Changeset 52153 in webkit


Ignore:
Timestamp:
Dec 15, 2009 8:17:56 AM (14 years ago)
Author:
zecke@webkit.org
Message:

[Qt] Followup for direct signals and slots connections in QNetworkReplyHandler

https://bugs.webkit.org/show_bug.cgi?id=32113

For Qt versions prior to 4.6.1 we will need to use QueuedConnection
for the signal and slot connection to avoid running into a bug in.

Add a comment that we want to remove one signal to forward
queued items when moving our minimum requirements.

  • platform/network/qt/QNetworkReplyHandler.cpp:

(WebCore::QNetworkReplyHandler::start):

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r52152 r52153  
     12009-12-15  Holger Hans Peter Freyther  <zecke@selfish.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Followup for direct signals and slots connections in QNetworkReplyHandler
     6        https://bugs.webkit.org/show_bug.cgi?id=32113
     7
     8        For Qt versions prior to 4.6.1 we will need to use QueuedConnection
     9        for the signal and slot connection to avoid running into a bug in.
     10
     11        Add a comment that we want to remove one signal to forward
     12        queued items when moving our minimum requirements.
     13
     14        * platform/network/qt/QNetworkReplyHandler.cpp:
     15        (WebCore::QNetworkReplyHandler::start):
     16
    1172009-12-14  Holger Hans Peter Freyther  <zecke@selfish.org>
    218
  • trunk/WebCore/platform/network/qt/QNetworkReplyHandler.cpp

    r52112 r52153  
    3838#include <QDebug>
    3939#include <QCoreApplication>
     40
     41// What type of connection should be used for the signals of the
     42// QNetworkReply? This depends on if Qt has a bugfix for this or not.
     43// It is fixed in Qt 4.6.1. See https://bugs.webkit.org/show_bug.cgi?id=32113
     44#if QT_VERSION > QT_VERSION_CHECK(4, 6, 0)
     45#define SIGNAL_CONN Qt::DirectConnection
     46#else
     47#define SIGNAL_CONN Qt::QueuedConnection
     48#endif
     49
    4050
    4151namespace WebCore {
     
    432442
    433443    connect(m_reply, SIGNAL(finished()),
    434             this, SLOT(finish()), Qt::DirectConnection);
     444            this, SLOT(finish()), SIGNAL_CONN);
    435445
    436446    // For http(s) we know that the headers are complete upon metaDataChanged() emission, so we
     
    438448    if (scheme == QLatin1String("http") || scheme == QLatin1String("https"))
    439449        connect(m_reply, SIGNAL(metaDataChanged()),
    440                 this, SLOT(sendResponseIfNeeded()), Qt::DirectConnection);
     450                this, SLOT(sendResponseIfNeeded()), SIGNAL_CONN);
    441451
    442452    connect(m_reply, SIGNAL(readyRead()),
    443             this, SLOT(forwardData()), Qt::DirectConnection);
     453            this, SLOT(forwardData()), SIGNAL_CONN);
     454
     455    // Make this a direct function call once we require 4.6.1+.
    444456    connect(this, SIGNAL(processQueuedItems()),
    445             this, SLOT(sendQueuedItems()), Qt::DirectConnection);
     457            this, SLOT(sendQueuedItems()), SIGNAL_CONN);
    446458}
    447459
Note: See TracChangeset for help on using the changeset viewer.