Bug 31087

Summary: ChannelRequest::immutableProperties() initially returns invalid property values
Product: Telepathy Reporter: Artem Garmash <artemgarmash>
Component: tp-qtAssignee: Olli Salli <ollisal>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: major    
Priority: medium    
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

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.