diff options
author | Alessandro Portale <alessandro.portale@digia.com> | 2014-09-09 15:18:54 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2014-10-09 09:43:26 +0200 |
commit | 106487387d493dab934e19b33bfed55b8df62d67 (patch) | |
tree | ac2dfad985759a609454179082de9f7e97e1b73d /src/tools | |
parent | e5f528fb0ea09ec839853575c1154f9101303a84 (diff) |
Removing a few unneeded "? true : false"
Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qdoc/config.cpp | 2 | ||||
-rw-r--r-- | src/tools/qdoc/cppcodeparser.cpp | 2 | ||||
-rw-r--r-- | src/tools/uic/ui4.cpp | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/tools/qdoc/config.cpp b/src/tools/qdoc/config.cpp index 5c12458cac..51ab341869 100644 --- a/src/tools/qdoc/config.cpp +++ b/src/tools/qdoc/config.cpp @@ -1101,7 +1101,7 @@ void Config::load(Location location, const QString& fileName) ConfigVarMultimap::Iterator i; i = configVars_.insert(*key, ConfigVar(*key, rhsValues, QDir::currentPath(), keyLoc)); - i.value().plus_ = (plus ? true : false); + i.value().plus_ = plus; ++key; } } diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index 66dfa3290f..22aae609ae 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -1076,7 +1076,7 @@ bool CppCodeParser::skipTo(int target) { while ((tok != Tok_Eoi) && (tok != target)) readToken(); - return (tok == target ? true : false); + return tok == target; } /*! diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp index 352cd34b68..01b4437db7 100644 --- a/src/tools/uic/ui4.cpp +++ b/src/tools/uic/ui4.cpp @@ -3471,7 +3471,7 @@ void DomWidget::read(QXmlStreamReader &reader) continue; } if (name == QStringLiteral("native")) { - setAttributeNative((attribute.value().toString() == QStringLiteral("true") ? true : false)); + setAttributeNative(attribute.value().toString() == QStringLiteral("true")); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); @@ -4845,23 +4845,23 @@ void DomFont::read(QXmlStreamReader &reader) continue; } if (tag == QStringLiteral("italic")) { - setElementItalic((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementItalic(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("bold")) { - setElementBold((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementBold(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("underline")) { - setElementUnderline((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementUnderline(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("strikeout")) { - setElementStrikeOut((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementStrikeOut(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("antialiasing")) { - setElementAntialiasing((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementAntialiasing(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("stylestrategy")) { @@ -4869,7 +4869,7 @@ void DomFont::read(QXmlStreamReader &reader) continue; } if (tag == QStringLiteral("kerning")) { - setElementKerning((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementKerning(reader.readElementText() == QStringLiteral("true")); continue; } reader.raiseError(QStringLiteral("Unexpected element ") + tag); |