File Mapping
Traditionally when you wanted to map a file into memory on Unix this was done using mmap and on Windows with CreateFileMapping. Continuing the tradition of simple, consistent API’s, in 4.4 QFile will have two new functions: map() and unmap() that provide the ability to map files into memory.
An quick example:
QFile file("foo"); file.open(QFile::ReadOnly); uchar *memory = file.map(0, file.size()); if (memory) { // have some fun with the data file.unmap(); }
More on Qt
- Security advisory: Multiple third-party Chromium vulnerabilities fixed in Chrome 153.0.8010.52 impact Qt WebEngine
- Security advisory: Multiple third-party Chromium vulnerabilities fixed in Chrome 154.0.8037.93 impact Qt WebEngine
- Security advisory: CVE-2026-118968: Denial-of-service vulnerability in WAV audio decoding impacts Qt