This fixes database handling (SQLite) for following scenarios:
- opening database manually and then trying to save it,
- opening database from recent files list and then trying to save it.
Both scenarios failed for me, so I fixed them.
I agree. Code is not elegant and not very tidy here but that's what makes things work. Anyhow, I would like to change code for opening files further, so it's not bad for me for now.
I don't think it's really what counts in a review thing. I like to use auto and use it whenever I can. That's like not worth discussing.
I agree but that's not the code that I'm changing :)