Bug 31087 - ChannelRequest::immutableProperties() initially returns invalid property values
Summary: ChannelRequest::immutableProperties() initially returns invalid property values
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-qt (show other bugs)
Version: git master
Hardware: Other All
: medium major
Assignee: Olli Salli
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-24 12:39 UTC by Artem Garmash
Modified: 2010-10-29 06:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Artem Garmash 2010-10-24 12:39:40 UTC
... because they are not extracted in ChannelRequest::Private::Private(...):

--- a/TelepathyQt4/channel-request.cpp
+++ b/TelepathyQt4/channel-request.cpp
@@ -127,7 +127,7 @@ ChannelRequest::Private::Private(ChannelRequest *parent,
         if (key.startsWith(QLatin1String(TELEPATHY_INTERFACE_CHANNEL_REQUEST "."))
                 && key.count(QLatin1Char('.')) ==
                     QString::fromAscii(TELEPATHY_INTERFACE_CHANNEL_REQUEST ".").count(QLatin1Char('.'))) {
-            mainProps.insert(key.remove(QLatin1String(TELEPATHY_INTERFACE_CHANNEL_REQUEST ".")),
+            mainProps.insert(QString(key).remove(QLatin1String(TELEPATHY_INTERFACE_CHANNEL_REQUEST ".")),
                     immutableProperties.value(key));
         }
     }


This may cause various warnings and a failed assertion.
Comment 1 Olli Salli 2010-10-29 06:30:46 UTC
Right, more appropriately described, the code was relying on a particular method parameter evaluation order, which is undefined in C++ - sadly this meant that our unit tests on amd64/g++-4.4.x failed to catch it as the resulting evaluation order was suitable.

Well-defined code merged to master, will be in 0.3.13.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.