summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* remove duplicated code and API (merge QTouchEvent and QGraphicsSceneTouchEvent)Bradley T. Hughes2009-06-111-16/+19
| | | | | | | | | the API for these 2 classes is identical, the implementation is almost identical, they share the same data structures, so bite the bullet and merge them. this means we go back to using screenPos() instead of globalPos() again
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-107-53/+691
|\ | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene_p.h
| * QPainter::worldTransform() does not return identity matrix.Bjørn Erik Nilsen2009-06-101-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPainter::worldTransform() does not return identity matrix when created on a redirected widget. It should always be identity by default, and should only change as a result of QPainter::setWorldTransform. The reason it didn't return identity for redirected widgets, was that we translated the shared painter's world matrix directly. Since we cannot modify the world matrix directly, we have to store the shared painter's current world transform in a separate matrix (redirectedMatrix), reset the world transform to identity, and later combine the redirectedMatrix with world transforms set on the painter. Note that redirection_offset was in negative coordinates before, and that redirectionMatrix now is in positive coordinates, hence opposite signs around. Auto-test included. Reviewed-by: lars Reviewed-by: Samuel
| * Merge commit 'qt-mainline/master' into master-recursivepaintAndreas Aardal Hanssen2009-06-102-12/+83
| |\
| | * Made QListWidgetItem::operator<() check if the data is numerical when comparing.J-P Nurmi2009-06-101-12/+27
| | | | | | | | | | | | | | | Merge-request: 631 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
| * | Merge commit 'qt-mainline/master' into master-recursivepaintAndreas Aardal Hanssen2009-06-1010-23/+123
| |\ \
| * | | Fix tst_QGraphicsProxyWidget::scrollUpdate test, wrong test.Andreas Aardal Hanssen2009-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It should not be necessary to adjust the expose rectangle by 1 in all directions; the expose has already been adjusted by the scene and view. Reviewed-by: bnilsen
| * | | Fix sorting bug when using BSP tree index + add autotest.Andreas Aardal Hanssen2009-06-091-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use stable sorting to keep insertion order. This works fine as long as we sort a complete list of siblings in one go, and this list already has items in insertion order. But if we shuffle such a list, the only way to get proper sort order again (with insertion order intact), is if each item has a sibling index. We used to have this, but we don't have it anymore (as it's not needed for NoIndex mode). So until we separate the BSP index into a separate class and add this index there, we add this workaround which uses the toplevelitems list to ensure the items have the correct order. Reviewed-by: bnilsen
| * | | Ensure we use the correct static paintedItems list.Andreas Aardal Hanssen2009-06-091-6/+6
| | | | | | | | | | | | | | | | | | | | Fixes the zValue autotest, which regressed when the member list was added.
| * | | Fix QGraphicsView::render() regression, ensure the right device is passed.Andreas Aardal Hanssen2009-06-091-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we pass the viewport widget as the widget pointer when rendering to an arbitrary painter (e.g., onto a pixmap), we confuse the rendering functions to thinking that it's the viewport's region we should render into. So instead, when drawItems() is passed a painter that's different from the view, we pass 0 for the widget.
| * | | Revert 7aee2a7054d1ca280f6dfc9c46b3fe2ce403ccb3, fix render bugs.Andreas Aardal Hanssen2009-06-091-10/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduced an unexpected interdependency for scenes with items that enable ItemStacksBehindParent, and that contain children that are transformed. There's a manual test for this, called clippingAndTransformations, which shows this problem. The bug has been fixed and this change also includes an autotest that covers exactly this problem.
| * | | Add ItemSendsGeometryChanges, replacing itemChangeEnabled().Andreas Aardal Hanssen2009-06-091-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag toggles whether we should send notifications for setPos, setMatrix, and setTransform. It's off by default. Docs have been updated. All autotests pass. This change also cleans up a bit so that we both have readable code, and keeping the optimized path for when we need to send the notifications. By enabling this flag by default we are going to trigger regressions in end-user code. Reviewed-by: bnilsen
| * | | Auto-test to ensure moved items don't leave traces.Bjørn Erik Nilsen2009-06-091-0/+78
| | | | | | | | | | | | | | | | See also: 1c9032f29d4500b33622d7510b6361c99d9af296
| * | | Add another auto-test ensuring updates outside the brect are discared.Bjørn Erik Nilsen2009-06-091-0/+8
| | | |
| * | | Fix two regressions in Plasma. The painter state proctection was notAlexis Menard2009-06-092-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | properly pass to drawItemHelper. The second is a double conversion to deviceTransform in createStyleOption of QGraphicsItem. Since the recursive drawing already give a transform in device mode we don't need to convert it two times. Reviewed-by:andreas
| * | | Add (back) properties to QGraphicsItem to change the transformations componentOlivier Goffart2009-06-091-0/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapply commit 8ad5020940f10d4ecc5c5e8b3b9656531cb84ef3 and its dependent change that has been reverted while rebasing the recursivepaint branch. With the new properties it is possible to easily animate transformations Reviewed-by: Andreas Documentation still need to be reviewed.
| * | | A partial QGraphicsItem update causes a full update to be discarded.Bjørn Erik Nilsen2009-06-091-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | E.g. item->update(QRectF(0, 0, 5, 5)); item->update(); The problem was that we discarded all update requests whenever the item was already marked as dirty. The dirty bit only means it has pending updates (which might be a full update). However, we have a separate bit for full updates (fullUpdatePending) so we have to check against that bit instead. Makes tst_QGraphicsProxyWidget::paintEvent happy. Another auto-test included.
| * | | QGraphicsItem discard updates when it shouldn't.Bjørn Erik Nilsen2009-06-091-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once a _q_processDirtyItems call is queued, it means we at least have one item that is marked as dirty and we must reset it when the _q_processDirtyItems slot is called. The problem however, was that we didn't reset the item's dirty state if a full scene update occurred in between, i.e. item->update(); scene.update(); We don't have to calculate the item's dirty rect if a full scene update occurs in between, but we still have to reset its state. Auto-test included.
| * | | Fix tst_QGraphicsView::acceptMousePressEvent (by entering event loop).Andreas Aardal Hanssen2009-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | This is necessary after we made the sceneRect grow lazily when it's not assigned.
| * | | Make sure we reset the updateAll variable correctly.Bjørn Erik Nilsen2009-06-091-0/+1
| | | | | | | | | | | | | | | | Makes tst_QGraphicsScene::update happy.
| * | | Compatibility fix for QGraphicsScene::sceneRectChanged()/sceneRect().Bjørn Erik Nilsen2009-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to keep the growingItemsBoundingRect up-to-date if there's no scene rect. The only difference now is that sceneRectChanged will not be emitted before entering the event-loop, but the documentation only states it'll be emitted when the scene rect changes, so we consider it harmless. Makes tst_QGraphicsView::sceneRect_growing and tst_QGrahicsScene::sceneRect happy. Reviewed-by: Andreas
| * | | Ensure this test goes via QGraphicsScene::drawItems().Andreas Aardal Hanssen2009-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | Enable QGraphicsView::IndirectPainting to make sure it detects which items are drawn.
| * | | Remove leftover code from merge conflict.Andreas Aardal Hanssen2009-06-091-126/+0
| | | |
| * | | Massive re-factoring of Graphics View's update mechanism.Bjørn Erik Nilsen2009-06-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is work-in-progress, so don't expect everything to work perfectly. Most of the auto-test pass and examples and demos seem to run fine. Unfortunately I'm too tired to write about the actual update mehanism now, but it's faster than the old approach (if that helps:)). There's more to optimize, but I'll come back to that later. I need some sleep now :) To be continued.
* | | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-1011-23/+179
|\ \ \ \ | | |_|/ | |/| |
| * | | Move declaration of QFileInfoPrivate in a separate file _p andAlexis Menard2009-06-101-0/+56
| | |/ | |/| | | | | | | | | | | | | add an auto-test when we copy file infos. Reviewed-by: ogoffart
| * | Fix some incorrect license headers.Jason McDonald2009-06-104-4/+4
| | | | | | | | | | | | | | | | | | | | | The MODULE placeholder shouldn't be used anymore, and neither should the old Trolltech license header. Reviewed-by: Trust Me
| * | Add support for TIFF formats (Mono and indexed)Benjamin Poulain2009-06-091-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for reading and writing for Mono, MonoLSB and Indexed images in the tiff format. Previously, the images were always written in RGB32, dismissing the input format. Task-number: 254317 Reviewed-by: Samuel
| * | small improvement/refactor to cssparserThierry Bastian2009-06-091-2/+43
| | |
| * | Fix floating point exception in QImageReader::setScaledSize(QSize(0, 0))Leonardo Sobral Cunha2009-06-091-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | Avoid a division by 0 when doing QImageReader::setScaledSize(QSize(0, 0)) for jpeg formats. Reviewed-by: thierry Task-number: 255627
| * | Fix QImageReader autotest compilationLeonardo Sobral Cunha2009-06-091-1/+1
| | |
| * | make bic test works in shadow buildOlivier Goffart2009-06-092-16/+23
| |/
* | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-0810-59/+263
|\ \ | |/
| * Fixed ListView so that it is able to move items in negative space andThierry Bastian2009-06-081-0/+51
| | | | | | | | | | | | | | | | | | still paint them. The autotest is included. Task-number: 254449 Reviewed-by: ogoffart
| * Merge commit 'origin/4.5'Oswald Buddenhagen2009-06-081-6/+0
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/phonon/qt7/mediaobject.mm src/3rdparty/phonon/qt7/quicktimevideoplayer.mm src/gui/text/qfontengine_win.cpp tools/linguist/shared/cpp.cpp
| | * Autotest: Fixed a race condition in the network self test.Thiago Macieira2009-06-051-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the tests (including the httpsServer one) requested that the server close the connection (Connection: close). It could happen that, well, the server did close the connection and we noticed it while doing the waitForBytesWritten in the doSocketFlush function. Then we'd create an error in the next step because the socket wasn't connected. Reviewed-by: TrustMe
| * | Extend auto test to cover the emission order of the contentChange() andmae2009-06-081-0/+32
| | | | | | | | | | | | | | | cursorPositionChanged() singals of QTextDocument. The contentChange() signal is used for the syntax highlighter.
| * | Made QTreeWidgetItem::operator<() check if the data is numerical when comparing.J-P Nurmi2009-06-081-0/+4
| | | | | | | | | | | | | | | | | | | | | More information in task 166873. Merge-request: 514 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
| * | make signal handlers understand QVariant againKent Hansen2009-06-051-0/+29
| | | | | | | | | | | | | | | | | | Also, issue a warning if a type is not known to the meta-type system. Task-number: 248129
| * | have QScriptValue::toVariant() convert Array objects to QVariantListsKent Hansen2009-06-051-0/+21
| | | | | | | | | | | | | | | | | | | | | Converting the array to its string representation is not very useful. Now round-trip conversion will work as well. Reviewed-by: Ariya Hidayat
| * | Revert two of my commits, restoring the original fix for focus handling.Denis Dzyubenko2009-06-051-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix that was introduced adds regressions, and I don't see a way we can fix it without breaking someone elses code. So restoring the original fix that just avoid a crash (autotest by Thierry is included). Revert "Revert Avoid a crash when setting a focus in a widget hierarchy containing" Revert "Setting a focus on a widget hierarchy which contains both visible and invisible widgets could cause a crash." This reverts commit be833a4f25a8ec8c3dd7a8ac4fa4b0507c93e7ee. This partially reverts commit 1a7da7096bbda17197738061902f4489af234bc0 Reviewed-by: Thierry Bastian Reviewed-by: Prasanth Ullattil
| * | add HTTP DELETE support to Network Access APIPeter Hartmann2009-06-051-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | added new method QNetworkAccessManager::deleteResource (naming the method "delete" was not possible since it is a reserverd word in C++) and adjusted all the internals necessary. Task-number: 242916 Reviewed-by: Thiago
| * | handle qreal properties correctly in the meta-object systemKent Hansen2009-06-051-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling, it's possible that the size of qreal for moc itself (host platform) is different from the size of qreal on the target platform. Thus, we should not encode the metatype-id of qreal at moc time. Instead, use QMetaType::QReal in the generated code so that the the property flags are only derived at compile time. We also need to support the pesky QT_COORD_TYPE. In this case, qreal can be _any_ type (not just float or double), so we encode the property type as 0 and have a special check in QMetaProperty::type() that resolves the correct type at runtime. Reviewed-by: Simon Hausmann
| * | Make QStringBuilder work out-of-the-box if QT_NO_CAST_FROM_ASCII is definedhjk2009-06-051-35/+0
| | | | | | | | | | | | | | | | | | | | | | | | So far, only operator% was working for concatenation in those circumnstances. Now, defining QT_USE_FAST_OPERATOR_PLUS and QT_USE_FAST_CONCATENATION is enough, so user code will work without any source changes. Reviewed-by: joao
* | | don't reset the touch widget in the basicRawEventTranslation() testBradley T. Hughes2009-06-081-5/+3
| | |
* | | test basic raw event translationBradley T. Hughes2009-06-081-0/+87
| | | | | | | | | | | | | | | this makes sure that we get the proper start/last position maintenance and global->local translation.
* | | test that TouchBegin events propagate through widgets with ↵Bradley T. Hughes2009-06-081-0/+15
| | | | | | | | | | | | Qt::WA_AcceptTouchEvents
* | | Send the TouchEnd event with Qt::TouchPointReleased maskBradley T. Hughes2009-06-081-1/+1
| | | | | | | | | | | | | | | The mask isn't used and changing it doesn't do anything, so this is just a cosmetic/clarification change.
* | | test that QEvent::TouchUpdate and TouchEnd never propagateBradley T. Hughes2009-06-081-2/+49
| | |
* | | add test for TouchBegin propagationBradley T. Hughes2009-06-081-0/+53
| | |