23 CreateFile(
reinterpret_cast<const wchar_t*
>(cacheFileName.
constData()),
24 GENERIC_READ | GENERIC_EXECUTE, FILE_SHARE_READ,
25 nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
27 if (
handle == INVALID_HANDLE_VALUE) {
38 if (!ReadFile(
handle,
reinterpret_cast<char *
>(&
header),
sizeof(
header), &bytesRead,
nullptr)) {
43 if (bytesRead !=
sizeof(
header)) {
53 HANDLE fileMappingHandle = CreateFileMapping(
handle, 0, PAGE_READONLY, 0, 0, 0);
54 if (!fileMappingHandle) {
59 auto mappingCleanup =
qScopeGuard([fileMappingHandle]{
60 CloseHandle(fileMappingHandle);
63 dataPtr = MapViewOfFile(fileMappingHandle, FILE_MAP_READ, 0, 0, 0);
72void CompilationUnitMapper::close()
74 if (dataPtr !=
nullptr) {
81 UnmapViewOfFile(dataPtr);
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
const QChar * constData() const
Returns a pointer to the data stored in the QString.
static bool verifyHeader(const CompiledData::Unit *unit, QDateTime expectedSourceTimeStamp, QString *errorString)
Combined button and popup list for selecting options.
\qmltype Particle \inqmlmodule QtQuick.Particles
static QString header(const QString &name)
Q_DECL_COLD_FUNCTION Q_CORE_EXPORT QString qt_error_string(int errorCode=-1)
GLuint64 GLenum void * handle
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]
#define QStringLiteral(str)