summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Replace hardcoded shortcuts for X11 in QLineEdit with StandardKeysDavid Edmundson2013-09-211-14/+8
| | | | | | | | | | Added Ctrl+E to the X11 shortcuts for "move to end of line" Added new StandardKey DeleteCompleteLine bound to Ctrl+U Updated QLineEdit to use these standard keys Change-Id: I24e5dd3b4fed9f6c15f0d1a00be682734e2485a4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix some doc errors.Frederik Gladhorn2013-09-214-6/+4
| | | | | | | 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 QMenu -> NSMenu conversion functions.Morten Johan Sørvig2013-09-214-0/+160
| | | | | | | | | | | Add QMenu::toNSMenu() and QMenuBar()::toNSMenu(). Add QMenu::setAsDockMenu and qt_mac_set_doc_menu(QMenu *menu) These are all API wrappers around implementation in the Cocoa platform plugin. Change-Id: I927ed4fb5dc42cc577a41a80b531a4a2f7b8812c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Added support for cover windows on BlackBerry platformBernd Weimer2013-09-201-0/+13
| | | | | | | | | | | | On the BlackBerry platform when an application is minimized an alternate cover window is shown. This patch allows Qt to render into those windows. A new window type "Qt::CoverWindow" has been introduced. Change-Id: If5e321f5cb00f6d3ed7a5dc0af425655d7a9253a Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QCompleter::setFilterMode() add property filterMode.Oto Magaldadze2013-09-203-16/+94
| | | | | | | | | | | | | QCompleter::setFilterMode(Qt::MatchContains) will enable filtering out entries that contain typed characters in any place, instead of the default behavior when only those entries that start with typed characters are displayed. Qt::MatchEndsWith is also possible. QCompleter::setFilterMode(Qt::MatchStartsWith) will bring the default behavior back. Task-number: QTBUG-3414 Change-Id: I3845704c59eb8fc401e9a650c54a9c934ed28c2e Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QMessageBox - make it possible to have a checkbox on the dialogThorbjørn Martsum2013-09-202-3/+62
| | | | | | | | | This (partly) solves Task-number: QTBUG-2450 Change-Id: Ie2280c87b96e72acc76e806a83c4e8cc0d4e4ee4 Reviewed-by: J-P Nurmi <jpnurmi@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>
* Implement QMainWindow::takeCentralWidget()Sune Vuorela2013-09-202-0/+18
| | | | | | | | This allows the application developer to restructure the application, including moving the central widget some place else. Change-Id: Idca2f74c190500db24404e020b0eb400e41aad10 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Specify valid values for QScrollArea::setAlignment()Jan Arve Saether2013-09-191-0/+9
| | | | | Change-Id: If0c19d83d97fd218fc79f44421e16ca362964e8f Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Make Accessibility publicFrederik Gladhorn2013-09-195-6/+3
| | | | | | | | | There is no point in having QAccessible2, so merge it with the normal QAccessible. The header will be removed in a subsequent commit as it is still needed by declarative at this point in time. Change-Id: I1fc47d484d482f25387eba827bc5a373536b7a8b Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Include hidden headers in trees and tables consistentlyJan Arve Saether2013-09-183-6/+14
| | | | | | | | | | | | | | | | | | | | | | | There was a disagreement between the a11y plugin and QTreeView whether the horizontal header should have been exposed or not. When the header was hidden, this resulted in that we sent an event with a child id that was wrong, or in worst case higher than QAI::childrenCount(). This was the reason we got the warning output as described in the task. With this commit, we consistently *expose* hidden headers both for QTreeView and QTableView, but ensure that their state().invisible is set to true instead. This makes it consistent with how hidden cells are exposed. This also fixes a bug in QTableViewPrivate::accessibleTable2Index where we always added 1 to the index, which was spotted while writing the test. Task-number: QTBUG-33247 Change-Id: Ifd1f83d56296dd071424fdb81fce7628bc24fe0a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Simplify QFileSystemModel::remove by using QDir::removeRecursivelyDavid Faure2013-09-161-24/+2
| | | | | | | | This also fixes it in case of hidden or system files, which were missing from the filter (found by Denis Kovalskiy). Change-Id: Ic12de12ec51c20de52d040514e90be5e783add43 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't depend on QtQuick plugin in QtWidgetsEskil Abrahamsen Blomfeldt2013-09-161-2/+2
| | | | | | | | | | The accessible plugins directory contains a QtQuick plugin as well as a widgets plugin. We need to specify the correct one to avoid all widgets applications implicitly depending on QtQuick on Android. Change-Id: I72b2ee4fcd2d7914fc2ed7996f504ce2df79842d Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-09-145-5/+26
|\
| * Merge branch 'stable' into devSergio Ahumada2013-09-135-5/+26
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/qtconcurrentmedian.h src/corelib/itemmodels/qabstractitemmodel.cpp Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
| | * Fix highdpi CE_HeaderLabel pixmaps in fusion styleMorten Johan Sørvig2013-09-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure enough pixels is sourced by multiplying the layout rect size with the pixmaps devicePixelRatio. Task-number: QTBUG-31477 Change-Id: I742603c09a65a520587da3eef9479ef7f0c87022 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Windows style: Support underlined mnemonics from Qt Quick ControlsGabriel de Dietrich2013-09-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | We use the usual accessibility + private property combo pattern. Task-number: QTBUG-33030 Change-Id: I7fbb704c949ff2df163536534f6f46d2e226402d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| | * QMessageBox: implemented shortcut for selectAllShawn Rutledge2013-09-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context menu all along has indicated that Ctrl-A selects all the text, so now that is actually implemented. Task-number: QTBUG-6731 Change-Id: I82dac3aea530e5a3fcd59217c4c0118025061c7d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * QMessageBox: shortcuts for selectAll, copy don't conflict with buttonsShawn Rutledge2013-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can hit a key with no modifier to select a dialog button that has the corresponding mnemonic, but it doesn't make sense to do that if the Control or Meta key is being held. Now you can hit Ctrl-A, Ctrl-C to select all the message detail text and copy it to the clipboard, even if the dialog has buttons with mnemonics like &Continue and Save &Again. But as before, Alt-C, plain C, Alt-A and plain A select the mnemonic buttons on the dialog. Change-Id: I40c052dbb7730bde444ac2de405724a3203d1472 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * 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>
| | * Doc: Fix copy+paste errors for QAbstractItemModelSze Howe Koh2013-09-081-2/+2
| | | | | | | | | | | | | | | Change-Id: Ia462544cc86870d9870ae1be3b4f9135c9efe45c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | QMessageBox - move margins to a left spacerThorbjørn Martsum2013-09-131-27/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves labels indent and contents margins into a left spacer, and it only puts the iconLabel in the layout if there is an icon. Change-Id: I6f3563a08fc15ec6ec267e095adf1734f7828355 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | 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>
* | Adding QPlatformMessageDialogHelper and QMessageDialogOptionsShawn Rutledge2013-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We plan to add support for native message/alert dialogs on Android and iOS because it's otherwise impossible to have a true popup window. Then we might as well have native message/alert dialogs on other platforms too. It will become an alternative implementation behind QMessageBox and perhaps QErrorMessage. Task-number: QTBUG-30883 Task-number: QTBUG-29462 Change-Id: I73dcfc6438e696189b6d37091874c7ad69b4ec68 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-106-9/+23
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-076-9/+23
| |\| | | | | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| | * Forward QGraphicsView::mouseDoubleClickEventMarcel Krems2013-09-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do the same as in mousePressEvent. Otherwise it is not possible to handle the event in one of the graphics views parents. Task-number: QTBUG-8061 Change-Id: I67c7635361a9ed595c513c28ea016e6253fa2101 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
| | * Fix regression in QListViewJ-P Nurmi2013-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix was originally applied to Qt 4.8 (4c64464), but missed Qt 5 which had already been branched at that point of time. Task-number: QTBUG-33089 Task-number: QTBUG-21433 Change-Id: Ia3cd35d29dbdc70ba55b6f0840c4082e232c24ae Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| | * Ensure the timer is killed when appropriate before starting a new oneAndy Shaw2013-09-031-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the mouse moves while the sloppy menu timer is still running then it would end up just creating a new one and the old one would continue to run. If the action that it is relevant for is different then it should restart the timer, otherwise it should just ignore the mouse move and let the other timer continue. Change-Id: Id03014fa05596bd6ede887fa917e21ca5a7690d8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * Update QLineEdit::placeholderText property documentationGiuseppe D'Angelo2013-08-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eeb31ad10a1c1b26233f383de6d1b2b217cde08f changed the behavior and allowed the placeholder text to stay visible even if the lineedit has focus. Task-number: QTBUG-33237 Change-Id: I733331be1d3225eb28390b21eb9a7e4971bfdc31 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * 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>
| | * Close menu on 2nd click on QMenuBar.Friedemann Kleint2013-08-271-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-32807 Change-Id: I0c3c25c6acf92bc30c1bcfc09003209b572ec777 Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* | | [1/2] Optimize text drawing for QStyleOptionViewItem in QCommonStyleKonstantin Ritt2013-09-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Optimize isViewItemCached() a bit by reordering conditions so that conditions that going to change more often in a common case evaluated first. Change-Id: Ibb406f964345e8f2bff7b433bf33e09a99dcbdc4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.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-103-79/+302
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-29565 Change-Id: Iedb861962e3638bcbdf9d9a72a47bebc63b425b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | QDateTime - Split QDateTimeParser into a separate fileJohn Layt2013-09-092-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Not strictly needed yet, but helps to reduce the size of QDateTime and make it easier to read a major re-write. Imposes separation of parser which will be needed if we make QLocale always use the system backends, after which only QDateTimeEdit widget will need the parser and it can be moved there. Change-Id: I6a5e9a3edf6fe8ff2340af6afecd8ba4bfde9dd4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Fix constant false comparison of out-of-range enumsThiago Macieira2013-09-071-3/+3
| | | | | | | | | | | | | | | | | | | | QGraphicsItem::GraphicsItemFlag is unsigned, so a comparison to -1 is always false. qgraphicsitem.cpp:847:39: error: comparison of constant -1 with expression of type 'QGraphicsItem::GraphicsItemFlag' is always false [-Werror,-Wtautological-constant-out-of-range-compare] Change-Id: I3fc59b777d09060dd34e81f51ed8bdf41354a0f1 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* | Remove qFill from the Windows XP styleGiuseppe D'Angelo2013-09-051-1/+1
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ia5d4a6604a1ec8998d6cb4f03b4c0669a3d6b23f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Remove qSort from QtWidgetsGiuseppe D'Angelo2013-09-057-11/+20
| | | | | | | | | | | | | | | | | | 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>
* | Remove deprecated algorithms usage from itemviewsGiuseppe D'Angelo2013-09-054-8/+10
| | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I68efdd1b08b94a737345644a5b588ffff5caac63 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>
* | Fix QSpinBox size calculation problem with stylesheetsCaroline Chao2013-09-041-12/+18
| | | | | | | | | | | | | | | | | | Problem caused by change a317ee0a6fa76d1166f6da8593d39eaf7afce83c Task-number: QTBUG-31602 Change-Id: Ie8948445a58f51946f21d567ba91f9f10b848f8b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | QColorDialog: wrap setCursor calls in #ifndef QT_NO_CURSORAndrew Knight2013-09-031-0/+4
| | | | | | | | | | | | | | QColorDialog mistakenly assumes setCursor will work everywhere. Change-Id: Ia5e513f6825c931ce42276ea2eb581e049c5b41a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QHeaderView - add maximum section sizeThorbjørn Martsum2013-09-023-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we auto resize it is handy to be able to limit the maximum size (just like the minimum size). [ChangeLog][QtWidgets][QHeaderView]A maximumSize for sections has been introduced. The maximum section size is by default the largest possible section size which in Qt 5.2 has been limited to 1048575 pixels. Task-number: QTBUG-4346 Change-Id: Ida9cbcc11bd5c4498e319df2e6379c69a7033c04 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | item delegates: fix clicking on tristate checkboxes.David Faure2013-09-022-4/+10
| | | | | | | | | | | | | | | | | | QCheckBox cycles through the 3 states, but item delegates didn't do that. Change-Id: Iad1e464341033ca357925fe8064f53bb584459f4 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-023-23/+26
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-273-23/+26
| |\| | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| | * Style: Remove useless background paint for menu scrollerGabriel de Dietrich2013-08-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This would also cause an extra paint in QQuickStyleItem, resulting in the frame being erased for those styles not having a frame width set (e.g., fusion and GTK). Change-Id: I7a9371c540cd31fd9f1400a51c4ec57582996dd2 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>