Qt 4.8
Protected Functions | Private Functions | Properties | List of all members
QResourceFileEnginePrivate Class Reference
Inheritance diagram for QResourceFileEnginePrivate:
QAbstractFileEnginePrivate

Protected Functions

 QResourceFileEnginePrivate ()
 

Private Functions

ucharmap (qint64 offset, qint64 size, QFile::MemoryMapFlags flags)
 
bool unmap (uchar *ptr)
 

Properties

qint64 offset
 
QResource resource
 
QByteArray uncompressed
 

Additional Inherited Members

- Public Functions inherited from QAbstractFileEnginePrivate
 QAbstractFileEnginePrivate ()
 
virtual ~QAbstractFileEnginePrivate ()
 
- Public Variables inherited from QAbstractFileEnginePrivate
QString errorString
 
QFile::FileError fileError
 
QAbstractFileEngineq_ptr
 

Detailed Description

Definition at line 1207 of file qresource.cpp.

Constructors and Destructors

◆ QResourceFileEnginePrivate()

QResourceFileEnginePrivate::QResourceFileEnginePrivate ( )
inlineprotected

Definition at line 1218 of file qresource.cpp.

1218 : offset(0) { }

Functions

◆ map()

uchar * QResourceFileEnginePrivate::map ( qint64  offset,
qint64  size,
QFile::MemoryMapFlags  flags 
)
private

Definition at line 1494 of file qresource.cpp.

1495 {
1497  Q_UNUSED(flags);
1498  if (offset < 0 || size <= 0 || !resource.isValid() || offset + size > resource.size()) {
1499  q->setError(QFile::UnspecifiedError, QString());
1500  return 0;
1501  }
1502  uchar *address = const_cast<uchar *>(resource.data());
1503  return (address + offset);
1504 }
The QString class provides a Unicode character string.
Definition: qstring.h:83
qint64 size() const
Returns the size of the data backing the resource.
Definition: qresource.cpp:510
#define Q_Q(Class)
Definition: qglobal.h:2483
unsigned char uchar
Definition: qglobal.h:994
bool isValid() const
Returns true if the resource really exists in the resource hierarchy, false otherwise.
Definition: qresource.cpp:470
const uchar * data() const
Returns direct access to a read only segment of data that this resource represents.
Definition: qresource.cpp:526
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ unmap()

bool QResourceFileEnginePrivate::unmap ( uchar ptr)
private

Definition at line 1506 of file qresource.cpp.

1507 {
1508  Q_UNUSED(ptr);
1509  return true;
1510 }
const T * ptr(const T &t)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

Properties

◆ offset

qint64 QResourceFileEnginePrivate::offset
private

Definition at line 1214 of file qresource.cpp.

◆ resource

QResource QResourceFileEnginePrivate::resource
private

Definition at line 1215 of file qresource.cpp.

◆ uncompressed

QByteArray QResourceFileEnginePrivate::uncompressed
private

Definition at line 1216 of file qresource.cpp.


The documentation for this class was generated from the following file: