summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation with strict iteratorsDavid Faure2009-05-181-8/+9
|
* Graphics View Optimization: Use a simple style option by default.Bjoern Erik Nilsen2009-05-152-3/+12
| | | | | | | | | | | | | | | | | | | | | QStyleOptionGraphicsItem extends QStyleOption with three values: 1) matrix, 2) levelOfDetail, 3) exposedRect, and they all involve expensive QTranform operations when calculated. We pass style option(s) to drawItems() and paint(), but the extended values are usually not in use. We can therefore gain quite some nice speedup by making them opt-in with the QGraphicsItem::ItemUsesExtendedStyleOption flag. Additionally, QStyleOptionGraphicsItem::levelOfDetail has been obsoleted, and a new function QStyleOptionGraphicsItem:: levelOfDetailFromTransform(const QTransform &) has been added. Me and Andreas don't consider this change to be too controversial even though it changes the behavior. Auto tests still pass. Reviewed-by: Andreas
* Merge branch '4.5'Thiago Macieira2009-05-142-2/+117
|\ | | | | | | | | Conflicts: tools/macdeployqt/shared/shared.cpp
| * QColor::toCmyk() does not convert the color if it is already in CMYKBenjamin Poulain2009-05-141-0/+21
| | | | | | | | | | | | | | | | | | QColor::toCmyk() converted the color to RGB and then to CMYK. If the color was already in CMYK, this conversion change it. The color is now returned directly if it is in CMYK Reviewed-by: Ariya Task-number: 253625
| * Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5Andy2009-05-141-0/+110
| |\
| | * Fix QGraphicsItem::deviceTransform() to also work with normal items.Andreas Aardal Hanssen2009-05-141-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsItem::deviceTransform() returns the item-to-device transform, provided with the device-to-scene transform, and combining it with the item's scene transform. This function is meant to handle items that enable ItemIgnoresTransformations, but it happened to not work properly for items that _don't_ enable that flag. Unfortunately this bug is hard to work around for users from the outside, as it requires you to check if the item or any ancestor enables ItemIgnoresTransformations. The fix also removes unnecessary branchs inside QGV so that we use the same function for all items. Reviewed-by: bnilsen
| * | Prevent duplicate entries in the sidebar when the paths are the sameAndy2009-05-141-2/+7
| |/ | | | | | | | | | | | | | | | | If two urls were added to the sidebar that only differed in how they referenced the added url (i.e. /foo/bar/. and /foo/bar) then only one entry should appear. Task-number: 253532 Reviewed-by: Alexis
* | QColor::toCmyk() does not convert the color if it is already in CMYKBenjamin Poulain2009-05-141-0/+21
| | | | | | | | | | | | | | | | | | QColor::toCmyk() converted the color to RGB and then to CMYK. If the color was already in CMYK, this conversion change it. The color is now returned directly if it is in CMYK Reviewed-by: Ariya Task-number: 253625
* | Fix missing update of edit geometry on QSpinBoxJens Bache-Wiig2009-05-141-0/+6
| | | | | | | | | | | | | | | | | | | | When showing or hiding spinbox buttons we did not update the child line edit geometry. This would on windows basically mean that the buttons would not show up as they were completely covered by the edit. Task-number: 235747 Reviewed-by: ogoffart
* | Fix sending of double-click events after explicit grab-ungrab.Andreas Aardal Hanssen2009-05-141-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug report came from the Declarative UI project as part of Kinetic. In FxFlickable the mouse is explicitly grabbed inside the mouse press event handler, and it's (explicitly) released in the release handler. When doing this, lastMouseGrabber is 0, and the double-click is delivered as a press. The fix is to not convert the double-click to a press if the receiver is the first and only mouse grabber (i.e., lastMouseGrabber is 0). The fix isn't entirely correct, as it can in theory allow an item to receive a double-click event as the first received event. This seems to only be possible in the case of using explicit mouse grabbing in combinations with the press and release event handlers so it's quite a corner case. Reviewed-by: Alexis
* | Merge branch 'master' of ../master into contiguouscacheIan Walters2009-05-1410-18/+947
|\ \
| * \ Merge branch '4.5'Thiago Macieira2009-05-132-0/+73
| |\ \ | | |/ | | | | | | | | | Conflicts: tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| | * Improve the HTTP status line parsing and catch more errors.Thiago Macieira2009-05-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need for using QByteArrayMatcher for one single character, so avoid the overhead. Also validate the message header a bit more: we require the status line to start with "HTTP/n.m " where n and m are positive integers less than 10. Task-number: 248838 Reviewed-by: Markus Goetz
| | * Fix handling of garbage data sent by the HTTP server instead of aThiago Macieira2009-05-131-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proper HTTP reply. If the server's reply doesn't start with "HTTP/", then the reply is not valid. This could happen if we connected via HTTP to an HTTPS server. It could also happen with an Icecast server (reply ICY/x.y). Task-number: 248838 Reviewed-by: Markus Goetz
| | * Reset the 'connectedToScene' flag when changing the scene of a viewLeonardo Sobral Cunha2009-05-131-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QGraphicsScene::_q_emitUpdated() the slot QGrpahicsView::updateScene(QList<QRectF>) gets connected and a boolean (connectedToScene) is set to prevent double connections. The problem is that this boolean was not reset when the view gets a new scene. Task-number: 253415 Reviewed-by: andreas
| * | QNAM: Upload architecture change: Auto testMarkus Goetz2009-05-131-16/+516
| | | | | | | | | | | | | | | Reviewed-by: Thiago Macieira Reviewed-by: Peter Hartmann
| * | QRingBuffer: Enanced with readPointerAtPositionMarkus Goetz2009-05-133-0/+207
| | | | | | | | | | | | Ability to read from a QRingBuffer at any position without modifying it.
| * | Merge commit 'origin/4.5'Olivier Goffart2009-05-132-2/+105
| |\ \ | | |/
| | * Fixes a segfault from out of order cleanup of mysql resources.Bill King2009-05-131-2/+20
| | | | | | | | | | | | | | | | | | | | | If a QSqlQuery survived the lifetime of removal of a mysql db connection (that failed), the cleanup code would cause a segfault because it was using an out of date pointer that was pointing at memory that'd been freed by the removeDatabase() call. Revby: Justin McPherson Task-number: 205701
| | * Fixed bug with Qt::WidgetWithChildren shortcut context in QGraphicsWidget.jasplin2009-05-121-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | For a QGraphicsWidget w, a shortcut with Qt::WidgetWithChildren context would trigger even if w did not have focus (provided no other widgets in the view had focus). Reviewed-by: andreas Task-number: 250119
| * | QListView was assuming that selected indexes were always children ofThierry Bastian2009-05-121-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | their root. This can be different. ...especially if one manages the selection by program or if you share the selection model with a treeview. Task-number: 196118 Reviewed-by: ogoffart
| * | The editor geometry in item views is not correctly updated when 1stThierry Bastian2009-05-121-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shown The problem is that it gets the previous geometry of the cell whereas its own sizeHint might lead to change the geometry of the cell. Task-number: 253109 Reviewed-by: ogoffart
| * | tst_qsslsocket: Added assertions that make test fail if certs not foundMarkus Goetz2009-05-121-0/+2
| | |
* | | Merge branch 'master' into contiguouscacheIan Walters2009-05-12256-2636/+6176
|\ \ \ | |/ /
| * | Add a benchmark to measure performance on QGV with caching.Alexis Menard2009-05-113-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | This commit add an benchmark to allow testing performance with cache enable or not. It covers different use cases with item rotating, moving and so on. Reviewed-by:bnilsen
| * | Merge branch '4.5'Thiago Macieira2009-05-113-0/+345
| |\ \ | | |/
| | * Add a test for UTF-8 conditionsThiago Macieira2009-05-112-0/+312
| | |
| | * Don't leak memory when assigning scriptvalue to iteratorKent Hansen2009-05-111-0/+33
| | | | | | | | | | | | | | | | | | The d-pointer was not deleted as it should be. Reviewed-by: Harald Fernengel
| * | Merge branch '4.5'Thiago Macieira2009-05-1159-15/+246
| |\ \ | | |/
| | * Add a license file for the XML Conformance Testsuite.Thiago Macieira2009-05-111-0/+59
| | | | | | | | | | | | | | | | | | | | | The source of the license text is http://www.w3.org/Consortium/Legal/copyright-software-19980720 Reviewed-by: Trust Me
| | * Fixes qt3support unit tests generating compile failures when Qt is notRohan McGovern2009-05-1153-9/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configured with qt3support. The build system knows when qt3support was turned off, so let's just skip these tests in that case. That makes more sense than individually configuring each autotest machine to skip these tests when the configuration is known to turn off qt3support, which is what's done previously. Reviewed-by: Lincoln Ramsay
| | * Fixes a crash in QPrinterDialog with relative filenamesJoão Abecasis2009-05-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's better to set the sourceModel in the constructor for QFSCompletor, as requiring that it be set separately is error prone. Surprisingly, the printer dialog crash only appears to happen when using relative filenames. Task-number: 253135 Reviewed-by: alexis
| | * Fix QCompleter with UnfilteredPopupCompletionJoão Abecasis2009-05-081-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes regression introduced in a794ded85f74516239a08cf848e6b4f8b6dcac6a. When using UnfilteredPopupCompletion the matchCount is always zero and completion was being skipped. By adding the check for showAll we still avoid the assert but retain correct behavior. Task-number: 253125 Reviewed-by: jasplin
| | * Fix leak of file descriptors in QTemporaryFileJoão Abecasis2009-05-082-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using setFileName in QFile::copy (introduced recently) has a nasty side-effect of leaking file descriptors in QTemporaryFile. This happens because the code assumes the file has been closed. In QTemporaryFile, we need to explicitly call native file engine close. Test case by Thiago. Bug report from Arora developers. Reviewed-by: thiago
| | * Fixes QIBASE driver crashes on multiple execution of a prepared queryBill King2009-05-071-4/+15
| | | | | | | | | | | | Task-number: 246808
| * | Extend QTextDocument testmae2009-05-081-0/+18
| | | | | | | | | | | | This new test tests desired undo merging behaviour after insertions.
| * | Merge branch '4.5'Thiago Macieira2009-05-074-2/+123
| |\ \ | | |/ | | | | | | | | | | | | Conflicts: src/gui/painting/qbackingstore.cpp src/gui/painting/qwindowsurface_raster.cpp
| | * Fixed some inconsistencies for image drawing on non-integer coords.Samuel Rødal2009-05-072-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for 1x1 source rect image drawing in change ffbb3c1a2aee4134dce80cd144a26bf32865b698 was incorrect for transforms with type >= TxScale. The aliased coordinate delta needs to be applied in device coordinates, not in logical coordinates. Also specialize the non-antialiased TxScale case by simply calling fillRect_normalized directly, avoiding having to scan convert the rectangle manually. Task-number: 251561 Reviewed-by: Trond
| | * Make QNetworkProxy calculate the capabilities for a new proxy typeThiago Macieira2009-05-071-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you write: QNetworkProxy proxy; proxy.setType(QNetworkProxy::HttpProxy); Then now QNetworkProxy will set the capabilities to the default value for the new proxy type. Previously, it wouldn't do that: default values were set only for the type passed in the constructor. Reviewed-by: Peter Hartmann
| | * Make QDBusPendingCallWatcher emit a signal if it is created on anThiago Macieira2009-05-071-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | already-finished call. This fixes a bit of a "surprise" when calling a local method (which returns and finishes immediately) or when by accident calling a function that returns QDBusReply instead of QDBusPendingCall/Reply. Reviewed-by: Trust Me
| * | Fix treeview test with some styleOlivier Goffart2009-05-071-1/+4
| | | | | | | | | | | | the skulpture style (from KDE) always set ScrollByPixel
| * | spanning columns did not have ViewItemPosition ↵Olivier Goffart2009-05-071-3/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | QStyleOptionViewItemV4::OnlyOne set The new autotest tests lots of the flags of the QStyleOption Reviewed-by: Thierry Task-number: 252616
| * | Fixed qDebugs within tests being written as "error" tags in theRohan McGovern2009-05-072-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xunitxml testlog. `error' in xunit causes many xunit processing tools to consider the test as failing. This is different semantics from native testlib XML, where a qDebug is considered a message and not a failure. Change it to put qDebugs under the "system-err" tag when using xunitxml to retain semantic compatibility with testlib XML. Autotest: tst_selftests
| * | Merge branch '4.5' of git@scm.dev.troll.no:qt/qtSimon Hausmann2009-05-069-2/+308
| |\ \ | | |/ | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac_p.h src/gui/widgets/qmainwindow.cpp
| | * Crash in QWidget::render when passing an untransformed QPixmap painter.Bjoern Erik Nilsen2009-05-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The crash only occurred on Windows and X11 when running with -graphicssystem raster. The reason is that the actual paint device in QRasterPaintEngine::begin() is changed to pixmap->data->buffer(), which means QPaintEngine::paintDevice() returns something else than what it was told to paint on (see cb0c899b56b84154f69ddc545991bc6ded96ab01) The root of the problem, however, was that we used a weird condition (painter->worldMatrixEnabled(), added in 345072b9 for Qt 4.4) to find the target device. We did that because the shared painter was completely different in 4.4. We refactored it in 4.5.0, and we can only trust QPaintEngine::paintDevice to be the target device. Auto-test included. Task-number: 252837 Reviewed-by: Trond
| | * QGraphicsItem::setOpacity(0.0) does not trigger an update.Bjoern Erik Nilsen2009-05-061-2/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that we discarded update requests for fully transparent items, which is correct, but we even did that when the update was issued from QGraphicsItem::setOpacity. We don't have to, and shouldn't, consider the opacity in that case. Whenever we reach the fullUpdateHelper call in setOpacity it means we have to do an update regardless of the current opacity (oldOpacity was not 0.0 if the currentOpacity is 0.0). Auto-test included. Task-number: 252913 Reviewed-by: Andreas
| | * Fixed some inconsistencies for image drawing on non-integer coords.Samuel Rødal2009-05-062-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Don't use aliased coordinate delta for image drawing. Related to change fde7475bcf9c10522a8170e6eb8fb9a8fadc21cd. Task-number: 251561 Reviewed-by: Trond
| | * Ensured correct rounding of scaled image drawing at non-integer coords.Samuel Rødal2009-05-054-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Images coordinates should simply be rounded and are not to be subject to the aliased coordinate delta. The patch also adds a tiny delta in QSpanData::setupMatrix() to ensure coordinates for fetching from source images are rounded the opposite direction of the target rectangle. This removes a lot of artifacts when trying to do border-image based drawing on non-integer coordinates. A new qps test for border-image drawing is included. Task-number: 251561 Reviewed-by: Trond
| | * Fixed bug where 0-opacity would cause images to be drawn fully opaque.Samuel Rødal2009-05-051-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | The bug appears in the raster paint engine and only in release mode as the cause of the bug is in the MMX and SSE blend functions which are disabled in debug. To prevent it simply we return early if we detect that we have an opacity of 0. Reviewed-by: Trond
| | * Fix memory leak in QFutureMorten Sørvig2009-05-051-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | The held results were not cleared by QFutureInterface::operator=(QFutureInterface) Add call to resultStore().clear(), similar to the destructor. This needs to be done in the header since we know the template type here. Task-number: 252208 Reviewed-by: brad