qt5base-lts/tests/manual
Thomas Fischer 983dde1f2f Avoid adding widget to its own layout
Widgets and layouts added or inserted to a layout are checked for:
- Not being NULL
- Not being the parent widget of a layout or the layout itself,
  respectively

Without this commit, adding a widget to its own layout would result in a
CPU-hogging infinite loop. Now, a warning is written to stderr and the
add or insert function call is ignored.

The checks are implemented as public functions of QLayoutPrivate and
thus accessible in QLayout's descendants to be used in various
"addWidget", "insertWidget", etc functions.

Unlike 'classical' layouts like QGridLayout, QFormLayout does indeed
accept widgets that are NULL. To not break this behavior, any call for
the check functions first tests if the widget or layout, respectively,
to test is NULL or not and calls the check only in the latter case.

Automated tests for QBoxLayout, QGridLayout, and QFormLayout were added.
For an unpatched Qt 5.3, each of those automated tests will freeze as
explained in QTBUG-40609. For a fixed version, warning messages about
invalid parameters to addWidget/addLayout/... calls will be read by
QTest::ignoreMessage, resulting in a passed test.

Change-Id: I1522d5727e643da3f7c025755975aca9f482676d
Task-number: QTBUG-40609
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-05 00:05:45 +02:00
..
bearerex expand tabs and related whitespace fixes in *.{cpp,h,qdoc} 2014-01-13 22:46:50 +01:00
cocoa Compile. 2014-02-08 10:43:58 +01:00
corelib/tools QVarLengthArray - check if iterators arguments are valid (in debugmode) 2013-07-12 16:15:44 +02:00
dialogs QPrinter/Windows: Fix handling of native paper source ids. 2014-05-23 22:18:41 +02:00
filetest Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
gestures Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
highdpi Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
inputmethodhints Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
keypadnavigation Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
lance Merge remote-tracking branch 'origin/stable' into dev 2013-01-22 18:40:13 +01:00
mkspecs Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
network_remote_stresstest Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
network_stresstest Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
qcursor Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
qdesktopservices QUrl: do not decode "#" in fragments 2013-08-04 04:48:35 +02:00
qdesktopwidget Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
qgraphicsitem Fix some typos 2014-03-03 18:24:29 +01:00
qgraphicsitemgroup Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
qgraphicslayout/flicker Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
qhttpnetworkconnection Fix domain in manual test qhttpnetworkconnection. 2013-07-12 12:41:30 +02:00
qimagereader Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
qlayout Avoid adding widget to its own layout 2014-09-05 00:05:45 +02:00
qlocale Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
qmetatype QMetaType: remember whether a type was registered with Q_DECLARE_METATYPE 2012-12-11 11:12:08 +01:00
qnetworkaccessmanager/qget Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qnetworkconfiguration QNetworkConfiguration: add public member bearerTypeFamily() 2013-06-28 23:05:57 +02:00
qnetworkconfigurationmanager Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qnetworkreply network tests: add manual test for auth / proxy auth 2014-08-07 11:54:08 +02:00
qopengltextureblitter QOpenGLTextureBlitter: fix source rect when origin is top left 2014-02-16 11:06:40 +01:00
qopenglwidget/openglwidget QOpenGLWidget retina support. 2014-03-20 08:35:24 +01:00
qprintdevice_dump QPlatformPrintDevice - New QPA base class 2014-03-17 13:45:31 +01:00
qscreen Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qssloptions Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qsslsocket SSL: add support for the Next Protocol Negotiation extension 2014-02-11 15:37:10 +01:00
qtabletevent Add painting of points to the QTabletEvents manual test. 2013-06-26 21:06:44 +02:00
qtbug-8933 Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
qtexteditlist Fix clipping of QTextList decorators. 2013-05-23 12:49:39 +02:00
qtouchevent Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
qwidget_zorder Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
repaint Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
shortcuts Add manual test for shortcuts 2013-08-19 12:13:56 +02:00
socketengine Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
textrendering Compile most manual tests with Qt 4. 2013-03-22 19:52:26 +01:00
transientwindow Added transient window manual test 2013-02-25 15:00:24 +01:00
unc Add manual test for UNC paths 2013-07-19 10:10:19 +02:00
widgetgrab Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
widgets QHeaderView - remove confusing bool 2013-11-08 22:17:03 +01:00
windowchildgeometry Cocoa: Allow frameless NSWindow child QWindows 2014-02-05 23:12:50 +01:00
windowflags Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
windowgeometry Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
windowmodality Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
windowtransparency Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
xembed-raster Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
xembed-widgets Update manualtests license to say "part of test suite". 2013-05-26 20:54:51 +02:00
manual.pro Remove manual test qpainfo, which is superseded by the qtdiag tool. 2014-03-21 18:34:43 +01:00