diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-24 16:18:52 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-24 16:18:52 (GMT) |
commit | f09b8e7b134c8dfe7e50d64662e943273d721d9a (patch) | |
tree | 19b13cbe46a5c676327c3b4098e527f465469523 /src/plugins/bearer | |
parent | 295fbcba490712fe6e6f61926836920366134b55 (diff) | |
parent | 660f881f04a0880c83a0b43b4f4d0e89da082d92 (diff) | |
download | Qt-f09b8e7b134c8dfe7e50d64662e943273d721d9a.zip Qt-f09b8e7b134c8dfe7e50d64662e943273d721d9a.tar.gz Qt-f09b8e7b134c8dfe7e50d64662e943273d721d9a.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
src/opengl/qwindowsurface_gl.cpp
Diffstat (limited to 'src/plugins/bearer')
-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; |