Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-140486

QLockFile[win]: Use SetFileInformationByHandle to delete the file without closing the HANDLE

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 7.0 (Next Major Release)
    • Core: I/O
    • None
    • Windows

      SetFileInformationByHandle requires opening the file with the DELETE access flag. In turn, opening a file with this flag means everyone that wants to use the file at the same time has to open the file as FILE_SHARE_DELETE.

      Because QLockFile today doesn't the SHARE_DELETE flag, we cannot make the change to use SetFileInformationByHandle today because it would then suddenly become impossible for old and new versions of Qt to use QLockFile for the same file.

      By making QLockFile open the file with SHARE_DELETE today, however, we can give ourselves a longer tail of versions of Qt that will be able to coexist with Qt 7 or Qt 6.x, that does make this change.

        For Gerrit Dashboard: QTBUG-140486
        # Subject Branch Project Status CR V

            cnn Qt Core & Network
            manordheim MÃ¥rten Nordheim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change