Skip to content

Conversation

@Atari2
Copy link

@Atari2 Atari2 commented Jul 18, 2021

Currently when opening a rom in shex, shex will keep the QFile object open.
This, on Windows, causes the rom to be impossible to open in certain other programs (e.g. BizHawk), with an error like "This file is already open in another process (shex.exe)".

Since keeping the QFile object open is not necessary, the fix for this issue is simply to close the QFile after reading all of its data and then re-opening it only once we want to write into it.

This patch is simple and it doesn't do any error checking on open/read/write, because the code that was already existing didn't do any error checking either.

This patch also fixes a few missing or misplaced emit keywords as reported by QtCreator.

Atari2 added 3 commits July 18, 2021 12:54
Currently when opening a rom in shex, shex will keep the QFile object open.
This, on Windows, causes the rom to be impossible to open in certain other programs (e.g. BizHawk), with an error like "This file is already open in another process (shex.exe)".

Since keeping the QFile object open is not necessary, the fix for this issue is simply to close the QFile after reading all of its data and then re-opening it only once we want to write into it. 

This patch is simple and it doesn't do any error checking on open/read/write, because the code that was already existing didn't do any error checking either.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant