If we're changing the contents of the nib files in Qt, we need to
overwrite the nib files that we write to /tmp, as QFile::copy() does
not overwrite files.
This also catches the case where the files in /tmp are empty due to
a possible broken qrc-run, where re-runs of qrc to fix the resources
would still leave the corrupt nib in /tmp, resulting in:
-[NSKeyedUnarchiver initForReadingWithData:]: data is empty; did
you forget to send -finishEncoding to the NSKeyedArchiver?
And as a consequence:
qt_mac_loadMenuNib: could not instantiate nib
ASSERT: "mainMenu" in file qcocoamenuloader.mm, line 154
Change-Id: I2907a32d1a56c23a27343c81839a06b65a529372
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>