martinkostolny updated this revision to Diff 12272. martinkostolny added a comment.
Thanks a sorry for all the rookie mistakes. I tried to fix the problems You mentioned: - QT->Qt - get rid of useless streams - no more setting permissions and sync-to-disk when using QSaveFile - using of QMap::insert (should I use an initializer list instead?) Now, while discussing the atomic rename, I'm throwing a thought: how about using QStandardPaths::CacheLocation (~/.cache) for the temporary file? It should always exist, it is more likely the same FS device and should be writable by the user. I did that in this diff and left a fallback for using QSaveFile if atomic rename fails. REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D4847?vs=12251&id=12272 REVISION DETAIL https://phabricator.kde.org/D4847 AFFECTED FILES autotests/src/katetextbuffertest.cpp autotests/src/katetextbuffertest.h src/CMakeLists.txt src/buffer/katesecuretextbuffer.cpp src/buffer/katesecuretextbuffer_p.h src/buffer/katetextbuffer.cpp src/buffer/katetextbuffer.h src/buffer/org.kde.ktexteditor.katetextbuffer.actions To: martinkostolny, dhaumann, #ktexteditor Cc: apol, dfaure, anthonyfieroni, cullmann, ltoscano, dhaumann, graesslin, davidedmundson, palant, kwrite-devel, #frameworks, head7, kfunk, sars