Qt 4.8
Static Public Functions | Properties | List of all members
QSharedNetworkSessionManager Class Reference

#include <qsharednetworksession_p.h>

Static Public Functions

static QSharedPointer< QNetworkSessiongetSession (QNetworkConfiguration config)
 
static void setSession (QNetworkConfiguration config, QSharedPointer< QNetworkSession > session)
 

Properties

QHash< QNetworkConfiguration, QWeakPointer< QNetworkSession > > sessions
 

Detailed Description

Definition at line 69 of file qsharednetworksession_p.h.

Functions

◆ getSession()

QSharedPointer< QNetworkSession > QSharedNetworkSessionManager::getSession ( QNetworkConfiguration  config)
static

Definition at line 67 of file qsharednetworksession.cpp.

Referenced by QNetworkAccessManagerPrivate::createSession().

68 {
70  //if already have a session, return it
71  if (m->sessions.contains(config)) {
72  QSharedPointer<QNetworkSession> p = m->sessions.value(config).toStrongRef();
73  if (!p.isNull())
74  return p;
75  }
76  //otherwise make one
78  m->sessions[config] = session;
79  return session;
80 }
The QNetworkSession class provides control over the system&#39;s access points and enables session manage...
static void doDeleteLater(QObject *obj)
QSharedNetworkSessionManager * sharedNetworkSessionManager()
bool isNull() const
Returns true if this object is holding a reference to a null pointer.

◆ setSession()

void QSharedNetworkSessionManager::setSession ( QNetworkConfiguration  config,
QSharedPointer< QNetworkSession session 
)
static

Definition at line 82 of file qsharednetworksession.cpp.

83 {
85  m->sessions[config] = session;
86 }
QSharedNetworkSessionManager * sharedNetworkSessionManager()

Properties

◆ sessions

QHash<QNetworkConfiguration, QWeakPointer<QNetworkSession> > QSharedNetworkSessionManager::sessions
private

Definition at line 75 of file qsharednetworksession_p.h.

Referenced by getSession(), and setSession().


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