summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fix incorrect fallback for icon themesJens Bache-Wiig2009-09-091-18/+19
| | | | | | | | | When using themed icons, we incorrectly used the systemTheme as the fallback. This is not correct as the idea of the fallback was to use the generic "gnome" or "oxygen" themes if the proper theme was not available. Reviewed-by: joao
* CompileAnders Bakken2009-09-091-1/+1
| | | | | | | | Partially revert 6715f2f29ae413b328243d8c3dbe15cfba51d33f struct QWSServerCleaner { ~QWSServerCleaner(); } is not a function. Reviewed-by: Noam Rosenthal <noam.rosenthal@nokia.com>
* Fix crash (assert) in QTextDocumentmae2009-09-091-0/+2
| | | | | | | | | | | When loading binary files as text, QTextCursor did not check for beginning and end of frame (QChar(0xfdd0) and QChar(0xfdd1)), while QTextDocument asserted that those characters were absent. The patch makes QTextCursor::insertText() treat frame bounderies like paragraph separators. Reviewed-by: ck
* Account for right bearing in QFontMetrics::boundingRect(string)Eskil Abrahamsen Blomfeldt2009-09-091-2/+7
| | | | | | | | | | | | | QFontMetrics::boundingRect() that takes a string needs to account for the right bearing of the last glyph, as it is documented to be the rectangle that contains the pixels of the text. I've added a test for this, and fixed tst_QFontMetrics::elidedText() to use boundingRect() to find the actual width of the text drawn (width() will return the advance of the text, which is larger than the actual width of the pixels.) I've also fixed a small typo in the "len" -> "ilen". Reviewed-by: Simon Hausmann
* Fix crash/bug in QGraphicsItem's subFocus handling.Andreas Aardal Hanssen2009-09-092-8/+14
| | | | | | | | Removes dangling subFocusItem pointers when changing focus after reparenting. This change also includes a mini-optimization when adding focusable items to an inactive scene. Reviewed-by: brad
* Only active QGraphicsScenes can have active input focus.Andreas Aardal Hanssen2009-09-092-9/+21
| | | | | | | | | | | | | | | | | This change ensures that only active scenes can have active input focus items. If you try to set input focus on items that are in an inactive scene, these items will gain input focus only when the scene is activated. For scenes attached to a view, this change should only fix the bug that you could have a blinking line edit in a scene when the view is inactive, meaning you couldn't type into the line edit. For scenes that have no view, you now must activate the scene in order to give the items active input focus. This will affect those who use QGraphicsScene with custom key and focus handling. Reviewed-by: brad
* Remove ItemAutoDetectsFocusProxy from QGraphicsItem.Andreas Aardal Hanssen2009-09-093-47/+4
| | | | | | | | | | | | This change partially reverts f68fed388dcdba6ab6dad3af4933bcd3aa123cf8, which was an attempt at getting FocusRealms working. Turns out this approach is wrong. The flag behaves badly when reparenting, and the feature conflicts with plain old setting focus. Discussed with Aaron; this change was already reverted in the kinetic-declarativeui branch. Reviewed-by: TrustMe
* Make QtOpenGL link against EGL for OpenGL ESTom Cooksey2009-09-091-1/+1
| | | | | | | | | | Previously, QtOpenGL assumed that by linking against QtGui, it would automatically also be linked against EGL. However, this is no longer the case after 83940f25dba51a9942ab55ed8475fc7fc8a8da84 which makes sure only QtGui links against EGL and not other libs/apps linking against QtGui. Reviewed-by: Rhys Weatherley
* Removed some superfluous semicolonsAlessandro Portale2009-09-0910-13/+13
| | | | Reviewed-by: TrustMe
* QMenubar could popup a menu when undocking a toolbarThierry Bastian2009-09-091-5/+6
| | | | | | | | | This is due to the fact that it receives a mousemoveevent. But as it doesn't receive a mousepress event, we can detect whether it should popup or not. Task-number: 260873 Reviewed-by: prasanth
* Fix a possible crash when deleting the QMainWindow layoutThierry Bastian2009-09-091-1/+2
| | | | | | | | It can happen that an item is still a gap and could then be deleted twice. We now check that to avoid double deletion. Note: it doesn't fix the bug but avoids the crash. Task-number: 260873
* Fixed all but one of the failures in the headers autotest.Martin Smith2009-09-091-1/+1
| | | | The resource compiler still generates files that don't have the LPGL header.
* Getting text widget OOM tests working in Symbianmread2009-09-091-1/+1
| | | | | | | | | | | | | | There is one actual bug fix, checking for null pointer return. The exception safety test code now initialises the fonts system. The S60 fonts system does not survive OOM testing without this. Otherwise some duplicate tests are removed and code tidied up. Reviewed-by: Liang Qi Reviewed-by: Harald Fernengel Reviewed-by: Alessandro Portale
* Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6Janne Anttila2009-09-091097-4461/+4535
|\
| * Fix crash on QGraphicsItem destruction related to focus handling (redone)Kai Koehne2009-09-091-1/+3
| | | | | | | | | | | | | | | | | | Reset the dangling subFocusItem pointer in ~QGraphicsItem, after all the child items have been deleted. This replaces commit d724c91a0ae. Reviewed-by: Thomas Hartmann
| * Update license headers again.Jason McDonald2009-09-091097-4394/+4394
| | | | | | | | Reviewed-by: Trust Me
| * Merge commit '4feb4019cfc144cef4cd9177d52e52dee9ebdf32' into 4.6Rohan McGovern2009-09-091-7/+7
| |\ | | | | | | | | | | | | | | | Conflicts: tests/auto/network-settings.h tests/auto/qpainter/tst_qpainter.cpp
| | * Fixed bug in drawImage() when fall-back code path is used.Samuel Rødal2009-09-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | We need to floor instead of round to prevent rectangles that are on the edge from being shifted one pixel down / right. Task-number: 258776 Reviewed-by: Kim
| * | Make QGLWindowSurface use new QGLPaintDevice APITom Cooksey2009-09-081-0/+1
| | |
| * | Fix crash when instantiating multiple QApplications on QWSPaul Olav Tvete2009-09-081-0/+7
| | | | | | | | | | | | | | | | | | Copy variable initialization/cleanup code from X11 Reviewed-by: Tom
| * | Take right bearing of glyphs into account when doing text layoutEskil Abrahamsen Blomfeldt2009-09-081-54/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support correctly breaking text and calculating the bounding rect of text that has a right bearing (like italic text), we need to take the bearing into account when doing the layout. We add the bearing when checking whether we need to break the text, and we add it to the natural width of the text whenever we've finished a text line, so that we get the correct bounding rectangle. This patch only takes the last glyph's bearing into account. The theoretically correct approach would be to take all bearings into account and use the one which gives the longest text width. However, in practice the bearing of the glyph will not be great enough for it to span over several other glyphs. Also refactored a little to make the code simpler. Task-number: 176401 Reviewed-by: Simon Hausmann
| * | Fixed usage of QMargins in QStyleSheetStyleThorbjørn Lindeijer2009-09-081-4/+4
| | | | | | | | | | | | | | | | | | | | | The order of the parameters to the QMargins constructor changed in commit 758f4735bcae034ac25730e53bb371df3b7d6e8a. Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
| * | Fixed QLineEdit to correctly adjust the horizontal scrollingAdriano Rezende2009-09-082-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | The widget needs to use the naturalTextWidth to adjust the horizontal scrolling, otherwise it will not fit correctly the text in the visible area when resized. Merge-request: 1410 Reviewed-by: Alan Alpert
| * | Fixes a regression in QListView in 4.6 regarding the selectionThierry Bastian2009-09-081-0/+4
| | | | | | | | | | | | | | | | | | | | | In icon mode, if you click on the viewport (with extended selection), the selection should be cleared when you release the mouse button. Reviewed-by: ogoffart
| * | doc: Fixed several qdoc errors.Martin Smith2009-09-082-0/+7
| | | | | | | | | | | | That's the last of them... for now.
* | | Fixed 'use of function XXX is deprecated' warning reported by RVCT.Janne Anttila2009-09-091-2/+2
| | | | | | | | | | | | Task-number: 241223
* | | Fixes for compiler warnings reported by RVCTJanne Anttila2009-09-093-6/+2
| | | | | | | | | | | | | | | Task-number: 241223 Reviewed-by: Janne Koskinen
* | | Fixed 'use of function is deprecated' warnings reported by RVCTJanne Anttila2009-09-093-15/+15
| | | | | | | | | | | | | | | Task-number: 241223 Reviewed-by: Janne Koskinen
* | | Fixed 'illegal empty declaration' warning for Nokia X86 compiler.Janne Anttila2009-09-081-1/+1
|/ / | | | | | | | | Task-number: 241223 Reviewed-by: TrustMe
* | Merge commit 'origin/4.5' into 4.6Joerg Bornemann2009-09-081-2/+12
|\ \ | |/ | | | | | | Conflicts: src/gui/kernel/qapplication.cpp
| * Doc: keypad navigation is supported on Windows CEJoerg Bornemann2009-09-081-2/+10
| | | | | | | | Reviewed-by: thartman
* | Fixed the spelling of canceled in the QGesture api brought up by David Boddie.Denis Dzyubenko2009-09-072-6/+6
| | | | | | | | Reviewed-by: trustme
* | Use icons on QDialogButtonBox in KDEJens Bache-Wiig2009-09-074-15/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | Oxygen did not use icons in dialogs. This is obviously incorrect compared with other KDE apps. We changed common style to enable button icons by default on X11 and explicitly disabled them for Windows and Motif styles. We also updated the icons for YES and NO actions to use dialog-ok and process-stop to reflect the usaged in KDE itself. Reviewed-by: ogoffart
* | Fix crash on QGraphicsItem destruction related to focus handlingKai Koehne2009-09-071-1/+1
| | | | | | | | | | | | | | | | Do not call clearFocus() for child item in setParentItemHelper() if called from destructor: At this time, the ~QGraphicsItem destructor already deleted all its children. Reviewed-by: Andreas Aardal Hanssen
* | Fix some issues with Shift-selection in QAbstractItemViewFrank Reininghaus2009-09-071-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes some issues which occur when pressing the Shift key while selecting items (new unit tests included): 1. The offset of the visible area is missing at one point in QAbstractItemView::keyPressEvent, causing Shift-Arrow selection to fail if the view is scrolled down. 2. Shift-click and Shift-Arrow selection fail after a rubberband selection because d->pressedPosition does not correspond to a valid QModelIndex. The problems have been found in Dolphin: http://bugs.kde.org/show_bug.cgi?id=163451 Merge-request: 1426 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
* | Support setting font size in shorthand font propertiesEskil Abrahamsen Blomfeldt2009-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fontSizeAdjustment defaulted to 0 which means "medium" in internal semantics. This will override any font size you set in the short-hand. In other locations, fontSizeAdjustment defaults to -255 which has no meaning attached. To allow setting the font size in short-hand (as in "font: 20px Arial"), we can't default to a specific adjustment. Two tests are added: The first verifies the case that already worked, where you specify the font size using the "font-size" property. The other verifies the short-hand case and would previously fail. Task-number: 207189 Reviewed-by: Simon Hausmann
* | Fix tiled blit in 16-bit modePaul Olav Tvete2009-09-071-4/+7
| | | | | | | | | | | | | | | | Optimizations in change 8e447e8a did not handle the case when the target width is less than the width of a tile. Task-number: 260759 Reviewed-by: Samuel
* | Make QGraphicsShaderEffect private API for 4.6Rhys Weatherley2009-09-061-1/+0
| | | | | | | | | | | | | | The custom shader code in the OpenGL2 paint engine needs time to mature before we make this official public API. Reviewed-by: trustme
* | Merge branch '4.5' into 4.6Rohan McGovern2009-09-051-2/+2
|\ \ | |/ | | | | | | Conflicts: src/gui/itemviews/qlistview.cpp
| * Fix pixel snow on the combo box popup on Snow Leopard.Morten Sorvig2009-09-041-0/+1
| | | | | | | | | | | | | | | | | | On 10.5 and below the pixmap data bytes happened to be initialized by malloc, on 10.6 this is no longer the case. Revby: Gunnar Sletta <gunnar@trolltech.com> Similar to 28f94e1ef94f.
| * Wizard background images incorrect in Snow Leopard.Prasanth Ullattil2009-09-041-0/+1
| | | | | | | | | | | | | | We need to clear the QPixmap before the image is drawn using the CGContextDrawImage(). Reviewed-by: Norwegian Rock Cat
| * Fix a regression with QListView::setRowHidden() when a root index is setAndy Shaw2009-09-041-4/+4
| | | | | | | | | | | | | | | | | | When setRowHidden() was called after a root index was set then it would not actually hide the row, if a root index is not set then it worked fine. Task-number: 260879 Reviewed-by: Jan-Arve
* | Fixed compile for S60.Rohan McGovern2009-09-051-1/+1
| | | | | | | | Q_DECLARE_METATYPE must appear before qRegisterMetaType.
* | Only export internal raster classes in QWSAnders Bakken2009-09-042-3/+15
| | | | | | | | | | | | | | | | QRasterizer, QClipData and QRasterBuffer only need to exported when QRasterPaintEnginePrivate is subclassed which only is the case for DirectFB. Reviewed-by: Noam Rosenthal <noam.rosenthal@nokia.com>
* | Doc: Clarified that certain KDE widgets are KDE 3 widgets.David Boddie2009-09-041-4/+4
| | | | | | | | | | Task-number: 258991 Reviewed-by: Trust Me
* | Added multiple frames to QPaintBuffer.Samuel Rødal2009-09-042-7/+27
| | | | | | | | | | | | | | | | | | This lets us stream a single QPaintBuffer instead of one QPaintBuffer per frame in the trace graphicssystem, which leads to not streaming pixmaps / images once per frame. Performance when doing a trace is also a lot better for painting heavy applications. Reviewed-by: Trond
* | Avoided streaming multiple copies of images/pixmaps in QPaintBuffer.Samuel Rødal2009-09-041-1/+74
| | | | | | | | | | | | This reduces the size of the trace files significantly in certain cases. Reviewed-by: Trond
* | Optimize qt_format_text test operations: try not to detachOlivier Goffart2009-09-041-40/+28
| | | | | | | | | | | | | | | | | | | | | | | | Second try. This is a fixed version of the one reverted in commit 25014061b8de The difference is that it does text[offset] = QChar::LineSeparator; instead of chr = QChar::LineSeparator; Reviewed-by: Eskil
* | Fix crashes when moving descendents during destruction.Andreas Aardal Hanssen2009-09-041-7/+11
| | | | | | | | | | | | | | | | | | | | | | This fix prevents crashes in QGraphicsItem caused by calls to pure virtual functions as an item tries to access its dying parent. This happens when an item is moved by an ancestor during this ancestor's destructor. Autotests included. Reviewed-by: bnilsen
* | Don't call pure virtuals on deleting QGraphicsItemAaron Kennedy2009-09-041-1/+3
| | | | | | | | | | | | This also needs to be reviewed by andreas. Reviewed-by: Michael Brasser