diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-12-05 15:14:45 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2014-12-05 15:39:10 +0100 |
commit | 8ee7aa78afd3d3dee6e333953d51aa72cb227441 (patch) | |
tree | c61a84686639a7fdc6ba324dc689abc66090b7e6 /src/widgets/widgets/qtoolbar.cpp | |
parent | 05ad2fc2f4267defd4b9b7f0b8706d2624f10d12 (diff) |
qt_mac_loadMenuNib: Prevent stale NIB files by diffing file size
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>
Diffstat (limited to 'src/widgets/widgets/qtoolbar.cpp')
0 files changed, 0 insertions, 0 deletions