diff options
author | Thomas Hartmann <[email protected]> | 2017-04-19 14:44:49 +0200 |
---|---|---|
committer | Thomas Hartmann <[email protected]> | 2017-04-20 08:01:12 +0000 |
commit | e2be021cbac66ac416f7230db475468956fe6d31 (patch) | |
tree | 4d70ffdace9d3bd14852237bdd0fa4b48a0df305 /src/libs/qmljs/qmljsinterpreter.cpp | |
parent | 7fa9316a965066f7143c451477d94cdb0aadb7da (diff) |
Fix dead store
Change-Id: Ia7547803a379cd0518fdf3d707717f1bc9976dd1
Reviewed-by: Orgad Shaneh <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljsinterpreter.cpp')
-rw-r--r-- | src/libs/qmljs/qmljsinterpreter.cpp | 48 |
1 files changed, 17 insertions, 31 deletions
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index a0fb193807a..d124c295beb 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -185,37 +185,23 @@ PropertyInfo::PropertyInfo(uint flags) QString PropertyInfo::toString() const { - bool join = false; - QString res; - if (isReadable()) { - res += QLatin1String("Readable"); - join = true; - } - if (isWriteable()) { - if (join) - res += QLatin1Char('|'); - res += QLatin1String("Writeable"); - join = true; - } - if (isList()) { - if (join) - res += QLatin1Char('|'); - res += QLatin1String("ListType"); - join = true; - } - if (canBePointer()) { - if (join) - res += QLatin1Char('|'); - res += QLatin1String("Pointer"); - join = true; - } - if (canBeValue()) { - if (join) - res += QLatin1Char('|'); - res += QLatin1String("Value"); - join = true; - } - return res; + QStringList list; + if (isReadable()) + list.append("Readable"); + + if (isWriteable()) + list.append("Writeable"); + + if (isList()) + list.append("ListType"); + + if (canBePointer()) + list.append("Pointer"); + + if (canBeValue()) + list.append("Value"); + + return list.join('|'); } } // namespace QmlJS |