summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* blitter: Base QBlitterPaintEngine on QRasterPaintEngineHolger Hans Peter Freyther2012-01-023-117/+151
| | | | | | | | | | | | | | The original intention was to identify a clipping bug, it turns out that during a ::begin() (and systemChanged) we should forward the QPaintEnginePrivate state to our proxy engine. Instead of using the proxy-pattern subclass rasterengine and specialize the paths we are able to accelerate using the blitter interface. This will avoid similiar problems in the future. I have no performance measurement to show which of the two approaches is faster/slower. Change-Id: I39bff11b32b1fe20284c7e8df60050de5991bb6e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* blitter: Group code by functionality in header and cpp fileHolger Hans Peter Freyther2012-01-022-120/+118
| | | | | | | | | | * Group code responsible for tracking the render pipeline state to check if we can easily accelerate it * Code that will call into the QBlittable * Code that will lock the QBlittable before calling into raster Change-Id: I862e242d59805de5094ed363b486afcdbc23ff78 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* blitter: Fix the 'solid' detection for the brush in case of fillRectHolger Hans Peter Freyther2012-01-021-2/+2
| | | | | | | | | | | A default QPainter will set a QBrush with Qt::NoBrush BrushStyle, the current code detects this as a non solid fill and all calls with fillRect and a color will not go through QBlittable. Check for Solid or NoBrush style. Manually verified that a p.fillRect(rect, Qt::red) goes through the accelerated path now. Change-Id: Ic0d98030e94f5d11abbe61628fbf71d1e08219c2 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* blitter: Move state updates into new methodsHolger Hans Peter Freyther2012-01-021-45/+86
| | | | | | | | | Create updateCompleteState(QPainterState*) so we don't need to call into the paintengine, move all state methods into the QBlitterPaintEnginePrivate class. Change-Id: If30fdcc3f63755e0443bced7d9d9fb993d4ec2b7 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* blitter: Move the definition out of the classHolger Hans Peter Freyther2012-01-021-59/+72
| | | | | | | | Cosmetic change to remove four spaces of indention from some of the deeply nested methods. Change-Id: I67fdd0ab722b7c7c67c4da7a0a0bd86459751700 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* blitter: Kill the isBlitterLocked variable of the QBlitterPaintEngineHolger Hans Peter Freyther2012-01-023-10/+11
| | | | | | | | | | It starts with being initialized wrongly, the call to buffer() will lock the data while we think it is not locked, it can also get out of sync by someone calling buffer() again. Remove the variable and check with the QBlittable if we need to lock the resource into memory. Change-Id: I350375011138d1b4c2c48c100b7b30b8ea2ae460 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* blitter: Use CapabilitiesToStateMask as a class memberHolger Hans Peter Freyther2012-01-021-31/+29
| | | | | | | | | Move the bit helper functions into CapabilitiesToStateMask as they are only used in this class, allocate the class as part of the QBlitterPaintEnginePrivate, shorten the name as well. Change-Id: If22ddd117a9789cd98edb08f23fd0ffabb17d5a5 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* blitter: Style changes to the codeHolger Hans Peter Freyther2012-01-021-78/+65
| | | | | | | | Spend some bytes for spaces after comma and keywords. This should now mostly follow the Qt style guidelines. Change-Id: I3298c8d41d40ab5b0153a33d44b1b607a2edca8e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* raster: Fix typo in a function argumentHolger Hans Peter Freyther2012-01-021-1/+1
| | | | | | | Change-Id: I903e1245667680f43414414bb0b4bfaa6240ea04 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Make QTimer::singleShot use Qt::PreciseTimer for lower timeouts.Bradley T. Hughes2012-01-021-1/+4
| | | | | | | | | | CoarseTimers are worst in their first firing, so we prefer a PreciseTimer for something that happens only once. If the timeout is too big, we use a CoarseTimer anyway (current threshold is 2000ms). Author: Thiago Macieira <thiago.macieira@nokia.com> Change-Id: I30b20acf506e442cd58126abfe3a4d70fc13b075 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change QTimerInfo (UNIX) to keep the interval in milliseconds.Bradley T. Hughes2012-01-022-5/+17
| | | | | | | | | | The API passes the interval as an int, there's no reason to convert it to a timeval struct. This also prepares for changing the UNIX timer code to support the different timer types. Author: Thiago Macieira <thiago.macieira@nokia.com> Change-Id: Ie3cc1ae8f1be6a9ad3f1766051642cbf3e614418 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add Qt::TimerType argument to QAbstractEventDispatcher::registerTimer()Bradley T. Hughes2012-01-0218-45/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | ... and deprecate the old registerTimer() functions. The new pure- virtual registerTimer() breaks source-compatibility. Subclasses cannot be instantiated anymore, since the pure virtual function signature has changed. QAbstractEventDispatcher::TimerInfo is no longer a QPair. It is now a struct with timerId, interval, and timerType members. This is a source incompatibility that should only affect subclasses of QAbstractEventDispatcher, which will need to pass 3 arguments to the TimerInfo constructor instead of 2. If the subclass used QPair<int,int> instead of the TimerInfo typedef, the QPair<int,int> declarations will need to be replaced with TimerInfo. Call the new registerTimer() function with the type from QObject::startTimer(). Change all subclasses of QAbstractEventDispatcher to reimplement the new virtual function. The type argument is unused at the momemnt, except to ensure that registeredTimers() returns the type each timer was registered with. Implementations for the various dispatchers will be done in separate commits. Author: Thiago Macieira <thiago.macieira@nokia.com> Change-Id: Ia22697e0ab0847810c5d162ef473e0e5a17a904b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add Qt::TimerType and the QTimer::timerType propertyBradley T. Hughes2012-01-028-15/+87
| | | | | | | | | | | | | | | | | | | | The timer type will control the accuracy of the timer. By default, all timers are CoarseTimers, which allows for +/- 5% interval adjustment. PreciseTimers will not have any interval adjustments, VeryCoarseTimers will have intervals adjusted to full second resolution. Use QTimer::setTimerType() or the QTimer::singleShot() overload to specify the type. QObject::startTimer() now takes a Qt::TimerType argument which defaults to Qt::CoarseTimer. QBasicTimer::startTimer() gets an overload that takes a Qt::TimerType argument. The argument is unused for now, since the QAbstractEventDispatcher interface needs to change (done in a separate commit). Author: Thiago Macieira <thiago.macieira@nokia.com> Change-Id: I3100da5aa1fe17ec30b8644897d0fe6ec4a07f52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Handle -1 (Invalid Key) and Qt::Key_unknown gracefully in encodeString.David Faure2012-01-022-0/+25
| | | | | | | | Previously they would fall into the unicode handling and return very strange values. Change-Id: I62a53894c0983bf53fd79f924b40a6fd3ba02993 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* tests: use contains(QT_CONFIG,private_tests) consistentlySergio Ahumada2012-01-022-5/+9
| | | | | | | | | | | | | | These tests used requires(contains(QT_CONFIG,private_tests)) in their .pro file, but did not subtract themselves from their parent project SUBDIRS when private_tests weren't enabled. In the best case, this wastes a little time as qmake iterates over these projects which won't be built. In some worse esoteric cases, this may break compilation or packaging. Change-Id: If36b1b8f69c3509128786fec67899ae18ffaa2bc Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Unbreak cross-compilation to ARM.Sergio Ahumada2012-01-011-1/+1
| | | | | | | v8snapshot is not required to build V8 Change-Id: I75f728a1237acaac9d3a10a87673fb2b6dd2dc91 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change event posting to use a QVector.Robin Burchell2011-12-305-9/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a ~10% improvement to the newly introduced QCoreApplication event_posting_benchmark (a simple synthetic benchmark of creating a bunch of events, posting them, and sending the queue). before: ********* Start testing of QCoreApplicationBenchmark ********* Config: Using QTest library 5.0.0, Qt 5.0.0 PASS : QCoreApplicationBenchmark::initTestCase() RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"1000": 0.82 msecs per iteration (total: 53, iterations: 64) RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"10000": 8.6 msecs per iteration (total: 69, iterations: 8) RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"100000": 84 msecs per iteration (total: 84, iterations: 1) RESULT : QCoreApplicationBenchmark::signal_slot_benchmark():"1000000": 874 msecs per iteration (total: 874, iterations: 1) PASS : QCoreApplicationBenchmark::signal_slot_benchmark() PASS : QCoreApplicationBenchmark::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of QCoreApplicationBenchmark ********* after: ********* Start testing of QCoreApplicationBenchmark ********* Config: Using QTest library 5.0.0, Qt 5.0.0 PASS : QCoreApplicationBenchmark::initTestCase() RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"1000 events": 0.781 msecs per iteration (total: 100, iterations: 128) RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"10000 events": 7.8 msecs per iteration (total: 63, iterations: 8) RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"100000 events": 75 msecs per iteration (total: 75, iterations: 1) RESULT : QCoreApplicationBenchmark::event_posting_benchmark():"1000000 events": 774 msecs per iteration (total: 774, iterations: 1) PASS : QCoreApplicationBenchmark::event_posting_benchmark() PASS : QCoreApplicationBenchmark::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of QCoreApplicationBenchmark ********* Change-Id: Ibf56d9526b0a8cbaf171008da4104bb457628172 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Flag udpTest as insignificant, fails on Ubuntu 11.10 x64.Toby Tomkins2011-12-301-0/+3
| | | | | | | | | | This testcase fails on the Ubuntu 11.10 x64 platform, add flag to .pro file so test is ignored on this platform. Task-number: QTBUG-23380 Change-Id: I51831df8c8e9bfcf63d3689e37552ca1a62691cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Adapt QGraphicsView test to QPlatformInputContextPekka Vuorela2011-12-301-27/+26
| | | | | | Change-Id: I9562a0b763fe7d77cd08451426bf2ceaec00acf9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Adapt QGraphicsScene test to use QPlatformInputContextPekka Vuorela2011-12-302-24/+118
| | | | | Change-Id: Iaf61798cc78e57563fee088711d39090b722a946 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Prevent qDebug test bypassing the testlib message handler.Jason McDonald2011-12-301-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Several of the test functions in the QDebug autotest call qInstallMsgHandler() to temporarily use a custom message handler. Unfortunately, these test functions were then resetting the message handler back to Qt's default handler at the end of the test. QTestLib also calls qInstallMsgHandler() to set a message handler that redirects debug/warning/fatal messages into the test log. When the test resets the message handler back to Qt's default handler, testlib's message handler is bypassed for the rest of the test, preventing any subsequent debug/warning/fatal messages from being visible in the test log or subject to testlib's ignoreMessage() function. This error also caused several of the test functions to fail if they were run manually. The "defaultMessagehandler" test would fail if it was run before any other test function and the "assignment" test would fail if it was run after any other test function. This commit fixes these failures by using a helper class to ensure that the previously active message handler is restored at the end of each test function, even if the test function fails or throws an exception. Change-Id: I51376724d164c8ad126e5b9be76890bf3e6a9fb0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use QVERIFY2 to output verbose failure messages.Jason McDonald2011-12-301-16/+6
| | | | | Change-Id: I2ce96d9d9f582e99c1d9f6dd6e6e80ce42d6e61d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Correct misspelt function names in QFutureWatcher test.Jason McDonald2011-12-301-4/+4
| | | | | Change-Id: I60965f3475f83a7c42d2efc6ed8adf9a1403e144 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Correct misspelt function name in qtconcurrentmap test.Jason McDonald2011-12-301-2/+2
| | | | | Change-Id: I79b54b4e0de6319add89d220d3c3306556ab4ccc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Correct misspelt function name in qtconcurrentfilter test.Jason McDonald2011-12-301-2/+2
| | | | | Change-Id: Ie7ea2defac407d099d7bb27cccfb34911b832626 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Change test to use new QTRY_COMPARE/QTRY_VERIFY macros.Robin Burchell2011-12-301-26/+10
| | | | | | | | | | | When verifying nonzero results (i.e. that something expected *did* happen), using these macros allows bailing out of the timer much earlier than the potential 5 seconds. My running this on Linux goes from ~147 seconds to ~91 seconds. Change-Id: Ie1e41252eb4eb295b5c8e795ded02f00eb7f9387 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make qDecodeDataUrl return bool.Jonas M. Gastal2011-12-295-47/+45
| | | | | Change-Id: I23b9fed39af7bea6c171b35e10bd72c424bd903e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve QTextCodec::codecForLocale() test.Jason McDonald2011-12-291-9/+10
| | | | | | | | Don't call QSKIP when omitting the optional part of the test, as doing so hides the fact that the rest of the test passed. Change-Id: I9c102e8daeaf9586b2e510c4c9ce697ead290795 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix printerPaperSize and some tst_qprinter test failuresSergio Ahumada2011-12-292-5/+1
| | | | | | | | | Removing QEXPECT_FAIL accordingly. Task-number: QTBUG-22296 Task-number: QTBUG-22562 Change-Id: I128a78897722cc067168ee50dbcbfc7537abdfcd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable variadic macros if building in c++0x mode.Stephen Kelly2011-12-291-0/+1
| | | | | | Change-Id: I40d1f1f64ad31a299ccad9258f70e9bf3255c3cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Don't allow QThreadPool test to hang on failure.Jason McDonald2011-12-291-5/+2
| | | | | | | | Use QTRY_VERIFY() to fail after a reasonable timeout rather than putting the test into an infinite loop. Change-Id: Ie0917556e15999a94cc0587f3f4c11c0d743a228 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Clarifying the flow of signals on QNetworkAccessManager.Jonas M. Gastal2011-12-282-1/+10
| | | | | | | Task-number: QTBUG-22858 Change-Id: I07eaecebf17e73f9c3148465d8970ca7672a900c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid repeatedly registering the same meta-typeJason McDonald2011-12-281-2/+2
| | | | | | | | Register the meta-type in initTestCase(), which is run once, rather than in init(), which is run before every test function is run. Change-Id: Ic62a2469da6a2a85254ffc7c4d893395202c50d8 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve qtconcurrentthreadengine autotest.Jason McDonald2011-12-281-2/+3
| | | | | | | | | | The threadCount() test function is unstable and had been disabled by making it not be a slot. It is better to disable it with QSKIP so that the test output shows that the test function exists and is in need of repair. Change-Id: Iccdc8da31e0d15d922f7e9606835d1ff1a3a4966 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cleanup itemmodel autotests.Jason McDonald2011-12-282-96/+96
| | | | | | | | Avoid using bug tracker identifiers in test function names. These identifiers lose their meaning when the bug tracker is replaced. Change-Id: Ia867f7c2ec2ab9ed546588843d532ac615a34031 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove old debug code from itemmodel tests.Jason McDonald2011-12-282-7/+0
| | | | | Change-Id: I7c6aeed2d3b593a4dac89e54ef22743d5f736d42 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Reinstate commented test data in QItemSelectionModel test.Jason McDonald2011-12-281-2/+0
| | | | | | | | The restored test data was marked as failing, but appears to pass, and the available history does not explain why it was commented out. Change-Id: I7e9e3ba72fc8fef42c91ee882efa98d25b3d8317 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cleanup itemmodel autotests.Jason McDonald2011-12-289-650/+530
| | | | | | | | Bring the code closer to compliance with Qt's coding style guidelines and eliminate excessive vertical whitespace. Change-Id: Iaa29f8edf326ddb80cbadb6c18cca4fea88fd9b2 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove empty functions from itemmodels tests.Jason McDonald2011-12-285-138/+0
| | | | | Change-Id: I23775a334812b096192c7f44c4a3cb06f4b08705 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cleanup corelib autotests.Jason McDonald2011-12-2819-8/+386
| | | | | | | | | | | | | When using QSignalSpy, always verify that the signal spy is valid. This will cause the test to give a meaningful failure when spying on a non-existant signal. Without this change, tests that spy on a signal to ensure that it is not emitted (i.e. by comparing the spy count to zero) could pass erroneously if something went wrong when creating the signal spy, as an invalid QSignalSpy will always return a count of zero. Change-Id: I41f4a63d9f0de9190a86de237662dc96be802446 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove mention of Trolltech in qlibrary autotest.Jason McDonald2011-12-283-8/+8
| | | | | | | Task-number: QTBUG-19653 Change-Id: I8cf21bac41b08187528ba7004a7a23b9baa64b17 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove mention of Trolltech from QGraphicsScene autotest.Jason McDonald2011-12-281-1/+1
| | | | | | | Task-number: QTBUG-19653 Change-Id: Iabebf17f5b09c17a767e81a0ccadd03513238a75 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove mentions of Trolltech from QRegExp autotest.Jason McDonald2011-12-281-2/+2
| | | | | | | Task-number: QTBUG-19653 Change-Id: I55ae6bed6fb2177cdc842de34ef31ae98d0d3237 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove mention of trolltech from QThreadStorage test.Jason McDonald2011-12-281-1/+1
| | | | | | | Task-number: QTBUG-19653 Change-Id: I6c74a15b6c6db415a545328b73b6dd704d69bfee Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove mention of Trolltech in QHttp autotest.Jason McDonald2011-12-283-4/+4
| | | | | | | | | | The data file named "trolltech" has nothing specific to Trolltech in its contents. Rename it to "testhtml". The lack of a file extension is intentional. Task-number: QTBUG-19653 Change-Id: Idc5c5f4ffa447151e47f66ff7364f0fa8753a699 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove non-const getters marked for elimination.Robin Burchell2011-12-272-35/+0
| | | | | | | These all have consted overloads, so there's no need for them. Change-Id: I3d4f63b8eb8f1b7df7fa772d6172e0a954184d24 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Merge QTextDocumentFragment::toHtml() overload per Qt 5 comment.Robin Burchell2011-12-272-12/+1
| | | | | Change-Id: Ic8850684c2298b996354e27cc96ad6486d7a3679 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix typos parametter -> parameter.Stephen Kelly2011-12-271-2/+2
| | | | | Change-Id: I0ebb3658477a1afdc1af5f4f6f64f12dc20ace56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Increase the value of the UserRole for the ItemDataRole enum.Stephen Kelly2011-12-271-1/+1
| | | | | | | | For future proofing. No need for it to be so small. Change-Id: I8a0c734f87671881f114922ada7c5bc9524de19b Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace a pseudo-virtual slot with a virtual method.Stephen Kelly2011-12-272-3/+2
| | | | | | Change-Id: I5d0e1e54e0d3d441b71b7594bc14e872512cc937 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>