summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Fix some doc errors.Frederik Gladhorn2013-09-212-3/+1
| | | | | | | Change-Id: Ib874d7e9671d9cee75fe41f4dac5d0de7b09245e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add a WindowManagement capability to QPlatformIntegrationLaszlo Agocs2013-09-201-2/+4
| | | | | | | | | | | | | To be set to false by eglfs and similar platforms where no real window management is provided. When this capability is not set, some of the changes done for QTBUG-26903 will be disabled, allowing dialogs to show up at their QDialog-chosen place on platforms where no WM is present and so windows are never repositioned by the system. Change-Id: If1dac3cd11f2a856913a51277431fe3ec644b719 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix QGLWidget segfault on AndroidPaul Olav Tvete2013-09-202-4/+7
| | | | | | | | ...and other platforms that do not support WA_NativeWindow. Task-number: QTBUG-33523 Change-Id: I4ab043e8b3c3369aec41b44275fb3099d90e55b4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-09-141-1/+4
|\
| * Merge branch 'stable' into devSergio Ahumada2013-09-131-1/+4
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/qtconcurrentmedian.h src/corelib/itemmodels/qabstractitemmodel.cpp Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
| | * Move winId!=0 assertion from QWindow to QWidgetAndrew Knight2013-09-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In "very basic platform plugins", the platform window ID can be null, which conflicts with QWidget's special treatment of 0 as a parented widget. Such is the case with EGLFS, which can return a null native window handle for winId on some EGL implementations. Move the assertion winId!=0 into the widget framework, as this assert is not relevant for non-widget applications. A large proportion of basic platform plugin users will see relief from this unnecessary assertion. Change-Id: I25c9d96550cd747c77c9516d773e9cdebf7440ab Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | | Don't use an extension to the C++ language in public headersThiago Macieira2013-09-131-10/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | According to Clang 3.3, this is an extension: qpalette.h:178:9: error: anonymous types declared in an anonymous union are an extension [-Werror,-Wnested-anon-types] qsizepolicy.h:148:9: error: anonymous types declared in an anonymous union are an extension [-Werror,-Wnested-anon-types] If you try to simply give the struct a name, it complains with: qpalette.h:178:16: error: types cannot be declared in an anonymous union Change-Id: I61c69b8e42a1f4c4a15a0733f2d7efa0b3e44864 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-101-1/+1
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-1/+1
| |\| | | | | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| | * Activate Qt::WidgetWithChildrenShortcut shortcuts in MDI subwindowsGiuseppe D'Angelo2013-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a MDI subwindow is focused and an ancestor has a QShortCut set with the Qt::WidgetWithChildrenShortcut flag, it should trigger, as MDI subwindows are not top-level widgets. Task-number: QTBUG-32788 Change-Id: I7ec76d493b827ae6678209a56015ab6b432c1ed9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Add missing notify signals for window title and icon changes.Richard J. Moore2013-09-102-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds signals for changes to the window title, window icon and window icon text. Change-Id: Ia0ddcb94dda2c9ea790edc061d487765024191cd Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Reinitialize system palette when setting a new style.BogDan Vatra2013-09-102-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-29565 Change-Id: I5ac95d52c453aec9e2160a135dc1afdd9583eed3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | Fix Android Style plugin.BogDan Vatra2013-09-101-0/+6
|/ / | | | | | | | | | | | | | | Task-number: QTBUG-29565 Change-Id: Iedb861962e3638bcbdf9d9a72a47bebc63b425b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Remove qSort from QtWidgetsGiuseppe D'Angelo2013-09-051-3/+3
| | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Iec5c10fc4c3b4e684b51f6223bf3cb56acc42b58 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Fix layouts with expanding items with maximum sizePaul Olav Tvete2013-09-041-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Layout items with a Preferred size policy would be treated as fixed size if they were in the same layout as an Expanding item (or one with a stretch factor). This occurred e.g. if a layout was configured similar to this: 1. One item with ExpandFlag/stretch but with a maximumSize set, e.g. (100x100). 2. Another item with 'just' GrowFlag, and a maximum size bigger than its size hint. If the above layout was resized to e.g. (200x50) it would cause the expanding item to correctly get the size (100x50), but the 'growing' item would not stretch beyond its size hint. Instead, it would distribute space around both items, behaving as if the 'growing' item was fixed'. The expected behavior is to continue to grow the 'growing' item after the expanding item has reached its size limit. Task-number: QTBUG-33104 Change-Id: Ie410653d905f7ca4d702528dafb269f30a0e4f61 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-271-0/+2
|\| | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| * QWidget: Apply window opacity set before show.Friedemann Kleint2013-08-211-0/+2
| | | | | | | | | | | | | | Task-number: QTBUG-33078 Change-Id: Id9111f223a9dc58c88b072c52e36d42db450573a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-146-16/+47
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Fix ShortcutOverrid for Qt QuickFrederik Gladhorn2013-08-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tryShortcutOverride function needs to be called with the focus object. The same logic is in QGuiApplication::notify. Applications with QGuiApplication would therefore handle ShortcutOverride correctly where QApplication would not allow the override. ChangeLog: Fixed ShortcutOverrid for QtQuickControls. Now it is possible to assign a shortcut such as "b" and still type "b" in text inputs. Task-number: QTBUG-32928 Change-Id: I4f4ab82fd11f45174a4483a01bbbe8143dfe0724 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Fix ignoring closeEvents on OSX for QtQuick.Daiwei Li2013-08-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The QCloseEvent's accepted state should not be inverted for the QWindowSystemInterfacePrivate::CloseEvent. To make Widgets work with this change, pass whether the close was accepted from close_helper to the QCloseEvent generated by QGuiApplication. Task-number: QTBUG-28965 Change-Id: If384b0355776b93df02dff2ab78b5647903200e7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Josh Faust <jfaust@suitabletech.com>
| * Clear focus if the widget being deleted is the parent's focus child.Andy Shaw2013-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If a widget is deleted as a result of a window activation changed then it is possible that the parent does not clear the focus because of the activation change. If the focus child is actually part of an embedded widget in the graphicsview then it needs to be handled explicitly in this case too. Change-Id: I3e7a2b963f175828de4c19283178560abca91235 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * Fix updating of screens in QDesktopWidget.Friedemann Kleint2013-07-263-12/+35
| | | | | | | | | | | | | | Task-number: QTBUG-32567 Change-Id: Ib7442aed518427aa995cfc365ade6e6ffaf9c428 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Introduce QWheelEvent::Phase (Begin, Changed, Ended)J-P Nurmi2013-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some platforms (read: OS X) send wheel events without delta to indicate that scrolling is about to start or has ended. Currently, Qt simply ignores wheel events that have no delta. This change introduces a new QWheelEvent attribute that specifies the phase, and makes it possible to receive the special wheel events in started/ended phases. These events are required for implementing correctly behaving transient scrollbars. Change-Id: Ib8ce0d9ce9be63b2ad60aa7b0aaa1f12ef6cad09 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Android: Fix crash when setting WA_NativeWindowEskil Abrahamsen Blomfeldt2013-07-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | We don't support native widgets in Android, so we can get into a mess when people set this widget attribute, since the FB compositor will assume that all widgets have their own backing store. This adds a capability flag to the QPlatformIntegration which allows the plugin to disable the WA_NativeWindow feature. Task-number: QTBUG-32685 Change-Id: Ic200487da4a297f71ab594cf7c90d1e1d53bacd3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Reintroduce -geometry command line argument for X11/XCB.Friedemann Kleint2013-07-251-4/+13
| | | | | | | | | | | | | | | | | | | | | | Add parsing for the window geometry specification to QGuiApplicationPrivate. Enable the argument under a different name for the other platforms as well. Task-number: QTBUG-27349 Change-Id: I973b2c69f5172f7d0bc983b8ba4b0d164649ef02 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-114-2/+12
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Fix typo in setGraphicsEffect() occurrences.Mitch Curtis2013-07-111-1/+1
| | | | | | | | | | Change-Id: Iaca926ab47670616b55b0ab7ab735710237a5df8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Windows/ActiveQt: Pass native parent handle property from widget to widget ↵Friedemann Kleint2013-07-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | window. Task-number: QTBUG-31672 Task-number: QTBUG-32343 Change-Id: I6b1eca13248da06db739b1a8356a0259f7f4ae6c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * Search toplevel when setting the active window from focus window.Friedemann Kleint2013-07-101-0/+2
| | | | | | | | | | | | | | | | Task-number: QTBUG-32177 Task-number: QTBUG-32180 Change-Id: I44bea8c15636d788d85d6cbfa737aca5901c532c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Clean up evaluation license logicTor Arne Vestbø2013-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of storing the application type as a uint, we use the enum provided by QCoreApplicationPrivate. The former resulted in a few cases of wrong logic where the values got mixed up, such as always printing the QtCore console warning, even for GUI applications. The qt_eval_is_supported function has been refactored to return enums instead of magic values, to make the logic easier to read. The same goes for qt_eval_days_left, which now only concerns itself with the number of days left. qt_eval_is_expired() has been added to use for easy checking of expiration date. Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: Ia0e85b2103f790a7e02e0d6e567a477b3145fcb9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | QSizePolicy - add retainSizeWhenHiddenThorbjørn Lund Martsum2013-07-106-5/+34
| | | | | | | | | | | | | | | | | | | | Sometimes it is nice that hiding a widget does not affect the layout. This patch makes that possible by allowing hidden widgets to take up space. Change-Id: Ifbc1cdee0e112950acc025919b98199ea9558db7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | QStyle - tooltip - add wakeDelay and sleepDelay as styleHintsThorbjørn Martsum2013-07-031-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In earlier patches we allowed the user to control the tooltip duration. However the user still couldn't control the wake delay and sleep delay. This patch changes that and is the final patch in solving: Task-number: QTBUG-1016 Change-Id: I5e2c719737634ad7f371ad03691744612472ae70 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-275-23/+77
|\| | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/create_cmake.prf Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-253-19/+59
| |\ | | | | | | | | | Change-Id: I4c0ae2ac1c10d4d50c03625c802d981b7850ed6f
| | * Widgets: Set qt_button_down for each press.Friedemann Kleint2013-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not rely on release events. Task-number: QTBUG-31333 Change-Id: I09a056fed8892715c04ca78a42ae191e5a9a3b42 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * Fix missing shortcuts for WindowContainersJørgen Lind2013-06-212-18/+58
| | | | | | | | | | | | | | | Change-Id: Iee2d97e1ff2b1f0c56b1dde4f3ce22a427fbe554 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-252-4/+5
| |\ \ | | | | | | | | | | | | refs/staging/stable
| | * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-202-4/+5
| | |\| | | | | | | | | | | | | Change-Id: I94bb158562ae6b80a87b40139d7302ea7b9b9aa8
| | | * Widgets: Do not create QWindow in createTLExtra().Friedemann Kleint2013-06-142-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget::setWindowIcon() and similar call createTLExtra() which creates a QWindow without setting the native attributes on the parent, which can cause crashes when setParent_sys() decides to delete the window. Task-number: QTBUG-31672 Change-Id: I4c40ee12741be88b2281df90329ffb698d4009eb Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * | | Fix QWidget::isActiveWindow for window containers.Gunnar Sletta2013-06-251-0/+13
| |/ / | | | | | | | | | | | | Change-Id: If0e8b83d7dc84b66f4ce5a5cd98affa4bd9b7424 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | | QPlatformIntegration: add new style hint: SetFocusOnTouchReleaseRichard Moe Gustavsen2013-06-252-25/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On desktop platforms, widgets have traditionally received focus on mouse press. On touch platforms (iOS, Android) this is different, there you need to delay setting the focus until a touch release (probably to check if the press starts a flick or tap'n'hold etc). This patch will add a new style hint SetFocusOnRelease that can be set by the plugin to control this behavior in Qt. Change-Id: I2e4d714894e327822c855eb48a3b28e354726e95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | QWidget - add property toolTipDurationThorbjørn Martsum2013-06-253-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a property that specifies how long a tooltip is displayed. This partly solves: Task-number: QTBUG-1016 Change-Id: Ieea218bbcb869f6b48e72913d967e74fa792f2e2 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-202-10/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
| * | If a QWidget is ignored for auto-quit, ignore its corresponding QWindow.Stephen Kelly2013-06-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Unit test by Friedemann Kleint <Friedemann.Kleint@digia.com> Task-number: QTBUG-31569 Change-Id: I526d33d4f88a41f6ac349098476bc45af6c841b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * | Remove use of 'register' from Qt.Stephen Kelly2013-06-172-9/+9
| |/ | | | | | | | | | | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QToolTip - add static showText with time.Thorbjørn Martsum2013-05-272-11/+27
| | | | | | | | | | | | | | | | | | | | It is nice to be able to control how long time a tooltip is shown. This is the first part of solving: Task-number: QTBUG-1016 Change-Id: I8e313df8a2acdc5ccc91d9c8ce956c30c76daf4b Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-239-23/+48
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * Fixed crash associated with reparenting a QGLWidgetSamuel Rødal2013-05-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to make sure that we don't reset() the context when the QGLWidget is being reparented, as that will lead to the QOpenGLContext being destroyed and not recreated, leading to a crash in makeCurrent(). Also, don't destroy() the widget if it has not yet been created, as in that case there's no ParentAboutToChange event sent. Task-number: QTBUG-31016 Change-Id: I409fff94456802a80bd72b470a6fbaee87505baa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
| * Respect specified minimum height for menuBar also if it has HFW.Jan Arve Saether2013-05-141-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the menu bar is subject to height for width (HFW) we should of course respect that, but in addition we should ensure that the HFW is within the minimum and maximum height. This also is consistent with how QGridLayout calculates the effective minimum row height. This fixes a regression because change 4780f94e391b5e881497c5228661dead turned QTabWidget into a proper height-for-width citizen, and when setting a QTabWidget as a menuwidget, the buggy codepath for HFW was suddenly hit in menuBarHeightForWidth(). Task-number: QTBUG-31057 Change-Id: I3c1bb8063c92d6eda7e9433e44f08967d8e1c43e Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * Doc: Replaced the HTTPS links with HTTPVenu2013-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | The HTTPS links fail in Qt Assistant on Windows as the qt installation package includes qt libraries that are built without SSL support for legal reasons. Task-number: QTBUG-31073 Change-Id: I86909abadb1e8164749d924cc53ee05aa57f8f31 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>