summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/api/qxmlquery.cpp
diff options
context:
space:
mode:
authorTobias Koenig <tokoe@kde.org>2009-07-05 10:47:45 +0200
committerTobias Koenig <tokoe@kde.org>2009-07-05 10:47:45 +0200
commit5db5a9d5d878157a643a441d426ff739084ca031 (patch)
treed10017bbc11e62e44a7ced7e35de8516964e794a /src/xmlpatterns/api/qxmlquery.cpp
parent65c2d095cddfda32052925654dd1defd314ad4b3 (diff)
parent84bbac2a4d7b663e57b74094cbebf8fca16e0ed8 (diff)
downloadqt4-tools-5db5a9d5d878157a643a441d426ff739084ca031.tar.gz
Merge branch 'master' of git://gitorious.org/qt/qt
Diffstat (limited to 'src/xmlpatterns/api/qxmlquery.cpp')
-rw-r--r--src/xmlpatterns/api/qxmlquery.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/xmlpatterns/api/qxmlquery.cpp b/src/xmlpatterns/api/qxmlquery.cpp
index 1cf0a2eae4..79ae7a972b 100644
--- a/src/xmlpatterns/api/qxmlquery.cpp
+++ b/src/xmlpatterns/api/qxmlquery.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtXmlPatterns module of the Qt Toolkit.
**
@@ -34,7 +34,7 @@
** 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 qt-sales@nokia.com.
+** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1051,6 +1051,25 @@ bool QXmlQuery::setFocus(QIODevice *document)
}
/*!
+ This function behaves identically to calling the setFocus() overload with a
+ QIODevice whose content is \a focus encoded as UTF-8. That is, \a focus is
+ treated as if it contained an XML document.
+
+ Returns the same result as the overload.
+
+ \overload
+ \since 4.6
+ */
+bool QXmlQuery::setFocus(const QString &focus)
+{
+ QBuffer device;
+ device.setData(focus.toUtf8());
+ device.open(QIODevice::ReadOnly);
+
+ return setFocusHelper(this, &device);
+}
+
+/*!
Returns a value indicating what this QXmlQuery is being used for.
The default is QXmlQuery::XQuery10, which means the QXmlQuery is
being used for running XQuery and XPath queries. QXmlQuery::XSLT20