QtBase  v6.3.1
Public Member Functions | Static Public Member Functions | Protected Slots | List of all members
tst_qnetworkreply Class Reference
Inheritance diagram for tst_qnetworkreply:
Inheritance graph
[legend]
Collaboration diagram for tst_qnetworkreply:
Collaboration graph
[legend]

Public Member Functions

bool connect (const QNetworkReplyPtr &sender, const char *signal, const QObject *receiver, const char *slot, Qt::ConnectionType ct=Qt::AutoConnection)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 
virtual ~QObject ()
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
QString objectName () const
 
void setObjectName (const QString &name)
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 
bool isWindowType () const
 
bool signalsBlocked () const noexcept
 
bool blockSignals (bool b) noexcept
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 
template<typename T >
T findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
const QObjectListchildren () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 
void dumpObjectInfo () const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 

Static Public Member Functions

static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 

Protected Slots

void spdyReplyFinished ()
 
void authenticationRequiredSlot (QNetworkReply *, QAuthenticator *authenticator)
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Properties inherited from QObject
QString objectName
 the name of this object More...
 

Detailed Description

Definition at line 431 of file tst_qnetworkreply.cpp.

Member Function Documentation

◆ authenticationRequiredSlot

void tst_qnetworkreply::authenticationRequiredSlot ( QNetworkReply ,
QAuthenticator authenticator 
)
protectedslot

Definition at line 345 of file main.cpp.

Here is the call graph for this function:

◆ connect() [1/9]

bool tst_qnetworkreply::connect ( const QNetworkReplyPtr sender,
const char *  signal,
const QObject receiver,
const char *  slot,
Qt::ConnectionType  ct = Qt::AutoConnection 
)
inline

Definition at line 439 of file tst_qnetworkreply.cpp.

Here is the call graph for this function:

◆ connect() [2/9]

QMetaObject::Connection QObject::connect
inline

Definition at line 219 of file qobject.h.

◆ connect() [3/9]

QMetaObject::Connection QObject::connect
static

\threadsafe

Creates a connection of the given type from the signal in the sender object to the method in the receiver object. Returns a handle to the connection that can be used to disconnect it later.

You must use the SIGNAL() and SLOT() macros when specifying the signal and the method, for example:

This example ensures that the label always displays the current scroll bar value. Note that the signal and slots parameters must not contain any variable names, only the type. E.g. the following would not work and return false:

A signal can also be connected to another signal:

In this example, the MyWidget constructor relays a signal from a private member variable, and makes it available under a name that relates to MyWidget.

A signal can be connected to many slots and signals. Many signals can be connected to one slot.

If a signal is connected to several slots, the slots are activated in the same order in which the connections were made, when the signal is emitted.

The function returns a QMetaObject::Connection that represents a handle to a connection if it successfully connects the signal to the slot. The connection handle will be invalid if it cannot create the connection, for example, if QObject is unable to verify the existence of either signal or method, or if their signatures aren't compatible. You can check if the handle is valid by casting it to a bool.

By default, a signal is emitted for every connection you make; two signals are emitted for duplicate connections. You can break all of these connections with a single disconnect() call. If you pass the Qt::UniqueConnection type, the connection will only be made if it is not a duplicate. If there is already a duplicate (exact same signal to the exact same slot on the same objects), the connection will fail and connect will return an invalid QMetaObject::Connection.

Note
Qt::UniqueConnections do not work for lambdas, non-member functions and functors; they only apply to connecting to member functions.

The optional type parameter describes the type of connection to establish. In particular, it determines whether a particular signal is delivered to a slot immediately or queued for delivery at a later time. If the signal is queued, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the arguments to store them in an event behind the scenes. If you try to use a queued connection and get the error message

call qRegisterMetaType() to register the data type before you establish the connection.

See also
disconnect(), sender(), qRegisterMetaType(), Q_DECLARE_METATYPE(), {Differences between String-Based and Functor-Based Connections}

Definition at line 212 of file qobject.cpp.

Here is the caller graph for this function:

◆ connect() [4/9]

QMetaObject::Connection QObject::connect
static
Since
4.8

Creates a connection of the given type from the signal in the sender object to the method in the receiver object. Returns a handle to the connection that can be used to disconnect it later.

The Connection handle will be invalid if it cannot create the connection, for example, the parameters were invalid. You can check if the QMetaObject::Connection is valid by casting it to a bool.

This function works in the same way as {connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)} but it uses QMetaMethod to specify signal and method.

See also
connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)

Definition at line 215 of file qobject.cpp.

◆ connect() [5/9]

static QMetaObject::Connection ::type QObject::connect
inlinestatic

Definition at line 273 of file qobject.h.

◆ connect() [6/9]

template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1 && !std::is_convertible_v<Func2, const char*>, QMetaObject::Connection>::type QObject::connect ( typename Func1  ,
typename Func2   
)
inlinestatic

Definition at line 318 of file qobject.h.

◆ connect() [7/9]

template<typename Func1 , typename Func2 >
static QMetaObject::Connection QObject::connect ( typename Func1  ,
typename Func2   
)
inlinestatic

Definition at line 232 of file qobject.h.

◆ connect() [8/9]

static QMetaObject::Connection ::type QObject::connect
inlinestatic

Definition at line 264 of file qobject.h.

◆ connect() [9/9]

template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1 && !std::is_convertible_v<Func2, const char*>, QMetaObject::Connection>::type QObject::connect ( typename Func1  ,
typename Func2   
)
inlinestatic

Definition at line 307 of file qobject.h.

◆ spdyReplyFinished

void tst_qnetworkreply::spdyReplyFinished ( )
protectedslot

Definition at line 292 of file main.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: