summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* QGAL: Enable out-of-order sequential simplificationEduardo M. Fleury2009-11-271-46/+23
| | | | | | | | | | | | | | Modify the simplification code to allow the creation of out-of-order sequential anchors. Basically the "changedDirection" end-of-sequence condition was removed, also note that createSequence no longer bothers to revert the direction of anchors if the order it receives is not standard. Removing expect-fail clause from test since now we pass :-) Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGAL: Support for out-of-order sequential anchorsEduardo M. Fleury2009-11-271-6/+34
| | | | | | | | | | | Now sequential anchors account for the fact they may be composed of anchors with different directions. Both refreshSizeHints and updateChildrenSizes have been updated to support this situation. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGAL: Do not revert negative anchorsJesus Sanchez-Palencia2009-11-272-23/+4
| | | | | | | | Since we now support anchors with size less then zero, we no longer need to revert anchors with negative spacing. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGAL: Limit absolute size of anchors and add offset to calculationEduardo M. Fleury2009-11-272-12/+57
| | | | | | | | | | | | | | | | | | | | | This commit is groundwork for the support of negative-sized anchors by the simplex solver. The idea is to add to all variables an offset large enough to ensure they are never negative. The implementation limits all variable sizes in the range [-limit, limit] and feed them into the simplex with an offset of "limit". Subtracting this offset later to find out the real values. "limit" is defined as QWIDGETSIZE_MAX for platforms where qreal is double and as QWIDGETSIZE_MAX / 32 when it is float. This is to avoid numerical errors in the simplex solver. This commit also modifies the ASSERT clause inside QSimplex so it becomes less prone to false positives due to numerical errors. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGAL: Rename internalSizeHints to applySizePolicyEduardo M. Fleury2009-11-271-10/+15
| | | | | | | Former name did not reflect actual work done by the function. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGAL: Fix memory management issues (leak + invalid read)Eduardo M. Fleury2009-11-272-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing QGraphicsAnchor memory leak and access to free'd region. -- Leak: User-created anchors have two representations in QGAL, one visible externally (QGraphicsAnchor) and other internal (AnchorData). When such anchors are removed externally (QGraphicsAnchor is deleted), the former implementation ensured that the internal representation would be deleted too. However the opposite was not true. In cases where the anchors are deleted internally (in the layout destructor, for instance, or when an item is removed through the removeAt API), the public QGraphicsAnchor object would leak. This commit ensures the deletion will happen in both directions and adds protection to avoid a deletion loop. -- Invalid read: In QGAL::removeAnchor(vertex1, vertex2), we read vertex information after calling removeAnchor_helper(vertex1, vertex2). The problem is that in cases where the removed anchor is the last anchor to connect to a center vertex, its removal will cause also the removal of such vertex. Thus, accessing the vertices after the removeAnchor_helper() call is unsafe. To solve that we cache the information we need and then clear the vertex pointers to avoid errors in the future. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
* QGAL: Prevent internal anchors from being exposed by QGAL::anchor()Eduardo M. Fleury2009-11-271-2/+14
| | | | | | | | | | | Adding check to prevent the structural layout anchors as well as those internal to items, from being exposed through the public API. These checks also ensure no QGraphicsAnchor instances will be created for those anchors. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
* QGAL: default spacing can be unset using a negative valueEduardo M. Fleury2009-11-271-21/+2
| | | | | | | | | | | After a default spacing is set through QGAL::setSpacing() family of methods, the user must be able to unset it. To avoid adding another public method, we enabled this feature by allowing a negative value to be passed to those methods. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>
* Background in landscape mode on S60 5.0 is brokenSami Merilä2009-11-261-0/+1
| | | | | | | | | | | | | After initial fix, 99% of widgets draw temselves properly after orientation switch. However, QScrollAreas lose their palette hash, which causes scrollarea background to re-start from theme background top-left. As a correction, we re-set the theme palette hash after calling QApplication::setPalette, since that clears palette hash. Task-number: QTBUG-6125 Reviewed-by: Alessandro Portale
* Fixing background painting after orientation switch.Alessandro Portale2009-11-262-1/+2
| | | | | | | | | | | | | | | | Fixing previous fixes of QS60StylePrivate::setBackgroundTexture with commit SHAs a80e58335e69c8ce96d1596e0ed2d14e424a0d5e and d4089399a3ab7548a864d5a399e08df85c444783 Now, the palette gets the updated background brush and the palette is actually set as application palette. Also making sure that QS60StylePrivate::handleDynamicLayoutVariantSwitch does the right things in the right order. So that Table headers are not broken after orientaion switch. Task-number: QTBUG-6125 Task-number: QT-1478 Reviewed-by: Shane Kearns
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6David Boddie2009-11-2518-91/+150
|\
| * Merge commit 'oslo-staging-2/4.6' into upstream/4.6Olivier Goffart2009-11-2518-91/+150
| |\
| | * Fix QTreeWidgetItem::setChildIndicatorPolicy not updating.Olivier Goffart2009-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the ChildIndicatorPolicy change the hasChildren in the model. But this is cached in the QTreeView layout. We must do a relayout to clear the cache. Reviewed-by: Thierry Task-number: QTBUG-3071
| | * Fixes rendering issues when rendering a QWidget to PDF with WindowsXP Style.Yoann Lopes2009-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | The problem was that the images added to the PDF were not clipped to the expected area. Task-number: QTBUG-3412 Reviewed-by: Trond Kjernaasen
| | * Make paste + undo behave in QLineEdit as it does in QTextEditThierry Bastian2009-11-241-1/+6
| | | | | | | | | | | | | | | | | | | | | On the undo/redo stack, it needs to be treated as a separate command Task-number: QTBUG-5786 Reviewed-by: ogoffart
| | * Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6-staging2axis2009-11-244-4/+9
| | |\
| | * | Mac: Fixes painting artifacts in Graphics ViewBjørn Erik Nilsen2009-11-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that pending updates were not dispatched properly on the Mac, which is strongly required in order to get correct behavior wrt QGraphicsItem::update(). Task-number: QTBUG-4160 Reviewed-by: bnilsen
| | * | Mac: Fixes broken window decorations for QGraphicsProxyWidget.Bjørn Erik Nilsen2009-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was the QMacStyle didn't handle the pixel metric for PM_TitleBarHeight correctly when passing a style option containing an unitialized rect (empty rect). It already had special logic for invalid rects, so the fix is simply to extend the check to also handle empty rects. Auto-test included. Task-number: QTBUG-4160 Reviewed-by: msorvig
| | * | Itemview: Fixes statustip not clearedOlivier Goffart2009-11-242-2/+13
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-1717 Reviewed-by: Thierry
| | * | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into ↵axis2009-11-242-19/+6
| | |\ \ | | | | | | | | | | | | | | | 4.6-staging2
| | | * | Removed window activation hack, unified and fixed title&icon setting.Janne Anttila2009-11-232-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window activation hack is not needed anynmore since AppUi()->RemoveFromStack() ensures the next visible window will get the keyboard focus. Hack removal also required change to window title setting logic. Since window title (and icon) are associated to top-level windows, the logical place to set them is the same place where active window is changed i.e. QApplication::setActiveWindow is called. At the same time also window icon setting from show_sys was move to focusChanged to make icon/title setting more consistent. When changing orientation or switching to different statuspane mode we receive KInternalStatusPaneChange events for each window in QSymbianControl::HandleResourceChange. When receiving such event we only need to reset the icon for focused/visible window. If we don't handle it like this, it might happen that invisible widget added to control stack resets the global icon/title. Task-number: QTBUG-5780 Reviewed-by: Axis
| | * | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Eskil Abrahamsen Blomfeldt2009-11-239-22/+54
| | |\ \ \
| | | * | | Fixed endless loop when printing a QTextDocument.Trond Kjernåsen2009-11-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user enters a valid page range, which lies outside of the actual number of printable pages, we can't detect that until the document has been paginated. Task-number: QTBUG-6051 Reviewed-by: Kim
| | | * | | Make the menubar filter out EScape only if there is a current actionThierry Bastian2009-11-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-4965 Reviewed-by: gabi
| | | * | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Jan-Arve Sæther2009-11-235-9/+28
| | | |\ \ \
| | | | * | | Make the buttons react on mouse release only if it was pressedThierry Bastian2009-11-232-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-3521 Reviewed-by: prasanth
| | | | * | | Merge 'upstream/4.6' into oslo-staging-2/4.6Olivier Goffart2009-11-232-1/+3
| | | | |\ \ \
| | | | * | | | Fix QHeaderView when the model is reset and section have moved.Olivier Goffart2009-11-231-6/+19
| | | | | |/ / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logicalIndices and visualIndices array where not clean of the old sections, resulting in corrupted header. Task-number: QTBUG-6058 Reviewed-by: Thierry
| | | * | | | Merge branch 'fixes' of ↵Jan-Arve Sæther2009-11-232-12/+18
| | | |\ \ \ \ | | | | |/ / / | | | |/| | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into fleury-fixes2
| | | | * | | QGAL: sizeHint constraints needed by anchors parallel with the layoutEduardo M. Fleury2009-11-201-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method "constraintsFromSizeHints" does not create constraints for anchors between the layout vertices _only if_ these anchors have infinite maximum sizes. However, this test was not being done for half-anchors, ie. those created when the layout center anchorage point is used. That was OK when there was no chance that the center anchors had been simplified by a parallel anchor. Nowadays there's a chance that happens, so the test was extended. Commit also adds a test to avoid regressions. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| | | | * | | QGAL: deal correctly with anchors in parallel with the layoutCaio Marcelo de Oliveira Filho2009-11-202-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the preferred size calculation, we should not add 'layout anchors' (either one or the two halves) into the objective function, since the layout doesn't impose or prefer any size at all. This already worked for cases when the layout anchor is one, but not when we have two halves. The mechanism was a 'skipInPreferred' flag that were not being set. The flag is pretty much redundant right now, since we can get this information from the 'isLayoutAnchor' flag. So, the flag was removed and a test was added for both a parallel case with the entire layout and other with half of the layout (which wasn't passing before). Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| | * | | | | Fix positioning of diacritics in .otf fonts on WindowsEskil Abrahamsen Blomfeldt2009-11-232-44/+63
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since .otf fonts are not considered truetype fonts, they take the code paths intended for non-outline fonts. When calculating the bounding box of a glyph, this would mean we'd find the largest possible bounding rect of any glyph in the font, while the other metrics, such as the GPOS tables used to position diacritics in relation to base glyphs, are positioning the actual outline of the glyph. The result was that certain diacritics that depended on the opentype positioning would not be shown on Windows at all, as they would be positioned based on the wrong left bearing and height when drawn into the glyph cache. The fix is to find the tight bounding rect of the outline whenever possible and fall back to the old code when this fails. I've also added the left bearing of the glyph to the bounding box in the fallback case, as we did not respect this before and would misplace glyphs that has a bearing. Task-number: QTBUG-5860 Reviewed-by: Trond
* | | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6David Boddie2009-11-253-87/+125
|\ \ \ \ \ \
| * | | | | | Mac: deleting a menu item might clear items in other menusRichard Moe Gustavsen2009-11-251-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reson is that some menu items are reused across all menu bars. So we need to check that a menu actually still owns the item before clearing or hiding its data. Reviewed-by: Prasanth
| * | | | | | Cocoa: 'Quit' in menu bar does not workRichard Moe Gustavsen2009-11-252-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have two window, each with its own menu bar that has a 'Quit' action, we reuse the quit menu item when switching between the windows. Now, it we deleteLater one of the menu bars, the new menubar will update the 'Quit' item just before deleteLater will come along and remote the update again. This patch will fix this. Task-number: QTBUG-4684 Reviewed-by: Prasanth
| * | | | | | Fix the tablet device recognition on WindowsBenjamin Poulain2009-11-251-84/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unique ID was not taking into account the bits 4, 5, 6, 7 of CSR_TYPE. Those bytes identify similar devices with different flavor/color. The cursor data were also not updated correctly. The information were only updated if the pointer type changes (e.g.: pen to eraser) but not if the physical device change (e.g. stylus to brush). The information are now updated every time a proximity event has a new unique ID. Reviewed-by: Denis Dzyubenko Task-number: QTBUG-1930
| * | | | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-11-252-2/+28
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge commit '0d20ec8604b318ceafd6c35dfe1d73519bf024d3' of oslo-staging-1 ↵Simon Hausmann2009-11-256-26/+49
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into 4.6
| | * | | | | | Fixes implicit grabbing in Qt/CocoaDenis Dzyubenko2009-11-252-30/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When delivering mouse events in Qt/Cocoa set the implicit mouse grabber and deliver the event to it and do not try to propagate the event to the parent view. Reviewed-by: Prasanth (cherry picked from commit aae81f370f6afede95064bc75eb7ee6ac13b1c30)
* | | | | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6David Boddie2009-11-242-2/+28
|\ \ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | |
| * | | | | | | Fix softkeys for QDialogButtonBoxes created without a parent.Jason Barron2009-11-241-0/+24
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inthe case where a QDialogButtonBox was created without a parent, for example in the FTP example, the softkeys that are automatically created inside the button box were not being added to the right widget when the button box was given a parent (or added to a layout) later. This patch resolves that issue by handling the ParentChange event and then adding the softkeys at this point. Task-number: QTBUG-6086 Reviewed-by: axis
| * | | | | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Dean Dettman2009-11-242-2/+2
| |\ \ \ \ \ \
| * | | | | | | Docs : Add details to QMdiArea::removeSubWindow()Dean Dettman2009-11-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarifying that the behaviour is different depending on what is passed in. Reviewed-by: Morten Engvoldsen
* | | | | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6David Boddie2009-11-2435-118/+286
|\ \ \ \ \ \ \ \ | | |_|/ / / / / | |/| | | | | |
| * | | | | | | We don't need to initialize multitouch in non-gui applications.Denis Dzyubenko2009-11-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: trustme Patch-by: raipriha
| * | | | | | | Incorrect background while composing Japanese text(e.g 'shi' + <space>).Prasanth Ullattil2009-11-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happens only when there is a single japanese character entered & the suggested text is same as the one already displayed. In this case, black background was not drawn correctly. Reviewed-by: Simon Hausmann Reviewed-by: axis
| * | | | | | | Softkeys: Text disappears from textbox when predictive text is active.Samuel Nevala2009-11-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If two QInputMethodEvent("preedittext", attributes) or more are send in a row, textedit is drawn empty. Event creates lines based on isGettingInput flag and clears line every time there is preedit text. On 2nd event lines are cleared but not created since e->preeditString() != cursor.block().layout()->preeditAreaText() set isGettingInput to zero. When draw begins line count is checked. If no lines return. Moved layout->setPreeditArea() under if (isGettingInput) so pre-edit text is set only when text really changes. http://bugreports.qt.nokia.com/browse/QTBUG-4696 Task-number:QTBUG-4696 Reviewed-by:Markku Luukkainen Merge-request: 2132 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
| * | | | | | | Fixes implicit grabbing in Qt/CocoaDenis Dzyubenko2009-11-242-30/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When delivering mouse events in Qt/Cocoa set the implicit mouse grabber and deliver the event to it and do not try to propagate the event to the parent view. Reviewed-by: Prasanth
| * | | | | | | QLineEdit fix for macDenis Dzyubenko2009-11-241-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the Mac Up/Down arrow keys move the cursor to the beginning/end of the lineedit. The fix is to make sure the corresponding keyevent will be accepted by the QLineEdit and not propagated to parent widgets (resulting in a beep). Reviewed-by: Prasanth
| * | | | | | | Maximizing a window makes it a bit smaller that the minimum size:CocoaPrasanth Ullattil2009-11-241-2/+7
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When returning preferred sizes for the frame, we should consider the size for non client area elements like frame, tittlebar etc. Task-number: 6090 Reviewed-by: Denis