summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* QtWidgets: normalize signals/slotsMarc Mutz2012-07-131-1/+1
| | | | | | | | | | This is the result of running util/normalize --modify from Qt 4.7 with manual review. Change-Id: I024d48cd111ab89f3fe83d9df51b188c9ad5023c Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Debao Zhang <dbzhang800@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Mac: Fix crash on Mac OS 10.6 with new scrollbars.Christoph Schleifenbaum2012-07-131-10/+14
| | | | | | | | | | Add missing runtime for OS X version in constructor. This ended up in a crash when starting a version compiled on 10.7 on 10.6. Change-Id: I25c5562ee905317554e79d83a2f5236ce9e2a145 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix some spelling errorsSergio Ahumada2012-07-113-4/+4
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add stylehint to use querying RTL keyboard support.Friedemann Kleint2012-07-112-20/+4
| | | | | Change-Id: Ic58ed7cb64cc7fe60b4d431e9f29e389c62265fc Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Clear qt_button_down widget when starting a drag.Friedemann Kleint2012-07-112-0/+12
| | | | | | | | | Prevent pickMouseReceiver() from using the widget from which the drag was started. Task-number: QTBUG-26145 Change-Id: I65d4c295a894193e41c676fb9fd1f7113c2631b5 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Don't set the resize and move flags when activating fullscreen modeThomas McGuire2012-07-111-0/+8
| | | | | | | | | This fixes tst_QWidget::movedAndResizedAttributes() for platforms that don't have support for QPlatformWindow::setWindowState(). Change-Id: Id0f123d11b08a75c0c131080d509e6b23b281600 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix showNormal() and friends for platforms with fullscreen hintThomas McGuire2012-07-102-4/+4
| | | | | | | | | | | | Don't call show() inside of QWidget, as that might make the window fullscreen due to QStyleHints::showIsFullScreen(). This regression was introduced earlier when QWidget::show() gained support for the hint. No auto test caught the problem, as the affected platforms (EGL and QNX) are not CI-tested. Change-Id: I647c2362ac5b53ced562f1d77848552cc122fba0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* fix "paintEngine: Should no longer be called" warnings on WindowsJoerg Bornemann2012-07-091-1/+1
| | | | | | Change-Id: Idece743d1f28f1c579d823123b6814fae786b58b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Remove Library dependency on SettingsTasuku Suzuki2012-07-091-2/+2
| | | | | | | | made QLibraryInfo available with QT_NO_SETTINGS. QKdeTheme is removed when QT_NO_SETTINGS is defined. Change-Id: I63d619bb305e6c23985d9ea50c72d39a697b7a4b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* fix fullscreen state in QWidgetWindow::handleWindowStateChangedEventJoerg Bornemann2012-07-091-2/+0
| | | | | | | | | A widget can be Qt::WindowMaximized and Qt::WindowFullScreen at the same time. See tst_qwidget::windowState. Task-number: QTBUG-26420 Change-Id: I89d6edb857f41cda911152244cf23d36dfd1cdce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Doc: Replace all occurences of \BR with \br.Casper van Donderen2012-07-061-76/+76
| | | | | Change-Id: I9b0fac5fac7b0467de2d9a57a951b10a0f5438d7 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Update framestrut initially after window creationMiikka Heikkinen2012-07-061-0/+7
| | | | | | | | | | | Creating native widgets such as QGLWidget and then calling move() on top level widget before doing show() on it caused framestrut to be incorrect, as native widgets force the creation of the native windows also on their ancestors when they are constructed, rather than waiting for window to be shown. Change-Id: I3e8d60547b3b683178ba059c5d92526a1d447442 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QHeaderView - resizeSection improvementThorbjørn Lund Martsum2012-07-052-1/+16
| | | | | | | | | | | | | | | | | This patch improves the manual resizeSection a bit. Before we didn't consider that the program could maybe resize other sections when the user was resizing one section. The main issue with that is that setOffset is so smart that it helps moving the mouse cursor - however it really shouldn't do if the program is trying to change something too. Maybe this won't solve all (possible) problems at once - but it is a fixed needed just to make something work - trying to make anything work without this fix is horrible.... Change-Id: I3cefa375a9b8ee4c1ef1e08ba0900025c671e4c6 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Support for overlay-scrollbars on MacChristoph Schleifenbaum2012-07-056-40/+449
| | | | | | | | | | | | | | | On Lion scroll bars are within the scroll area itself and are not being shown as long as the user is not scrolling. This patch draws the new scroll bars and makes them fade away. Further it introduces a pixel metric checking for this behaviour. It's used by QAbstractScrollArea to put the viewport to the correct place. Task-number: QTBUG-21673 Change-Id: Id530265043549318ac420b392de6b8642deaa4c6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* QHeaderView - prevent negative default+minimum section sizesThorbjørn Lund Martsum2012-07-041-0/+4
| | | | | | | | | In 96f1fe8855082017fbbecccdab1eb11fd8c1f870 we agreed that sections with negative sizes did not make sense. Of the same reason default section sizes and minimum section sizes should be not negative. Change-Id: I6a770e7f510d8e2bb90bfd8f38b4fa0566fc137b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make QGenericPlugin and QGenericPluginFactory public APIGirish Ramakrishnan2012-07-041-1/+0
| | | | | | | | | | These classes are not specific to QPA. Discussed in QtCS 2012. Change-Id: I32bc5fad4f0fa5e7095af86d61966fdf4d9e4ad7 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Platform-plugin support for QSystemTrayIcon.Christoph Schleifenbaum2012-07-039-581/+116
| | | | | | | | | | | | | | | | | | | | | Implement QPlatformSystemTrayIcon providing QPA-plugin-support for system tray icons. Make QSystemTrayIcon use this as new backend. Ported over qsystemtrayicon_mac.mm to qcocoasystemtrayicon.mm to provide Cocoa support for the new interface. It had to be changed to match the interface, especially for icon and menu handling. This interface is made to not use QStyle or QMenu which are related classes of QSystemTrayIcon. It's therefore not introducing QtWidget dependency into the platform plugin. Task-number: QTBUG-20978 Change-Id: I0d0a73835698b3b4f97219d4f5bbcfa2af57dbe2 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix focus handling when the application has QAxWidgets.Miikka Heikkinen2012-07-032-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Removed old defunct platform specific code from QWidget::isActiveWindow() and added call to QPlatformWindow::isActive() instead. This is done because the embedded native windows inside QAxWidgets can have focus but are not part of the parent application's Qt window hierarchy, so native methods are required to determine if they are part of the active window or not. QWidgetPrivate::setFocus_sys() was implemented to activate the window of the focused widget if the focus was elsewhere. This is required because embedded native windows can steal the focus from the main application window. Focus event handling in Windows platform adaptation plugin was fixed to correctly identify the active window in cases where the are embedded native widgets that can have focus. Also fixed three test cases that were affected by these changes. Task-number: QTBUG-25852 Task-number: QTBUG-23699 Change-Id: I817e0ce4317e88955bb49b034eacd630a876ccf0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Implement automatic mouse grabbing on mouse button press.Miikka Heikkinen2012-07-033-1/+30
| | | | | | | | | | | QWidget::grabMouse() documentation states that Qt automatically grabs the mouse when a button is pressed and ungrabs it when it is released. Implemented this functionality to make Qt5 behavior similar to Qt4. Task-number: QTBUG-25977 Change-Id: I17aa7e8190f4f5224ebc382d62970c86ae492bdb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QDockWidgets on XCB.Friedemann Kleint2012-07-031-16/+21
| | | | | | | | Do not use native decoration. Task-number: QTBUG-26296 Change-Id: I15a6ace737a08003ee196bde3d0b5ca65aa00408 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* 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>