qtclient: MDI/state and load fixes and races in file load mode