summaryrefslogtreecommitdiffstats
path: root/src/network/bearer/qnetworksession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/bearer/qnetworksession.cpp')
-rw-r--r--src/network/bearer/qnetworksession.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 6a82791..cf9f4b2 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -275,6 +275,8 @@ void QNetworkSession::open()
{
if (d)
d->open();
+ else
+ emit error(InvalidConfigurationError);
}
/*!
@@ -308,6 +310,8 @@ bool QNetworkSession::waitForOpened(int msecs)
QEventLoop* loop = new QEventLoop(this);
QObject::connect(d, SIGNAL(quitPendingWaitsForOpened()),
loop, SLOT(quit()));
+ QObject::connect(this, SIGNAL(error(QNetworkSession::SessionError)),
+ loop, SLOT(quit()));
//final call
if (msecs>=0)
@@ -488,6 +492,20 @@ QString QNetworkSession::errorString() const
\o Setting this property to \i true before calling \l open() implies that the connection attempt
is made but if no connection can be established, the user is not connsulted and asked to select
a suitable connection. This property is not set by default and support for it depends on the platform.
+
+ \row
+ \o AutoCloseSessionTimeout
+ \o If the session requires polling to keep its state up to date, this property holds
+ the timeout in milliseconds before the session will automatically close. If the
+ value of this property is -1 the session will not automatically close. This property
+ is set to -1 by default.
+
+ The purpose of this property is to minimize resource use on platforms that use
+ polling to update the state of the session. Applications can set the value of this
+ property to the desired timeout before the session is closed. In response to the
+ closed() signal the network session should be deleted to ensure that all polling is
+ stopped. The session can then be recreated once it is required again. This property
+ has no effect for sessions that do not require polling.
\endtable
*/
QVariant QNetworkSession::sessionProperty(const QString& key) const
@@ -523,7 +541,7 @@ QVariant QNetworkSession::sessionProperty(const QString& key) const
\a key. Removing an already set property can be achieved by passing an
invalid QVariant.
- Note that the \i UserChoiceConfiguration and \i ActiveConfiguration
+ Note that the \e UserChoiceConfiguration and \e ActiveConfiguration
properties are read only and cannot be changed using this method.
*/
void QNetworkSession::setSessionProperty(const QString& key, const QVariant& value)