3 Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
16 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 class QAbstractButton
;
39 * @short Hacks around Qt and KDE library bugs (until they're fixed).
41 * SYNC: Remove hacks when fixed.
43 * @author Clarence Dang <dang@kde.org>
48 // http://www.trolltech.com/developer/tasktracker.html?method=entry&id=108906:
50 // Qt 4.1.1 QButtonGroup::checkedButton() does not return 0 after a
51 // button is unchecked.
54 // QButtonGroup_CheckedButton() will return 0 correctly.
55 static QAbstractButton
*QButtonGroup_CheckedButton (const QButtonGroup
*buttonGroup
);
57 // From: Clarence Dang <dang@kde.org>
58 // To: qt-bugs@trolltech.com
59 // Subject: Re: [Issue N108897] Dangerous, subtle change to QRect::normalize()
60 // Date: Fri, 31 Mar 2006 20:51:36 +1000
61 // Cc: kde-core-devel@kde.org
65 // Qt 4.1.1 qt-copy/src/corelib/tools/qrect.cpp:
67 // QRect QRect::normalized() const
69 // if (isNull() || width() == 0 || height() == 0)
72 // This check was not in Qt3. It is also wrong.
74 // e.g. QRect rect = QRect (thisPoint, lastPoint).normalize ()
76 // This innocent looking line will work for all values of "thisPoint" and
77 // "lastPoint", _except_ for 5 special cases by my count:
83 // Where "*" is the topLeft point and "+" are the troublesome bottomRight
87 // QRect_Normalized() will use the Qt3 behaviour and therefore, work for
89 static QRect
QRect_Normalized (const QRect
&rect
);