summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Suppress QWindowSystemInterface inclusion warnings.Girish Ramakrishnan2012-07-032-4/+4
| | | | | | | | | | | | | Since QWindowSystemInterface is now part of QPA API. The correct inclusion is: #include <qpa/qwindowsysteminterface.h> #include <qpa/qwindowsysteminterface_p.h> Bulk of the work was done by: find . -type f | xargs sed -i -e 's,#include <\(QtGui/\)\?QWindowSystemInterface>,#include <qpa/qwindowsysteminterface.h>,g' Change-Id: If75fc32611e72ef1cf58505794def375b1acf74a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* fix QWidget::grab(QRect(x, y, -1, -1))Joerg Bornemann2012-07-031-1/+5
| | | | | | | | | | | | Grabbing a widget with a position != (0,0) and an invalid size returned a pixmap of the widget's size. As we're grabbing just a part of the widget, the pixmap must be smaller by the amount of x, respective y. Autotest: tst_QWidget::grab() Change-Id: I3d5103e6e7c042cc6112038ace236e3f69060bda Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* revive the noPaintOnScreen fix on WindowsJoerg Bornemann2012-07-033-5/+28
| | | | | | | | | | | | | | | | | | The original commit message follows. Fixes: Fix the windows PaintOnScreen issue once and for all Details: To allow both the case where X11 people accidentally set PaintOnScreen (which should not have any effect on windows) and where people set it and subclass with paintEngine() { return 0 } to use GDI / DirectX we do this rather nasty hack. Original commit in Qt4: 07a2f68bd5869152471e4ffc4a63c683ef141ae8 Autotest: tst_QWidget::paintOnScreenPossible Change-Id: Ifbb7dc4611959be3ecc362c29a1c3436b0e0fa82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove _qpa from cpp filenamesGirish Ramakrishnan2012-07-034-2/+2
| | | | | | | | 36547f4eff44361f7a6acd0cff107c0e47561f93 removed the _qpa from .h files and promised to remove it from .cpp files at a later date. Change-Id: I24a5c3796f6b07dd9a1931b699f3212d315edb12 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
* remove unused variable from QPlainTextEdit::paintEventJoerg Bornemann2012-07-031-1/+0
| | | | | Change-Id: I0959acebaca0685f799465999ed002242f3b0ec3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Store the QMetaObject with the QMetaType.Stephen Kelly2012-07-011-0/+3
| | | | | | | | This will allow conversion between pointers to compatible QObject derived types. Change-Id: I19e08934571fb3f1b91e594892214041fe5f6a11 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Support the showIsFullScreen style hint in widgets.Thomas McGuire2012-06-302-13/+26
| | | | | | | | | | | | | | | Now QWidget::show() will be the same as QWidget::showFullScreen() if the style hint is set. This is consistent with QQuickView now. De-inline related methods to make it easier to change them later without breaking compatibility. Change-Id: I843ac6f846428217bfc5dc9f1d0a554de9d0c08f Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move QStandardItem/QStandardItemModel to QtGuiGiuseppe D'Angelo2012-06-295-3782/+1
| | | | | | | | | | | The dependencies on QFont, QBrush, QIcon are all in QtGui, so there's little sense to still have these classes in QtWidgets. This also copies and pastes a version of QWidgetItemData as QStandardItemData inside qstandarditemmodel_p.h. Change-Id: Ibafc5a30748e7ce0b54753309ae6dc4a797fc20e Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add framestrut mouse events.Friedemann Kleint2012-06-293-0/+20
| | | | | | | | | | | | | - Add infrastructure to QWindowSystemInterface. - Add a setter for enabling framestrut events to QPlatformWindow. - Add Windows implementation, pass keyboard modifiers. QDockWidget relies on it for docking. Task-number: QTBUG-26296 Change-Id: I9d84b356e9a5eb341f57b6f51f34b6b494ff7f87 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Make QCalendarWidget use its locale's firstDayOfWeek.Mitch Curtis2012-06-281-3/+5
| | | | | | | | | | | QCalendarWidget currently uses Qt::Sunday as the default first day of the week. It has been suggested that a better user experience would see the calendar's locale be used instead. Task-number: QTBUG-19811 Change-Id: I4441bf9ffd52213ef622a4a7f498530b7cc9e110 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Further fixes to widget maskingMiikka Heikkinen2012-06-281-0/+3
| | | | | | | | | | | | | If mask was set to a widget before the widget was shown, the mask was not applied. Also, if toplevel widgets were set a mask in Windows, the mask was applied to frame coordinates instead of client coordinates. Ported relevant code from Qt4 to fix these issues. Change-Id: Id6187cf4952b81b5b60c167e2fd284b7dc83ed9c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Move the QDataStream operator<< for QPair to qdatastream.hThiago Macieira2012-06-282-0/+3
| | | | | | | | | | QPair is small and is no problem to include from qdatastream.h. However, including QDataStream from qpair.h means including QIODevice and QObject too. Change-Id: I344321e9f68438008ec329a165135c3a346c6058 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-281-1/+67
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Widgets: Apply masks to native windows only.Friedemann Kleint2012-06-271-10/+2
| | | | | | | | | | Do not go searching for a parent window handle in setMask_sys() as this causes for example MDI areas to set masks that show the child only. Fix breakage introduced by 8e280d1e187b09651c7036bd76272342d52ce401 . Change-Id: I57de41d16985ebc8d3fc81153a671f2e2807b1eb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Add const & to foreach 'iterators'Albert Astals Cid2012-06-271-1/+1
| | | | | | | Change-Id: I8c0600dfd919f45d14a0011f2da9b9fe0b9a0df3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove .values() call in foreachAlbert Astals Cid2012-06-271-1/+1
| | | | | | | | foreach already knows how to iterate over the values without the need to create an intermediate qlist Change-Id: I4622a36fbdbf536a75f26b42e32488a77d078f02 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix raising and lowering native widgetsMiikka Heikkinen2012-06-271-2/+2
| | | | | | | | | Raising or lowering a native widget needs to raise or lower the associated platform window, too. Task-number: QTBUG-26344 Change-Id: Ib847d97df86857d92bcc4c9c0dd51219575d8db1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Convert QPA menus to use QIcon, and enable icons.James Turner2012-06-271-1/+2
| | | | | | | | | Icon support was disabled in QPA menus, now QIcon is in QtGui, convert the QPA interface, enable setting the icon in QMenu, and make the Cocoa implementation use it. (And fix a ref-counting leak if an icon is actually set) Change-Id: Ica203bf6826b79d8beee58f39febc851b9633a66 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove some unused variables from QAccessibleWidgetPrivateJan-Arve Saether2012-06-262-72/+3
| | | | | Change-Id: I22fd67d63131d48356023c26eb0689587ce96967 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Clarified documentation for QStandardItem::parent()Markku Heikkila2012-06-261-1/+3
| | | | | | | | Task-number: QTBUG-18785 Change-Id: I91ee8c3dc10c1484376a17e3f13794038d4a648f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* QPlatformWindow: Add Window masks.Friedemann Kleint2012-06-261-3/+18
| | | | | | | | | Add functionality for window masks to QPlatformWindow, which is required to implement QWidget::setMask() in order to fix the regression in functionality from Qt 4.8. Change-Id: I2c2d5629f0b4c6d90e52595ad70b13559aab1f41 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make QGtkStyle build with QT_NO_FILEDIALOGSukhyun Kim2012-06-263-0/+12
| | | | | | | | Fix compilation failure with qconfig large Change-Id: I8ae14f01879b94430dcbb5c85c61d14e922f6eb9 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixed inputMethodQuery() for Qt::ImHintsTasuku Suzuki2012-06-262-20/+36
| | | | | | | to return QWidget::inputMethodHints() Change-Id: I46735c553e0cb4689cd0c53a69d07ed61ba56bf6 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix docs mentioning Q_EXPORT_PLUGIN2Lars Knoll2012-06-251-1/+1
| | | | | | | | Fix all remaining places where Q_EXPORT_PLUGIN2 was being used in the documentation. Change-Id: I7be67b83c18545d0e74f250b4b26583444b01909 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make qtbase compile with QT_NO_CSSPARSERTasuku Suzuki2012-06-241-0/+1
| | | | | Change-Id: Iadcc7dfde6b06c339118c00a645d9dc592a0eead Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixed mouse grabbing preventing popups from being closed.Samuel Rødal2012-06-211-1/+3
| | | | | | | | | | | The pointer grabbing leads to fake Enter events being sent to the Qt::Popup window, preventing it from closing since QWidget::underMouse() returns true. We should only send Enter events if the mouse is actually inside the widget. Change-Id: I4ba3fb08943580f93ad4337ff0227becd647767e Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove references to Q_WS_QWSGirish Ramakrishnan2012-06-206-47/+5
| | | | | | | | | | | | | Affected code includes: src/widgets/dialogs/qmessagebox.cpp src/widgets/graphicsview/qgraphicsitem.cpp src/widgets/kernel/qapplication_p.h src/widgets/kernel/qwhatsthis.cpp src/widgets/kernel/qwidget.h src/widgets/widgets/qdockwidget.cpp Change-Id: Ib9e920b3cc1253b39e4e00d7137c21321ecc0399 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* plastique: Use QPlatformTheme::DialogButtonBoxButtonsHaveIconsGirish Ramakrishnan2012-06-201-3/+6
| | | | | Change-Id: I2f493d45820063ef62f16febde0df89a874dddb0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove dead codeGirish Ramakrishnan2012-06-201-4/+0
| | | | | Change-Id: I48c1e3b2ebcf4ec2fb21ed2d1a88e1dae64e937d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QWidgetWindow sending duplicate drag-drop eventsJames Turner2012-06-201-1/+1
| | | | | | | | | | Unlike the other event handlers in QWidgetWindow, the drag-drop events are not followed by an early return. This causes all drag-drop events to also be sent to the root widget of the window, which is a bug. For example in the fridgemagnets example, where the target widget and root widget are the same, the drop event is received twice. Change-Id: I99e56ad8c48b3d31b0bd7c815cea8490edbf0af4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Mac: Fix rendering of non-int sized fonts.Eike Ziller2012-06-202-17/+24
| | | | | | | | | Scrolling happens in integer steps, so it's necessary to use a fractional correction value. Task-number: QTCREATORBUG-7127 Change-Id: I6eccba6532f95aa4bf9270bdaec4b57280dc8e3d Reviewed-by: Matthias Ettrich <matthias.ettrich@nokia.com>
* Merge "Merge branch 'buildsystem'" into refs/staging/masterOswald Buddenhagen2012-06-201-12/+12
|\
| * fix misnomer: qt_module.prf => qt_build_config.prfOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | | | qt_module suggests to be congruent to qt_plugin. Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
| * automatically add QT_BUILD_FOO_LIB to DEFINESOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | Change-Id: I35d9861e48469eb5cc8824e361450684047e6559 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * clean up projects from QPRO_PWD nonsense, etc.Oswald Buddenhagen2012-06-191-1/+0
| | | | | | | | | | Change-Id: I4c41aedf5bfb37e31ad202cacd2312b0bdb168e2 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * auto-generate QMAKE_PKGCONFIG_REQUIRES and QMAKE_PKGCONFIG_DESCRIPTIONOswald Buddenhagen2012-06-191-2/+0
| | | | | | | | | | | | | | less boilerplate, more accuracy Change-Id: I6cc2abd50eafb4901d987c122f10a62ec9ea9da3 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * move QMAKE_PKGCONFIG_VARIABLES stuff out of qt_module_config.prfOswald Buddenhagen2012-06-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | this only needs to be set in one module each - the one which provides the relevant tool. this is moderately source-incompatible, in that a package which queries a given variable from the wrong library won't get the path it looks for any more. as it's likely that everyone was using QtCore as a reference anyway, this will only affect uic - which is in the new QtWidgets library, to which people need to adjust anyway. Change-Id: If05d3c33fda6cd12466e261391b825c59651d3e4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * auto-generate module prisOswald Buddenhagen2012-06-191-4/+2
| | | | | | | | | | Change-Id: I654428771034221ccf424be34d5d9c7764daf3b4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * automatically add the version header to HEADERSOswald Buddenhagen2012-06-191-2/+0
| | | | | | | | | | Change-Id: I7c2e1d852ebdbc5cca7a3a31ab2b4c9ab9faffd9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * make qt_module_config.prf install the module pri fileOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | | | | | | | | | absorb module.prf into qt_installs.prf, as that's where it belongs. add qt_install_module option and automatically set it in qt_module_config. make qt_installs use that option. Change-Id: I860616f3a29a456f7b88ddaffa09375400c8911e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * move moc, rcc and uic CONFIG additions to the respective qt modulesOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | | | | | they don't belong into the global scope Change-Id: I27a3de5f706392b3c4a84035521bc3b4e4055740 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * remove last traces of qbase.pri, qt_targets.pri and qt_installs.priOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | | | | | | qt_module_config.prf, qt_targets.prf and qt_installs.prf replace them Change-Id: I6fc670ce8540dbd9ddaec1632d486e43a7ebf14b Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* | Accessibility: Do not automatically add controllersFrederik Gladhorn2012-06-201-19/+0
| | | | | | | | | | | | | | | | | | | | | | While I do like the idea, it currently relies on every QWidget having QAccessibleWidget as a11y representation. This crashes for example when using the itemviews and asking them for relations. Change-Id: Ie15a78dae620eefb97c646b9e802b13bdf864650 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | Windows: Fix MinGW warnings.Friedemann Kleint2012-06-202-7/+11
|/ | | | | | | | | | | - Missing initializers for structs - Missing enumeration value - Mixing enumeration/ints in operator ? Change-Id: I149ab01ad2ebd04f89e5c699905d5ba724828e0f Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Clean up a partially scrolled QRollEffect widgetMiikka Heikkinen2012-06-181-1/+1
| | | | | | | | | If the associated widget pointer got zeroed while QRollEffect was scrolling, the partially scrolled QRollEffect widget remained on screen indefinitely as 'done' was never set to true. Change-Id: If1567ea740e81b5501137d10db471ca97d295ed8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix: Widgets that become top-level widgets may crash the applicationBerthold Krevert2012-06-152-3/+6
| | | | | | | | | | | | | | | | | You can reproduce the bug with the QMainWindow demo application: Just dock the toolbar on the left side, then try to drag the bar back to the top and observe that the application crashes. This happens, because the toolbar becomes a top-level widget during the dragging action and therefore some data structures like a window are created. After the toolbar has been docked, it loses its top-level state and the window object is destroyed. The same is not true for the backing store structure, which still keeps a pointer to the destroyed window. When the toolbar is dragged the next time, a new window object is created, but the backing store tries to access the deleted one. Crash occurs. Change-Id: I0d1ffc04c19ec14654ceb62a0d3cf7cf65cb952d Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Do not redefine NIN_KEYSELECT if already definedJonathan Liu2012-06-151-1/+4
| | | | | | | NIN_KEYSELECT is already defined for MinGW-w64. Change-Id: Ieab9f883cf1680f792d085e254916d51602ce701 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Speedup for QAbstractItemViewPrivate::delegateForIndexABBAPOH2012-06-141-4/+11
| | | | | | | | This fix prevents copying of a QPointer on a stack and adding/removing QMetaObject guards Change-Id: I844c10cede1536a14ad7cd9f007470966619d6d6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix QListView::scrollTo() when there are hidden rowsJani Honkonen2012-06-141-1/+6
| | | | | | | | | | | | | | | | | This is a cherry-pick of b0601630dd0ddabfaa3b97d042ee02b981d95988 from February QListView does not consider hidden rows when scrolling to an item. If there are hidden rows (or columns) before the selected item then the visual index of an item is not the same as the row index from the model. So scrolling will be off by the number of hidden rows before the selected item. Added a autotest for this also. Task-number: QTBUG-21115 Change-Id: I01b097bce7f163cdb480a71b763c060cc006fdc7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Introduce QPA API for size grip handling.Friedemann Kleint2012-06-141-71/+27
| | | | | | | | | | - Introduce API to do size grip handling (mouse press and move). - Move Windows code to Windows plugin. - Move X11 code to XCB plugin and activate it. Change-Id: I2f61d6ddc1fa07447e668554d41ecc820efca23f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>