summaryrefslogtreecommitdiffstats
path: root/src/widgets/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>
* 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>
* 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>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-103-4/+11
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-073-4/+11
| |\ | | | | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| | * 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>
| | * 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>
* | | 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>
* | Remove qSort from QtWidgetsGiuseppe D'Angelo2013-09-052-3/+7
| | | | | | | | | | | | | | | | | | 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>
* | QButtonGroup - add buttonToggled signalsThorbjørn Martsum2013-08-284-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QButtonGroup emits signals on clicked, pressed and released for buttons in the group, but for some (insuffienct) reason it did not emit anything for toggle (the only signal that it didn't emit anything for). This patch changes that, by adding handling of that signal to QButtonGroup. Task-number: QTBUG-14857 Change-Id: I88bcd7b060b78c7ff05ea1adf7baaddfe6d463be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Thiago Macieira2013-08-221-1/+1
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-211-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | 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>
* | Extend QStyle API with a SH_Splitter_OpaqueResize styleHintRohan Garg2013-08-202-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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-164-10/+31
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-144-10/+31
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * 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>
| | * 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>
* | | 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>
* | | 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>
* | 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>
* | 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>
* | Added SH_Widget_Animate in QStyleÀlex Fiestas2013-08-022-12/+21
| | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | 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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-152-3/+12
|\| | | | | | | Change-Id: I0218a1f08b89f2d56757ab35eec06799d2a1492f
| * Display sizegrip on QMdiSubWindows, even on 10.7 and laterGabriel de Dietrich2013-07-121-1/+1
| | | | | | | | | | | | | | | | | | We don't have 4-edge window resizing, so we need QSizeGrip to be functional again in this case. Task-number: QTBUG-32228 Change-Id: Ib66bc662f8bf0b521427755570bc1cd65fb28446 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Consider virtual screen when determining dock widget visibility.Friedemann Kleint2013-07-121-2/+11
| | | | | | | | | | | | | | Task-number: QTBUG-32260 Change-Id: I8b28e3869a6e3b1ed12a311dfa0100979098fc4b Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-114-20/+5
|\| | | | | | | | | | | | | | | | | | | 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
| * QComboBox - optimize (improve stupid code at enter-key)Thorbjørn Martsum2013-07-101-3/+2
| | | | | | | | | | | | | | | | There is no need to do a search for an item if we already have the correct index. Change-Id: Iac0e7df7573b71b82aa491acb8e289fe02fb3285 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * Deal with unused functions, as found by the Intel compilerThiago Macieira2013-07-012-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Q_DECL_UNUSED for the one that is possibly unused (we have two overloads so that one gets selected): qglobal.cpp(2069): warning #177: function "<unnamed>::fromstrerror_helper(int, const QByteArray &)" was declared but never referenced Remove functions really not used: qbezier.cpp(153): warning #177: function "findInflections" was declared but never referenced qbezier.cpp(534): warning #177: function "splitBezierAt" was declared but never referenced qpathclipper.cpp(1039): warning #177: function "midPoint" was declared but never referenced qpainter.cpp(119): warning #177: function "check_gradient" was declared but never referenced qdockarealayout.cpp(2580): warning #177: function "qMin(int, int, int)" was declared but never referenced qmainwindowlayout.cpp(1019): warning #177: function "validateDockWidgetArea" was declared but never referenced qgraphicsanchorlayout_p.cpp(670): warning #177: function "checkAdd" was declared but never referenced qcups.cpp(481): warning #177: function "paperSize2String" was declared but never referenced complexwidgets.cpp(373): warning #177: function "removeInvisibleWidgetsFromList" was declared but never referenced Change-Id: I1e5558e206b04edea381442030dc69536198d966 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * Fix the cursor position of an empty QLineEdit with a placeholder textJ-P Nurmi2013-06-291-3/+3
| | | | | | | | | | | | Task-number: QTBUG-32061 Change-Id: I43b689d8d7bc3c93036de48518f7a0f9f2aa33cf Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-271-1/+1
|\| | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/create_cmake.prf Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-201-1/+1
| |\ | | | | | | | | | Change-Id: I94bb158562ae6b80a87b40139d7302ea7b9b9aa8
| | * Fix another type of crash when dragging QDockWidget in and outShawn Rutledge2013-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDockWidgetPrivate::mouseMoveEvent calls q->move() which can result in a call to QDockWidgetPrivate::endDrag(), which will delete the state struct. Therefore mouseMoveEvent needs to check whether it's null or not before accessing it. Task-number: QTBUG-31672 Change-Id: I91a31620f16a80b31b65b2742e7937ae8960f0fd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-06-243-4/+4
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-203-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
| | * | hide placeholder text when QLineEdit has preedit textTasuku Suzuki2013-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ica84e9ce715702b690906ef748970e16d9162c4b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Aurélien Gâteau <agateau@kde.org>
| | * | Remove use of 'register' from Qt.Stephen Kelly2013-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | Recognize separator item in QMenu.Leonard Lee2013-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mouse over event on upper level menu separator should automatically close the sub menu listing. Manual test is not needed for this commit since it is easy to test it against common examples. Task-number: QTBUG-31664 Change-Id: I323d7ba206352a5d533584543b9a2ebf842b4dfc Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | | Show QTextEdit placeholder even when focusedBenjamin Port2013-06-211-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Useful to have the same behavior in QLineEdit and QTextEdit. Change-Id: I02d6ac0a6072403c7aa3e8f76a728c46a9d66b14 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | | | QDialogButtonBox: add a missing constructorMarc Mutz2013-06-212-1/+17
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the buttons in the constructor is a use-case that happens more often than setting the orientation. Yet, there was a (Qt::Orientation,QWidget*) constructor, but no (StandardButtons,QWidget*) one. This patch adds it. Change-Id: If6a5c9f7450a388cd77bd93c8dd144b2fdc11847 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-121-0/+3
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenubar.mm Change-Id: I4a699fc8a7f30b2af9de8e496c3d5f027b7495bb
| * | QDockWidget: Keep position when undocking.Friedemann Kleint2013-06-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Initialize undockedGeometry to roughly the current position. Task-number: QTBUG-31044 Change-Id: I03cbe280d1215bb58ab721b60e29b45359cde76d Reviewed-by: Andy Shaw <andy.shaw@digia.com>