diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-07-06 13:43:03 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-07-06 13:43:03 (GMT) |
commit | e07e95da3d35a2ea1ab2b325df6c91620f948497 (patch) | |
tree | d13f72baa539cd3345cf8fa0a1c0d7f8323d4f7f /tools/linguist/phrasebooks/french.qph | |
parent | fd181167709283a2ceefa5285d6189fa7de23bb6 (diff) | |
download | Qt-e07e95da3d35a2ea1ab2b325df6c91620f948497.zip Qt-e07e95da3d35a2ea1ab2b325df6c91620f948497.tar.gz Qt-e07e95da3d35a2ea1ab2b325df6c91620f948497.tar.bz2 |
Fix issue where a mainwindow would show two size grips in Cocoa.
OK. this is a bit strange. It seems the topdata->resizer value is used
to control whether or not we should show a resize handle based on a
count (0 no, non-zero yes). Since we somehow decided that this value
will never be larger than 15, we made it 4-bits wide. There's a "Qt/Mac"
API, QWidgetPrivate::qt_mac_update_sizer(QWidget *, int = 0) which
would adjust this value by the int passed in.. We use that in several places, not excluding
the QStatusBar where we would pass 1 if we want to show, and -1 if we
didn't. Now if you subtract -1 from zero when you are 4 bits wide, well,
bad things happen. Therefore protect that (since if it's at zero we have
succeeded, we don't want to show the resizer). This seems to work well.
The private API is certainly an interesting way of solving the problem,
but is easy to abuse (for example, this code will break if resizer = 1
and we are passed -2 in the function.
Task-number: 257485
Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'tools/linguist/phrasebooks/french.qph')
0 files changed, 0 insertions, 0 deletions