summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Fix broken resource cleanup in QOpenGLWidgetLaszlo Agocs2014-11-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context has to be made current. Otherwise we may fail to clean up or, what's worse, we may delete FBOs and textures in some random context. The latter was visible with ANGLE in the qopenglwidget example. When having two QOpenGLWidget instances, the context for the second happened to be the current one when destroying the first. This is now avoided by making sure the correct context is current when deleting the FBOs. Task-number: QTBUG-42696 Change-Id: I8c1eed7c13a869968cc67141e585d02c6bc6f279 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * | QPanGestureRecognizer: Make the number of touch points a parameter.Friedemann Kleint2014-11-174-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare for determining the suitable number of touch points from the device type. For now, 2 points are used as before, which can be overridden by setting the environment variable QT_PAN_TOUCHPOINTS. Add member variable to QPanGesturePrivate which is set on gesture creation and later used for comparison. Task-number: QTBUG-40461 Change-Id: I6d9e35ca752375bc6a54435482ca0925195b8142 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * | send touch update when more points begin after single touch is ignoredShawn Rutledge2014-11-132-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, a widget can't detect pinches if the points don't start simultaneously unless it sets WA_TouchPadAcceptSingleTouchEvents. The use case is for a widget that doesn't actually want the single touch events, but only when there are two or more touchpoints. Task-number: QTBUG-42389 Change-Id: I5269d9acb93a0001c4fde02b1f7b9e0dfcc0032f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * | a widget's window is transient for its parent's top-level windowShawn Rutledge2014-11-131-2/+3
| |/ | | | | | | | | | | | | | | | | | | | | When a widget's parent's window is not a top-level window, it should find the top-level window before calling setTransientParent, to avoid a warning (since a71e285133087714034f3c84a758980c85b3801e). Task-number: QTBUG-42464 Change-Id: I732691b0d40aba226470332426775d1bd4381009 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix too many resizes and move events for native widgetsJørgen Lind2014-11-043-20/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the QWidgetWindow receives a resize or move event, it should check with the widget if its crect already has this geometry. if not then send the resize or move event Ideally events should be sent whenever the QWidgetWindow receives them. QTBUG-42383 is created for this problem Task-number: QTBUG-29937 Task-number: QTBUG-38768 Task-number: QTBUG-30744 Change-Id: I1e9a5d25de29a98885edece927ba14d7a763eb01 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Cocoa: Handle Qt::WA_MacAlwaysShowToolWindowShawn Rutledge2014-10-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | Forward the flag to QWindow by setting the _q_macAlwaysShowToolWindowproperty on the window in QWidgetPrivate::create_sys(). Test for the property when creating the window. Task-number: QTBUG-29816 Done-with: Morten Sørvig Change-Id: Id810dda98d02deb0902192cce1783d8b16b04d04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * Fix QWidget::scroll during paintingAllan Sandfeld Jensen2014-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Calling scroll during painting fails in cases where the scroll is attempted accelerated. This is easily fixed by not using accelerated scrolling during painting. Task-number: QTBUG-41615 Change-Id: I38d2428d5679c242f13d53793a3dc3b8e01b538f Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Check geometry correctly when replaying popup mouse events.Friedemann Kleint2014-10-281-8/+13
| | | | | | | | | | | | | | Task-number: QTBUG-41869 Task-number: QTBUG-39313 Change-Id: I2b59f5db6f0ae4007b1a3b58a79eed958e662272 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * QSwipeGestureRecognizer: Prevent cancel in startup-phase.Friedemann Kleint2014-10-272-10/+23
| | | | | | | | | | | | | | | | | | | | Replace the boolean 'started' member by an enumeration which indicates the startup phase. While in that phase, do not cancel when pressed points are detected for fewer than 3 touch points. Task-number: QTBUG-15768 Change-Id: Ic57b19e3002392fb632f551f615d80ada9831d34 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Ensure that a leave event is sent to a popup that is being closedJørgen Lind2014-11-072-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a context menu contains a menu item which will open a dialog, the context menu will never get the leave event, which might leave the menu in an invalid state. Synthetic leave events are sent to windows, but not to popups that are blocked by modal dialogs. Hovever, a popup is removed from the popup stack in QApplication before it receives the leave event. Therefore always give popups events, even when they are not visible. Task-number: QTBUG-38021 Change-Id: I63f6febed44f1e7c8f29e7a09af07f32b4ddbc82 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Clean up ShortcutOverride handlingFrederik Gladhorn2014-10-301-33/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of sending the event from random places, send it from QWindowSystemInterface. This allows to send override events on OS X to menus before doing other key processing and reduces the number of ShortcutOverride events on all platforms to exactly one per key press event. Additional test by Friedemann Kleint. Task-number: QTBUG-38986 Change-Id: I6981bb776aba586ebc7c3daa5fd7a0d84c25bc3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-273-18/+33
|\| | | | | | | | | | | | | Conflicts: src/gui/text/qfontdatabase.cpp Change-Id: I6ac1f55faa22b8e7b591386fb67f0333d0ea443d
| * Doc: warn about preserving input method hintsPaul Olav Tvete2014-10-241-0/+4
| | | | | | | | | | | | Task-number: QTBUG-41252 Change-Id: I8ea2094c440b3c78b4bc78a69a5f6b18533e4927 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
| * QSwipeGestureRecognizer: Fix gesture cancel on direction change.Friedemann Kleint2014-10-231-2/+2
| | | | | | | | | | | | | | Task-number: QTBUG-12736 Change-Id: I6d8d09843b45df17cb9158070f63b3397c5b4c07 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * Fix QWidget::mapTo/FromGlobal() when embedded in QGraphicsView.Friedemann Kleint2014-10-231-0/+22
| | | | | | | | | | | | | | | | | | | | Map the positions via QGraphicsScene and the first QGraphicsView (as is done in existing code). Fall back to the previous code path when no QGraphicsView exists, which is hit in the tests. Change-Id: I0754765d05cded6bc1b64045f2513fef8afde337 Task-number: QTBUG-41135 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * Respect minimum size of heightForWidth layoutsPaul Olav Tvete2014-10-221-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we cannot support heightForWidth constraints on toplevel windows, it is impossible to solve this perfectly: if the window is resizable at all, the user will be able to resize it too small. Our old solution was just to give up and allow completely free resizing, even down to 0x0. This makes very little sense. It is clearly better to use the minimum size that we have already computed, even though it is not perfect. This reverts a behavior change introduced in commit 36e9516f85fbb9c9a236f5ca034d5a0126d86c12 (September 9th, 2002) [ChangeLog][QtWidgets][QLayout] Widgets and dialogs containing layouts with heightForWidth (such as a label with word wrap) will no longer get a minimum size of 0x0. Task-number: QTBUG-37673 Change-Id: If26b7ef9c80edbf9d54c6519b36646df408b7652 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * Windows: Implement Qt::WA_ShowWithoutActivating.Friedemann Kleint2014-10-221-2/+0
| | | | | | | | | | | | | | | | | | | | Set dynamic property for all platforms and query it in QWindowsWindow::show_sys(). Task-number: QTBUG-19194 Task-number: QTBUG-34504 Change-Id: I4199a2ed835d3de928405d470a81c54da93cc768 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Set correct transient parent in q_createNativeChildrenAndSetParent().Friedemann Kleint2014-10-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | Fix warning: void QWindow::setTransientParent(QWindow*) ... must be a top level window. which occurred for example when parenting a QMenu onto a native child widget. Task-number: QTBUG-41898 Change-Id: Icc25fb2108bd68b2d9c0e551949b90fc7a82d358 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-205-23/+121
|\| | | | | | | Change-Id: If7e51514ed6832750e3ad967e4d322ccf920d2bb
| * Always report focusObjectChanged on QWidget::clearFocus()Tor Arne Vestbø2014-10-201-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | The focusObject() of a QWidgetWindow is based on the focusWidget() of the top level widget of the window, which is resolved through the focus_child chain of the widget. This is not the same thing as the focusWidget of the application. The hasFocus() function of a QWidget queries the latter, so we can't put the focusObjectChanged signal inside hasFocus() when we unconditionally clear the focus_child chain (and hence the focusObject) earlier in the function. Change-Id: Iae39da5d6031d22b21e9dc9f18e5fe6e6fd11a5c Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * Clear specific QWindow::focusObject() on QWindowPrivate::clearFocusObject()Tor Arne Vestbø2014-10-201-2/+4
| | | | | | | | | | | | | | | | | | | | The focusObject of a QWidgetWindow is the focusWidget() of the top level widget, so when clearing the focus object of the window we should clear focus of the same focusWidget, not the application-wide focus widget, which may live in another window. Change-Id: Ib9162418865c225e23aac7987e119b3b651983eb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * Widgets: only update IM if the widget is the current focus objectRichard Moe Gustavsen2014-10-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QInputMethod works on focusObject, not focusWidget. These two are not always the same, and sometimes the focusObject is also NULL. In either case, we should not tell QInputMethod to commit, reset or otherwise emit signals based on the internal state of widgets that are not the focus object. This led to a crash on iOS, since we got a call to cursorRectangleChanged when focus object was NULL, which the code didn't (and shouldn't need to) take into account. Change-Id: I54e40d7ec35210ba6599a78c5a8c7f982a1c3dbb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * QSizePolicy: remind to mark as Q_PRIMITIVE_TYPE in Qt 6Marc Mutz2014-10-191-0/+4
| | | | | | | | | | Change-Id: I1f18b4cd99f37aadf199e70d3acade9c8f5f9799 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Avoid breaking BC with new virtuals in QOpenGLPaintDeviceLaszlo Agocs2014-10-161-11/+22
| | | | | | | | | | | | Task-number: QTBUG-41046 Change-Id: Iab628d2d6811d528e2cc513b6f8a74baa628541d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Fix QOpenGLWidget on Cocoa when used as viewportLaszlo Agocs2014-10-142-4/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having a QOpenGLWidget as a graphics view viewport was not functioning on OS X: it was showing incomplete content due to accessing the texture attached to the framebuffer object before the rendering is complete. On the normal path, when rendering is done via paintGL(), the flush was there. When used as a viewport however, this path is not used. The missing flush is now added for the other case too. For performance reasons, we will not flush on every paint engine end(). Instead, the flush is deferred until composition starts. QGLWidget also featured a weird on-by-default autoFillBackground concept. To maintain compatibility with apps that used QGLWidget as the viewport for QGraphicsView, we will now do the same for QOpenGLWidget, but only when it is used as a viewport. For regular QOpenGLWidgets autoFillBackground defaults to false, like for any other widget. The docs are extended with a small section about differences between QGLWidget and QOpenGLWidget. Task-number: QTBUG-41046 Change-Id: I42c2033fdd2ef5815783fd640fe11373761061e0 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Add a warning when using QOpenGLWidget as a native childLaszlo Agocs2014-10-101-0/+6
| | | | | | | | | | | | | | | | | | Just like it is done for QQuickWidget. Task-number: QTBUG-41779 Change-Id: I1b27c2ed34ecb2520edf82843b675dbf6b0eab8e Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-095-7/+27
|\| | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * QSizePolicy: remove an outdated commentMarc Mutz2014-10-041-1/+0
| | | | | | | | | | | | | | The change asked for by the comment is apparently done. Change-Id: I7ef2b58eb8c38192904e83b1c2386d3c762e0bed Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Gabriel de Dietrich2014-10-012-1/+17
| |\
| | * Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-292-1/+17
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| | | * OS X: Fix menu item shortcuts without modifiersEskil Abrahamsen Blomfeldt2014-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A regression was introduced by bdebec4e2ef79f1771d2dcc22f9a919eb4487567. The intention of the change was to avoid using Qt's shortcut mechanism to trigger menu items which were already triggered through the regular menu API in Cocoa. However, Cocoa has trouble with key equivalents that do not have any keyboard modifiers. Thus, we have to allow these particular key sequences to go through the regular system. I've verified that the original bug is still fixed with this change. [ChangeLog][OS X] Fixed menu item shortcuts without keyboard modifiers. Task-number: QTBUG-41192 Change-Id: I8f5a9cbc7a448b3cb0519baed95be5cbb630205c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | | * Make sure we don't delete child QWindows if they have WA_NativeWindow setGabriel de Dietrich2014-09-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting a QWindow automatically deletes its child windows because they are in the QObject hierarchy. However, if the user sets both WA_NativeWindow and WA_DontCreateNativeAncestors, we can't just delete that widget's QWindow. First because the widget doesn't get notified (and maybe it should be), and then because we may invalidate any reference to the QWindow the user may have kept. Our solution is to reparent the child QWindows into the new parent's closest QWindow. We must, however, take the precaution of not keeping any reference to the backing store in the platform window. Reparenting operations can trigger repaints on the platform window, but the backing store is not set and flushed until later. Task-number: QTBUG-38377 Change-Id: I353f5528f227a227b6d10419367cbe1d5d07a94e Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * | | Doc: Use title case in section1 titlesNico Vertriest2014-09-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * | | Fix losing dirty state when calling update() from paintGL()Laszlo Agocs2014-09-301-1/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the paint for the QOpenGLWidget was in invoked on the fast path, where only that widget was dirty, the resetWidget call after sending the paint event removed the widget from the dirty list, making it impossible to schedule an update during the event handling. The correct way is to clean the list and then send the paint events. Change-Id: Icdad5686ded7944fd1c8af56496f725e163a60e6 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | QWidget: simplify reading of an env-var in create()Marc Mutz2014-10-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of initializing paintOnScreenEnv to -1 (thus forcing the variable into the data segment), and then overwriting the -1 with a read from the env-var, dynamically initialize the variable from the env-var directly, thus allowing the variable back into the bss segment (which doesn't occupy storage in the executable). There may have been a reason to do it this way when the old code could fail due to the memory allocation involved, but now with qEnvironmentVariableIntValue(), that is no longer a reason. Change-Id: I6547a81f69b0b57dc49bb4dd3ba1865ce8ac5b86 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Simplify QWidgetPrivate::map{To,From}WS()Marc Mutz2014-10-061-2/+2
| | | | | | | | | | | | | | | Change-Id: I065a173601d45ddb8ec52e721dfc596a487637fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | QDesktopWidget: use qDeleteAll()Marc Mutz2014-10-061-1/+3
| | | | | | | | | | | | | | | Change-Id: Icfbf47309e425deabcef81c8f11b8e42fcc9cdcc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | QWidget: use qEnvironmentVariableIntValue()Marc Mutz2014-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I5b5aec194aab66c7cea8da736655cc7270ade272 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | QApplication: use qEnvironmentVariableIntValue()Marc Mutz2014-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I3bd7b79b520ddbb9d4dd6adb3a495e214f111c2c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | QWidgetBackingStore: simplify reading of an env-var in {move,scroll}Rect()Marc Mutz2014-10-021-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of initializing accelEnv to -1 (thus forcing the variable into the data segment), and then overwriting the -1 with a read from the env-var, dynamically initialize the variable from the env-var directly, thus allowing the variable back into the bss segment (which doesn't occupy storage in the executable). There may have been a reason to do it this way when the old code could fail due to the memory allocation involved, but now with qEnvironmentVariableIntValue(), that is no longer a reason. Change-Id: I619fe45d8eb2a50515f5fb255cabd23a5966b11e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | QWidgetBackingStore: use qEnvironmentVariableIntValue()Marc Mutz2014-10-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I7efe6124ab78092f05ef4296e37bd0d123deb064 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Add debug output for QGestureEvent and QGesture classes.Friedemann Kleint2014-09-302-1/+81
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-15768 Task-number: QTBUG-40461 Change-Id: I3fe29f71ddf39c76efaca02d2b70494378d147dc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-2962-1234/+897
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * | Generate Show/Hide events for widgets when minimized state changes.Friedemann Kleint2014-09-241-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression against Qt 4, where Show/Hide events were received when the minimized state changed. It is restricted to QWidget so as not to introduce additional events to QWindow (which already has signal visibilityChanged()) and cause unexpected side effects in QQuickWindow. Task-number: QTBUG-41312 Change-Id: Ib165a5daf7a7e5d8231ef8a94b70e8a2a3253057 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | Update license headers and add new license filesMatti Paaso2014-09-2462-1175/+679
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
| * | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Frederik Gladhorn2014-09-248-41/+97
| |\ \
| | * | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-238-41/+97
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| | | * Avoid adding widget to its own layoutThomas Fischer2014-09-055-39/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * Add missing private headers warningSamuel Gaist2014-09-042-0/+22
| | | | | | | | | | | | | | | | | | | | Change-Id: I7a4dd22ea3bcebf4c3ec3ad731628fd8f3c247e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Make QWindowContainer handle drag'n'dropAllan Sandfeld Jensen2014-08-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drag'n'drop events were not propagated by a the QWindowContainer to the embedded QWindow. This patch makes the widget accept the events and pass them on Task-number: QTBUG-40603 Change-Id: I97320fbcad27f7c6aa48c95c90bb42dda634764e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>