summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qwidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to Digia4.6Sergio Ahumada2012-11-271-18/+18
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I8b2ed2e09e9beb46bdda354017c29f00be6ae76f Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | Reviewed-by: Trust Me
* Added reference counting to QWidgetBackingStoreGareth Stockwell2010-06-021-8/+49
| | | | | | | | | | | | | | | | | | | On Symbian, the top-level widget's backing store must be destroyed when it is no longer required, in order to conserve memory. The criteria for destroying the backing store is when neither the TLW nor any of its native descendents (which share the backing store) are visible. In order to implement this requirement, a count must be kept of the number of native widgets which are using the TLW's backing store. This patch provides the mechanism for maintaining this count, and for destroying the backing store when the count is decremented to zero. No calls to either the increment nor decrement functions are made, however, by this code included in this patch; this code will be added to only the Symbian backend by a subsequent patch. Task-number: QTBUG-8697 Reviewed-by: Bjørn Erik Nilsen Reviewed-by: Jason Barron
* QTBUG-4887 and other exception safety fixesmread2010-04-071-2/+6
| | | | | | | | | | | | | | | | | | | | This change includes a fix for QTBUG-4887 and other exception safety problems found while testing it. The QTBUG-4887 fix is to qimage.cpp. QImage doesn't throw exceptions on failure like a proper class should, instead it tries to fail "nice". What happens here is that setAlphaChannel would crash on OOM as after the convertToFormat call, d could be NULL. This new version checks the result of the conversion before using it. The other fixes are all cases where exceptions were thrown from destructors. I added code to the test app to help debug these cases, and I fixed all the problems I found. With these changes, tst_exceptionsafety_objects runs and passes on the Symbian emulator. Reviewed-by: Shane Kearns
* Fixed a bug where a proxy widget received FocusIn over and over.axis2010-03-181-0/+2
| | | | | | | | | | | This also fixed the issue where an input panel would not be requested by the widget, because it thought it was being focused over and over, instead of focused, and then clicked (focus followed by click is default input panel popup behavior on Symbian). AutoTest: Included and passed RevBy: yoann RevBy: Jan-Arve
* Fix compileJens Bache-Wiig2010-03-031-1/+0
| | | | Reviewed-by: cduclos
* Bug with toolbar focus on MacCarlos Manuel Duclos Vergara2010-03-031-0/+18
| | | | | | | | | | | | | | | | | | | | | | Before doing anything we need to make sure that we don't leave anything in a non-consistent state. When hiding a widget we need to make sure that no mouse_down events are active, because the mouse_up event will never be received by a hidden widget or one of its descendants. The solution is simple, before going through with this we check if there are any mouse_down events in progress, if so we check if it is related to this widget or not. If so, we just reset the mouse_down and then we continue. In X11 and Windows we send a mouse_release event, however we don't do that here because we were already ignoring that from before. I.e. Carbon did not send the mouse release event, so we will not send the mouse release event. There are two ways to interpret this: 1. If we don't send the mouse release event, the widget might get into an inconsistent state, i.e. it might be waiting for a release event that will never arrive. 2. If we send the mouse release event, then the widget might decide to trigger an action that is not supposed to trigger because it is not visible. Task-number: QTBUG-8604 Reviewed-by: denis
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-02-261-5/+8
|\ | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Remove unwanted code after c027f0ae1967ec1d64cb2c9679c8b57f18faf7f5 ActiveQt Internet Explorer component causes Desktop Icons to flicker.
| * ActiveQt Internet Explorer component causes Desktop Icons to flicker.Prasanth Ullattil2010-02-261-5/+8
| | | | | | | | | | | | | | | | | | | | | | This happens only if IE is embedded in an frameless window. The repaint caused by calling EnableModeless() is making the desktop icons flicker. This repaint generated via ActiveQt will be ignored by QtGui. This is done by checking if the window style is already in the required state or not. Task-number: QTBUG-8355 Reviewed-by: Denis
* | Improvements to itemview keypad navigation in S60.Janne Anttila2010-02-251-0/+43
|/ | | | | | | | | | | | | | The logic used in this commit is partially taken from sliders. This commit makes it possible to interact (change row or column) in itemview even itemview does not have editFocus. Interacting without editFocus is enabled when it is not possible to keypad navigate to reuqested direction. In addition if keypad navigation to any direction is not possible (i.e there is only one listwidget on screen), there is no sense to add "done" softkey to get out of edit focus. Task-number: QTBUG-4802 Reviewed-by: Alessandro Portale
* Fix to S60 softkeys when no active Qt window or native widget is shown.Janne Anttila2010-02-121-1/+1
| | | | | | | | | | | | | | | | | | | Softkeys need to be updated also when Qt activewindow is set to NULL, this is needed that usecase where last Qt widget is closed works correctly. I.e. closed widget softkeys has to be removed, and replaced by default "Exit" softkey. Earlier only window activation or widget focusIn event caused softkey update. In addition IsDisplayingMenuOrDialog does not work correctly under all circumstances. Sometimes when menu is being launched the Qt gets focusChanged event before the menu is actually shown, but menu CBA is already created. This is fixed by checking that we update CBA only when AppUi CB is the current one. This assumption works as long as Qt uses only the CBA created by S60 application framwork and does not create other CEikButtonGroupContainer instances. Task-number: QTBUG-6115 Reviewed-by: Sami Merila
* Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Kim Motoyoshi Kalland2010-02-091-1/+1
|\ | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication_win.cpp src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h
| * Fixed bug where GL widget was not fully updated on Vista.Kim Motoyoshi Kalland2010-02-041-1/+1
| | | | | | | | | | | | | | | | | | There were cases where the QGLWidget would not be fully updated on screen on Windows Vista and Windows 7 with Aero disabled. Task-number: QTBUG-7865 Reviewed-by: Prasanth
| * Fixed uninitialized background artifacts in QWidget::render.Donald Carr2009-12-081-1/+1
| | | | | | | | | | | | backport of 64d38ba23b4acc46fdb9145f1953315573e3f8dc Reviewed-by: Anders Bakken<anders.bakken@nokia.com>
* | Revert change 34f1758 on non-Synbian platformsPaul Olav Tvete2010-02-051-0/+2
| | | | | | | | | | | | | | | | | | The change introduces behavior changes (including crashing on QWS). It is only critical for Symbian. To reduce risk, we only apply it on the Symbian platform for now. Task-number: Autotest regression Reviewed-by: Jesper
* | Merge remote branch 'origin/4.6' into 4.6Paul Olav Tvete2010-02-051-1/+14
|\ \ | | | | | | | | | | | | Conflicts: dist/changes-4.6.2
| * | Improve raster graphics system performance on Mac (second try).Morten Johan Sørvig2010-02-041-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the qmlviewer "sluggish animations and lost mouse events" issue by making sure we don't block and wait for for the screen refresh when flushing the backing store to the screen. NB: This commit fixes build issues found in f5f62c0bed. Review: msorvig Details: - Don't force repaints, flush the backingstore in response to a Cocoa paint/display events only. - Flush once per window. - Get the CGContext from the window (don't create a new one) - Don't call CGContextiFlush on the context.
* | | Fix tst_QAccessiblity failure.Bjørn Erik Nilsen2010-02-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This started to fail after 34f1758428282a327c12b0d8040061c1f67ecc7f. Or actually, the test crashes on my machine. Reason is that the the test first creates a top-level line edit (which then gets its own backing store). The line edit is then reparented into another top-level. When the line edit is destroyed extra->topextra->backingStore is true and we delete the backing store it first got when created as a top-level. However, the line edit was reparented so this backing store is not the "active" one. We should still delete topextra->backingstore, but we must also remove any pointer references to the line edit in the "active" backing store. Reviewed-by: jbarron
* | | Crash when closing any top-level widget on Symbian.Bjørn Erik Nilsen2010-02-041-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window surface must be deleted while the window is valid because on some graphics systems a notifcation is sent to the window when the surface is released. This fix is also an optmization as we no longer process any backing store requests while deleting the top-level. Previously it would handle requests from the window itself and all its children. Task-number: QT-2513 Reviewed-by: jbarron
* | | Assert failure when setting a widget focus proxy as its successor in tab orderGabriel de Dietrich2010-02-011-0/+2
|/ / | | | | | | | | | | | | Now we check that and skip it from the tab list. Auto-test included. Reviewed-by: leo Task-number: QTBUG-7532
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-251-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Doc: Fixed broken link. Doc: Added a warning about the Accelerated Graphics Driver example. Doc: Fixed installation information for Qt for Embedded Linux. fix copy-paste error minor optimization Autotest: add a test for allowing hostnames ending in dot Fix QUrl::toAce for domains with dot at end Fix NSCFNumber autorelease warning on Mac. Add a reference to adjustSize() from the size property Fix the parallel build of QtWebKit
| * | Add a reference to adjustSize() from the size propertyAndy Shaw2010-01-221-1/+1
| | | | | | | | | | | | | | | Task-number: QTBUG-7401 Reviewed-by: TrustMe
* | | Move avkon component transparency check to app initialization.Jani Hautakangas2010-01-221-1/+1
| | | | | | | | | | | | Reviewed-by: Sami Merila
* | | Fix for symbian dialog background transparency.Jani Hautakangas2010-01-221-0/+8
|/ / | | | | | | | | | | | | If Avkon components support transparency then dialog background is transparent enabling rounded corners. Reviewed-by: Sami Merila
* | Fixes a crash when setting focus on a widget with a focus proxy.Denis Dzyubenko2010-01-061-6/+13
| | | | | | | | | | | | | | When the focus proxy widget doesn't have InputMethodEnabled attribute set we shouldn't try to set an input context on it. Reviewed-by: Simon Hausmann
* | Update copyright year to 2010Jason McDonald2010-01-071-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | doc: Added note explaining grabMouse() for Cocoa and Carbon.Martin Smith2010-01-051-4/+10
| | | | | | | | Task-number: QTBUG-6810
* | Fixes crash when widget with WA_StaticContents child become toplevel.Olivier Goffart2009-12-291-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | Happens for example if a DockWidget is undocked and has a child whith the WA_StaticContents attribute. The parent does not change (so newParent is false) but still, the top level widget change. So staticWidget need to be moved to the new backingstore. Reviewed-by: Benjamin Poulain Task-number: QTBUG-6883
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2009-12-091-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Export QGLShareRegister because qgl_share_reg() is exported Fix upside down PVR compressed textures. Make sure a context is current when loading compressed textures. Fix possible off-by-one inconsistency against system look and feel when Fixes broken graphics effect auto tests. Doc: Explicitly mention that QWidget/QGraphicsItem takes ownership of effects. Remove id property from QGraphicsObject Minor fixes to softkey dimming support (commit 245c9cc0). FEP returns the wrong foreground color in GetFormatOfFepInlineText
| * | Doc: Explicitly mention that QWidget/QGraphicsItem takes ownership of effects.Bjørn Erik Nilsen2009-12-081-0/+2
| | |
* | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2009-12-081-10/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix GL_BGRA formats under OpenGL/ES systems Compilation fix Assert in designer while drag & dropping items from a QListWidget Fixed memory leaks when removing a QGraphicsEffect from a QGraphicsItem or QWidget Fix the toolbars docking Added dimming support for disabled softkeys in Symbian. Remove compilation warning from S60pixelMetrics on ARM Button and LineEdit/TextEdit theme colors are incorrect QS60Style: Overwrites correct stylehint color values MMP_RULES overriding qmake variables now warns user Switched S60 QDesktopServices implementation to CDocumentHandler based. Fixed "...QString::QString(const char *)... is deprecated" warning. Unnecessary symbian version checks in sqldrivers.pro QS60Style: Always store changed theme palette
| * | Fixed memory leaks when removing a QGraphicsEffect from a QGraphicsItem or ↵Yoann Lopes2009-12-071-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget with setGraphicsEffect(0). The effect was not deleted in that case, problem solved for both QGraphicsItem and QWidget. Autotest included. Task-number: QTBUG-5917 Reviewed-by: bnilsen
* | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-staging1Denis Dzyubenko2009-12-031-2/+8
|\ \ \ | |/ / | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoapanel_mac.mm src/gui/kernel/qcocoawindow_mac.mm
| * | Clarify the docs a bit when setting focus.axis2009-12-011-2/+8
| | | | | | | | | | | | RevBy: Trust me
* | | Do not emulate mouse event out of touch pad eventsDenis Dzyubenko2009-12-021-1/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | If the touch event comes from a touchpad it doesn't seem necessary to send fake mouse events. At least on the platform that actually supports touchpad events (i.e. Mac) native apps don't do that and the current implementation breaks popup handling - since touch events are only sent by default if two or more fingers touch the touchpad, we send fake MouseButtonPress when second finger is pressed and MouseButtonRelease when the second finger is released - i.e. at the same time when the system send scrollWheel events. This causes the active popup to close when using two-finger scroll gesture. Reviewed-by: Brad
* | Fixes for tab/space usage in qwidget.cpp.Janne Anttila2009-11-251-15/+15
| | | | | | | | Reviewed-by: TrustMe
* | avoid possible crash when showing a modal dialog from a widget destructorThierry Bastian2009-11-201-2/+3
| | | | | | | | | | Task-number: QTBUG-5804 Reviewed-by: denis
* | Merge remote branch 'staging/4.6' into 4.6Simon Hausmann2009-11-181-2/+4
|\ \ | | | | | | | | | | | | Conflicts: configure.exe
| * | doc: Clarified function of setLayoutDirection()Martin Smith2009-11-171-2/+4
| | | | | | | | | | | | Task-number: QTBUG-5432
* | | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-171-9/+12
|\ \ \ | |/ /
| * | Fix input method support on widgets that have a focus proxy set.Simon Hausmann2009-11-131-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | When enabling/disabling a widget or changing its InputMethodEnabled attribute, use the focus proxy widget's input context for reset and for setting the focus widget on the input context. Task-number: QTBUG-5781 Reviewed-by: Denis
* | | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-131-0/+11
|\ \ \ | |/ /
| * | Code in gui/* should be completely namespacedhjk2009-11-111-4/+5
| | | | | | | | | | | | And not rely on random QT_USE_NAMESPACE being pulled in from *.moc files.
| * | Improvements to graphics effects API after review round.Samuel Rødal2009-11-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Get rid of QGraphicsEffectSource from the public API, instead add convenience functions in QGraphicsEffect. This way we commit to less API, and are free to introduce a customizable QGraphicsEffectSource in a future release. * Move PixmapPadMode into QGraphicsEffect and tweak the names of the enum values. * Make QGraphicsBlurEffect::BlurHint into a bit flag, for extensibility. Reviewed-by: Bjørn Erik Nilsen
| * | Doc: Added an example to demonstrate the QWebElement class.David Boddie2009-11-091-0/+11
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | doc change: remove duplicate entry in "see also" and stray focusWidget.Christian Kamm2009-11-111-2/+1
| | | | | | | | | | | | Reviewed-by: owolff
* | | Merge branch 'tools-team/4.6' (early part) into 4.6Oswald Buddenhagen2009-11-101-4/+5
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qscopedpointer.h
| * | | Code in gui/* should be completely namespacedhjk2009-11-091-4/+5
| | | | | | | | | | | | | | | | And not rely on random QT_USE_NAMESPACE being pulled in from *.moc files.
* | | | Improvements to graphics effects API after review round.Samuel Rødal2009-11-101-5/+5
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Get rid of QGraphicsEffectSource from the public API, instead add convenience functions in QGraphicsEffect. This way we commit to less API, and are free to introduce a customizable QGraphicsEffectSource in a future release. * Move PixmapPadMode into QGraphicsEffect and tweak the names of the enum values. * Make QGraphicsBlurEffect::BlurHint into a bit flag, for extensibility. Reviewed-by: Bjørn Erik Nilsen
* | | Doc: typo fixedJoerg Bornemann2009-11-091-1/+1
|/ / | | | | | | Reviewed-by: TrustMe