]> m_has_attr_ = false;&endl; m_attr_ = 0;&endl; m_attr_ = 0.0;&endl; m_attr_ = 0.0;&endl; m_attr_ = false;&endl; m_ = 0;&endl; m_ = 0.0;&endl; m_ = false;&endl; m_ = 0;&endl; m_kind = Unknown;&endl;&endl; m_children = 0;&endl; m_text = QLatin1String("");&endl; :: ()&endl; {&endl; }&endl;&endl; qDeleteAll(m_ );&endl; m_ .clear();&endl; delete m_ ;&endl; ::~ ()&endl; {&endl; }&endl;&endl; void ::clear(bool clear_all)&endl; {&endl; &endl; if (clear_all) {&endl; m_text = QLatin1String("");&endl; m_text.clear();&endl; }&endl;&endl; m_kind = Unknown;&endl;&endl; m_children = 0;&endl; }&endl;&endl; QString(QLatin1Char(' ')) QLatin1String(" ") &endl; foreach (const QXmlStreamAttribute &attribute, reader.attributes()) {&endl; QStringRef name = attribute.name();&endl; attribute.value().toString() if (name == ) {&endl; setAttribute ( );&endl; continue;&endl; }&endl; reader.raiseError(QLatin1String("Unexpected attribute ") + name.toString());&endl; }&endl; if (tag == ) {&endl; setElement ( );&endl; m_ .append( );&endl; Dom *v = new Dom ();&endl; v->read(reader);&endl; setElement (v);&endl; Dom *v = new Dom ();&endl; v->read(reader);&endl; m_ .append(v);&endl; continue;&endl; }&endl; void ::read(QXmlStreamReader &reader)&endl; {&endl; &endl; for (bool finished = false; !finished && !reader.hasError();) {&endl; switch (reader.readNext()) {&endl; case QXmlStreamReader::StartElement : {&endl; const QString tag = reader.name().toString().toLower();&endl; reader.raiseError(QLatin1String("Unexpected element ") + tag);&endl; }&endl; break;&endl; case QXmlStreamReader::EndElement :&endl; finished = true;&endl; break;&endl; case QXmlStreamReader::Characters :&endl; if (!reader.isWhitespace())&endl; m_text.append(reader.text().toString());&endl; break;&endl; default :&endl; break;&endl; }&endl; }&endl; }&endl;&endl; &endl; node.attribute( ) if (node.hasAttribute( ))&endl; setAttribute ( );&endl; if (tag == ) {&endl; setElement ( );&endl; m_ .append( );&endl; Dom *v = new Dom ();&endl; v->read(e);&endl; setElement (v);&endl; Dom *v = new Dom ();&endl; v->read(e);&endl; m_ .append(v);&endl; continue;&endl; }&endl; #ifdef QUILOADER_QDOM_READ&endl; void ::read(const QDomElement &node)&endl; { &endl; for (QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {&endl; if (!n.isElement())&endl; continue;&endl; QDomElement e = n.toElement();&endl; QString tag = e.tagName().toLower();&endl; }&endl; m_text = QLatin1String("");&endl; m_text.clear();&endl; for (QDomNode child = node.firstChild(); !child.isNull(); child = child.nextSibling()) {&endl; if (child.isText())&endl; m_text.append(child.nodeValue());&endl; }&endl; }&endl; #endif&endl; &endl; if (hasAttribute ())&endl; writer.writeAttribute( , );&endl;&endl; switch (kind()) {&endl; case : {&endl; writer.writeTextElement( , );&endl; v = element ();&endl; if (v != 0) {&endl; v->write(writer, );&endl; }&endl; break;&endl; }&endl; default:&endl; break;&endl; }&endl; for (int i = 0; i < m_ .size(); ++i) {&endl; v = m_ [i];&endl; v->write(writer, );&endl; writer.writeTextElement( , );&endl; }&endl; if (m_children & ) {&endl; m_ ->write(writer, );&endl; writer.writeTextElement( , );&endl; }&endl;&endl; void ::write(QXmlStreamWriter &writer, const QString &tagName) const&endl; {&endl; writer.writeStartElement(tagName.isEmpty() ? QString::fromUtf8(" ") : tagName.toLower());&endl;&endl; if (!m_text.isEmpty())&endl; writer.writeCharacters(m_text);&endl;&endl; writer.writeEndElement();&endl; }&endl;&endl; ::takeElement () &endl;{&endl; a = m_ ;&endl; m_ = 0;&endl; m_children ^= ;&endl; return a;&endl; }&endl;&endl; void ::setElement ( a)&endl; {&endl; clear(false);&endl; m_kind = ;&endl; delete m_ ;&endl; m_children |= ;&endl; m_ = a;&endl; }&endl;&endl; void ::clearElement ()&endl; {&endl; delete m_ ;&endl; m_ = 0;&endl; m_children &= ~ ;&endl; }&endl;&endl; /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the either Technology Preview License Agreement or the ** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain ** additional rights. These rights are described in the Nokia Qt LGPL ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this ** package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "ui4_p.h"&endl; &endl; #ifdef QUILOADER_QDOM_READ&endl; #include <QtXml/QDomElement>&endl; #endif&endl; &endl; QT_BEGIN_NAMESPACE&endl; #ifdef QFORMINTERNAL_NAMESPACE&endl; using namespace QFormInternal;&endl; #endif&endl; &endl; /*******************************************************************************&endl; ** Implementations&endl; */&endl;&endl; QT_END_NAMESPACE&endl; &endl;