Qt 4.8
qxmlquery.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include <QtCore/QBuffer>
43 #include <QtCore/QStringList>
44 #include <QtXmlPatterns/QXmlFormatter>
45 
47 #include "qcommonvalues_p.h"
48 #include "qxmlresultitems.h"
49 #include "qxmlresultitems_p.h"
50 #include "qxmlserializer.h"
51 #include "qxpathhelper_p.h"
52 
53 #include "qxmlquery.h"
54 #include "qxmlquery_p.h"
55 
57 
252 // ### Qt5: Merge constructor overloads
262 {
263 }
264 
270 QXmlQuery::QXmlQuery(const QXmlQuery &other) : d(new QXmlQueryPrivate(*other.d))
271 {
272  /* First we have invoked QXmlQueryPrivate's synthesized copy constructor.
273  * Keep this section in sync with QXmlQuery::operator=(). */
274  d->detach();
275 }
276 
282 {
283 }
284 
302  const QXmlNamePool &np) : d(new QXmlQueryPrivate(np))
303 {
305 }
306 
311 {
312  delete d;
313 }
314 
319 {
320  /* Keep this section in sync with QXmlQuery::QXmlQuery(const QXmlQuery &).
321  */
322  if(d != other.d)
323  {
324  *d = *other.d;
325  d->detach();
326  }
327 
328  return *this;
329 }
330 
372 {
373  d->messageHandler = aMessageHandler;
374 }
375 
381 {
382  return d->messageHandler;
383 }
384 
416 void QXmlQuery::setQuery(QIODevice *sourceCode, const QUrl &documentURI)
417 {
418  if(!sourceCode)
419  {
420  qWarning("A null QIODevice pointer cannot be passed.");
421  return;
422  }
423 
424  if(!sourceCode->isReadable())
425  {
426  qWarning("The device must be readable.");
427  return;
428  }
429 
431  d->expression(sourceCode);
432 }
433 
441 void QXmlQuery::setQuery(const QString &sourceCode, const QUrl &documentURI)
442 {
443  Q_ASSERT_X(documentURI.isEmpty() || documentURI.isValid(), Q_FUNC_INFO,
444  "The document URI must be valid.");
445 
446  QByteArray query(sourceCode.toUtf8());
447  QBuffer buffer(&query);
448  buffer.open(QIODevice::ReadOnly);
449 
450  setQuery(&buffer, documentURI);
451 }
452 
473 void QXmlQuery::setQuery(const QUrl &queryURI, const QUrl &baseURI)
474 {
475  Q_ASSERT_X(queryURI.isValid(), Q_FUNC_INFO, "The passed URI must be valid.");
476 
477  const QUrl canonicalURI(QPatternist::XPathHelper::normalizeQueryURI(queryURI));
478  Q_ASSERT(canonicalURI.isValid());
479  Q_ASSERT(!canonicalURI.isRelative());
480  Q_ASSERT(baseURI.isValid() || baseURI.isEmpty());
481 
482  d->queryURI = QPatternist::XPathHelper::normalizeQueryURI(baseURI.isEmpty() ? queryURI : baseURI);
483 
485 
486  try
487  {
489  d->staticContext()));
490  }
491  catch(const QPatternist::Exception)
492  {
493  /* We do nothing, result will be 0. */
494  }
495 
496  if(result)
497  {
498  setQuery(result.data(), d->queryURI);
499  result->close();
500  }
501  else
502  d->recompileRequired();
503 }
504 
528 void QXmlQuery::bindVariable(const QXmlName &name, const QXmlItem &value)
529 {
530  if(name.isNull())
531  {
532  qWarning("The variable name cannot be null.");
533  return;
534  }
535 
537  const QVariant variant(QVariant::fromValue(value));
538 
539  /* If the type of the variable changed(as opposed to only the value),
540  * we will have to recompile. */
541  if(vl->invalidationRequired(name, variant) || value.isNull())
542  d->recompileRequired();
543 
544  vl->addBinding(name, variant);
545 }
546 
559 void QXmlQuery::bindVariable(const QString &localName, const QXmlItem &value)
560 {
561  bindVariable(QXmlName(d->namePool, localName), value);
562 }
563 
599 {
600  if(device && !device->isReadable())
601  {
602  qWarning("A null, or readable QIODevice must be passed.");
603  return;
604  }
605 
606  if(name.isNull())
607  {
608  qWarning("The variable name cannot be null.");
609  return;
610  }
611 
613 
614  if(device)
615  {
616  const QVariant variant(QVariant::fromValue(device));
617 
618  if(vl->invalidationRequired(name, variant))
619  d->recompileRequired();
620 
621  vl->addBinding(name, variant);
622 
623  /* We need to tell the resource loader to discard its document, because
624  * the underlying QIODevice has changed, but the variable name is the
625  * same which means that the URI is the same, and hence the resource
626  * loader will return the document for the old QIODevice.
627  */
628  d->resourceLoader()->clear(QUrl(QLatin1String("tag:trolltech.com,2007:QtXmlPatterns:QIODeviceVariable:") + d->namePool.d->stringForLocalName(name.localName())));
629  }
630  else
631  {
632  vl->removeBinding(name);
633  d->recompileRequired();
634  }
635 }
636 
653 void QXmlQuery::bindVariable(const QString &localName, QIODevice *device)
654 {
655  bindVariable(QXmlName(d->namePool, localName), device);
656 }
657 
673 {
674  if(!callback)
675  {
676  qWarning("A non-null callback must be passed.");
677  return false;
678  }
679 
680  if(isValid())
681  {
682  try
683  {
684  /*
685  * This order is significant. expression() might cause
686  * query recompilation, and as part of that it recreates
687  * the static context. However, if we create the dynamic
688  * context before the query recompilation has been
689  * triggered, it will use the old static context, and
690  * hence old source locations.
691  */
693  const QPatternist::DynamicContext::Ptr dynContext(d->dynamicContext(callback));
694  callback->startOfSequence();
695  expr->evaluateToSequenceReceiver(dynContext);
696  callback->endOfSequence();
697  return true;
698  }
699  catch(const QPatternist::Exception)
700  {
701  return false;
702  }
703  }
704  else
705  return false;
706 }
707 
724 {
725  if(!target)
726  {
727  qWarning("A non-null callback must be passed.");
728  return false;
729  }
730 
731  if(isValid())
732  {
733  try
734  {
735  /*
736  * This order is significant. expression() might cause
737  * query recompilation, and as part of that it recreates
738  * the static context. However, if we create the dynamic
739  * context before the query recompilation has been
740  * triggered, it will use the old static context, and
741  * hence old source locations.
742  */
744  if(!expr)
745  return false;
746 
748 
749  if(!QPatternist::BuiltinTypes::xsString->xdtTypeMatches(expr->staticType()->itemType()))
750  return false;
751 
752  const QPatternist::Item::Iterator::Ptr it(expr->evaluateSequence(dynContext));
753  QPatternist::Item next(it->next());
754 
755  while(!next.isNull())
756  {
757  target->append(next.stringValue());
758  next = it->next();
759  }
760 
761  return true;
762  }
763  catch(const QPatternist::Exception)
764  {
765  return false;
766  }
767  }
768  else
769  return false;
770 }
771 
789 bool QXmlQuery::evaluateTo(QIODevice *target) const
790 {
791  if(!target)
792  {
793  qWarning("The pointer to the device cannot be null.");
794  return false;
795  }
796 
797  if(!target->isWritable())
798  {
799  qWarning("The device must be writable.");
800  return false;
801  }
802 
803  QXmlSerializer serializer(*this, target);
804  return evaluateTo(&serializer);
805 }
806 
816 {
817  if(!result)
818  {
819  qWarning("A null pointer cannot be passed.");
820  return;
821  }
822 
823  if(isValid())
824  {
825  try
826  {
827  /*
828  * We don't have the d->expression() calls and
829  * d->dynamicContext() calls in the same order as seen in
830  * QXmlQuery::evaluateTo(), and the reason to why
831  * that isn't a problem, is that we call isValid().
832  */
834  result->d_ptr->setDynamicContext(dynContext);
835  result->d_ptr->iterator = d->expression()->evaluateSequence(dynContext);
836  }
837  catch(const QPatternist::Exception)
838  {
840  result->d_ptr->hasError = true;
841  }
842  }
843  else
844  {
846  result->d_ptr->hasError = true;
847  }
848 }
849 
863 bool QXmlQuery::evaluateTo(QString *output) const
864 {
865  Q_ASSERT_X(output, Q_FUNC_INFO,
866  "The input cannot be null");
867 
868  QBuffer outputDevice;
869  outputDevice.open(QIODevice::ReadWrite);
870 
871  QXmlFormatter formatter(*this, &outputDevice);
872  const bool success = evaluateTo(&formatter);
873 
874  outputDevice.close();
875  *output = QString::fromUtf8(outputDevice.data().constData());
876 
877  return success;
878 }
879 
885 bool QXmlQuery::isValid() const
886 {
887  return d->isValid();
888 }
889 
897 {
898  d->uriResolver = resolver;
899 }
900 
925 {
926  return d->uriResolver;
927 }
928 
934 {
935  return d->namePool;
936 }
937 
955 void QXmlQuery::setFocus(const QXmlItem &item)
956 {
957  d->contextItem = item;
958 }
959 
966 template<typename TInputType>
967 bool setFocusHelper(QXmlQuery *const queryInstance,
968  const TInputType &focusValue)
969 {
970  /* We call resourceLoader(), so we have ensured that we have a resourceLoader
971  * that we will share in our copy. */
972  queryInstance->d->resourceLoader();
973 
974  QXmlQuery focusQuery(*queryInstance);
975 
976  /* Now we use the same, so we own the loaded document. */
977  focusQuery.d->m_resourceLoader = queryInstance->d->m_resourceLoader;
978 
979  /* The copy constructor doesn't allow us to copy an existing QXmlQuery and
980  * changing the language at the same time so we need to use private API. */
981  focusQuery.d->queryLanguage = QXmlQuery::XQuery10;
982 
983  Q_ASSERT(focusQuery.queryLanguage() == QXmlQuery::XQuery10);
984  focusQuery.bindVariable(QChar::fromLatin1('u'), focusValue);
985  focusQuery.setQuery(QLatin1String("doc($u)"));
986  Q_ASSERT(focusQuery.isValid());
987 
988  QXmlResultItems focusResult;
989 
990  queryInstance->d->m_resourceLoader = focusQuery.d->m_resourceLoader;
991 
992  focusQuery.evaluateTo(&focusResult);
993  const QXmlItem focusItem(focusResult.next());
994 
995  if(focusItem.isNull() || focusResult.hasError())
996  {
997  /* The previous focus must be cleared in error situations.
998  * Otherwise the query may be left in an inconsistent state. */
999  queryInstance->setFocus(QXmlItem());
1000  return false;
1001  }
1002  else
1003  {
1004  queryInstance->setFocus(focusItem);
1005  return true;
1006  }
1007 }
1008 
1025 bool QXmlQuery::setFocus(const QUrl &documentURI)
1026 {
1027  Q_ASSERT_X(documentURI.isValid() && !documentURI.isEmpty(),
1028  Q_FUNC_INFO,
1029  "The URI passed must be valid.");
1030 
1031  return setFocusHelper(this, QVariant(documentURI));
1032 }
1033 
1049 {
1050  if(!document)
1051  {
1052  qWarning("A null QIODevice pointer cannot be passed.");
1053  return false;
1054  }
1055 
1056  if(!document->isReadable())
1057  {
1058  qWarning("The device must be readable.");
1059  return false;
1060  }
1061 
1062  return setFocusHelper(this, document);
1063 }
1064 
1075 bool QXmlQuery::setFocus(const QString &focus)
1076 {
1077  QBuffer device;
1078  device.setData(focus.toUtf8());
1079  device.open(QIODevice::ReadOnly);
1080 
1081  return setFocusHelper(this, &device);
1082 }
1083 
1094 {
1095  return d->queryLanguage;
1096 }
1097 
1115 {
1117 }
1118 
1143 {
1144  Q_ASSERT_X(QXmlName::isNCName(localName),
1145  Q_FUNC_INFO,
1146  "The name passed must be a valid NCName.");
1147  setInitialTemplateName(QXmlName(d->namePool, localName));
1148 }
1149 
1160 {
1161  return d->initialTemplateName;
1162 }
1163 
1172 {
1173  d->m_networkAccessDelegator->m_genericManager = newManager;
1174 }
1175 
1183 {
1184  return d->m_networkAccessDelegator->m_genericManager;
1185 }
1186 
1198 {
1199  Q_ASSERT_X(query.isValid(), Q_FUNC_INFO, "The query being bound must be valid.");
1200 
1202  const QVariant variant(QVariant::fromValue(query));
1203 
1204  if(vl->invalidationRequired(name, variant))
1205  d->recompileRequired();
1206 
1207  vl->addBinding(name, variant);
1208 }
1209 
1219 void QXmlQuery::bindVariable(const QString &localName, const QXmlQuery &query)
1220 {
1221  return bindVariable(QXmlName(d->namePool, localName), query);
1222 }
1223 
const QString & stringForLocalName(const QXmlName::LocalNameCode code) const
Definition: qnamepool_p.h:168
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
double d
Definition: qnumeric_p.h:62
void evaluateTo(QXmlResultItems *result) const
Starts the evaluation and makes it available in result.
Definition: qxmlquery.cpp:815
static void callback(AuServer *, AuEventHandlerRec *, AuEvent *e, AuPointer p)
Definition: qsound_x11.cpp:170
bool isValid() const
Returns true if the URL is valid; otherwise returns false.
Definition: qurl.cpp:4303
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
const QByteArray & data() const
Returns the data contained in the buffer.
Definition: qbuffer.cpp:301
bool isReadable() const
Returns true if data can be read from the device; otherwise returns false.
Definition: qiodevice.cpp:544
bool isWritable() const
Returns true if data can be written to the device; otherwise returns false.
Definition: qiodevice.cpp:558
#define it(className, varName)
void setData(const QByteArray &data)
Sets the contents of the internal buffer to be data.
Definition: qbuffer.cpp:315
void bindVariable(const QXmlName &name, const QXmlItem &value)
Binds the variable name to the value so that $name can be used from within the query to refer to the ...
Definition: qxmlquery.cpp:528
bool open(OpenMode openMode)
Reimplemented Function
Definition: qbuffer.cpp:338
QueryLanguage
Specifies whether you want QXmlQuery to interpret the input to setQuery() as an XQuery or as an XSLT ...
Definition: qxmlquery.h:82
QByteArray toUtf8() const Q_REQUIRED_RESULT
Returns a UTF-8 representation of the string as a QByteArray.
Definition: qstring.cpp:4074
A smart pointer very similar to std::auto_ptr.
Definition: qautoptr_p.h:73
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
Definition: qurl.cpp:4317
The QXmlResultItems class iterates through the results of evaluating an XQuery in QXmlQuery...
void close()
Reimplemented Function
Definition: qbuffer.cpp:359
The QXmlItem class contains either an XML node or an atomic value.
void setQuery(const QString &sourceCode, const QUrl &documentURI=QUrl())
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qxmlquery.cpp:441
void setNetworkAccessManager(QNetworkAccessManager *newManager)
Sets the network manager to newManager.
Definition: qxmlquery.cpp:1171
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
bool isValid() const
Returns true if this query is valid.
Definition: qxmlquery.cpp:885
The QBuffer class provides a QIODevice interface for a QByteArray.
Definition: qbuffer.h:57
The QUrl class provides a convenient interface for working with URLs.
Definition: qurl.h:61
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static const EmptyIterator< Item >::Ptr emptyIterator
QPatternist::NetworkAccessDelegator::Ptr m_networkAccessDelegator
Definition: qxmlquery_p.h:319
void setDynamicContext(const QPatternist::DynamicContext::Ptr &context)
The QXmlNamePool class is a table of shared strings referenced by instances of QXmlName.
Definition: qxmlnamepool.h:69
virtual void endOfSequence()=0
This callback is called once only, right after the XQuery Sequence ends.
void setUriResolver(const QAbstractUriResolver *resolver)
Sets the URI resolver to resolver.
Definition: qxmlquery.cpp:896
static const AtomicType::Ptr xsString
QPatternist::VariableLoader::Ptr variableLoader()
Definition: qxmlquery_p.h:125
void recompileRequired()
Definition: qxmlquery_p.h:120
QXmlName initialTemplateName() const
Returns the name of the XSL-T stylesheet template that the processor will call first when running an ...
Definition: qxmlquery.cpp:1159
QXmlName initialTemplateName
Definition: qxmlquery_p.h:285
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
The QAbstractUriResolver class is a callback interface for resolving Uniform Resource Identifiers...
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
~QXmlQuery()
Destroys this QXmlQuery.
Definition: qxmlquery.cpp:310
QScopedPointer< QXmlResultItemsPrivate > d_ptr
const QAbstractUriResolver * uriResolver() const
Returns the query&#39;s URI resolver.
Definition: qxmlquery.cpp:924
QueryLanguage queryLanguage() const
Returns a value indicating what this QXmlQuery is being used for.
Definition: qxmlquery.cpp:1093
QXmlNamePool namePool
Definition: qxmlquery_p.h:277
The QXmlSerializer class is an implementation of QAbstractXmlReceiver for transforming XQuery output ...
const char * name
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
void reset(T *other=0)
Definition: qautoptr_p.h:154
Q_CORE_EXPORT void qWarning(const char *,...)
static QChar fromLatin1(char c)
Converts the Latin-1 character c to its equivalent QChar.
Definition: qchar.h:378
virtual void startOfSequence()=0
This callback is called once only, right before the XQuery Sequence begins.
QExplicitlySharedDataPointer< QPatternist::NamePool > d
Definition: qxmlnamepool.h:88
QXmlQueryPrivate * d
Definition: qxmlquery.h:149
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
Definition: qvariant.h:336
QXmlItem contextItem
Definition: qxmlquery_p.h:284
The QNetworkAccessManager class allows the application to send network requests and receive replies...
QPatternist::Item::Iterator::Ptr iterator
QString localName(const QXmlNamePool &query) const
Returns the local name.
Definition: qxmlname.cpp:387
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
static QNetworkReply * load(const QUrl &uri, QNetworkAccessManager *const networkManager, const ReportContext::Ptr &context, ErrorHandling handling=FailOnError)
Helper function that do NetworkAccessDelegator::get(), but does it blocked.
QPatternist::DeviceResourceLoader::Ptr m_resourceLoader
Definition: qxmlquery_p.h:306
QXmlQuery::QueryLanguage queryLanguage
Definition: qxmlquery_p.h:292
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way...
Definition: qxmlname.h:58
The QAbstractXmlReceiver class provides a callback interface for transforming the output of a QXmlQue...
Represents an item in the XPath 2.0 Data Model.
Definition: qitem_p.h:182
The QAbstractMessageHandler class provides a callback interface for handling messages.
QXmlQuery & operator=(const QXmlQuery &other)
Assigns other to this QXmlQuery instance.
Definition: qxmlquery.cpp:318
QPatternist::AccelTreeResourceLoader::Ptr resourceLoader()
Definition: qxmlquery_p.h:206
static bool isNCName(const QString &candidate)
Returns true if candidate is an NCName.
Definition: qxmlname.cpp:445
QAbstractMessageHandler * messageHandler() const
Returns the message handler that handles compile and runtime messages for this QXmlQuery.
Definition: qxmlquery.cpp:380
QXmlNamePool namePool() const
Returns the name pool used by this QXmlQuery for constructing QXmlName {names}.
Definition: qxmlquery.cpp:933
void setFocus(const QXmlItem &item)
Sets the focus to item.
Definition: qxmlquery.cpp:955
const QAbstractUriResolver * uriResolver
Definition: qxmlquery_p.h:283
QPatternist::Expression::Ptr expression(QIODevice *const queryDevice=0)
Definition: qxmlquery_p.h:235
The QXmlFormatter class is an implementation of QXmlSerializer for transforming XQuery output into fo...
Definition: qxmlformatter.h:58
const char * variant
QPointer< QAbstractMessageHandler > messageHandler
Definition: qxmlquery_p.h:278
friend class QXmlName
Definition: qxmlquery.h:141
The QIODevice class is the base interface class of all I/O devices in Qt.
Definition: qiodevice.h:66
static QUrl normalizeQueryURI(const QUrl &uri)
QPatternist::GenericStaticContext::Ptr staticContext()
Definition: qxmlquery_p.h:133
QPatternist::DynamicContext::Ptr dynamicContext(QAbstractXmlReceiver *const callback=0)
Definition: qxmlquery_p.h:175
QNetworkAccessManager * networkAccessManager() const
Returns the network manager, or 0 if it has not been set.
Definition: qxmlquery.cpp:1182
bool isNull() const
Returns true if this QXmlName is not initialized with a valid combination of {namespace URI}...
Definition: qxmlname.cpp:224
The QXmlQuery class performs XQueries on XML data, or on non-XML data modeled to look like XML...
Definition: qxmlquery.h:79
void setInitialTemplateName(const QXmlName &name)
Sets the name of the initial template.
Definition: qxmlquery.cpp:1114
QXmlQuery()
Constructs an invalid, empty query that cannot be used until setQuery() is called.
Definition: qxmlquery.cpp:261
bool isNull() const
Returns true if this QXmlItem is neither a node nor an atomic value.
void setMessageHandler(QAbstractMessageHandler *messageHandler)
Changes the QAbstractMessageHandler {message handler} for this QXmlQuery to aMessageHandler.
Definition: qxmlquery.cpp:371
friend bool setFocusHelper(QXmlQuery *const queryInstance, const TInputType &focusValue)
Definition: qxmlquery.cpp:967
#define Q_FUNC_INFO
Definition: qglobal.h:1871