diff options
author | Jose <jose@zeroc.com> | 2011-12-30 23:12:14 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2011-12-30 23:12:14 +0100 |
commit | e5655fc5f648b02a567c2d6b630a8ca4430142a8 (patch) | |
tree | 6f321487b3d15d00b263c3a2e4708240b6e1dd88 /cpp/src/IceStorm/SqlDB/SqlSubscriberMap.cpp | |
parent | minor test script fixes (diff) | |
download | ice-e5655fc5f648b02a567c2d6b630a8ca4430142a8.tar.bz2 ice-e5655fc5f648b02a567c2d6b630a8ca4430142a8.tar.xz ice-e5655fc5f648b02a567c2d6b630a8ca4430142a8.zip |
ICE-4574 - SQL DB and string conversions
Diffstat (limited to 'cpp/src/IceStorm/SqlDB/SqlSubscriberMap.cpp')
-rw-r--r-- | cpp/src/IceStorm/SqlDB/SqlSubscriberMap.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cpp/src/IceStorm/SqlDB/SqlSubscriberMap.cpp b/cpp/src/IceStorm/SqlDB/SqlSubscriberMap.cpp index f50faaf7db7..8ad679f45c3 100644 --- a/cpp/src/IceStorm/SqlDB/SqlSubscriberMap.cpp +++ b/cpp/src/IceStorm/SqlDB/SqlSubscriberMap.cpp @@ -119,7 +119,7 @@ SqlSubscriberMap::QoSMap::find(const DatabaseConnectionPtr& connection, QoS qos; while(query.next()) { - qos[query.value(2).toString().toStdString()] = query.value(3).toString().toStdString(); + qos[query.value(2).toString().toUtf8().data()] = query.value(3).toString().toUtf8().data(); } return qos; } @@ -295,13 +295,13 @@ SqlSubscriberMap::find(const DatabaseConnectionPtr& connection, if(query.next()) { SubscriberRecord record; - record.topicName = query.value(2).toString().toStdString(); + record.topicName = query.value(2).toString().toUtf8().data(); record.id = key.id; - record.link = query.value(3).toString().toStdString() == "true" ? true : false; - record.obj = _communicator->stringToProxy(query.value(4).toString().toStdString()); + record.link = string(query.value(3).toString().toUtf8().data()) == "true" ? true : false; + record.obj = _communicator->stringToProxy(query.value(4).toString().toUtf8().data()); record.cost = query.value(5).toInt(); record.theTopic = - TopicPrx::uncheckedCast(_communicator->stringToProxy(query.value(6).toString().toStdString())); + TopicPrx::uncheckedCast(_communicator->stringToProxy(query.value(6).toString().toUtf8().data())); record.theQoS = _qosMap.find(connection, key); @@ -330,17 +330,17 @@ SqlSubscriberMap::getMap(const DatabaseConnectionPtr& connection, while(query.next()) { SubscriberRecordKey key; - key.topic = _communicator->stringToIdentity(query.value(0).toString().toStdString()); - key.id = _communicator->stringToIdentity(query.value(1).toString().toStdString()); + key.topic = _communicator->stringToIdentity(query.value(0).toString().toUtf8().data()); + key.id = _communicator->stringToIdentity(query.value(1).toString().toUtf8().data()); SubscriberRecord record; - record.topicName = query.value(2).toString().toStdString(); + record.topicName = query.value(2).toString().toUtf8().data(); record.id = key.id; - record.link = query.value(3).toString().toStdString() == "true" ? true : false; - record.obj = _communicator->stringToProxy(query.value(4).toString().toStdString()); + record.link = string(query.value(3).toString().toUtf8().data()) == "true" ? true : false; + record.obj = _communicator->stringToProxy(query.value(4).toString().toUtf8().data()); record.cost = query.value(5).toInt(); record.theTopic = - TopicPrx::uncheckedCast(_communicator->stringToProxy(query.value(6).toString().toStdString())); + TopicPrx::uncheckedCast(_communicator->stringToProxy(query.value(6).toString().toUtf8().data())); record.theQoS = _qosMap.find(connection, key); |