Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlxmllistmodel.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <QtQml/qqmlcontext.h>
7#include <QtQml/qqmlengine.h>
8#include <QtQml/qqmlinfo.h>
9#include <QtQml/qqmlfile.h>
10
11#include <QtCore/qcoreapplication.h>
12#include <QtCore/qfile.h>
13#include <QtCore/qfuturewatcher.h>
14#include <QtCore/qtimer.h>
15#include <QtCore/qxmlstream.h>
16
17#if QT_CONFIG(qml_network)
18#include <QtNetwork/qnetworkreply.h>
19#include <QtNetwork/qnetworkrequest.h>
20#endif
21
23
25
76{
77 return m_name;
78}
79
81{
82 if (name == m_name)
83 return;
84 m_name = name;
86}
87
98
123
125
153
196{
197 return m_elementName;
198}
199
201{
202 if (name.startsWith(QLatin1Char('/'))) {
203 qmlWarning(this) << tr("An XML element must not start with '/'");
204 return;
205 } else if (name.endsWith(QLatin1Char('/'))) {
206 qmlWarning(this) << tr("An XML element must not end with '/'");
207 return;
208 } else if (name.contains(QStringLiteral("//"))) {
209 qmlWarning(this) << tr("An XML element must not contain \"//\"");
210 return;
211 }
212
213 if (name == m_elementName)
214 return;
215 m_elementName = name;
217}
218
235{
236 return m_attributeName;
237}
238
240{
241 if (m_attributeName == attributeName)
242 return;
243 m_attributeName = attributeName;
245}
246
248{
249 return !m_name.isEmpty();
250}
251
340
342{
343 // Cancel all objects
344 for (auto &w : m_watchers.values())
345 w->cancel();
346 // Wait until all objects are finished
347 while (!m_watchers.isEmpty()) {
348 auto it = m_watchers.begin();
349 it.value()->waitForFinished();
350 // Explicitly delete the watcher here, because the connected lambda
351 // would not be called until processEvents() is called
352 delete it.value();
353 m_watchers.erase(it);
354 }
355}
356
358{
359 return !parent.isValid() && column == 0 && row >= 0 && m_size ? createIndex(row, column)
360 : QModelIndex();
361}
362
364{
365 return !parent.isValid() ? m_size : 0;
366}
367
369{
370 const int roleIndex = m_roles.indexOf(role);
371 return (roleIndex == -1 || !index.isValid()) ? QVariant()
372 : m_data.value(index.row()).value(roleIndex);
373}
374
375QHash<int, QByteArray> QQmlXmlListModel::roleNames() const
376{
377 QHash<int, QByteArray> roleNames;
378 for (int i = 0; i < m_roles.size(); ++i)
379 roleNames.insert(m_roles.at(i), m_roleNames.at(i).toUtf8());
380 return roleNames;
381}
382
388{
389 return m_size;
390}
391
397{
398 return m_source;
399}
400
402{
403 if (m_source != src) {
404 m_source = src;
405 reload();
407 }
408}
409
417{
418 return m_query;
419}
420
422{
423 if (!query.startsWith(QLatin1Char('/'))) {
425 "XmlListModelRoleList", "An XmlListModel query must start with '/'");
426 return;
427 }
428
429 if (m_query != query) {
430 m_query = query;
431 reload();
433 }
434}
435
441QQmlListProperty<QQmlXmlListModelRole> QQmlXmlListModel::roleObjects()
442{
443 QQmlListProperty<QQmlXmlListModelRole> list(this, &m_roleObjects);
446 return list;
447}
448
450{
451 if (role) {
452 int i = m_roleObjects.size();
453 m_roleObjects.append(role);
454 if (m_roleNames.contains(role->name())) {
455 qmlWarning(role)
456 << QQmlXmlListModel::tr(
457 "\"%1\" duplicates a previous role name and will be disabled.")
458 .arg(role->name());
459 return;
460 }
461 m_roles.insert(i, m_highestRole);
462 m_roleNames.insert(i, role->name());
463 ++m_highestRole;
464 }
465}
466
468{
469 m_roles.clear();
470 m_roleNames.clear();
471 m_roleObjects.clear();
472}
473
474void QQmlXmlListModel::appendRole(QQmlListProperty<QQmlXmlListModelRole> *list,
476{
477 auto object = qobject_cast<QQmlXmlListModel *>(list->object);
478 if (object) // role is checked inside appendRole
479 object->appendRole(role);
480}
481
482void QQmlXmlListModel::clearRole(QQmlListProperty<QQmlXmlListModelRole> *list)
483{
484 auto object = qobject_cast<QQmlXmlListModel *>(list->object);
485 if (object)
486 object->clearRole();
487}
488
489void QQmlXmlListModel::tryExecuteQuery(const QByteArray &data)
490{
491 auto job = createJob(data);
492 m_queryId = job.queryId;
493 QQmlXmlListModelQueryRunnable *runnable = new QQmlXmlListModelQueryRunnable(std::move(job));
494 if (runnable) {
495 auto future = runnable->future();
496 auto *watcher = new ResultFutureWatcher();
497 // No need to connect to canceled signal, because it just notifies that
498 // QFuture::cancel() was called. We will get the finished() signal in
499 // both cases.
500 connect(watcher, &ResultFutureWatcher::finished, this, [id = m_queryId, this]() {
501 auto *watcher = static_cast<ResultFutureWatcher *>(sender());
502 if (watcher) {
503 if (!watcher->isCanceled()) {
505 // handle errors
506 for (const auto &errorInfo : result.errors)
507 queryError(errorInfo.first, errorInfo.second);
508 // fill results
509 queryCompleted(result);
510 }
511 // remove from watchers
512 m_watchers.remove(id);
513 watcher->deleteLater();
514 }
515 });
516 m_watchers[m_queryId] = watcher;
517 watcher->setFuture(future);
518 QThreadPool::globalInstance()->start(runnable);
519 } else {
520 m_errorString = tr("Failed to create an instance of QRunnable query object");
521 m_status = QQmlXmlListModel::Error;
522 m_queryId = -1;
523 Q_EMIT statusChanged(m_status);
524 }
525}
526
527QQmlXmlListModelQueryJob QQmlXmlListModel::createJob(const QByteArray &data)
528{
530 job.queryId = nextQueryId();
531 job.data = data;
532 job.query = m_query;
533
534 for (int i = 0; i < m_roleObjects.size(); i++) {
535 if (!m_roleObjects.at(i)->isValid()) {
536 job.roleNames << QString();
537 job.elementNames << QString();
538 job.elementAttributes << QString();
539 continue;
540 }
541 job.roleNames << m_roleObjects.at(i)->name();
542 job.elementNames << m_roleObjects.at(i)->elementName();
543 job.elementAttributes << m_roleObjects.at(i)->attributeName();
544 job.roleQueryErrorId << static_cast<void *>(m_roleObjects.at(i));
545 }
546
547 return job;
548}
549
550int QQmlXmlListModel::nextQueryId()
551{
552 m_nextQueryIdGenerator++;
553 if (m_nextQueryIdGenerator <= 0)
554 m_nextQueryIdGenerator = 1;
555 return m_nextQueryIdGenerator;
556}
557
572{
573 return m_status;
574}
575
592{
593 return m_progress;
594}
595
603{
604 return m_errorString;
605}
606
608{
609 m_isComponentComplete = false;
610}
611
613{
614 m_isComponentComplete = true;
615 reload();
616}
617
624{
625 if (!m_isComponentComplete)
626 return;
627
628 if (m_queryId > 0 && m_watchers.contains(m_queryId))
629 m_watchers[m_queryId]->cancel();
630
631 m_queryId = -1;
632
633 if (m_size < 0)
634 m_size = 0;
635
636#if QT_CONFIG(qml_network)
637 if (m_reply) {
638 m_reply->abort();
639 deleteReply();
640 }
641#endif
642
643 const QQmlContext *context = qmlContext(this);
644 const auto resolvedSource = context ? context->resolvedUrl(m_source) : m_source;
645
646 if (resolvedSource.isEmpty()) {
647 m_queryId = 0;
648 notifyQueryStarted(false);
649 QTimer::singleShot(0, this, &QQmlXmlListModel::dataCleared);
650 } else if (QQmlFile::isLocalFile(resolvedSource)) {
652 const bool opened = file.open(QIODevice::ReadOnly);
653 if (!opened)
654 qWarning("Failed to open file %s: %s", qPrintable(file.fileName()),
656 QByteArray data = opened ? file.readAll() : QByteArray();
657 notifyQueryStarted(false);
658 if (data.isEmpty()) {
659 m_queryId = 0;
660 QTimer::singleShot(0, this, &QQmlXmlListModel::dataCleared);
661 } else {
662 tryExecuteQuery(data);
663 }
664 } else {
665#if QT_CONFIG(qml_network)
666 notifyQueryStarted(true);
667 QNetworkRequest req(resolvedSource);
668 req.setRawHeader("Accept", "application/xml,*/*");
669 m_reply = qmlContext(this)->engine()->networkAccessManager()->get(req);
670
672 &QQmlXmlListModel::requestFinished);
674 &QQmlXmlListModel::requestProgress);
675#else
676 m_queryId = 0;
677 notifyQueryStarted(false);
678 QTimer::singleShot(0, this, &QQmlXmlListModel::dataCleared);
679#endif
680 }
681}
682
683#if QT_CONFIG(qml_network)
684void QQmlXmlListModel::requestFinished()
685{
686 if (m_reply->error() != QNetworkReply::NoError) {
687 m_errorString = m_reply->errorString();
688 deleteReply();
689
690 if (m_size > 0) {
691 beginRemoveRows(QModelIndex(), 0, m_size - 1);
692 m_data.clear();
693 m_size = 0;
696 }
697
698 m_status = Error;
699 m_queryId = -1;
700 Q_EMIT statusChanged(m_status);
701 } else {
702 QByteArray data = m_reply->readAll();
703 if (data.isEmpty()) {
704 m_queryId = 0;
705 QTimer::singleShot(0, this, &QQmlXmlListModel::dataCleared);
706 } else {
707 tryExecuteQuery(data);
708 }
709 deleteReply();
710
711 m_progress = 1.0;
712 Q_EMIT progressChanged(m_progress);
713 }
714}
715
716void QQmlXmlListModel::deleteReply()
717{
718 if (m_reply) {
719 QObject::disconnect(m_reply, 0, this, 0);
720 m_reply->deleteLater();
721 m_reply = nullptr;
722 }
723}
724#endif
725
726void QQmlXmlListModel::requestProgress(qint64 received, qint64 total)
727{
728 if (m_status == Loading && total > 0) {
729 m_progress = qreal(received) / total;
730 Q_EMIT progressChanged(m_progress);
731 }
732}
733
734void QQmlXmlListModel::dataCleared()
735{
737 r.queryId = 0;
738 queryCompleted(r);
739}
740
741void QQmlXmlListModel::queryError(void *object, const QString &error)
742{
743 for (int i = 0; i < m_roleObjects.size(); i++) {
744 if (m_roleObjects.at(i) == static_cast<QQmlXmlListModelRole *>(object)) {
745 qmlWarning(m_roleObjects.at(i))
746 << QQmlXmlListModel::tr("Query error: \"%1\"").arg(error);
747 return;
748 }
749 }
750 qmlWarning(this) << QQmlXmlListModel::tr("Query error: \"%1\"").arg(error);
751}
752
753void QQmlXmlListModel::queryCompleted(const QQmlXmlListModelQueryResult &result)
754{
755 if (result.queryId != m_queryId)
756 return;
757
758 int origCount = m_size;
759 bool sizeChanged = result.data.size() != m_size;
760
761 if (m_source.isEmpty())
762 m_status = Null;
763 else
764 m_status = Ready;
765 m_errorString.clear();
766 m_queryId = -1;
767
768 if (origCount > 0) {
769 beginRemoveRows(QModelIndex(), 0, origCount - 1);
771 }
772 m_size = result.data.size();
773 m_data = result.data;
774
775 if (m_size > 0) {
776 beginInsertRows(QModelIndex(), 0, m_size - 1);
778 }
779
780 if (sizeChanged)
782
783 Q_EMIT statusChanged(m_status);
784}
785
786void QQmlXmlListModel::notifyQueryStarted(bool remoteSource)
787{
788 m_progress = remoteSource ? 0.0 : 1.0;
789 m_status = QQmlXmlListModel::Loading;
790 m_errorString.clear();
791 Q_EMIT progressChanged(m_progress);
792 Q_EMIT statusChanged(m_status);
793}
794
795static qsizetype findIndexOfName(const QStringList &elementNames, const QStringView &name,
796 qsizetype startIndex = 0)
797{
798 for (auto idx = startIndex; idx < elementNames.size(); ++idx) {
799 if (elementNames[idx].startsWith(name))
800 return idx;
801 }
802 return -1;
803}
804
810
812{
813 m_promise.start();
814 if (!m_promise.isCanceled()) {
816 result.queryId = m_job.queryId;
817 doQueryJob(&result);
818 m_promise.addResult(std::move(result));
819 }
820 m_promise.finish();
821}
822
823QFuture<QQmlXmlListModelQueryResult> QQmlXmlListModelQueryRunnable::future() const
824{
825 return m_promise.future();
826}
827
828void QQmlXmlListModelQueryRunnable::doQueryJob(QQmlXmlListModelQueryResult *currentResult)
829{
830 Q_ASSERT(m_job.queryId != -1);
831
832 QByteArray data(m_job.data);
833 QXmlStreamReader reader;
834 reader.addData(data);
835
837
838 while (!reader.atEnd() && !m_promise.isCanceled()) {
839 int i = 0;
840 while (i < items.size()) {
841 if (reader.readNextStartElement()) {
842 if (reader.name() == items.at(i)) {
843 if (i != items.size() - 1) {
844 i++;
845 continue;
846 } else {
847 processElement(currentResult, items.at(i), reader);
848 }
849 } else {
850 reader.skipCurrentElement();
851 }
852 }
853 if (reader.tokenType() == QXmlStreamReader::Invalid) {
854 reader.readNext();
855 break;
856 } else if (reader.hasError()) {
857 reader.raiseError();
858 break;
859 }
860 }
861 }
862}
863
864void QQmlXmlListModelQueryRunnable::processElement(QQmlXmlListModelQueryResult *currentResult,
865 const QString &element, QXmlStreamReader &reader)
866{
867 if (!reader.isStartElement() || reader.name() != element)
868 return;
869
870 const QStringList &elementNames = m_job.elementNames;
871 const QStringList &attributes = m_job.elementAttributes;
872 QFlatMap<int, QString> results;
873
874 // First of all check all the empty element names. They might have
875 // attributes to be read from the current element
876 if (!reader.attributes().isEmpty()) {
877 for (auto index = 0; index < elementNames.size(); ++index) {
878 if (elementNames.at(index).isEmpty() && !attributes.at(index).isEmpty()) {
879 const QString &attribute = attributes.at(index);
880 if (reader.attributes().hasAttribute(attribute))
881 results[index] = reader.attributes().value(attribute).toString();
882 }
883 }
884 }
885
886 // After that we recursively search for the elements, considering that we
887 // can have nested element names in our model, and that the same element
888 // can be used multiple types (with different attributes, for example)
889 readSubTree(QString(), reader, results, &currentResult->errors);
890
891 if (reader.hasError())
892 currentResult->errors.push_back(qMakePair(this, reader.errorString()));
893
894 currentResult->data << results;
895}
896
897void QQmlXmlListModelQueryRunnable::readSubTree(const QString &prefix, QXmlStreamReader &reader,
898 QFlatMap<int, QString> &results,
899 QList<QPair<void *, QString>> *errors)
900{
901 const QStringList &elementNames = m_job.elementNames;
902 const QStringList &attributes = m_job.elementAttributes;
903 while (reader.readNextStartElement()) {
904 const auto name = reader.name();
905 const QString fullName =
906 prefix.isEmpty() ? name.toString() : (prefix + QLatin1Char('/') + name.toString());
907 qsizetype index = name.isEmpty() ? -1 : findIndexOfName(elementNames, fullName);
908 if (index >= 0) {
909 // We can have multiple roles with the same element name, but
910 // different attributes, so we need to cache the attributes and
911 // element text.
912 const auto elementAttributes = reader.attributes();
913 // We can read text only when the element actually contains it,
914 // otherwise it will be an error. It can also be used to check that
915 // we've reached the bottom level.
916 QString elementText;
917 bool elementTextRead = false;
918 while (index >= 0) {
919 // if the path matches completely, not just starts with, we
920 // need to actually extract value
921 if (elementNames[index] == fullName) {
922 QString roleResult;
923 const QString &attribute = attributes.at(index);
924 if (!attribute.isEmpty()) {
925 if (elementAttributes.hasAttribute(attribute)) {
926 roleResult = elementAttributes.value(attributes.at(index)).toString();
927 } else {
928 errors->push_back(qMakePair(m_job.roleQueryErrorId.at(index),
929 QLatin1String("Attribute %1 not found")
930 .arg(attributes[index])));
931 }
932 } else if (!elementNames.at(index).isEmpty()) {
933 if (!elementTextRead) {
934 elementText =
935 reader.readElementText(QXmlStreamReader::IncludeChildElements);
936 elementTextRead = true;
937 }
938 roleResult = elementText;
939 }
940 results[index] = roleResult;
941 }
942 // search for the next role with the same element name
943 index = findIndexOfName(elementNames, fullName, index + 1);
944 }
945 if (!elementTextRead)
946 readSubTree(fullName, reader, results, errors);
947 } else {
948 reader.skipCurrentElement();
949 }
950 }
951}
952
954
955#include "moc_qqmlxmllistmodel_p.cpp"
void endRemoveRows()
Ends a row removal operation.
void endInsertRows()
Ends a row insertion operation.
QModelIndex createIndex(int row, int column, const void *data=nullptr) const
Creates a model index for the given row and column with the internal pointer ptr.
void beginRemoveRows(const QModelIndex &parent, int first, int last)
Begins a row removal operation.
void beginInsertRows(const QModelIndex &parent, int first, int last)
Begins a row insertion operation.
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
Definition qbytearray.h:57
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
\inmodule QtCore
Definition qfile.h:93
QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
Definition qfile.cpp:904
QString fileName() const override
Returns the name set by setFileName() or to the QFile constructors.
Definition qfile.cpp:277
T value(const Key &key, const T &defaultValue) const
Definition qflatmap_p.h:636
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition qhash.h:1303
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
QString errorString() const
Returns a human-readable description of the last device error that occurred.
QString errorString() const
Returns a human readable description of the last error that occurred.
Definition qlist.h:75
qsizetype size() const noexcept
Definition qlist.h:397
iterator insert(qsizetype i, parameter_type t)
Definition qlist.h:488
void push_back(parameter_type t)
Definition qlist.h:675
const_reference at(qsizetype i) const noexcept
Definition qlist.h:446
T value(qsizetype i) const
Definition qlist.h:664
pointer data()
Definition qlist.h:431
void append(parameter_type t)
Definition qlist.h:458
void clear()
Definition qlist.h:434
\inmodule QtCore
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
This signal is emitted to indicate the progress of the download part of this network request,...
void finished()
This signal is emitted when the reply has finished processing.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
void setRawHeader(const QByteArray &headerName, const QByteArray &value)
Sets the header headerName to be of value headerValue.
\inmodule QtCore
Definition qobject.h:103
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
Definition qobject.cpp:2658
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
Definition qobject.cpp:3236
bool isCanceled() const
Definition qpromise.h:79
QFuture< T > future() const
Definition qpromise.h:48
void finish()
Definition qpromise.h:75
bool addResult(U &&result, int index=-1)
Definition qpromise.h:60
void start()
Definition qpromise.h:74
The QQmlContext class defines a context within a QML engine.
Definition qqmlcontext.h:25
QQmlEngine * engine() const
Return the context's QQmlEngine, or \nullptr if the context has no QQmlEngine or the QQmlEngine was d...
static bool isLocalFile(const QString &url)
Returns true if url is a local file that can be opened with \l{QFile}.
Definition qqmlfile.cpp:644
static QString urlToLocalFileOrQrc(const QString &)
If url is a local file returns a path suitable for passing to \l{QFile}.
Definition qqmlfile.cpp:742
QQmlXmlListModelQueryRunnable(QQmlXmlListModelQueryJob &&job)
QFuture< QQmlXmlListModelQueryResult > future() const
void run() override
Implement this pure virtual function in your subclass.
void setElementName(const QString &name)
void setAttributeName(const QString &attributeName)
void setName(const QString &name)
void classBegin() override
Invoked after class creation, but before any properties have been set.
void reload()
\qmlmethod QtQml.XmlListModel::XmlListModel::reload()
void progressChanged(qreal progress)
QQmlListProperty< QQmlXmlListModelRole > roleObjects()
\qmlproperty list<XmlListModelRole> QtQml.XmlListModel::XmlListModel::roles
Q_INVOKABLE QString errorString() const
\qmlmethod QtQml.XmlListModel::XmlListModel::errorString()
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void appendRole(QQmlXmlListModelRole *)
void setSource(const QUrl &)
QModelIndex index(int row, int column, const QModelIndex &parent) const override
Returns the index of the data in row and column with parent.
void statusChanged(QQmlXmlListModel::Status)
QQmlXmlListModel(QObject *parent=nullptr)
\qmltype XmlListModel \inqmlmodule QtQml.XmlListModel
int rowCount(const QModelIndex &parent) const override
Returns the number of rows under the given parent.
void setQuery(const QString &)
QVariant data(const QModelIndex &index, int role) const override
Returns the data stored under the given role for the item referred to by the index.
QHash< int, QByteArray > roleNames() const override
void setAutoDelete(bool autoDelete)
Enables auto-deletion if autoDelete is true; otherwise auto-deletion is disabled.
Definition qrunnable.h:38
\inmodule QtCore
\inmodule QtCore
Definition qstringview.h:78
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
Definition qstring.cpp:8218
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:192
void clear()
Clears the contents of the string and makes it null.
Definition qstring.h:1252
static QThreadPool * globalInstance()
Returns the global QThreadPool instance.
bool singleShot
whether the timer is a single-shot timer
Definition qtimer.h:22
\inmodule QtCore
Definition qurl.h:94
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
Definition qurl.cpp:1896
\inmodule QtCore
Definition qvariant.h:65
QSet< QString >::iterator it
Combined button and popup list for selecting options.
@ SkipEmptyParts
Definition qnamespace.h:128
QImageReader reader("image.png")
[1]
static void * context
DBusConnection const char DBusError * error
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
EGLOutputLayerEXT EGLint attribute
#define qWarning
Definition qlogging.h:166
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1525
GLfloat GLfloat GLfloat w
[0]
GLuint index
[2]
GLboolean r
[2]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum src
GLuint * nextQueryId
GLuint name
GLint first
GLenum GLenum GLsizei void GLsizei void * column
GLenum query
GLenum GLenum GLsizei void * row
GLuint64EXT * result
[6]
QT_BEGIN_NAMESPACE constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))
Definition qpair.h:19
QQmlContext * qmlContext(const QObject *obj)
Definition qqml.cpp:75
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
static qsizetype findIndexOfName(const QStringList &elementNames, const QStringView &name, qsizetype startIndex=0)
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
SSL_CTX int void * arg
#define qPrintable(string)
Definition qstring.h:1531
#define QStringLiteral(str)
#define tr(X)
#define Q_EMIT
ptrdiff_t qsizetype
Definition qtypes.h:165
long long qint64
Definition qtypes.h:60
double qreal
Definition qtypes.h:187
QList< int > list
[14]
QFuture< void > future
[5]
QFutureWatcher< int > watcher
QFile file
[0]
QList< QTreeWidgetItem * > items
QJSValue fullName
\inmodule QtCore \reentrant
Definition qchar.h:18
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
Definition qlist.h:962
QList< QPair< void *, QString > > errors
QList< QFlatMap< int, QString > > data