diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-23 12:58:52 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-23 12:58:52 (GMT) |
commit | 3274c40dee91aff48d5345187b43613be6e9f4d9 (patch) | |
tree | c905d770e350e80747991df8cef3cc14066d60c1 /src/plugins | |
parent | 57b2c5860825fb096d1e45582b06f4c77effb8ca (diff) | |
parent | 551ba5eb80bb8e4e522154f43abf864b8bf5146d (diff) | |
download | Qt-3274c40dee91aff48d5345187b43613be6e9f4d9.zip Qt-3274c40dee91aff48d5345187b43613be6e9f4d9.tar.gz Qt-3274c40dee91aff48d5345187b43613be6e9f4d9.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Fixes QT-4753
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/bearer/icd/dbusdispatcher.cpp | 9 | ||||
-rw-r--r-- | src/plugins/bearer/icd/qnetworksession_impl.cpp | 14 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/plugins/bearer/icd/dbusdispatcher.cpp b/src/plugins/bearer/icd/dbusdispatcher.cpp index 13cd8a9..a317cb4 100644 --- a/src/plugins/bearer/icd/dbusdispatcher.cpp +++ b/src/plugins/bearer/icd/dbusdispatcher.cpp @@ -194,18 +194,21 @@ static bool appendVariantToDBusMessage(const QVariant& argument, &int32_data); break; - case QVariant::String: - str_data = argument.toString().toLatin1().data(); + case QVariant::String: { + QByteArray data = argument.toString().toLatin1(); + str_data = data.data(); dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING, &str_data); break; + } case QVariant::StringList: str_list = argument.toStringList(); dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, "s", &array_iter); for (idx = 0; idx < str_list.size(); idx++) { - str_data = str_list.at(idx).toLatin1().data(); + QByteArray data = str_list.at(idx).toLatin1(); + str_data = data.data(); dbus_message_iter_append_basic(&array_iter, DBUS_TYPE_STRING, &str_data); diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index af5d85e..94a6c81 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -621,21 +621,21 @@ static QString get_network_interface() if (ret == 0) { /* No results */ #ifdef BEARER_MANAGEMENT_DEBUG - qDebug() << "Cannot get addrinfo from icd, are you connected or is icd running?"; + qDebug() << "Cannot get addrinfo from icd, are you connected or is icd running?"; #endif - return iface; + return iface; } if (addr_results.first().ip_info.isEmpty()) - return QString(); + return QString(); - const char *address = addr_results.first().ip_info.first().address.toAscii().constData(); + QByteArray data = addr_results.first().ip_info.first().address.toAscii(); struct in_addr addr; - if (inet_aton(address, &addr) == 0) { + if (inet_aton(data.constData(), &addr) == 0) { #ifdef BEARER_MANAGEMENT_DEBUG - qDebug() << "address" << address << "invalid"; + qDebug() << "address" << data.constData() << "invalid"; #endif - return iface; + return iface; } struct ifaddrs *ifaddr, *ifa; |