Fix no bearermanagement build
As pointed out in the bug, it also fixes API use when configured with no bearermanagement. Task-number: QTBUG-46239 Change-Id: Ief8df85ad6acf61e8d5bb3eed54e7d6ecb84c1a0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>bb10
parent
18be63de2a
commit
386aca1ba4
|
|
@ -961,6 +961,27 @@ QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccess
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
Returns the network session currently in use.
|
||||
This can be changed at any time, ownership remains with the QNetworkAccessManager
|
||||
*/
|
||||
const QWeakPointer<const QNetworkSession> QNetworkAccessManagerPrivate::getNetworkSession(const QNetworkAccessManager *q)
|
||||
{
|
||||
return q->d_func()->networkSessionWeakRef;
|
||||
}
|
||||
|
||||
QSharedPointer<QNetworkSession> QNetworkAccessManagerPrivate::getNetworkSession() const
|
||||
{
|
||||
if (networkSessionStrongRef)
|
||||
return networkSessionStrongRef;
|
||||
return networkSessionWeakRef.toStrongRef();
|
||||
}
|
||||
|
||||
#endif // QT_NO_BEARERMANAGEMENT
|
||||
|
||||
|
||||
#ifndef QT_NO_SSL
|
||||
/*!
|
||||
\since 5.2
|
||||
|
|
@ -1021,26 +1042,6 @@ void QNetworkAccessManager::connectToHost(const QString &hostName, quint16 port)
|
|||
get(request);
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
Returns the network session currently in use.
|
||||
This can be changed at any time, ownership remains with the QNetworkAccessManager
|
||||
*/
|
||||
const QWeakPointer<const QNetworkSession> QNetworkAccessManagerPrivate::getNetworkSession(const QNetworkAccessManager *q)
|
||||
{
|
||||
return q->d_func()->networkSessionWeakRef;
|
||||
}
|
||||
|
||||
QSharedPointer<QNetworkSession> QNetworkAccessManagerPrivate::getNetworkSession() const
|
||||
{
|
||||
if (networkSessionStrongRef)
|
||||
return networkSessionStrongRef;
|
||||
return networkSessionWeakRef.toStrongRef();
|
||||
}
|
||||
|
||||
#endif // QT_NO_BEARERMANAGEMENT
|
||||
|
||||
/*!
|
||||
\since 4.7
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
#include <QtCore/qdebug.h>
|
||||
|
||||
#include <QDir>
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
|
||||
extern "C" { // Otherwise it won't find CWKeychain* symbols at link time
|
||||
#import <CoreWLAN/CoreWLAN.h>
|
||||
|
|
@ -896,3 +897,5 @@ quint64 QCoreWlanEngine::getBytes(const QString &interfaceName, bool b)
|
|||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue