summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
* | Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformThemeAndy Shaw2013-08-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | Since QPlatformTheme covers all dialogs whereas QPlatformDialogHelper is really only for the native dialogs then the SnapToDefaultButton hint is moved as it has relevance for all dialogs Task-number: QTBUG-32631 Change-Id: I1dce0bb4abcd4cfd39c4a199a33fc7078176ab4b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QMessageBox - merge some mac and non-mac codeThorbjørn Martsum2013-08-221-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | I have not located any significant behavior changes in this, and it is annoying having too much similar code in different branches. The main change is a removal of Qt::AlignLeft, but the icon Label should be in its own column. Change-Id: Iaf07fc503075e61e2af1a93d5fc9e6e34a24451d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | QMessageBox - move layout handlingThorbjørn Martsum2013-08-221-12/+18
| | | | | | | | | | | | | | | | This patch moves some layout handling to a new function. That will be helpful later since we can re-use the new function. Change-Id: I4cc846f9958d9530ec2b07292093b94bd27ee055 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Thiago Macieira2013-08-223-4/+24
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-213-4/+24
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/src.pro Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
| | * update the viewport after changing the backgroundIrfan Omair2013-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-4359 Change-Id: I218e6a8b3b64e1b518338efb18e8a7eb95ecf2c7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * QHeaderView::paintSection(): fix visible index handlingJ-P Nurmi2013-08-152-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sections may be hidden => QStyleOptionHeader::position must reflect the state seen on the screen. Otherwise styles will give wrong visual results. Task-number: QTBUG-32203 Change-Id: I7ef86496be092bf6f52ec45f757b501f38c3a431 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | QComboBox - only react on a mouse-release if we had a mousepressThorbjørn Lund Martsum2013-08-212-2/+21
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In delegates we get into trouble with calling showPopup in setEditorData (edit by double click) - and that is not reasonable. The user has requested edit - and therefore it is natural to save a click for the user and show the popup at once. However that fails since we have the mouse down and as soon as we release the mouse we will call hidePopup. This patch ensures that the mouseReleaseEvent, that caused the problem is only considered if we have had a mousePressEvent. Change-Id: Ibe031fcb9ad2158f6969e41127bbb5f651b9cae6 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Doc: Renamed list of example page to "Item Views Example".Jerome Pasion2013-08-211-1/+1
| | | | | | | | | | | | | | | | | | Previous name caused a conflict with another page with the same name. This page will replace the one in qtdoc. Task-number: QTBUG-32580 Change-Id: Ifda8841feaab4def6c16972a027947f75ccb7739 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Extend QStyle API with a SH_Splitter_OpaqueResize styleHintRohan Garg2013-08-205-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | Currently the default for QSplitter::opaqueResize is hard coded, which is less than ideal. Instead this should be provided as a style hint via QStyle so as to give a more uniform look to all applications. Change-Id: I5711811f7b672e36aafcd292ed320308570a0390 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-08-1616-48/+106
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-1416-48/+106
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * un-confuse lupdate: remove excess brace in dead codeOswald Buddenhagen2013-08-121-1/+0
| | | | | | | | | | | | | | | Change-Id: I7b81121b559f18446c4e546ad4f00cb4a592ca7f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * Merge branch 'release' into stableSergio Ahumada2013-08-091-16/+16
| | |\ | | | | | | | | | | | | Change-Id: I5e94c4f01564df633c9925561ebb0b553bd31a2e
| | | * Doc: Corrected the example path in the tutorialVenu2013-08-021-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32688 Change-Id: I12c264f29bc1d49322c60debdec3758859f62fa8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| | * | QComboBox: fix item activation via completerJ-P Nurmi2013-08-083-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-31146 Change-Id: I64291f397d80bf934152f63e629810540abf466e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | * | Fix QCompleter::activated(QModelIndex)J-P Nurmi2013-08-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When falling back to the completion prefix, make sure to also pass an invalid index to activated(). Change-Id: I6b282a01c95492466890632b77837bcc96eb038a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | * | Mac Style: Fix 1-pixel text offset in combo boxGabriel de Dietrich2013-08-071-0/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: Ie1bb2b300d6897659f4652c22884f1bd611cd3c4 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| | * | Fix double transform for items ignoring parent transformations.Andreas Aardal Hanssen2013-08-051-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the topmost untransformable's scene transform, which includes the item's position and local transformation, was used to determine the item's anchoring position. This position was then passed on to be multiplied by the item's transform again. This works fine for toplevel untransformable items that don't have any transform set at all, but those who do would have their transforms applied twice - one to determine the anchoring position, and again to transform the item itself. Since only translation transformations can affect the first operation (the anchoring pos), this bug only applies to items that set ItemIgnoresTransformations and use a local transform that includes translation. Task-number: QTBUG-21618 Change-Id: I772d52d59dfd9f242d0140632a87e9c68dfe0ea1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| | * | Fix typo in Model/View Programming documentation.Mitch Curtis2013-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I88f49a894a8c1e88a4cdb559fdc426f01e113f80 Reviewed-by: Jerome Pasion <jerome.pasion@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>
| | * | Check if the widgetItem is valid before accessing widget() on itAndy Shaw2013-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a state was restored but not all the dockwidgets that were available before are available at the time of restoration then when dragging a dockwidget to where the unavailable one is expected to be would cause a crash. Change-Id: I829d93041b7950a3546ba4e6c3764b169f276315 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * | Remove duplicated call to QGraphicsSceneMouseEvent::setButtons.Marcel Krems2013-07-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-8061 Change-Id: I1326d6b3d6c6b7c3f6dc383aa5fe66d5e1f0b229 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.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>
* | | qpushbutton_p.h: add missing include guardJ-P Nurmi2013-08-161-0/+5
| | | | | | | | | | | | | | | | | | Change-Id: I255550e7235dcc8d2170f97e08752c2cb7cea624 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | | QHeaderView - reduce memory usageThorbjørn Martsum2013-08-162-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Though the worst case memory usage was improved in b800d8b94a7861ecf8853621f6556fca186fb5b7 the best case usage changed. Since best case is the same as worst case in Qt5, we should use as little as possible, which this patch ensures. We reduce the memory usage from 3 to 2 ints per section - which is half of worst case in Qt4. There seems to be no bigger cost in performance doing that. The recalcSectionStartPos is still very fast. This patch limits the maximum section size to (2^20) ~ 1.000.000 pixels. This alleviates Task-number: QTBUG-32325 Change-Id: I9b7530030a31b4e35cf1ca9e32c6b936f5ea9790 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Replace QWheelEvent::Phase with revised Qt::ScrollPhaseJ-P Nurmi2013-08-151-2/+2
|/ / | | | | | | | | Change-Id: I4d8e7d48497d0d96a297191976c0d99feb67b538 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Add useful signals to QTabBar and QTabWidgetIvan Komissarov2013-08-134-0/+75
| | | | | | | | | | | | | | | | | | | | In this patch we introduce tabBarClicked and tabBarDoubleClicked to get a finer grained information on the user interaction with the tab bar. Done-with: kevin.ottens@kdab.com Change-Id: I7be76a556ca09186e98f2e076fe2512d6c5e6773 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | QScrollBar: handle QWheelEvent::Phase for transient scrollbarsJ-P Nurmi2013-08-101-0/+5
| | | | | | | | | | | | | | | | | | Transient scrollbars should become and stay visible when touching the pad with two fingers. Change-Id: Ic36ba56019f484cedb2404550551ebe68ea6f285 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> 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>
* | Add clearButton-property to QLineEdit.Friedemann Kleint2013-08-084-1/+56
| | | | | | | | | | | | | | | | Based on addAction-API. Change-Id: Ie6c3d2d728b23a85cdd80428c92ee8208ae0a65c Done-with: Kevin.Ottens@kdab.com Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | QTreeView - allow users to control data in the treestructureThorbjørn Lund Martsum2013-08-073-8/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to set which logical index the tree is in. Before the tree always displayed data from the logical index 0, but it is actually more likely that the user wants to have data from visual index 0 (which can be done by special value -1). There is nothing special about logical index 0, and not being able to change the tree-data is just annoying. Change-Id: Ib070ce93343a0d2fbac3ad5a42cb4359401ac87c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Add side widgets to QLineEdit via QAction.Friedemann Kleint2013-08-064-12/+320
| | | | | | | | | | | | | | | | | | | | | | | | Add QLineEdit::addAction() overloads, allowing for a variable number of icons or user-defined widgets. Change-Id: Id298f18c2f47cc998170357e65cc6098df851aab Done-with: Kevin.Ottens@kdab.com Reviewed-by: Thomas Zander <zander@kde.org> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Doc: Setting module pages' \qtvariable.Jerome Pasion2013-08-021-0/+1
| | | | | | | | | | | | | | | | | | Argument to \qtvariable is the QT variable needed for linking to the module. Task-number: QTBUG-32172 Change-Id: I181c0cfaf9529f3aea741cdaee0f20d6cd0e2d2f Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Added SH_Widget_Animate in QStyleÀlex Fiestas2013-08-027-16/+45
| | | | | | | | | | | | | | | | | | | | | | Added SH_Widget_Animate in QStyle styleHint, and use it to determine whether widgets should be animated or not. In this patch QTabBar, QColumnView,QTreeView and QWidgetAnimator are patched to obey the new Hint. Change-Id: Iefdbddc52c7843f6653dbfb5462125942489b4d9 Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* | Assign icons to actions of QLineEdit context menuAurélien Gâteau2013-07-301-0/+13
| | | | | | | | | | | | | | | | Icons are only set if they are valid. Change-Id: If2398cdc977a3882e7738ef1bcf5519bd7053449 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* | Assign icons to actions of QTextEdit context menuAurélien Gâteau2013-07-301-0/+13
| | | | | | | | | | | | | | Icons are only set if they are valid. Change-Id: I7637dec18b3066930455a2f6fd40d87097eb20f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Move the X11 system tray code from widgets into XCB-plugin.Friedemann Kleint2013-07-302-97/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add system tray tracker class to XCB plugin and provide functionality via invokable slots of the native interface. - Remove XLib-dependency of widgets/utils. - Reintroduce tracking of tray window destruction and recreation, which was removed in the XLib-code when porting it from Qt 4 to Qt 5. This paves the way for implementing the tray icon completely in terms of QPlatformSystemTrayIcon at some point later. Change-Id: Ia04268b0e2919c05874a3e9548930535332897c7 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@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 remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-232-1/+4
|\| | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| * Make *ItemBoundingRect modes work with custom shapes.Mitch Curtis2013-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, calling QGraphicsScene::items(QPointF(0, 0), Qt::IntersectsItemBoundingRect) or QGraphicsScene::items(QPointF(0, 0), Qt::ContainsItemBoundingRect) will exclude items whose shape does not contain QPointF(0, 0). This is because QGraphicsSceneIndexPointIntersector::intersect() also checks if the point is contained within the shape, instead of just checking if it is contained within the bounding rect. Task-number: QTBUG-19036 Change-Id: Ie701af2a5694d40cf9b3c9c19adbb09a53a4e398 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| * Mac OS: Fix a crash in tst_qgraphicsproxywidget.Friedemann Kleint2013-07-161-0/+3
| | | | | | | | | | Change-Id: Ie93d77f00ee1e6a04ac20794e4d2d1e63cbdb636 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Move the declaration of QFileIconProviderPrivate to it's own file.Sérgio Martins2013-07-223-31/+89
| | | | | | | | | | | | | | | | | | | | | | | | Needed to backport qtbase/46685f755b01288fd53c4483cb97a22c426a57f0 to Qt4. We can't add new symbols in Qt4 to QFileIconProvider so we will make the private class a friend of the QFileDialog. Change-Id: I6bc5a2d127b09f20633e733a79de509c8c186c6c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | Prevent QLineEdit from emitting edited signal (QTBUG-27347)Ivan Komissarov2013-07-211-2/+2
| | | | | | | | | | | | | | | | edited() signal should not be emitted when QValidator fixups text in a lineedit. Change-Id: Iccef45c4b858a65fd5097dc9e5033cefb09ad889 Reviewed-by: David Faure <david.faure@kdab.com>
* | Add QUrl based API to QFileDialogKevin Ottens2013-07-182-6/+139
| | | | | | | | | | Change-Id: Iaf4f8e57e8df956dec9105eb00c193645f2db098 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Have QFileDialog use QUrl internallyKevin Ottens2013-07-183-33/+95
| | | | | | | | | | | | | | | | | | | | | | | | When using the native dialog and through the helper, we use QUrl in QFileDialog. It is preparatory work for having QUrl based methods on QFileDialog interface itself. Done-with: sean.harmer@kdab.com Done-with: faure@kde.org Change-Id: I61e99d498252241f38ec05724702a90ba050c4bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-154-9/+33
|\| | | | | | | Change-Id: I0218a1f08b89f2d56757ab35eec06799d2a1492f