About QFile::map(...) something has been broken in Qt 4.6 rc1 for OS X.
No problem under Windows.
The following code was wroking before:
QFile file("/myfile");
file.open(QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Unbuffered);
char buf[100];
memset(buf, 0, 100);
file.write(buf, 100);
uchar* p = file.map(0, 100);

now p is NULL !!!

By comparing the code in beta1 and rc1, I see some modification
in qfsfileengine_unix.cpp.
The problem is about this code which has been added:

if (doStat()
&& (QT_OFF_T(size) > st.st_size - QT_OFF_T(offset)))
return 0;

The problem is that "st.st_size" is 0 because it does not take into account the 
recently written data.

Reported as:
http://bugreports.qt.nokia.com/browse/QTBUG-6330


_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to