4#ifndef QQMLDATABLOB_P_H
5#define QQMLDATABLOB_P_H
18#include <private/qqmlrefcount_p.h>
19#include <private/qqmljsdiagnosticmessage_p.h>
20#include <private/qv4compileddata_p.h>
22#if QT_CONFIG(qml_network)
23#include <QtNetwork/qnetworkreply.h>
26#include <QtQml/qqmlprivate.h>
27#include <QtQml/qqmlerror.h>
28#include <QtQml/qqmlabstracturlinterceptor.h>
29#include <QtQml/qqmlprivate.h>
31#include <QtCore/qdatetime.h>
32#include <QtCore/qfileinfo.h>
33#include <QtCore/qurl.h>
67 Status status()
const;
69 bool isLoading()
const;
70 bool isWaiting()
const;
71 bool isComplete()
const;
73 bool isCompleteOrError()
const;
75 qreal progress()
const;
79 QUrl finalUrl()
const;
92 return hasInlineSourceCode || !fileInfo.filePath().isEmpty();
100 bool hasInlineSourceCode =
false;
115#if QT_CONFIG(qml_network)
120 virtual void allDependenciesDone();
123 virtual void downloadProgressChanged(
qreal);
124 virtual void completed();
135 void cancelAllWaitingFor();
136 void notifyAllWaitingOnMe();
142 StatusMask = 0x0000FFFF,
144 ProgressMask = 0x00FF0000,
146 AsyncMask = 0x80000000,
164 int d = _p.loadRelaxed();
165 int nd = (
d & ~StatusMask) | ((status << StatusShift) & StatusMask);
166 if (
d == nd || _p.testAndSetOrdered(
d, nd))
return;
170 inline bool isAsync()
const
172 return _p.loadRelaxed() & AsyncMask;
175 inline void setIsAsync(
bool v)
178 int d = _p.loadRelaxed();
179 int nd = (
d & ~AsyncMask) | (
v ? AsyncMask : NoMask);
180 if (
d == nd || _p.testAndSetOrdered(
d, nd))
return;
184 inline qreal progress()
const
186 return quint8((_p.loadRelaxed() & ProgressMask) >> ProgressShift) / float(0xFF);
189 inline void setProgress(
qreal progress)
193 int d = _p.loadRelaxed();
194 int nd = (
d & ~ProgressMask) | ((
v << ProgressShift) & ProgressMask);
195 if (
d == nd || _p.testAndSetOrdered(
d, nd))
return;
215 mutable QString m_finalUrlString;
225 int m_redirectCount:30;
\inmodule QtCore\reentrant
\inmodule QtCore \reentrant
NetworkError
Indicates all possible error conditions found during the processing of the request.
The QQmlDataBlob encapsulates a data request that can be issued to a QQmlTypeLoader.
virtual void dataReceived(const SourceCodeData &)=0
Invoked when data for the blob is received.
QQmlTypeLoader * typeLoader() const
virtual void initializeFromCachedUnit(const QQmlPrivate::CachedQmlUnit *)=0
QList< QQmlDataBlob * > m_waitingOnMe
QQmlTypeLoader * m_typeLoader
Status
This enum describes the status of the data blob.
The QQmlError class encapsulates a QML error.
The QQmlTypeLoader class abstracts loading files and their dependencies over the network.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLsizei const GLfloat * v
[13]
static void setError(QJsonObject *response, const QString &msg)
QUrl url("example.com")
[constructor-url-reference]
QNetworkAccessManager manager