diff options
author | Janne Koskinen <janne.p.koskinen@digia.com> | 2010-04-19 15:36:56 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-04-21 11:31:39 (GMT) |
commit | bfd0fa7a333088b4846b0303ab8cbb08773b7ecd (patch) | |
tree | e713f230f12f678a42e9703ce8af2516125587a4 | |
parent | 073c33838510c76c9d7769eb6941e58f3aff724f (diff) | |
download | Qt-bfd0fa7a333088b4846b0303ab8cbb08773b7ecd.zip Qt-bfd0fa7a333088b4846b0303ab8cbb08773b7ecd.tar.gz Qt-bfd0fa7a333088b4846b0303ab8cbb08773b7ecd.tar.bz2 |
WINSCW boolean fix for XPATH
WINSCW cannot determine boolean type unless it is explicitly defined.
This fix needs to be re-applied always when files are regenerated.
Reviewed-by: Simon Hausmann
(cherry picked from commit 07aa94196e5ab6827099c683c0be96edbc62e6c0)
-rw-r--r-- | src/3rdparty/webkit/WebCore/xml/XPathValue.cpp | 5 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/xml/XPathValue.h | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/WebCore/xml/XPathValue.cpp b/src/3rdparty/webkit/WebCore/xml/XPathValue.cpp index 29e211e..f5acb38 100644 --- a/src/3rdparty/webkit/WebCore/xml/XPathValue.cpp +++ b/src/3rdparty/webkit/WebCore/xml/XPathValue.cpp @@ -68,7 +68,12 @@ NodeSet& Value::modifiableNodeSet() return m_data->m_nodeSet; } +#if COMPILER(WINSCW) +// FIXME --nl-- Symbian WINSCW compiler complains with 'ambiguous access to overloaded function' (double, unsigned long, unsigned int) +unsigned int Value::toBoolean() const +#else bool Value::toBoolean() const +#endif { switch (m_type) { case NodeSetValue: diff --git a/src/3rdparty/webkit/WebCore/xml/XPathValue.h b/src/3rdparty/webkit/WebCore/xml/XPathValue.h index a0cd24d..bd44c91 100644 --- a/src/3rdparty/webkit/WebCore/xml/XPathValue.h +++ b/src/3rdparty/webkit/WebCore/xml/XPathValue.h @@ -66,8 +66,11 @@ namespace WebCore { Value(Node* value) : m_type(NodeSetValue), m_bool(false), m_number(0), m_data(ValueData::create()) { m_data->m_nodeSet.append(value); } // This is needed to safely implement constructing from bool - with normal function overloading, any pointer type would match. +#if COMPILER(WINSCW) + Value(bool); +#else template<typename T> Value(T); - +#endif static const struct AdoptTag {} adopt; Value(NodeSet& value, const AdoptTag&) : m_type(NodeSetValue), m_bool(false), m_number(0), m_data(ValueData::create()) { value.swap(m_data->m_nodeSet); } @@ -80,7 +83,12 @@ namespace WebCore { const NodeSet& toNodeSet() const; NodeSet& modifiableNodeSet(); +#if COMPILER(WINSCW) + // FIXME --nl-- Symbian WINSCW compiler complains with 'ambiguous access to overloaded function' (double, unsigned long, unsigned int) + unsigned int toBoolean() const; +#else bool toBoolean() const; +#endif double toNumber() const; String toString() const; @@ -90,8 +98,9 @@ namespace WebCore { double m_number; RefPtr<ValueData> m_data; }; - +#if !COMPILER(WINSCW) template<> +#endif inline Value::Value(bool value) : m_type(BooleanValue) , m_bool(value) |