summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* QS60Style: Itemviews are drawn incorrectlySami Merila2010-09-071-1/+5
| | | | | | | | | | | | | | | | | | When running QS60Style on hardware, all the itemview items without any special background (i.e. not "pressed", not "highlighted", not "alternate") are drawn with "pressed button" graphics. This is due that the internal drawing function gets called without any enum value set and it seem to pick the second enumeration constant from theme element list. The enumeration constant is not defined to match to any integer value. As a solution, style will not call the drawing function when theme element is not defined. Task-number: QTBUG-11601 Reviewed-by: Liang Qi (cherry picked from commit 1ec0155c191e2818f56815ee4ddbf5d8982f1267)
* Change to commercial license headers in preparation for release.Jason McDonald2010-09-071135-14755/+14755
| | | | Reviewed-by: Trust Me
* Add three new style-hints to QFont to match CSS' generic font familiesTor Arne Vestbø2010-09-066-1/+34
| | | | | | | | | The defaults were chosen to match major web browsers. See: http://xhva.net/log/?p=160 Reviewed-by: Simon Hausmann (cherry picked from commit 6d5655089fa4e2231a1a8edc98ecbb6b29e344e1)
* Fix QStaticText copy constructor to also copy text option propertyEskil Abrahamsen Blomfeldt2010-09-061-3/+3
| | | | | | | | | | The text option property of QStaticText was not copied in the copy constructor, so when the text was detached, the property would be reset to the default. Task-number: QTBUG-13368 Reviewed-by: Gunnar (cherry picked from commit 200d1743dcdacf1036384f746046e55d91ccd918)
* Added missing code to bring web browser foreground in Symbian.Janne Anttila2010-09-061-0/+1
| | | | | | Task-number: QTBUG-8336 Reviewed-by: Miikka Heikkinen (cherry picked from commit d5373433d2a6d632e06d3873003069d49e17e2cd)
* Modified file/directory names and text to remove disallowed terminology.Kevin Wright2010-09-032-7/+7
| | | | (cherry picked from commit a02eba0de0fcf9a17d489ee1f92977c95d3afd76)
* Fixed input context trying to squeeze content into a full widget.axis2010-09-031-0/+7
| | | | | | | | | | | | Problem was reproduced on N97. If the FEP detects that the widget is full while still editing text, it will try to send those events as key events instead. Since this screws up the content in the widget, we stop those events from reaching the widget in the input context. AutoTest: Passed Task: QTBUG-12949 RevBy: Miikka Heikkinen (cherry picked from commit 5ca6264933af60b3cd376b7f08bea008fa69b515)
* Cleaned up position tracking in the Symbian input methods.axis2010-09-033-15/+18
| | | | | | | | | | | | | | | | | | | | | | This fixed a case where using password mode would lead to Qt believing that the cursor was one step to the left of where it really was. This would have the effect of replacing the last character instead of appending to it, and even crashing if the cursor was all the way to the left. The code is also much cleaner this way, but it meant that QTBUG-9867 had to be solved differently this time. We do this by assuming that and empty FEP update means "erase last character", which seems to work well in practice. Also added a long overdue autotest for the FEP input methods. Most tests pass, but some don't, which I will try to fix later. Task: QTBUG-9867 Task: QTBUG-12949 RevBy: Miikka Heikkinen AutoTest: Included (cherry picked from commit 52cf47565e402dc682038ccaf8d725401802b603)
* Revert "Long-press shortcuts for symbols on QWERTY keyboard don't work"axis2010-09-033-16/+2
| | | | | | | | | | This reverts commit 05eacd9ad40f8adb5aaa12a8b90113a73b43f642. Conflicts: src/gui/inputmethod/qcoefepinputcontext_p.h src/gui/inputmethod/qcoefepinputcontext_s60.cpp (cherry picked from commit c5901037f0d3ccd45b0c79b38ef5b04552dad0aa)
* Fix a crash when passing a null pixmap to QPainter::drawPixmapFragments().Trond Kjernåsen2010-09-031-1/+1
| | | | | | Task-number: QTBUG-13331 Reviewed-by: Samuel (cherry picked from commit dcb98430f6add24c9d54253bd35d35010cc75c23)
* Fix compiling issue for FreeType version earlier than 2.1.10Jiang Jiang2010-09-031-2/+9
| | | | | | | | | | | | FT_GlyphSlot_Embolden was introduced since FreeType 2.1.10 and we started using it since 4.7. Some systems (including RHEL/CentOS 4) only provide earlier versions will get a compiling error if they use -system-freetype to build Qt. This patch fix it by providing a graceful degradation when the function is not available. Task-number: QTBUG-13274 Reviewed-by: Eskil (cherry picked from commit 25622198904580c6eb93996f74c2e7b62afa77c7)
* Update QDesktopWidget geometry when S60 furniture visibility changesGareth Stockwell2010-09-032-2/+10
| | | | | | Task-number: QTBUG-13204 Reviewed-by: axis (cherry picked from commit 55b067d14d8c12bd29b03c17e0281a11a49f95ca)
* Ensure geometry of top-level widget accounts for S60 screen furnitureGareth Stockwell2010-09-031-13/+13
| | | | | | | | | | | | | | | If the S60 screen furniture has already been constructed before QWidgetPrivate::show_sys() is called on a top-level widget which has Qt::WindowMaximized set (e.g. due to a showMaximized() call), its geometry is set to the full screen extent, including the regions covered by the status bar and CBA. This patch ensures that calculation of the widget geometry always takes into account the screen furniture. Task-number: QTBUG-12605 Reviewed-by: Jason Barron (cherry picked from commit a957ed92a61d9311ed163dba15f2b6f8d30bf03c)
* Clear Qt::WA_OutsideWSRange when making window fullscreenGareth Stockwell2010-09-031-0/+2
| | | | | | Task-number: QTBUG-10269 Reviewed-by: Jason Barron (cherry picked from commit 859cca02a89ecadbb5578bb113e535374bcfcaca)
* Prevent null pointer dereferenceGareth Stockwell2010-09-031-1/+1
| | | | | | Task-number: QTBUG-13204 Reviewed-by: axis (cherry picked from commit 9d88ff485e93e9701719263ce0a46cb86b0398ca)
* Refactored handling of window visibility events on SymbianGareth Stockwell2010-09-022-26/+37
| | | | | | Task-number: QTBUG-12817 Reviewed-by: Jason Barron (cherry picked from commit ea85300f6456ef1bd9702296f3068edf0795736e)
* Replaced backing store reference count with list of visible widgetsGareth Stockwell2010-09-023-31/+58
| | | | | | | | | | | | | | | | | | | | | | | Previously, the following sequence: 1. Widget is hidden 2. Widget partially revealed 3. Widget fully revealed resulted in the reference count of the backing store owned by the widget's window() being incremented twice. This patch replaces the simple reference count with a QSet which stores pointers to the native widgets which are descendents of the backing store owner, and which are currently visible. The sequence above therefore results in just a single insertion at step (2), with step (3) having no effect on the backing store. The QRefCountedWidgetBackingStore class has been renamed QWidgetBackingStoreTracker to better reflect its purpose. Task-number: QTBUG-12800 Task-number: QTBUG-12817 Reviewed-by: Jason Barron (cherry picked from commit cb8d2dcc70846ccd9384a8b94b2a80821c0eb285)
* Fix for memory leak in qt_initShane Kearns2010-09-021-0/+2
| | | | | Reviewed-by: Miikka Heikkinen (cherry picked from commit 5d32b723332acab5fdf880aa0d555ab8e05d79dd)
* Correcting spelling mistakes in documentation. Part of fix for QTBUG-11938.Jason McDonald2010-09-0211-14/+14
| | | | | | | | | | Reviewer: David Boddie Task number: QTBUG-11938 (cherry picked from commit eea84818e98af917d3cf2bf04ea17a416ef9d55e) Conflicts: src/script/api/qscriptcontext.cpp
* Pending surface might not get destroyed if no flush() happensJani Hautakangas2010-09-023-16/+9
| | | | | | | | | in between graphics system change. This patch ensures that all old surfaces are destroyed before new graphics system is activated. Reviewed-by: Jason Barron (cherry picked from commit d3ab1fccea2b1e011e7518269a29045a53f0a30b)
* Use ARGB32 premultiplied backing store format in Symbian^3Jani Hautakangas2010-09-022-5/+10
| | | | | | | | raster paint engine for translucent windows. Task-number: QTBUG-12710 Reviewed-by: Jason Barron (cherry picked from commit 0210bbbd7bf8254be5f7f19f524068cd39fc34c2)
* Register window types for Symbian system effectsJani Hautakangas2010-09-023-1/+61
| | | | | | | | | | | Set the purpose of the window (dialog/popup/child window etc...). Notify WServ when modal window is shown/hidden Notify WServ when temporary surface deallocation happens. Notify WServ when the application is going to shutdown. Task-number: QT-2027 Reviewed-by: Jason Barron (cherry picked from commit 339270016bd8805b081f0b4ff550906a6bcfec5b)
* Remove the memory tracking attempt from the runtime graphics system.Jason Barron2010-09-024-98/+4
| | | | | | | | | | It has been decided that this logic will not be used by anyone at the moment so let's remove it. This removes an exported (although private) virtual function so breaks binary compatiblity for plugins built with previous versions. Reviewed-by: Jani Hautakangas (cherry picked from commit bd1aeaa50c60cffa3e195f3f6aed808f23a5c73c)
* Removed static on a member that didn't have to be.axis2010-09-022-5/+8
| | | | | | | One step further towards no static data... RevBy: Trust me (cherry picked from commit ddbffbe7271cfdd3935c188ccb8e804ad73627f6)
* Ensure that window rectangle is updated when CBA visibility changesGareth Stockwell2010-09-023-21/+33
| | | | | | | | | | | | | | | | | | | | | | | In S60, there are two pieces of screen furniture, changes in whose visibility or size can affect the size of the Qt application window. These are the status pane, at the top of the screen, and the CBA at the bottom. QSymbianControl listens for changes in status pane visibility and size by implementing MEikStatusPaneObserver. Notifications received via this interface trigger a call to QSymbianControl::handleClientAreaChange() which resizes the control. There is no corresponding interface through which to receive notifications of changes in CBA visibility. This patch introduces a utility function for setting the visibility of both the status pane and CBA, which ensures that the control's rectangle is updated when either one changes. Task-number: QTBUG-5320 Reviewed-by: Jason Barron (cherry picked from commit 92d6d1c974206bac7520101ad26ca93eb0b4d977)
* Fix crash caused by not clearing the QPixmapCache on application exit.Oleh Vasyura2010-09-021-0/+2
| | | | | | | | | | | | | | | The qt_cleanup() function will call CCoeEnv::DestroyEnvironment() on application shutdown. This destruction will in turn tear down the various server sessions associated with the application. One of these sessions is the FBSERV session and if the QPixmapCache attempts to delete a CFbsBitmap after the session has been destroyed, the app will crash. The solution is call QPixmapCache::cleanup() before we destroy the environment. This is inline with what the other platforms do. Reviewed-by: Jason Barron (cherry picked from commit 55625badfab6bfe49c60ab5cd9a586c6bd511579)
* Ensure native window is considered invisible when it gets destroyedGareth Stockwell2010-09-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The lifetime of the backing store depends, on Symbian, on the visibility of the native windows which are rendering from it. Specifically, once all such windows (i.e. the TLW window and those of any native widget descendents) have become invisible, the backing store is deleted. During re-parenting of a visible native child widget from parent1 to parent2, the following events occur: 1. QWidget::hide() is called on the child 2. The child widget's native control is deleted 3. A new native control is created, with its parent set as parent2->window()->effectiveWinId() Because there is no yield to the event loop between (1) and (2), the application does not receive a 'window hidden' notification as a result of the call to hide(). This means that the child widget is not removed from the list of visible widgets held in the backing store of parent1->window(). This patch ensures that the child is removed from this list during between steps (1) and (2). Task-number: QTBUG-12406 Task-number: QTBUG-12817 Reviewed-by: Jason Barron (cherry picked from commit bc1c472967c78579178cf7e98ab999842fee3102)
* Fix QStaticText with OpenGL1 engineEskil Abrahamsen Blomfeldt2010-09-021-1/+2
| | | | | | | | | | Like OpenGL2 and OpenVG, the OpenGL1 paint engine also transforms text coordinates itself and does not require QStaticText to use device coordinates. Task-number: QTBUG-13228 Reviewed-by: Samuel (cherry picked from commit d0f1f569e27f7f34f3bfc03bd759f28f7b567997)
* Apparently QPen::brush() can't return a NoBrush for a NoPen.Trond Kjernåsen2010-09-021-4/+4
| | | | | | | | | There are explicit tests in qdatastream for this. IMO it's wrong, wrong, wrong, but it's currently abused in the SVG module so we can't change it. Reviewed-by: Gunnar (cherry picked from commit bdcfcc607c1a6744cf1b35eca0914fa96e70071c)
* Fix mispositioned text with QStaticText and OpenVG graphics systemEskil Abrahamsen Blomfeldt2010-09-021-2/+5
| | | | | | | | | | | | The OpenVG paint engine, like the OpenGL2 paint engine, supports caching the untransformed glyphs and transforming them as they are drawn. Since we would pretransform the positions of the glyphs, the transformation would be applied twice, thus making the glyphs appear in the wrong location when the painter had a transform set. Task-number: QTBUG-13049 Reviewed-by: Gunnar (cherry picked from commit f3771c5d91995b2beaa73bd3e3c783b76a887b50)
* Add text decoration support to QStaticTextJiang Jiang2010-09-021-13/+71
| | | | | | | | | | | | | The original code path of QStaticText does not include decoration drawing, this patch generalized the drawTextItemDecoration() function to draw decoration for drawText(), then use that to draw decoration for QStaticText. A helper function called drawDecorationForGlyphs() is made to allow easier extension for direct glyphs drawing support. Task-number: QTBUG-12121 Reviewed-by: Eskil (cherry picked from commit a1641e27d2e2f5e29362e3737be6b9d75714d138)
* Fix crash when all the items in a QListView are hiddenJason McDonald2010-09-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Calling QIconModeViewBase::initDynamicLayout() on the second and successive segments would return QPoint(-1,-1), resulting in a totally empty area rectangle for all the items while in QIconModeViewBase::doDynamicLayout(). This rectangle is used to initialize the BSP tree, and produces an arithmetic exception when empty. Furthermore, a rendering bug was also apparent when displaying the first item of a segment while the last item of the previous segment was hidden. Auto-tests included. Reviewed-by: Olivier Task-number: QTBUG-12308 (cherry picked from commit 3c7e7992461b1fef37ada68244f1b5b891015bda) Conflicts: src/gui/itemviews/qlistview.cpp tests/auto/qlistview/tst_qlistview.cpp
* Workaround for QTBUG-8013: Do not return an ascent of 0Alessandro Portale2010-09-011-1/+4
| | | | | | | | | | | | | | | | Symbian's CFont::FontMaxAscent() returns in some cases an incorrect value of 0. That usually happens (for some font sizes) if a stroke based font is the main system font. We were able to reproduce it on some S60 3.2 devices with a chinese language pack installed. This patch will test if CFont::FontMaxAscent() returns 0. And if so, it alculates an ascent taht makes more sense. Task-number: QTBUG-8013 Reviewed-by: Liang Qi (cherry picked from commit f4f10d2a2d60790939492694abf6b9578a5f048a)
* Increase drag distance on Symbian to improve finger usability on capacitive ↵Joona Petrell2010-09-011-1/+1
| | | | | | | | screens Task-number: QTBUG-12594 Reviewed-by: Martin Jones (cherry picked from commit 89e723153b15af5d3acbeb859d4f35bf52f8e250)
* Crash in QX11PaintEngine::drawPixmapCarlos Manuel Duclos Vergara2010-09-011-0/+2
| | | | | | | | | | | We receive a pixmap as a const reference and then we convert it to an X11 pixmap. This conversion could fail for many reasons, however we were not looking at the result of this conversion. This patch was contributed by Christoph Feck from KDE. Task-number: QTBUG-12826 Reviewed-by: Samuel (cherry picked from commit 8e7fb343372acd0bc5fe04db7a5c5542541d4538)
* Cocoa: Demo browser can get stuck after closing modal dialogRichard Moe Gustavsen2010-09-011-0/+6
| | | | | | | | | | | | | | | This turns out to be a glitch in the event dispatcher for Qt/Cocoa. The problem is that you can, in some really slim cases it must be, end up calling processEvents with the exec flag set, while the current modal dialog has been told to leave modal. In that case, we recurse into a new event dispatching loop for a session that is about to die. And that causes problems when the session actually dies. This patch makes sure that you cannon start spinning a session that is about to die, by setting the sessionCache to zero. Task-number: QTBUG-13164 Reviewed-by: Tor Arne (cherry picked from commit a373648fa876a9684394aa9b7ecafd51e53f4742)
* Doc: Fixed qdoc warnings.v4.7.0-rc1Jesper Thomschutz2010-08-244-17/+56
| | | | | | | | | | | | | | Reviewed-by: Trust Me (cherry picked from commit cb086eb5340c4c41efaf45373aa05c37e8aa974a) Conflicts: doc/src/index.qdoc src/dbus/qdbusconnection.cpp src/declarative/util/qdeclarativeanimation.cpp src/gui/s60framework/qs60mainapplication.cpp src/gui/s60framework/qs60mainappui.cpp src/network/access/qnetworkrequest.cpp
* Cocoa: revert parts of cc6dc0aeefde881a95f5fea2b26f2f3d7bdc6e15Richard Moe Gustavsen2010-08-191-4/+0
| | | | | | | | The reason is that we tried to fix the stacking order of child windows while we fixed a crash. But the patch turned out to break an auto-test Reviewed-by: prasanth (cherry picked from commit 749ad26d255327c9fa3fe857a30983cc6dfef0d9)
* Revert "Fix the rendering of lines with the X11 paint engine"Samuel Rødal2010-08-191-10/+12
| | | | | | | | | | | | | | | | | This reverts commit ebbab30af417dfbf3df47dec15c0e2f8d6a30fa6, which broke fill / outline consistency, and when trying to fix that by rounding the fill the same way that broke rendering in Creator. Unfortunately the X11 paint engine is too sensitive to changes, there have already been tons of patches to make it as consistent as possible. It's simply not possible to get the same rounding for both fill and outlines and at the same time have consistency between fill and outline (no holes or fill outside the outline), while using the integer based Xlib rendering API. Hopefully in 4.8 we'll switch to raster and the X11 paint engine will be a legacy. Reviewed-by: Trond (cherry picked from commit 041a68007413a20a9a9c97d0f2f04f9e03428f67)
* Revert "Outline / fill inconsistency in X11 paint engine."Samuel Rødal2010-08-191-4/+4
| | | | | | | This reverts commit ff405f5623d7ed18c881c097368e3e9afd2e9443. Reviewed-by: Trond (cherry picked from commit 3014b427aa8700890f9bd8ea2a0300fc152bf3d2)
* Outline / fill inconsistency in X11 paint engine.Samuel Rødal2010-08-191-4/+4
| | | | | | | | | | | Change ebbab30af417dfbf3df47dec15c0e2f8d6a30fa6 broke outline / fill consistency in the X11 engine. Since the positioning of lines is more important we'll round the fill coordinates the same way. The bug was visible in the filltest.qps arthur test. Reviewed-by: Gunnar Sletta (cherry picked from commit ff405f5623d7ed18c881c097368e3e9afd2e9443)
* Cocoa: parent windows shows on screen when they should be hiddenRichard Moe Gustavsen2010-08-191-6/+16
| | | | | | | | | | | | | | | The reason is the cocoa method that adds a window as a child of another, it ends up showing both the parent and the child window regardless. And this could in some cases also cause a crash. So we therefore need to be careful when calling that function, and be sure that the parent is actually visible. In addition, addChildWindow reset the stacking level of the child window, and made e.g. normal child windows pop in front of tool child windows. This could easily be seen in e.g. Designer. Task-number: QTBUG-12866 Reviewed-by: prasanth (cherry picked from commit cc6dc0aeefde881a95f5fea2b26f2f3d7bdc6e15)
* Drawer widget in a MainWindow disappears after returning from full screen mode.Carlos Manuel Duclos Vergara2010-08-181-1/+3
| | | | | | | | | | The problem was in the toggleDrawer function. We were not checking the status of the last transition before setting the new transition, so all the transition were treated as non-intentional. Task-number: QTBUG-11373 Reviewed-by: Prasanth (cherry picked from commit 725d8e061ededee9a5ddf0914aabd0f6aa2ee741)
* Cocoa: Stacking order of modal dialogs is wrongRichard Moe Gustavsen2010-08-161-6/+6
| | | | | | | | | | | | | Modal dialogs were sometimes hidden behind other normal windows on screen. The reason was that, upon going modal for a window, we actually resat the stacking level on the window in a faulty attempt to respect any stays-on-top window flags. This patch makes sure we avoid doing that, and at the same time, ensures we don't reintroduce the original bug as well. Task-number: QTBUG-12841 Reviewed-by: cduclos (cherry picked from commit 6d0d767e63df3c997d6d7a8cb6cd4bf8c0dfc835)
* Multiple "Edit/Special Characters" menu entries on Mac OS X (Cocoa)Prasanth Ullattil2010-08-164-0/+19
| | | | | | | | | | | | Every time [NSApp setMainMenu:] is called, Cocoa will add the 'Special Characters' item to the 'Edit' menu. Before adding a new entry it will make sure that menu items list doesn't contain an item with the selector 'orderFrontCharacterPalette' & a 'nil' target. We need to return the index for the first entry (we have QCocoaMenuLoader as target). Task-number: QTBUG-12842 Reviewed-by: Denis (cherry picked from commit b52da4ab2179079a6aff95891786d2f6598048b5)
* Properly emit geometryChanged() when the position change.Alexis Menard2010-08-131-1/+2
| | | | | | | | Also emit the signal at the very end, so people can rely on the resize event to adjust some stuff in their item. Reviewed-by:yoann (cherry picked from commit 3ee89bc0830f69d44f272eff5a0c886bff33c92e)
* Disable minRightBearing optimization in QTextLayout on MacEskil Abrahamsen Blomfeldt2010-08-121-0/+2
| | | | | | | | | | | | Neither of the Mac font engines have implemented minimum right bearing, which will cause them to return 0 for the minimum value. This will cause the right bearing to never be calculated prior to breaking and thus never be a part of the breaking width. Since actually implementing the functions is too time consuming for right now, we will disable the optimization for the time being. Reviewed-by: Olivier (cherry picked from commit bb696453f6f87cad58982af3455335478fedb8cc)
* Fix scrollbar randomly popping up in QPlainTextEditEskil Abrahamsen Blomfeldt2010-08-121-4/+17
| | | | | | | | | | | | | | When a line break was detected, we would retain the value of the right bearing for the character after the break instead of resetting it to the right bearing of the previous value. This could in some cases cause the bounding rect of the text to be wrong, and could cause unnecessary horizontal scrollbars to pop up. It was especially visible when using WrapAnywhere. Visible e.g. in the compile output in Creator. Done-by: mae Reviewed-by: Eskil Reviewed-by: Lars (cherry picked from commit c5fa9eb1cb02d979502e2c9918d752c6708fb406)
* Fix QTextEngine overflow caused by extremely long textJiang Jiang2010-08-123-33/+87
| | | | | | | | | | | | | Internally, QTextEngine use int to calculate most of the layout data required. If a string longer than 2^24 is passed into either QTextEngine or classes using it (QStackTextEngine, QPainter, QFontMetrics, etc.), overflow will happen because the memory size required to allocate for layout will become too large for int to handle. This patch will prevent these cases and add error handling mechanism for relevant code. Task-number: QT-3658 Reviewed-by: Eskil Abrahamsen Blomfeldt (cherry picked from commit 05bb249c2ad3ee15eb205a806f8546c105683096)
* Fix RightBearing confusion in text layoutmae2010-08-121-1/+1
| | | | | | | | Negative RightBearing was wrongly taken into account when calculating the line wrap Reviewed-by: Eskil Abrahamsen Blomfeldt (cherry picked from commit 975b1913e44128a3e9b9055f9bf2ff40d86adf2a)