summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Centralize more common settings in 1 global qdocconf.Casper van Donderen2012-09-111-36/+1
| | | | | | | | | | All qdocconf settings that should be used by all Qt modules are now in qt-module-defaults.qdocconf. Change-Id: I2a0315a55db3fcbb0160c4392d2da98611043d83 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Streamline forwarding of blocked events.Friedemann Kleint2012-09-111-12/+10
| | | | | | | | | Do not send to layouts, invoke modalWidget() only once. Task-number: QTBUG-27039 Change-Id: I96db02c8da544d0961c8ab25505926ac6f699342 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: hjk <qthjk@ovi.com>
* Fix build with QT_NO_WHEELEVENT.Sérgio Martins2012-09-102-0/+8
| | | | | Change-Id: I80c64183677a5f518e2c637f4c1ff4004e3010c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* [Qt5 Docs] Fix typos and style of qtimer.cpp and qdatetimeedit.cppDavid Gil2012-09-101-17/+16
| | | | | | | | | | Fix some typos. Fix some sentences to make them clearer to understand. Fix some Qt4-widget-centric info. Change-Id: I77f23ce8cb9a6752a0f8dd214c9ff550d620cd21 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Do not call requestActivateWindow() on popups.Friedemann Kleint2012-09-101-4/+7
| | | | | | | | | | | | | | | Showing a compo dropdown would cause the parent to become deactivated (Windows). Introduced by: 8368557b9c0010fb205969d010c9d8549fbee0ae for QTBUG-25852 , QTBUG-23699 . Task-number: QTBUG-27145 Change-Id: I7b89697a2c55d58cc0ab184b61a0cff8bf2275ec Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Rename QPaintDevice::init() to initPainter()Richard Moore2012-09-102-2/+2
| | | | | | | | The old name was too generic and was likely to cause warnings in user code. Change-Id: I7126d8fe89a394cd8388af5a030961af7b69c741 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Removing duplicate includesSergio Ahumada2012-09-0915-28/+2
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* don't use QT_{BEGIN,END}_INCLUDE_NAMESPACE needlesslyOswald Buddenhagen2012-09-083-12/+4
| | | | | | | | these macros behave counter-intuitively, so don't use them unless the code structure really suggests their use. Change-Id: I58213b39f8a98e4368901217fac14ca49c28b8cf Reviewed-by: hjk <qthjk@ovi.com>
* Use QStringList::join(QChar) overload where applicable [QtWidgets]Marc Mutz2012-09-072-2/+2
| | | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: Ia30048e0c40967dc86a4e4ad26ac02ab67519096 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Document how opacity affects QGraphicsScene item queries.Mitch Curtis2012-09-072-18/+51
| | | | | | | | | | | | | | | Currently, QGraphicsScene::items() and related functions only return items that are visible. The definition of visible effectively means any item for whom isVisible() returns false or opacity() returns 0.0. However, this is not documented anywhere. Also fixed some typos/grammatical errors. Change-Id: Ia6d1f7d63024dc9412438fe97748d7a69ee8225b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Fixed behaviour of mouse clicks for menu bars on WindowsOliver Wolff2012-09-074-14/+0
| | | | | | | | | As the behaviour described in the style hint seems to be default and working, it can be removed. Change-Id: Ia8d47cf187597ae48b9e42c3f98ef3d4c390db34 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Revert "Implement automatic mouse grabbing on mouse button press."Friedemann Kleint2012-09-073-30/+1
| | | | | | | | | | | | | | | | This reverts commit 6b5bbc531b30d8ece25425e39843c6ae1af1d045. Autograbbing mouse shouldn't be done in crossplatform code, as X11 does this automatically. Windows needs platform specific solution. Task-number: QTBUG-26962 Task-number: QTBUG-27039 Task-number: QTBUG-23699 Change-Id: I911df92c4a34deb50b729f50681497046657948b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix g++ compiler warnings.Friedemann Kleint2012-09-071-1/+3
| | | | | | | | Unused variables, unsigned comparison DWORD >= 0 is always true, format string. Change-Id: I9f0a20392e262b2542fb23ea4f513e4c4e354b68 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix QDateEdit displaying day as a number for short and long day formatsMitch Curtis2012-09-051-5/+6
| | | | | | | | | | | When 2 (February) is entered as the month for (e.g.) 31/Jan/2000 (which is following the format: "dd/MMM/yyyy"), the day is corrected to 29 but displayed as its numerical value instead of its short (or long) name. Task-number: QTBUG-27036 QTBUG-19091 Change-Id: I558ee13b224707d22b26c2ec2c045f96118bd5a1 Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: aavit <qt_aavit@ovi.com>
* Don't use string comparison to figure out how to use the clipboardJorgen Lind2012-09-051-3/+4
| | | | | Change-Id: I36738b3808ebed0d108882ebdc74ee7dd1899bfd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Move assignment of mousePressed variable in QWidgetTextControlJorgen Lind2012-09-051-1/+2
| | | | | | | | Or else we never hit the path where middle button click pasts selection on X11. This is also how it worked in Qt 4. Change-Id: Ia090c465db0e5e8cb249f5d752e0bb86951e2eb0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-053-11/+11
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct the QFileDialog's delete warning message.Mitch Curtis2012-09-041-3/+3
| | | | | | | | | | | "Are sure you want to delete '%1'?" should be: "Are you sure you want to delete '%1'?" Title of the message box should be Delete, not Open. Task-number: QTBUG-26851 Change-Id: I40933c5e1b231d3d2e3274b4d669267d26ba8cfc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* QWizard/Win: Fix vista helper cache state invalidationJonathan Liu2012-09-041-1/+2
| | | | | | | | | | If the cached state is not dirty and the instanceCount is zero, when the instanceCount is incremented the cached state will not be correct. To fix this, reset the cached state to dirty if the instanceCount is incremented from zero. Change-Id: Ic49eef7f83b1289a939f998817b1b2b5f5a2a45f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* graphicsview: use std::sort instead of qSortRobin Burchell2012-09-045-15/+15
| | | | | | | | | | | | In almost all cases, std::sort is wildly faster than qSort - but especially in the case where the input data is already sorted. in some stress tests which ran through the index with a lot of items, this commit provides huge speedup (684ms down to 10ms for painting 15001 empty items on the provided benchmark), for me. Task-number: QTBUG-11022 Change-Id: I5551f8e320c33ba13d464bf22047a665c81f3b74 Reviewed-by: Peter Kümmel <syntheticpp@gmx.net> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* QWizard/Win: Fix incorrect cached state after all wizards destroyedJonathan Liu2012-09-032-1/+5
| | | | | | | | | | | | | | | | | | | | | If a QWizard is shown when Aero is enabled, the current visual style is cached in a static member of QVistaHelper. The cached state is updated by QVistaHelper when it receives WM_THEMECHANGED or WM_DWMCOMPOSITIONCHANGED events from Windows. If all QWizard instances are destroyed, there are no instances of QVistaHelper to receive these notifications and update the cache. If Aero is now disabled, the cached current visual style in QVistaHelper isn't updated. If a wizard is now created and shown, a large black rectangle is shown in the titlebar. A static instance count is added so that when no wizards are running, the cached state is not used. Task-number: QTBUG-27004 Change-Id: Iefe4c8552388280219c9726418ed7476b8ebb15a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Private slots should be named starting with _q_Sergio Ahumada2012-09-033-3/+3
| | | | | | | | | | | | | This is to reduce the risk of collisions with signals/slots in user classes q_updateFocusObject(QObject *object) => _q_updateFocusObject(QObject *object) q_checkFocusObject(QObject *object) => _q_checkFocusObject(QObject *object) q_connectFocusObject() => _q_connectFocusObject() emitActivated(QPlatformSystemTrayIcon::ActivationReason) => _q_emitActivated(QPlatformSystemTrayIcon::ActivationReason) Change-Id: I148913f1e24a80fe5cacfd737d1b455b805cfced Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Introduce hook for text cursor changes in QTextEdit and QPlainTextEdithjk2012-09-024-1/+24
| | | | | | | | | | | Currently it is hard for Q{Plain}TextEdit subclasses to keep track of changes of the text cursor by direct calls to setTextCursor from arbitrary code. By redirecting the setTextCursor to a virtual function subclasses get the chance to intercept such calls. Change-Id: Id92d9c86928b97285b0f5b7b39790442dfac3e50 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Fix docbuild when not using -developer-build.Casper van Donderen2012-09-011-2/+2
| | | | | | | | https://codereview.qt-project.org/#change,33974 only works in the case of a developer build. Not in a normal prefix build. Change-Id: I3a3e5029cefaa9f83c5deb71665f0efa9d812819 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix address book example.Frederik Gladhorn2012-09-011-1/+1
| | | | | Change-Id: I2e0cb03bb7e9585edf44d4464af17848069337ee Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Fix graphicsview docs.Frederik Gladhorn2012-09-011-12/+11
| | | | | Change-Id: I9438e64dbbc859fc60eb41a1bc664af35b762894 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Moved snippets from widgets to gui so that they are found by qdoc.Kim Motoyoshi Kalland2012-08-312-153/+0
| | | | | Change-Id: I3245366c26dfffc6c2eb062e9710460c32e4b8d8 Reviewed-by: aavit <qt_aavit@ovi.com>
* QXxxStyle: override standardIcon() & layoutSpacing()J-P Nurmi2012-08-3125-160/+127
| | | | | | | | QStyle::standardIconImplementation() & layoutSpacingImplementation() are removed, and standardIcon() & layoutSpacing() made pure virtual. Change-Id: Ibf43323d0cf6c3b6cec4547afe8e826e120f74ba Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* QStyle: make standardIcon() & layoutSpacing() virtualJ-P Nurmi2012-08-312-119/+14
| | | | | | | | Removes standardIconImplementation() and layoutSpacingImplementation() that were added in Qt 4 as a workaround for binary compatibility reasons. Change-Id: I45292dc6802310d6cda4f443bb7484b061af0138 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make QGraphicsView respect scrollbar policiesJeremy Lainé2012-08-311-6/+8
| | | | | | | | | | | | | | | | | When calculating the maximum height / width which a QGraphicsView can display, make sure we only take the scrollbars' dimensions into account if their policy is set to Qt::ScrollBarAsNeeded: - if the policy is set to Qt::ScrollBarAlwaysOff, the scrollbar will not be displayed at all - if the policy is set to Qt::ScrollBarAlwaysOn, the scrollbar's dimensions have already been substracted from the available space by QAbstractScrollArea::maximumViewportSize() Task-number: QTBUG-14711 Change-Id: If5d24b41dbe7b089abca2bf61ccbd370d4de79a1 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix updating of drag icons.Friedemann Kleint2012-08-312-53/+66
| | | | | | | | | | | | Try to find a target widget that accepts drops; ignore the event if none can be found. Split the handleDrag*() functions to reduce indentation. Add an autotest. Task-number: QTBUG-22987 Change-Id: I516ac5f0c002caaf83c52ac16f821246e565230f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Simplify qtbase qdocconfs.Casper van Donderen2012-08-311-15/+2
| | | | | | | | | | We should be using the global qdocconf for the common variables. This change also allows you to just specify -installdir without using a templatedir. Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Document how to remove a QGraphicsEffect.Richard Moore2012-08-291-1/+2
| | | | | | | You can remove an effect by setting 0, but this wasn't documented. Change-Id: I2d86875d8554cb26b4d88b8ce04b4daa9792c5d5 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fixed the QTreeView expansion/collpasing when animatedThierry Bastian2012-08-291-2/+6
| | | | | | | | | | | | | | | | | | If you had a QTreeView with expandable items, if you tried to expand and while the animation was still running you'd try to collpase the node, the display would be completely broken: the items below that items would not be visible any more except for a fraction of a second when expanding or collapsing it again. The problem is in the fact that when starting an animation the QTreeView stores the state before animating. And it does that even if an animation is already running. So the stateBeforeAnimation becomes AnimatingState and when the animation finishes, AnimatingState is the state that is restored breaking the painting. Unit test is included. Change-Id: I015212c1ed8962e6df705655099a5660f195caf3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Ensure child items are updated even if the parent item has no contentAndy Shaw2012-08-291-1/+2
| | | | | | | | | | | | When a parent item had its visiblity toggled, then the child item would not update if the parent item had ItemHasNoContents and ItemClipsChildrenToShape set. This is a common use case in declarative as the root item has ItemHasNoContents set. Task-number: QTBUG-26846 Change-Id: Id6592ebc4ba2caa4331a4a71f7247e40993131b6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Drawing fix for overlay scrollbars on Mac.Christoph Schleifenbaum2012-08-291-1/+1
| | | | | | | | | A wrong check lead to a scrollbar with value 0 never been draw. This is the fix for it. Instead is has to be checked for a length of 0. Change-Id: I0c4e2f7e0014074e3c22554bcbea0ebfc3122952 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* doc: fix linksFrederik Gladhorn2012-08-281-1/+1
| | | | | Change-Id: Ifb6363e35c5317b6b1d9fd5e53079b30753f0666 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Fix qdoc link.Frederik Gladhorn2012-08-281-1/+1
| | | | | Change-Id: I65e58351737b5628ac8c5dfe36a14b898076d690 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Find example images for widget docs.Frederik Gladhorn2012-08-281-1/+2
| | | | | Change-Id: I958031b3ececa953c73d7792900f271f4a19803e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* doc: remove links to Qt DesignerFrederik Gladhorn2012-08-284-6/+6
| | | | | | | | Designer is in the tools repo, we cannot link there. Mentioning the name should be good enough. Change-Id: I55193aa31e60ae266a8890f706c332a63ed3610d Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add graphicsview documentation overview.Frederik Gladhorn2012-08-281-0/+557
| | | | | | | | This was removed from the docs repo and not re-added in qtbase. (change id for removal: Id1a65f07f4687465499fc5666bb1ad710914fabd) Change-Id: Ifb403757884114c00e64d713f65af5178dcb5d4b Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* doc: clean up model view overview linksFrederik Gladhorn2012-08-271-12/+10
| | | | | Change-Id: I4aaf0cb254ffa4c7369e51b35af0226c98ec293c Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* QFileSystemModel: remove incorrect #ifndefMarc Mutz2012-08-261-2/+0
| | | | | | | | | | No other call to fileInfoGatherer.getInfo(info) is #ifndef'ed on QT_NO_FILESYSTEMWATCHER, so this one shouldn't be, either. Change-Id: If145226c13d77460d6169a9ed3028647b0f565b5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Majid Khan <mkhan3189@gmail.com>
* Fix infinite recursion while dragging toolbar of QMainWindow.Markku Heikkila2012-08-251-2/+3
| | | | | | | | | | | | | Prevent recursion in QMainWindowLayout::endSeparatorMove(). Manually cherry-picked from Qt 4.8 change 90b71dc0ff4ec9bb150a0de9933d6eb06d995a34 Task-number: QTBUG-21378 Change-Id: I901ebfd96be0bdc6ab03dd8c3335d2622db843db Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Improve docs.Frederik Gladhorn2012-08-251-129/+5
| | | | | | Change-Id: I073398e4da14a1c6489c951200f022a346f4d2fa Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QSystemTrayIcon: fix narrowing warningMarc Mutz2012-08-231-1/+1
| | | | | | | | | | | | GCC complained: warning: narrowing conversion of ‘((QSystemTrayIconSys*)this)->QSystemTrayIconSys::<anonymous>.QWidget::winId()’ from ‘WId {aka long long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing] Change-Id: I63908c884b51db203ee0ed659a152af77c295292 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Doc: Fix snippet and example referencing widget examplesAndy Nichols2012-08-232-6/+6
| | | | | | | | Widget examples were moved into a widgets subfolder, but qdoc references were not updated. Change-Id: Id2a4573e723745b9827c664c852807d6116f8f6d Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Make keyboard search work in the current column, not only the first.Stephen Kelly2012-08-221-0/+5
| | | | | | | Task-number: QTBUG-26540 Change-Id: I1c365aeb013f5ddedd0589aa4c4844be759a3882 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix indexAbove and indexBelow to return indexes in the correct column.Stephen Kelly2012-08-221-2/+4
| | | | | | | | They used to always return indexes in column 0. Change-Id: I2cf4239e0a975b37548de00a1deb916fcd88b4c7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Clean up borders in cleanlooksJens Bache-Wiig2012-08-221-16/+5
| | | | | | | | | This aligns the dockwidget appearance in cleanlooks with that we use for Gtk style. It should look a lot cleaner this way as most of the borders were redundant. Change-Id: Idf20a105f583ca8cdbba0bcb6f22b298d53cc40d Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>