Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/saferString into lp:~bzoltan/ubuntu-ui-toolkit/OTA13-2016-06-29

Proposed by Cris Dywan
Status: Merged
Merged at revision: 2049
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/saferString
Merge into: lp:~bzoltan/ubuntu-ui-toolkit/OTA13-2016-06-29
Diff against target: 12 lines (+1/-1)
1 file modified
src/Ubuntu/UbuntuToolkit/privates/ucpagewrapper.cpp (+1/-1)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/saferString
Reviewer Review Type Date Requested Status
Zoltan Balogh Pending
Review via email: mp+302280@code.launchpad.net

Commit message

Use safe qstrcmp: typeName() can be 0

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Ubuntu/UbuntuToolkit/privates/ucpagewrapper.cpp'
--- src/Ubuntu/UbuntuToolkit/privates/ucpagewrapper.cpp 2016-07-20 11:45:52 +0000
+++ src/Ubuntu/UbuntuToolkit/privates/ucpagewrapper.cpp 2016-08-08 12:01:08 +0000
@@ -210,7 +210,7 @@
210 for (;i != propMap.constEnd(); i++) {210 for (;i != propMap.constEnd(); i++) {
211 QQmlProperty prop(target, i.key(), context);211 QQmlProperty prop(target, i.key(), context);
212 bool convertible = true;212 bool convertible = true;
213 if (!strcmp(i.value().typeName(),"void*")) {213 if (!qstrcmp(i.value().typeName(),"void*")) {
214 // we have void*, we cannot convert that one, so we must force the conversion214 // we have void*, we cannot convert that one, so we must force the conversion
215 void *pvalue = i.value().value<void*>();215 void *pvalue = i.value().value<void*>();
216 QVariant value(QVariant::Type(prop.propertyType()), pvalue);216 QVariant value(QVariant::Type(prop.propertyType()), pvalue);

Subscribers

People subscribed via source and target branches

to all changes: