summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-08-19 09:24:04 (GMT)
committeraxis <qt-info@nokia.com>2009-08-19 09:24:04 (GMT)
commit2d1b49bd21b788ba3e35fc5c41bf3aab42cbda65 (patch)
tree24dae3a4532870d61282841f6bb186cb008ab747 /demos
parentb3a3652abbf1cb4ebba6c6257ecf47f8dc022d93 (diff)
parent20d2b7312456435e5e1a98dba7c2cc96b44fe83c (diff)
downloadQt-2d1b49bd21b788ba3e35fc5c41bf3aab42cbda65.zip
Qt-2d1b49bd21b788ba3e35fc5c41bf3aab42cbda65.tar.gz
Qt-2d1b49bd21b788ba3e35fc5c41bf3aab42cbda65.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts: tests/auto/auto.pro
Diffstat (limited to 'demos')
-rw-r--r--demos/browser/xbel.cpp109
-rw-r--r--demos/browser/xbel.h1
2 files changed, 36 insertions, 74 deletions
diff --git a/demos/browser/xbel.cpp b/demos/browser/xbel.cpp
index ed62868..66b49a4 100644
--- a/demos/browser/xbel.cpp
+++ b/demos/browser/xbel.cpp
@@ -133,16 +133,13 @@ BookmarkNode *XbelReader::read(QIODevice *device)
{
BookmarkNode *root = new BookmarkNode(BookmarkNode::Root);
setDevice(device);
- while (!atEnd()) {
- readNext();
- if (isStartElement()) {
- QString version = attributes().value(QLatin1String("version")).toString();
- if (name() == QLatin1String("xbel")
- && (version.isEmpty() || version == QLatin1String("1.0"))) {
- readXBEL(root);
- } else {
- raiseError(QObject::tr("The file is not an XBEL version 1.0 file."));
- }
+ if (readNextStartElement()) {
+ QString version = attributes().value(QLatin1String("version")).toString();
+ if (name() == QLatin1String("xbel")
+ && (version.isEmpty() || version == QLatin1String("1.0"))) {
+ readXBEL(root);
+ } else {
+ raiseError(QObject::tr("The file is not an XBEL version 1.0 file."));
}
}
return root;
@@ -152,21 +149,15 @@ void XbelReader::readXBEL(BookmarkNode *parent)
{
Q_ASSERT(isStartElement() && name() == QLatin1String("xbel"));
- while (!atEnd()) {
- readNext();
- if (isEndElement())
- break;
-
- if (isStartElement()) {
- if (name() == QLatin1String("folder"))
- readFolder(parent);
- else if (name() == QLatin1String("bookmark"))
- readBookmarkNode(parent);
- else if (name() == QLatin1String("separator"))
- readSeparator(parent);
- else
- skipUnknownElement();
- }
+ while (readNextStartElement()) {
+ if (name() == QLatin1String("folder"))
+ readFolder(parent);
+ else if (name() == QLatin1String("bookmark"))
+ readBookmarkNode(parent);
+ else if (name() == QLatin1String("separator"))
+ readSeparator(parent);
+ else
+ skipCurrentElement();
}
}
@@ -177,26 +168,19 @@ void XbelReader::readFolder(BookmarkNode *parent)
BookmarkNode *folder = new BookmarkNode(BookmarkNode::Folder, parent);
folder->expanded = (attributes().value(QLatin1String("folded")) == QLatin1String("no"));
- while (!atEnd()) {
- readNext();
-
- if (isEndElement())
- break;
-
- if (isStartElement()) {
- if (name() == QLatin1String("title"))
- readTitle(folder);
- else if (name() == QLatin1String("desc"))
- readDescription(folder);
- else if (name() == QLatin1String("folder"))
- readFolder(folder);
- else if (name() == QLatin1String("bookmark"))
- readBookmarkNode(folder);
- else if (name() == QLatin1String("separator"))
- readSeparator(folder);
- else
- skipUnknownElement();
- }
+ while (readNextStartElement()) {
+ if (name() == QLatin1String("title"))
+ readTitle(folder);
+ else if (name() == QLatin1String("desc"))
+ readDescription(folder);
+ else if (name() == QLatin1String("folder"))
+ readFolder(folder);
+ else if (name() == QLatin1String("bookmark"))
+ readBookmarkNode(folder);
+ else if (name() == QLatin1String("separator"))
+ readSeparator(folder);
+ else
+ skipCurrentElement();
}
}
@@ -224,39 +208,18 @@ void XbelReader::readBookmarkNode(BookmarkNode *parent)
Q_ASSERT(isStartElement() && name() == QLatin1String("bookmark"));
BookmarkNode *bookmark = new BookmarkNode(BookmarkNode::Bookmark, parent);
bookmark->url = attributes().value(QLatin1String("href")).toString();
- while (!atEnd()) {
- readNext();
- if (isEndElement())
- break;
-
- if (isStartElement()) {
- if (name() == QLatin1String("title"))
- readTitle(bookmark);
- else if (name() == QLatin1String("desc"))
- readDescription(bookmark);
- else
- skipUnknownElement();
- }
+ while (readNextStartElement()) {
+ if (name() == QLatin1String("title"))
+ readTitle(bookmark);
+ else if (name() == QLatin1String("desc"))
+ readDescription(bookmark);
+ else
+ skipCurrentElement();
}
if (bookmark->title.isEmpty())
bookmark->title = QObject::tr("Unknown title");
}
-void XbelReader::skipUnknownElement()
-{
- Q_ASSERT(isStartElement());
-
- while (!atEnd()) {
- readNext();
-
- if (isEndElement())
- break;
-
- if (isStartElement())
- skipUnknownElement();
- }
-}
-
XbelWriter::XbelWriter()
{
diff --git a/demos/browser/xbel.h b/demos/browser/xbel.h
index 2bdffe1..ec9008e 100644
--- a/demos/browser/xbel.h
+++ b/demos/browser/xbel.h
@@ -87,7 +87,6 @@ public:
BookmarkNode *read(QIODevice *device);
private:
- void skipUnknownElement();
void readXBEL(BookmarkNode *parent);
void readTitle(BookmarkNode *parent);
void readDescription(BookmarkNode *parent);
del'>- VERSION='1.8.12-pre2'
+ VERSION='1.8.12'
cat >>confdefs.h <<_ACEOF
@@ -31678,7 +31678,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-HDF5 config.lt 1.8.12-pre2
+HDF5 config.lt 1.8.12
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -33812,7 +33812,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by HDF5 $as_me 1.8.12-pre2, which was
+This file was extended by HDF5 $as_me 1.8.12, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -33878,7 +33878,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-HDF5 config.status 1.8.12-pre2
+HDF5 config.status 1.8.12
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index aa66f1d..f0db685 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_PREREQ([2.69])
## NOTE: Do not forget to change the version number here when we do a
## release!!!
##
-AC_INIT([HDF5], [1.8.12-pre2], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.8.12], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADER([src/H5config.h])
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt