Details
Description
When porting from QFile:
QSaveFile sf(path); if (sf.open(QIODevice::WriteOnly)) { sf.write("Hello\n"); ok = sf.commit(); if (ok) qDebug() << "Wrote " << sf.size() << " bytes to " << path; }
prints
Wrote 0 bytes to "/tmp/test.txt" Empty filename passed to function
Attachments
Issue Links
- duplicates
-
QTBUG-66605 QSaveFile::fileTime() fails after QSaveFile::commit()
- Closed
- relates to
-
QTBUG-75077 QSaveFile truncates file due to incorrect commit/flush handling
- Reported
For Gerrit Dashboard: QTBUG-77039 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
221551,13 | QSaveFile: don't reset fileEngine after commit() | dev | qt/qtbase | Status: MERGED | +2 | 0 |