macOS: Properly set QWidget::windowFilePath
Make sure we don't end up with an out of date file path
(cherry picked from commit a8f371a6b5a85201a53cfce9a1e6c22e145e79b7)