summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex <qt-info@nokia.com>2010-08-05 07:43:52 (GMT)
committerToby Tomkins <toby.tomkins@nokia.com>2010-08-06 23:54:18 (GMT)
commitda48ab7726d97e305c17d8ad549ec548085df4ec (patch)
treea59994fa0ad9cea0eb8fe25b71a74d47337dcb28
parent01d3dcc43d26479c4a01ca8fa2530d19857d5049 (diff)
downloadQt-da48ab7726d97e305c17d8ad549ec548085df4ec.zip
Qt-da48ab7726d97e305c17d8ad549ec548085df4ec.tar.gz
Qt-da48ab7726d97e305c17d8ad549ec548085df4ec.tar.bz2
Fix link error when building Bearer application with Qt Mobility
QtMobility uses the Qt header when compiling applications which link against Mobility's Bearer library. Therefore QNetworkConfiguration::bearerName() cannot be inline and refer to the new QNetworkConfiguration::bearerTypeName() function (which doesn't exist in Mobility) Task-number: QTBUG-12378 Reviewed-by: Rohan McGovern (cherry picked from commit d524da81ee257a6bd67d32d0bc870280a7d5b8a4)
-rw-r--r--src/network/bearer/qnetworkconfiguration.cpp7
-rw-r--r--src/network/bearer/qnetworkconfiguration.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp
index b645916..8d57b97 100644
--- a/src/network/bearer/qnetworkconfiguration.cpp
+++ b/src/network/bearer/qnetworkconfiguration.cpp
@@ -406,6 +406,13 @@ QList<QNetworkConfiguration> QNetworkConfiguration::children() const
This function is deprecated. It is equivalent to calling bearerTypeName(), however
bearerType() should be used in preference.
*/
+QString QNetworkConfiguration::bearerName() const
+{
+ // This function cannot be inline as it would break Qt Mobility.
+ // Qt Mobility uses the Qt header as well and since the Mobility Bearer library
+ // does not provide bearerTypeName() we cannot use an inline function.
+ return bearerTypeName();
+}
/*!
Returns the type of bearer used by this network configuration.
diff --git a/src/network/bearer/qnetworkconfiguration.h b/src/network/bearer/qnetworkconfiguration.h
index d9d36fd..e4f762a 100644
--- a/src/network/bearer/qnetworkconfiguration.h
+++ b/src/network/bearer/qnetworkconfiguration.h
@@ -120,7 +120,7 @@ public:
Purpose purpose() const;
// Required to maintain source compatibility with Qt Mobility.
- QT_DEPRECATED inline QString bearerName() const { return bearerTypeName(); }
+ QT_DEPRECATED QString bearerName() const;
BearerType bearerType() const;
QString bearerTypeName() const;