summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix softkeys for QDialogButtonBoxes created without a parent.Jason Barron2009-11-251-16/+44
| | | | | | | | | | | | | | 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 (cherry picked from commit a0c8e134a284d45520dd3a229e68dbcd155299e6)
* Don't crash in eval() function when QtScript debugger is attachedKent Hansen2009-11-241-0/+28
| | | | | | | | | | | | | | | | | | | | | | The built-in eval() function bypasses the script registration performed by QScriptEngine::evaluate(), so if we get an atStatement() callback from JSC from that script, the scriptID-to-sourceProvider lookup will fail. In this case, just return from atStatement() without delivering the positionChange() callback to the QScriptEngineAgent, since the agent will not have received the scriptLoad() callback for that script anyway. This is a change in behavior from 4.5, but we consider it the minimum-impact fix at this point to keep 4.6.0 from crashing. The only downside is that debugging will effectively be "disabled" for the script passed to eval(), but that's a lot better than crashing. Task-number: QTBUG-6108 Reviewed-by: Jedrzej Nowacki (cherry picked from commit 23002374d11598b26b6585e78dc073071a13f0ec)
* Fix regression introduced in 1e6b424b692b20dcfec920f8d3563e520ec1ff05João Abecasis2009-11-231-0/+112
| | | | | | | | | | | | | When processing the result of QIODevice::readLine, forgot to take into account that a '\0' is appended to the array. The terminating character is not accounted for in the number of bytes returned. By pre-allocating a byte for the terminating null character, we make sure we'll actually read 16k bytes on each and every iteration. Task-number: QTBUG-6019 Reviewed-by: Thiago Macieira (cherry picked from commit b7692016f282251002b3e85dfcb5567bd91a12c0)
* Q_ASSERT failure when resizing a span to (1,1) in 1st cellGabriel de Dietrich2009-11-231-0/+8
| | | | | | Reviewed-by: Olivier Task-number: QTBUG-6004 (cherry picked from commit 75d68b2b245da91ec9f985893f9b233d9d6a0793)
* Autotest: Change the service name we're testing between tests.Thiago Macieira2009-11-201-5/+7
| | | | | | | | Otherwise, we get errors from one test to the next, due to the cleanup unregistering the name again. Task-number: QT-5588 (cherry picked from commit 65e00180516eb136c2a7119dfe9e63fc9c66065e)
* Export QStateMachine::WrappedEvent and QStateMachine::SignalEventEskil Abrahamsen Blomfeldt2009-11-191-0/+8
| | | | | | | | | These two classes were missing exports. Since the accessors are inline, the bug would only be visible when someone tried to call the constructors of the classes. Reviewed-by: Kent Hansen (cherry picked from commit c7135e9b8d76e50daaa38d5d163687357878dc24)
* Crash when rendering a scene using DeviceCoordinateCacheGabriel de Dietrich2009-11-191-0/+16
| | | | | | | | | | | The execution flow would allow the widget the scene would be rendered on to be null. However this very widget was being used when using DeviceCoordinateCache to get the desktop size. We now skip this optimisation when no widget is given. Auto-test included. Reviewed-by: bnilsen Task-number: QTBUG-5904 (cherry picked from commit b6070e9a069219e4049fcf017d6a160b80bf37b7)
* Fix tst_QGraphicsView::inputMethodSensitivity autotestOlivier Goffart2009-11-192-6/+65
| | | | | | | | | | The problem was that the scene was not notified it lost the focus when it was disconnected from the view (with setScene) So when it got back the focus, nothing was updated because the scene thought it still had the focus. Reviewed-by: jasplin (cherry picked from commit c535df0f286826c5575ec00c7e4c3f811a73918b)
* Fixed Multi-length strings not implemented for float functionsOlivier Goffart2009-11-191-2/+12
| | | | | | | Task-number: QTBUG-5963 Reviewed-by: Oswald Buddenhagen Reviewed-by: Eskil (cherry picked from commit a73e660fd05bafc402d63d71e811a621e46f452d)
* Update license headers to release version.Jason McDonald2009-11-191304-16952/+16952
| | | | Reviewed-by: Trust Me
* Fix regression introduced in c08e708037d33271825ce6a6a1ac640e96b70c36João Abecasis2009-11-191-0/+12
| | | | | | | | | | | | When writing nothing to a file, not actually writing anything is not an error. Also, from a change introduced in the same commit, there is no point in checking for EOF when writing. Task-number: QTBUG-5847 Reviewed-by: Olivier Goffart (cherry picked from commit 72ee915bb0465549b7ca8e62d2af146cc44fdeac)
* Removing unnecessary chunking and stat'ing when reading QIODeviceJoão Abecasis2009-11-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chunk size increased to QIODEVICE_BUFFERSIZE (currently 16k) where chunking is still needed. Namely, on sequential devices and when QByteArray is unable to allocate a large enough buffer. This is necessary for backward compatibility Improved validation and prevention of overflow in maxSize argument. Updated autotest that relied on a null QByteArray when no data was available and no errors were found. The only guarantee we should be providing in this case is an empty result -- even though that behavior is preserved for the time being. Affected functions: * QIODevice::read(qint64 maxSize) Chunking will still happen for large maxSize (i.e., QByteArray resize fails), where it could be used as a synonym for QIODevice::readAll(). No stat'ing performed. Read from device continues for as long as it is successful. Stops if an error occurs or if we get less data than requested. * QIODevice::readAll() Chunking is performed for sequential devices where total size wouldn't be known beforehand. For sequential devices, reading continues as long as data is returned, even if less than requested. Non-sequential devices will be stat'ed once. If QIODevice::size returns 0, this is taken to mean unknown size and chunking is performed. Otherwise, a single read request is made for the specified size. On failure to resize QByteArray, nothing is returned. * QIODevice::readLine(qint64 maxSize) Chunking is performed for maxSize == 0, or if we can't allocate a large enough buffer. No stat'ing performed at this level. Read from device continues until EOL is found, as long as we get all requested data. Task-number: QT-2347 Reviewed-by: Thiago Macieira Reviewed-by: Miikka Heikkinen (cherry picked from commit 1e6b424b692b20dcfec920f8d3563e520ec1ff05)
* Fix regression in emitting of QTextDocument::undoCommandAdded()Thomas Zander2009-11-181-0/+11
| | | | | | | | | | | The test I wrote was not testing if calling undo/redo had any effect on emitting undoCommandAdded(), added these test cases and fixed the QTextDocumentPrivate::endEditBlock so we now again emit only when an undo command is added, not also on calling undo or redo. Reviewed-by: mae Reviewed-by: Samuel Rødal (cherry picked from commit 7e1f19c3e3036f166a84dbaa916ec1da1cc818c6)
* Fix S60 input method not showing up in editable QGraphicsTextItemsSimon Hausmann2009-11-181-0/+3
| | | | | | | | | Correctly set the ItemAcceptsInputMethod flag in setTextInteractionFlags. Reviewed-by: Andreas Reviewed-by: axis Reviewed-by: Janne Koskinen (cherry picked from commit ead0ab9e14603f278fcaaf4f126cdd232274fe26)
* Fix input method support on widgets that have a focus proxy set.Simon Hausmann2009-11-181-0/+59
| | | | | | | | | | When enabling/disabling a widget or changing its InputMethodEnabled attribute, use the focus proxy widget's input context for reset and for setting the focus widget on the input context. Task-number: QTBUG-5781 Reviewed-by: Denis (cherry picked from commit 851814cfedd678bfdf019eeafecd085b9df9058f)
* QUrl::fromUserInput: improvements, corrections and make the demoJocelyn Turcotte2009-11-181-2/+6
| | | | | | | | | | | | | | browser use it. - Handle windows files names by looking for paths first (and don't check that it exists first) - Handle host names without dots (it was not handled because of difficulties with the case host:port) - Return the parsed url only if the host or the path is not empty instead of returning a url that looks like "http:" Reviewed-by: Thiago Macieira (cherry picked from commit aeea26b384a362e59c335f7932a8b3915c1c8383)
* QMenu: do not crash if action is destroyed in the triggered signal.Olivier Goffart2009-11-181-0/+13
| | | | | | Task-number: QTBUG-4480 Reviewed-by: Thierry (cherry picked from commit dc2cb80ceb35edd958685189e9075ac1061870f4)
* Fixed loading of 8-bit grayscale TIFF files.Samuel Rødal2009-11-184-3/+23
| | | | | | | | | | | | The PHOTOMETRIC_MINISBLACK and PHOTOMETRIC_MINISWHITE settings also apply to 8-bit grayscale, so we need to check the bit depth of the image as well. For convenience we also try to write the images using PHOTOMETRIC_MINISBLACK and PHOTOMETRIC_MINISWHITE as opposed to PHOTOMETRIC_PALETTE when we detect that the color table is grayscale. Task-number: QTBUG-5459 Reviewed-by: Benjamin Poulain (cherry picked from commit 845c69b2e780e1646f68ee99beda10768a1971e2)
* Make tst_headers pass with changed QtScript licenseSimon Hausmann2009-11-171-1/+1
| | | | | | | Add LGPL-ONLY to the supported tag types. Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> (cherry picked from commit 3a92f40e1faf4d81f5071a66558b051a9fda727e)
* Add a simpler FBO autotest which just uses glClear()Tom Cooksey2009-11-171-0/+31
| | | | | If this autotest doesn't pass, FBOs are really broken. (cherry picked from commit 3143014a80d1dfdfe3bb0f6175a3f7f7f41b2aaf)
* Set frameless window hints on QGL test windows under QWSRhys Weatherley2009-11-171-0/+15
| | | | | | | | | | | | | | | QWS combines the window title bar and the top-level widget into one window surface, which causes problems when the top-level widget is a QGLWidget: the raw GL surface contents are not the same as on other platforms where only the top-level widget contents are included in the window surface. This change sets Qt::FramelessWindowHint on QWS systems on widgets where we need to read back the top-level widget for comparison against a reference image. Reviewed-by: Sarah Smith (cherry picked from commit b48ae5932131b6d0934a50846cad441f6e9f5ccd)
* Make qgl autotests more stable & passing in test farmTom Cooksey2009-11-171-6/+18
| | | | | | | | | | There were problems with false-failures due to the test farm's GL implementation having off-by-one pixel errors. To fix this, we don't compare every pixel but rather sample pixels in a grid pattern which avoids boundries. Reviewed-By: Samuel (cherry picked from commit 18a3daf86118bd23a28f05fcf1721969c4ba491b)
* Enable & fix qgl autotests on 16-bpp systemsTom Cooksey2009-11-171-49/+111
| | | | | | | | | | Introduce a fuzzy pixel and image compare which changes it's allowed fuzz based on the system's color depth. If the compared images are different, the autotests will also save the two images to the current directory for comparison. Reviewed-By: Samuel (cherry picked from commit c92670dc8b2e5cf727c33943dde0755c17d0dac2)
* Mark both the new and original EGL contexts as sharingRhys Weatherley2009-11-171-0/+1
| | | | | | | | If we succeed in creating a shared context, then mark the original as shared as well. Reviewed-by: Sarah Smith (cherry picked from commit 09a123c7f9df37f82a4baab0e7ec70ebfe5444d3)
* Fixed tst_qpixmapfilter testcaseGunnar Sletta2009-11-161-12/+12
| | | | | Reviewed-by: Samuel (cherry picked from commit e2e8104c03608ef753f84740bdf6ac1bff18be84)
* Match drop shadow bounding rectangle unit test to the new implementationRhys Weatherley2009-11-161-13/+13
| | | | | Reviewed-by: Sarah Smith (cherry picked from commit 829265b98a6c7c3856f3504e29209bff38c95ce9)
* Early return for allowMove within a parent QModelIndexStephen Kelly2009-11-161-18/+45
| | | | | | | | | | If this is not done, the climbing ancestors later in the method uses srcParent.row() as pos causing failure depending on which rows are being moved, and what the row of the parent is. Merge-request: 2072 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com> (cherry picked from commit e6be9c88bc98481936fcba7fa1cfb4e255f6e30b)
* Make isSharing() reset to false when context no longer sharingRhys Weatherley2009-11-161-0/+5
| | | | | | | | | | | The documentation for QGLContext::isSharing() indicates that the function returns true only when the context is sharing. However, previously the sharing flag would stay on if the context was created as sharing but is no longer sharing. Task-number: QTBUG-5578 Reviewed-by: Sarah Smith (cherry picked from commit 0e74cc3e1a05147a8ae9c1c4be7c9f836da1acf3)
* Revert "Always set a clip on the painter in QGraphicsView."Andreas Aardal Hanssen2009-11-131-72/+0
| | | | | | | | | | This reverts commit 4bf7f90a27377f439e86d6175e5e3cdebd131be0. The change is already reverted in kinetic-declarativeui. Reviewed-by: Warwick Allison Reviewed-by: bnilsen (cherry picked from commit 5e3f81237aae96181c9315b8e7c6c5368629a000)
* Make it possible for QMainWindow to restore the geom of undocked widgetThierry Bastian2009-11-131-0/+16
| | | | | | Task-number: QTBUG-5663 Reviewed-by: ogoffart (cherry picked from commit 2321e8636d7436b70a8afcde16828f00c4b8590e)
* Make sure posted events are always sent when calling processEvents() on Win32Bradley T. Hughes2009-11-131-0/+36
| | | | | | | | | | After 31f1ff910, posted events could be delayed by a previous call to processEvents(). This causes some tests to randomly fail, so bring back the invariant that processEvents() will always call sendPostedEvents() when called "manually" (i.e. not from exec()). Reviewed-by: Prasanth Ullattil (cherry picked from commit fe0f807e1f4e7510c6d8cddd848bcbc25e358651)
* compile fix for tst_qfile on Windows CEJoerg Bornemann2009-11-131-0/+1
| | | | | | | Changed the signature of QT_OPEN to be the same on all platforms. Reviewed-by: thartman (cherry picked from commit c9aa65bf79fdd09ad5d6405ba1d127888e26fd26)
* Autotest: fix compiling after qscopedpointer.h changed.Thiago Macieira2009-11-131-28/+3
| | | | | | | | | QCustomScopedPointer was moved to a private header since it's only a helper class. QScopedSharedPointer wasn't necessary since it can be replaced with QSharedDataPointer neatly. Reviewed-by: Jesper Thomschütz (cherry picked from commit 95db13345cd7b6b7cac8725fe2879aaf80233818)
* Fixed QGraphicsEffectSource autotest after graphics effect API changes.Samuel Rødal2009-11-131-30/+20
| | | | (cherry picked from commit 1a36403e3c21a60f81cd0244b84f21223b4216e9)
* qfontcombobox auto test added to tests/auto/auto.proJoerg Bornemann2009-11-101-0/+1
| | | | Reviewed-by: TrustMe
* Merge branch 'tools-team/4.6' (early part) into 4.6Oswald Buddenhagen2009-11-1011-1/+126
|\ | | | | | | | | Conflicts: src/corelib/tools/qscopedpointer.h
| * record id-based messages even if they have an empty sourceOswald Buddenhagen2009-11-065-0/+25
| | | | | | | | | | | | this makes sense if one uses lupdate only for validation purposes, i.e. to find out if the code uses only ids which are defined in some external specification.
| * handle messages with ids (more) correctlyOswald Buddenhagen2009-11-069-1/+101
| | | | | | | | | | when comparing two messages which both have ids, compare only the ids. this affects finding/reporting duplicates and merging.
* | Improvements to graphics effects API after review round.Samuel Rødal2009-11-101-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | * Get rid of QGraphicsEffectSource from the public API, instead add convenience functions in QGraphicsEffect. This way we commit to less API, and are free to introduce a customizable QGraphicsEffectSource in a future release. * Move PixmapPadMode into QGraphicsEffect and tweak the names of the enum values. * Make QGraphicsBlurEffect::BlurHint into a bit flag, for extensibility. Reviewed-by: Bjørn Erik Nilsen
* | Extending QScopedPointer test caseJoão Abecasis2009-11-101-17/+139
| | | | | | | | | | | | | | | | | | | | | | ... to also test QScopedArrayPointer, QCustomScopedPointer and QScopedSharedPointer. Added one level of indirection to comparison test case to avoid double-delete in case of test failure. The test also tests other aspects of Q*Scoped*Pointer behavior. Reviewed-by: Olivier Goffart
* | Changes to low-level audio API.Kurt Korbatits2009-11-104-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | QAudioFormat::isNull() -> QAudioFormat::isValid() (inverse logic) QAudio::SuspendState -> QAudio::SuspendedState QAudio::StopState -> QAudio::StoppedState QAudioDeviceInfo::deviceList() -> QAudioDeviceInfo::availableDevices() clock() -> elapsedUSecs() totalTime() -> processedUSecs() QIODevice* start(QIODevice*) -> void start(QIODevice*), QIODevice* start() Reviewed-by:Justin McPherson
* | Changes to low-level audio API.Kurt Korbatits2009-11-104-28/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAudioFormat::isNull() -> QAudioFormat::isValid() (inverse logic) QAudio::SuspendState -> QAudio::SuspendedState QAudio::StopState -> QAudio::StoppedState QAudioDeviceInfo::deviceList() -> QAudioDeviceInfo::availableDevices() clock() -> elapsedUSecs() totalTime() -> processedUSecs() QIODevice* start(QIODevice*) -> void start(QIODevice*), QIODevice* start() Reviewed-by:Justin McPherson
* | Merge branch '4.6' of ../qt into 4.6Kurt Korbatits2009-11-1058-1412/+2896
|\ \
| * \ Merge commit 'qtwebkit/qtwebkit-4.6' into 4.6Jocelyn Turcotte2009-11-092-25/+32
| |\ \
| | * | QNetworkCookie: Add the dot prefix of the domain while adding to the jarJocelyn Turcotte2009-11-092-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead than when parsing the cookie header. This corrects the bug QT-2379, happening in the following sequence: parseCookie -> setCookieUrl -> toRawForm -> parseCookie where a default domain would now also have a dot prefix, and shouldn't. QT-2379 Reviewed-by: Peter Hartmann
| * | | Merge branch '4.6-api-review' into 4.6Marius Storm-Olsen2009-11-0913-67/+67
| |\ \ \
| | * | | API review: Rename numRects() -> rectCount()Marius Storm-Olsen2009-11-091-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegion::numRects() is marked obsolete. Removed all usage of the old function inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
| | * | | API review: Rename numDigits() and setNumDigits()Marius Storm-Olsen2009-11-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLCDNumber doesn't follow the API convention of *Count and set*Count(). Introduce properly named functions, and obsolete the old ones. Reviewed-by: Andreas Aardal Hanssen
| | * | | API review: Rename functions numColors(), setNumColors() and numBytes()Marius Storm-Olsen2009-11-068-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPaintDevice and QImage used the functions numColors(), setNumColors(), and numBytes(). However, this is not consistent with the rest of the Qt API which uses *Count() and set*Count(). Removed all usage of these functions inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
| | * | | API review: QRegExp::numCaptures() -> QRegExp::captureCount()Marius Storm-Olsen2009-11-063-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp::numCaptures() is marked as obsolete. Replaced all usage in Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen