Summary: make it compile without foreach
Test Plan: autotest ok
Reviewers: dfaure
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D19778
The constructor of QFlags which was intended to handle literal "0"
as commonly used indicator of no-flags-set has been done with a
trick based on pointer types. Which these days of nullptr existing and
compilers pushing to use that sadly fired back and, instead of
allowing convenient code with commonly understood literal "0" values,
resulted in quite some code using "nullptr" to indicate a QFLags-based
type value with no flags set, which can be puzzling for humans
reading the code.
This was broken by astyle in commit v4.95.0~5 (Code reformatted using
kde-dev-scripts/astyle-kdelibs. Use git blame -w 5d4c2df to show
authorship as it was before this commit., 2013-12-18), because despite
the filenames, this is not really c++ code.
Note: QStringLiteral and multi-line string literals are not possible
with MSVC 2013 and below (known compiler bug/limitation).
Patch by Paul Wulff <paul.wulff@gmail.com>
CCMAIL: montel@kde.org
modeltest.(cpp|h) are taken from Qt 5.3. The license header has been
trimmed to clarify which license we are using it under, and to reflect
the fact we use a COPYING.LIB file instead of LICENSE.LGPL.
REVIEW: 116096