summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix warning in qvariant.h header + make sure QVariant in QVariant works as ↵Olivier Goffart2009-10-282-27/+257
| | | | | | | | expected Also add more test Reviewed-by: Thierry
* Fixed bug in QTableView spans.Gabriel de Dietrich2009-10-283-2/+85
| | | | | | | | In some cases, the spans internal structure was left in an inconsistent state. Auto-test included. Bonus: spans consistency checking method. Task-number: QTBUG-5062 Reviewed-by: Olivier
* Fixed missing repaints on QTreeView when moving the mouseThierry Bastian2009-10-281-2/+6
| | | | | | | ..from the decoration to the item itself. QAbstractItemView can't handle that because it doesn't know anything about decoration. Reviewed-by: gabi
* Extand test of qBinaryFindOlivier Goffart2009-10-281-1/+16
|
* Use qLowerBound in qBinaryFindPascal Létourneau2009-10-281-32/+10
| | | | | | | | | | | | The current implementation of qBinaryFind use 64bit arithmetics even on a 32bit system, which make it slow The docs mention qBinaryFind will find any occurence of the search value not necessarily the first one, but this is not case with current implementation So nothing prevents the use of qLowerBound Reviewed-by: Olivier Goffart Merge-request: 1513
* Wrong caching of opaque children in QWidget.Bjørn Erik Nilsen2009-10-283-14/+51
| | | | | | | | | | | | | | | The opaque children cache was clipped to all the ancestors up to the top-level, which means whenever a widget changes geometry all the children must be invalidated. However, the bug was that we didn't invalidate the children, and that is of course slow so we don't want to do it either. A better solution is to only clip the children cache to the widget itself (widget->rect() instead of widget->clipRect()), and we can perfectly do this because the region we subtract the opaque children from is already inside the clipRect(). Auto-test included. Task-number: QTBUG-4245 (related to)
* Stabilize tst_QGraphicsView::optimizationFlags_dontSavePainterState2Bjørn Erik Nilsen2009-10-281-2/+6
| | | | | Make sure the view is painted, otherwise the transforms are identity and comparisons don't make sense.
* Compile on 64bitOlivier Goffart2009-10-281-2/+2
| | | | Reviewed-by: Jan-Arve
* Allow to put the central widget in a QMainWindow after it was shownThierry Bastian2009-10-282-6/+9
| | | | Task-number: QTBUG-1171
* Changing the time we wait for the end of the animationThierry Bastian2009-10-281-3/+3
| | | | | We now wait for the animation duration + 100 (instead of 50). It makes tests more reliable on windows (and probably embedded)
* Make the QPropertyAnimation pass on windows by waiting slightly longerThierry Bastian2009-10-281-4/+4
| | | | | Timers on windows are not accurate enough to "only" wait for the animation duration + 50.
* Fix initial focus bug in ItemIsFocusScope.Andreas Aardal Hanssen2009-10-282-14/+112
| | | | | | | | | | | | | | | | The task provides an example that doesn't gain input focus when started. The fix contains two parts: one is to allow items with focus scope ancestors to become focus items even if the scope is inactive. The other is to fix up the focusItem pointers on reparent. Before, the focus scopes' focusItem pointers always pointed to itself, or the next scope. Now these items are treated no differently than other items in that respect. The change has a performance impact when reparenting a large subtree that has a sub focus item onto another item (one more dig). Task-number: QT-2331 Reviewed-by: Alexis Menard
* Double-clicking a dock widget titlebar could make it disappearThierry Bastian2009-10-282-4/+25
| | | | | | | | If it wasn't already docked on a mainwindow, its state would become unexpected. Task-number: QTBUG-945 Reviewed-by: gabi
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-widget-team into 4.6Jan-Arve Sæther2009-10-289-20/+160
|\
| * QSplitter would not show previously collapsed widgets.Gabriel de Dietrich2009-10-282-2/+49
| | | | | | | | | | | | | | | | | | After deleting or hiding the last non collapsed item in a QSplitter, none would be visible. We now check wether there is any non-hidden, collapsed widget, and set it to non-collapsed. Auto-test included. Task-number: QTBUG-4101 Reviewed-by: Olivier
| * Qt::escape(): also escape the quote (")Olivier Goffart2009-10-283-24/+32
| | | | | | | | | | | | | | | | This amend previous commit by removing the duplicate function. The quote need to be escaped in attributes. Reviewed-by: Thomas Zander
| * Fix XML entities in QTextDocument::toHtml()Thorvald Natvig2009-10-283-9/+57
| | | | | | | | | | | | | | | | | | If a QTextDocument contains an anchor with a & in it, this & is not escaped in the toHtml() function, meaning the resulting document can't be parsed as XML as it will contain invalid entities. Reviewed-by: Olivier Goffart Merge-request: 1753
| * Let QGraphicsItem set QObjectPrivate::wasDeleted when appropriate.Andreas Aardal Hanssen2009-10-283-7/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows children of QGraphicsObject-derived classes to check if the parent is being deleted by checking the private flag wasDeleted. Reverts 37b16d5cbb4e7bc534f690ebf50434d228b5ecfc, p4 change 9681, to allow QGraphicsItem to set QObjectPrivate's wasDeleted member before entering QObjectPrivate's destructor. The original code was in there to let the user know, via the console output, that QObject was double-deleted (e.g., when placing QObject on the stack, and also giving it a parent, so that if the parent is deleted first, bang). Reviewed-by: Aaron Kennedy Reviewed-by: Bradley T. Hughes
* | Merge branch 'fixes' of ↵Jan-Arve Sæther2009-10-281399-12672/+37285
|\ \ | |/ |/| | | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into openbossa-fleury-fixes3 Conflicts: src/gui/graphicsview/qgraphicsanchorlayout_p.cpp src/gui/graphicsview/qgraphicsanchorlayout_p.h
| * QGAL: Add test for David Boddie bugEduardo M. Fleury2009-10-261-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current simplification code does not handle sequences with anchors pointed to different directions could not be simplified together into a sequential anchor. A (10 / 20 / 50 ) B (20 / 20 / 20) Ex: o-----------------> <----------------o The reason we don't support it yet is shown in the example above. The resulting anchor would be either: Result_1 (-10 / 0 / 30) o------------------------------------> (or) Result_2 (-30 / 0 / 10) <------------------------------------o But the current implementation assumes no anchors can have negative sizes. Hopefully, the next commits will add support for it and then enable such simplification. :-) Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * QGAL (QSimplex): Add constraints simplificationEduardo M. Fleury2009-10-262-4/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the simplex solver is able to remove fixed variables from its constraints as to improve its running time. The simplification consists of two actions that are done iteratively until no possible changes exist: 1st) Look for constraints of type Var == Constant Save constant as the trivial value of Var 2nd) Substitute known results in existing constraints Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * QGAL (QSimplex): Make deep copy of constraints inside QSimplexEduardo M. Fleury2009-10-263-12/+13
| | | | | | | | | | | | | | | | | | The idea is to allow QSimplex solver to modify the constraints without breaking other parts of the code that rely on the original ones. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * QGAL: Add QSimplexConstraint::toString() method for debuggingEduardo M. Fleury2009-10-261-0/+23
| | | | | | | | | | Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * QGAL: Use constraints of type "equal" for fixed itemsEduardo M. Fleury2009-10-261-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We usually create two restrictions for each item, one to tell its size should be more than its minimum size and other enforcing it to be at most its maximum size. Now, for items that have fixed size, ie. minSize == maxSize, we create a single constraint telling its size should be equal its min/maxSize. The immediate advantage is to have one less constraint for each of these items. The indirect advantage is that the simplex solver can take advantage of such information. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * QGAL: clarify the usage of isLayoutAnchor bitCaio Marcelo de Oliveira Filho2009-10-262-11/+4
| | | | | | | | | | | | | | | | | | | | | | The 'isLayoutAnchor' is necessary only as a way to flag Layout internal anchors, i.e. anchors with the Layout as 'item' in the AnchorData structure. We don't need to propagate this bit when composing anchors. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * QGAL: add orientation bit to the anchorCaio Marcelo de Oliveira Filho2009-10-262-9/+11
| | | | | | | | | | | | | | | | | | Use a free bit in the anchor struct to save the orientation information. That way we do not depend on looking for this information in the vertices (by looking the orientation of its edge). Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * QGAL: simplification doesn't depend on vertex anchor point informationCaio Marcelo de Oliveira Filho2009-10-261-4/+4
| | | | | | | | | | | | | | | | | | Look for information inside the anchor instead of on the vertices. This will give us flexibility of simplifying vertices before the anchor simplification phase. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * QGAL: store item and center-ness information in the anchorCaio Marcelo de Oliveira Filho2009-10-262-14/+19
| | | | | | | | | | | | | | | | | | We used to look for this information in the anchor's from and to vertices, but to enable simplification of vertices, we have to store this information in the anchor. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * QGAL: identify unfeasible setups even when graph is simplifiedCaio Marcelo de Oliveira Filho2009-10-263-34/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The calculate graphs now can return early due to unfeasible anchor setups found out during simplification. This allows finding out problems in parallel anchors, when one anchor has maximum size smaller than the minimum size of the other anchor. The order for simplification and refreshing size hints also has been swaped: - First, refresh size hints for all anchors in the graph. If the graph is simplified, the refreshSizeHints() call will reach the children anchors. - Then, if the simplificated graph is invalid, rebuild it. During this rebuild, refreshSizeHints_helper() will be called for all levels. So in both situations we can identify an unfeasible setup. Note that this test alone is not enough to classify the graph as feasible, depending on the graph, it will still need to go through the Simplex. A test case was added and the function that traverse the graph refreshing now is called refreshAllSizeHints(). The old name was not so clear since the function will not fill only the anchors that have items associated. Last but not least, the lastCalculationUsedSimplex variable is cleared when starting calculateGraphs(), since we now can leave the function earlier, without reaching calculateTrunk(), which is the function that sets it. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * QGAL: separate parallel anchor creation from sequence creationCaio Marcelo de Oliveira Filho2009-10-261-29/+61
| | | | | | | | | | | | | | | | | | Extract the creation of parallel anchors from the creation of sequential anchor. This will be useful to keep track whether a parallel anchor is feasible or not. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * QGAL: complex anchors can indicate errors when refreshing sizehintCaio Marcelo de Oliveira Filho2009-10-262-22/+31
| | | | | | | | | | | | | | | | | | Now the refreshSizeHints() returns a boolean, and the parallel anchor will return false in unfeasible cases, e.g. one anchor has maximum size smaller than other minimum size. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-261500-16350/+43625
| |\
| | * Suppress warnings in QtOpenGL codeRhys Weatherley2009-10-263-1/+5
| | |
| | * Suppress warnings under OpenGL/ES 2.0 in QGLShaderProgramRhys Weatherley2009-10-261-0/+55
| | |
| | * Fix OpenGL/ES 2.0 bug in previous QGLShaderProgram check-inRhys Weatherley2009-10-261-1/+1
| | |
| | * Use QObjectPrivate within QGLShaderPrivate and QGLShaderProgramPrivateRhys Weatherley2009-10-262-47/+134
| | | | | | | | | | | | Reviewed-by: Sarah Smith
| | * Optimize concatenation of partial shadersRhys Weatherley2009-10-262-30/+95
| | | | | | | | | | | | Reviewed-by: Sarah Smith
| | * Fix ifdef around QMatrix4x4::rotate(QQuaternion)Rhys Weatherley2009-10-261-1/+1
| | | | | | | | | | | | Reviewed-by: trustme
| | * Optimize QGraphicsRotation's use of QMatrix4x4Rhys Weatherley2009-10-264-6/+179
| | | | | | | | | | | | | | | | | | | | | | | | Previous code was creating a full 3D rotation matrix and then projecting back to 2D. This change combines the two steps into one to avoid calculating matrix components that will be dropped. Reviewed-by: Sarah Smith
| | * Make compile on X11 systems where qreal == floatRhys Weatherley2009-10-261-1/+1
| | | | | | | | | | | | Reviewed-by: Sarah Smith
| | * Fix a crash in shutdown of QGraphicsEffectRhys Weatherley2009-10-251-1/+1
| | | | | | | | | | | | Reviewed-by: trustme
| | * Issue a warning if bindAttributeLocation() is used after shaders linkedRhys Weatherley2009-10-251-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Attribute locations must be bound before a shader program is linked according to the GLSL specification. Issue a warning to the user if they do it in the wrong order, which should help to isolate hard to find bugs much quicker. Reviewed-by: trustme
| | * Add an extra overload for QMatrix4x4::toTransform()Rhys Weatherley2009-10-254-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 100afe8d fixed a bug in QGraphicsRotation related to when the "distance to plane" projection needed to be performed. As a side effect it made the toTransform() API not do the expected thing when the function is called with no argument. This change makes the default no-argument version of toTransform() do the simple "drop row 3 and column 3" orthographic transformation that normal users of the class expect, and adds a new overload for the "distance to plane" projection case for the special case. Reviewed-by: trustme
| | * Merge branch '4.5' into 4.6Thiago Macieira2009-10-233-29/+6
| | |\
| | | * QWidget painting regression on Windows.Bjørn Erik Nilsen2009-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem occurred on Windows due to a call to repaint() on a top-level window from setDisabledStyle() in qwidget.cpp. This function is called whenever a window is blocking. In this particular case the children of the repainted window are opaque, and should therefore not be repainted, which also means that the top-level have to subtract the region of the opaque children when filling the background. This region is cached, and the problem was that the cached region was wrong. It was wrong because it was not invalidated properly. Task: QTBUG-4245 Reviewed-by: Paul
| | | * QWindowsMobileStyle::drawPrimitive(PE_Frame) background color fixedJoerg Bornemann2009-10-221-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The background color of PE_Frame was palette().light() and has been changed to use palette().background() now. This fixes the autotest tst_QStyleSheetStyle::task188195_baseBackground for Windows mobile. Reviewed-by: thartman
| | | * move default QAbstractButton font setup on Win mobile to QApplicationJoerg Bornemann2009-10-222-24/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original approach of modifying the font for QAbstractButtons in QWindowsMobileStyle::polish broke the autotest tst_qstylesheetstyle::fontPropagation. Reviewed-by: thartman
| | * | Compile on QWSAnders Bakken2009-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 04d18b38c38c5ff623b30366ea08d56128b9b7d0 Qt didn't compile for QWS. Will email original committer to verify that original intent is maintained. Reviewed-by: Donald Carr <donald.carr@nokia.com>
| | * | Add cross compiling pkg-config disabled warningDonald Carr2009-10-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have historically silently disabled pkg-config when cross compiling in order to avoid host pkg-config contamination of the target build. pkg-config files are present on many embedded targets, and make the correct detection/configuration of dependencies far more convenient for the developer. It is therefor valuable to advertise that pkg-config functionality is available but disabled barring direct involvement on their parts, rather than silently disabling it. Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| | * | QT_NO_CURSOR build fix on windows. Random corrections for it on mac.Jocelyn Turcotte2009-10-235-1/+11
| | | | | | | | | | | | | | | | Reviewed-by: Denis Dzyubenko