summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
...
* QResourcesManager unit test completedPaul Lemire2014-08-143-7/+411
| | | | | Change-Id: I3fbf2f71d2ef35d0f0cbe6ac2c8d1f539a6c0de7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_node corrected to work with abstract nodes and componentsPaul Lemire2014-08-131-22/+52
| | | | | Change-Id: Icaed79267790f6d17c2e3ba481a1a9bd3e65a95e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Renamed Component to QComponentPaul Lemire2014-07-051-9/+9
| | | | | Change-Id: Ifd585f5883e446d0569c38219d26ba581455e857 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Renamed Entity to QEntityPaul Lemire2014-07-051-7/+7
| | | | | Change-Id: I16b3d967e1244e3d47bffd36f6284a0e9ef0a89f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Renamed Node to QNodePaul Lemire2014-07-051-19/+19
| | | | | Change-Id: I0a0ebde1c107db8831b596eab1e512a2062979f7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rendering using QFrameAllocatorPaul Lemire2014-07-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | Renderer contains a QThreadStorage object containing a vector of QFrameAllocator. Each Renderview Jobs calls the Renderer to retrieve the QFrameAllocator for their thread and their frame index (between 0 and the maximum number of cached frames). If the QThreadStorage hasn't been initialized, it is initialized, otherwise the QFrameAllocator is returned directly. The QFrameAllocator is automatically cleared if the previous call wasn't for the same frame index. QUniformValues and RenderViews have been updated to used QFrameAllocator to allocate objects instead of using new. RenderQueue has been slightly modified. It is now possible to retrieve the RenderQueue to render without popping it out of the QCircularBuffer of RenderQueues. A call to popFrameQueue does that. This is needed to be sure that we won't be rendering a RenderQueue that could have been cleared because the backend is rebuilding a newer frame. This forces the Renderer to render the whole frame before allowing the Jobs to build other frames if there are more than the maximum amount of cached frames. Change-Id: Ie7718e201e2f6b420903092d1706277e9786916e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QFrameAllocator + unit testsPaul Lemire2014-07-033-0/+635
| | | | | Change-Id: I0bf124236d0bf8f28c347b07ab323e64091c5e6f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* UnitTests for Nodes/Entity/ComponentPaul Lemire2014-06-273-1/+299
| | | | | Change-Id: Ic9558158f00d8bff0f7efc0fe3576027a03daae9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAbstractResourcesManager renamed to QResourcesManagerPaul Lemire2014-06-262-20/+20
| | | | | Change-Id: Ic89c53ee527cf1f174445f019566b8ab8c648f36 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAbstractResourcesManager refactored to use a policy based designPaul Lemire2014-06-262-20/+20
| | | | | | | | | | | | | | | | | | | | Two policies have been added, AllocatingPolicy and LockingPolicy. The AllocatingPolicy removes the need for subclassing QAbstractManager to handle different allocating scheme. This is now handled through a dedicated AllocatingPolicty that can be easily set by setting a template parameter. The default AllocationPolicy is ArrayAllocatingPolicy. QArrayResourcesManager and QListResourcesManager have therefore been removed and replaced by those. Tests have also been updated. The second policy, LockingPolicy provides a way to specify the locking behavior to be used by the QAbstractResourcesManager. The default is NonLockingPolicy which doesn't lock anything. The other LockingPolicy provides locking around a QReadWriteLocker. The QAbstractResourcesManager class should be renamed to QResourcesManager. Change-Id: Ifecf7f1bcd5205eff78f9200b4dee004bee28af4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add minimal cmake tests to get past qmake runSean Harmer2014-06-262-0/+22
| | | | | Change-Id: I1ba314dab255f4666a7bd93f2e45fa37c4cbfcad Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Don't build renderqueues test when symbols are not availableSean Harmer2014-06-131-1/+3
| | | | | Change-Id: I978b27f444f3e897478060ff16b2a0b0dcbfd558 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderQueues of RenderViewPaul Lemire2014-04-193-0/+270
| | | | | | | | | | | | | | | | | | | RenderQueues class uses a QBounderCircularBuffer to store computed RenderViews of a subset of the following few frames. This allows for RenderViewJobs to compute future frames while the current frame is being rendered. In case the RenderView submission takes too long, the RenderView jobs will eventually be locked to allow the Renderer to catch up and not miss any important state change. This implementation tries to minimize the time needed to synchronize the job threads with the rendering thread while providing thread safe access to the queues if used correctly. In RenderThread, the exec loop is replaced by a rendering loop and the RenderQueue has been properly added to the Renderer. Change-Id: I44f1f4065cdc7f39a8957a26114a905ea437834b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QBoundedCircularBuffer and testSean Harmer2014-04-193-1/+254
| | | | | Change-Id: Ied0bd701fa653396b657ea5c2f2097eb7a425953 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QCircularBuffer and testSean Harmer2014-04-173-1/+2067
| | | | | | | | | | | | | This is different to QtCore's QRingBuffer. QRingBuffer deals with raw bytes with a non-contiguous list of QByteArrays. QCircularBuffer is strongly typed and the data is guaranteed to be stored in a contiguous block of memory. Although the start/end of the buffer may not correspond to the start/end of the block of memory once it has reached capacity and wraps around. Done-with: Andreas Hartmetz and Marc Mutz Change-Id: Id03ad308b13fb359604d19474d892ff22c1e9b93 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Added missing methods to QAbstractResourcesManagerPaul Lemire2014-04-142-4/+6
| | | | | Change-Id: I50d7d25f0fb4afd8fba247a08b8f937a064030cc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* ResourcesManager subclassesPaul Lemire2014-04-106-37/+322
| | | | | | | | QArrayResourcesManager : QVector based resources manager QListResourcesManager : QList bases resources manager Change-Id: I487716749dccb7cb75edc6556d93fc3bb96941ee Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix INDEXBITS in QHandleManager, QHandlePaul Lemire2014-04-092-9/+18
| | | | | | | | | | | | QHandleManager worked only when INDEXBITS was set to the default value 16. This is corrected now so that a QResourceManager<T, 4> created a QHandleManager<T, 4> which provides QHandle<T, 4> Follow up commits will follow for the refactoring of QResourcesManager into subclasses that can implement their own dedicated memory allocation scheme. Change-Id: If3b3fb43ae1c9473d9777cf9ba984ba37a65cfa9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QResourcesManagerPaul Lemire2014-04-093-1/+224
| | | | | | | | QResources manager adapted to work with Sean Harmer's QHandle and QHandleManager. Change-Id: Ia2d60c93b72913194bbd04e064a5457ff1a091b7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QHandleManager template and testSean Harmer2014-04-083-1/+206
| | | | | | | With: Paul Lemire Change-Id: Id269fd051a6a6b4f23a733c8123f11bb63e80aa7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QHandle template class and testSean Harmer2014-04-045-0/+195
| | | | | | | | With: Paul Lemire Change-Id: I47a228553da06d9692a206fd2424beea0a163b2f Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Removing old 1.0 stuff from project root.Pasi Keranen2014-04-031-11/+0
| | | | | | | | If needed we can fetch stuff back from master branch. Change-Id: Ic35f989de4a59d2c0a18ca6b18f0c0aca64d5046 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove Qt3D 1.x sourcesSean Harmer2014-03-28136-22455/+0
| | | | | | Change-Id: Ic6c05d78f617155892b546721946ee2c5c9b660a Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Bugfixes and cleanups for the picking codeFabian Bumberger2013-07-315-1/+249
| | | | | | | | | - Removed the pickRegistry and related code, because it is not needed - Fixed picking when navigation is turned off - Introduced a new autotest for picking Change-Id: Ib43789383760902f42542b45cfe49342f4ffa090 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Generate the cmake module tests, instead of having them outdated.Stephen Kelly2013-04-184-82/+5
| | | | | Change-Id: I89f8d11d84db06b4fd90a8fb5e77f469e619a45f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove the bad API for the distance unit of the rayLaszlo Papp2013-04-171-2/+2
| | | | | | | | | | | | | | | It is a bad API because of the following reasons: 1) fromPoint does not imply if it is a distance, direction, or something else from the point. 2) More importantly, it reads as a static method converting a point to a ray at first glance according to the other Qt API occurrences around. Change-Id: If92f6642138821916cda43dc33a8c3e84267c626 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Simplify the API for the distance from the pointLaszlo Papp2013-04-172-15/+15
| | | | | Change-Id: Ic5a27f11a8fe628d7b0d9b8566c113ea48e799f1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Temporarily mark the cmake test as insignificantSean Harmer2013-04-171-0/+1
| | | | | | | | | | | | This is required to be able to commit a couple of changes that 1) Tidy up the headers to stop libassimp API leaking through 2) Links against QtOpenGL for QGLPixelBuffer This can be re-enabled once those changes are merged Change-Id: Id2e8b26209d854723d3c885662ec1e6ddf5313af Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix winding on quad strips that make up spheresSamuel Rødal2013-03-191-1/+1
| | | | | | | | | | | The winding was incorrect, which caused the QGLSphere to disappear when back-face culling was enabled. Task-number: QTBUG-17822 (cherry picked from commit dde93f2bdbc0b0918f0fd6608c83cb6e2f1fe2b7) Change-Id: I1e06103b0c84fcd87e6066693f06003ab2cf723d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use qmake for package dependency resolution in cmake tests.Stephen Kelly2013-02-261-0/+2
| | | | | | | This allows us to remove hardcoded depends information. Change-Id: I15f6bf0b000ab6a7fc742b19e2132295f5583b69 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* make use of qtHaveModule()Oswald Buddenhagen2013-01-091-2/+2
| | | | | | | | Change-Id: I53de6de78a982968c31a9c8d17628d1cddb63a14 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove some unnecessary CONFIG additionsOswald Buddenhagen2012-12-1644-46/+2
| | | | | | | qt is already added by spec_pre.prf, warn_on by default_pre.prf. Change-Id: I362942adad909b718c0af7c7e44cd0c8688901c2 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* test: Fix tst_LoadModel::load()Sergio Ahumada2012-10-131-1/+1
| | | | | Change-Id: Ic272110b03ac648838bfbf328b40726e2624bdd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2360-1442/+1442
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ib09067b91869c2840710bffee104bc63c76b0bf7 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Explicitly use float rather than qreal in math3d classesSean Harmer2012-09-165-486/+476
| | | | | | | | | | | This commit is a follow-up to the change in qtbase/gui/math3d to use floats. We are now explicit about precision rather than fudging around qreal's containing no more than float precision values. Change-Id: I673a86fde4f57ddbd61aedff09617b772d7971b0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Sarah Jane Smith <sez@storybridge.org>
* Use float throughout the Qt3D module for consistency and performanceSean Harmer2012-09-1618-185/+193
| | | | | | | | | | This commit changes the API of all classes in this module to use float rather than qreal. This makes the API consistent across platforms and improves floating point performance. Change-Id: I95ae65cb31428748e066d5efca059ce24087fafa Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Sarah Jane Smith <sez@storybridge.org>
* Compile after Math3d was changed to use float instead of qreal.Friedemann Kleint2012-09-1111-88/+91
| | | | | | | | | | | | | Introduced by qtbase: 51d40d7e9bdfc63c5109aef5b732aa2ba10f985a . Fix warnings about truncation from double to float. Introduce qFuzzyCompare() and mark some tests as insignificant. Task-number: QTBUG-27189 Change-Id: Icc2038df5c4c25a7fa9a89ed906a934c2af60cec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-0144-0/+44
| | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: Ic47384e3ed17e5f7b7402757eb995bfa898656a8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Qt3D: Use new qWaitForWindowExposed()/Active() functions.Friedemann Kleint2012-07-202-6/+2
| | | | | Change-Id: If449dafcd8f3703d9368c7bc9ad648803b15987b Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Test that the package configs for Qt3D work.Stephen Kelly2012-07-205-1/+99
| | | | | Change-Id: I079b5b4ec7fb7301e732b8898cd64c6d7afe1c9d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make it possible to compile Qt3D without QML/Quick.Casper van Donderen2012-07-061-2/+2
| | | | | | | | | The C++ implementation of Qt3D could not be compiled without also having installed QtQML and QtQuick. This change allows the compilation of the non-QML part of Qt3D separately. Change-Id: I791a03a0f0e1118f3ec20b77be327786148b8923 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* (Partial) Work done on Coverity report.Sergey Dubitskiy2012-06-223-47/+49
| | | | | | | Only partial because Coverity report is no longer accessible. Change-Id: Id7e1171bd9ab3c3900eaa771c04a8df2a1d7dabe Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
* Fix skipped tests.Sarah Smith2012-06-225-19/+12
| | | | | | | | Also fix some other spam and warnings out of this test. Task-number: QTBUG-25548 Change-Id: Id7a1cf12837bed79310539b324b1a06cd77c4613 Reviewed-by: Danny Pope <daniel.pope@nokia.com>
* Update the Qt3D and Shapes version.Sarah Smith2012-06-2011-14/+14
| | | | | | | | | | | For the Qt5 release Qt3D will be bumped to 2.0 to match QML2.0 and thus we need to apply this across all code and examples. Task-Number: QTBUG-26183 Change-Id: Ief54cb6f39da97ccfeeccc56f93a77b25316f71e Reviewed-by: Julian de Bhal <julian.debhal@nokia.com> Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
* Quell warnings.Sarah Smith2012-06-193-21/+21
| | | | | | | Address warnings about unsigned vs signed comparisons. Change-Id: I26e481accfed37026f2ddf36cdb9485d7568c59f Reviewed-by: Sergey Dubitskiy <sergey.dubitskiy@nokia.com>
* tst_QGLAbstractsurface failure fix.dpope2012-06-031-0/+10
| | | | | | | | | QGLMockview was setting x,y as 50,50 - all our code tests against 0,0. Change to mock view seems easiest. Also addresses QTBUG-25277. Task-number: QTBUG-24637 Change-Id: I55b38efaecd45c9f1adaa181455756964fd44270 Reviewed-by: Danny Pope <daniel.pope@nokia.com>
* Do not build qmltest related tests when no support is available.Toby Tomkins2012-05-281-2/+6
| | | | | | | | | Support for qmltest may be missing when building qtdeclarative. This change modifies the autotests so that those relying on qmltest will only be built if it is present. Change-Id: I8032120817294149d015c68dd661b96da04c7394 Reviewed-by: Julian de Bhal <julian.debhal@nokia.com>
* Set tst_qglmaterial to insignificant.dpope2012-05-161-0/+1
| | | | | | | | | This is due to mac failure which cannot be fixed until resources become available - this is currently blocking continuous integration. Task-number:QTBUG-25757 Change-Id: Ic88d0fc7d580df02b290b454473ac5b3e6978684 Reviewed-by: Sergey Dubitskiy <sergey.dubitskiy@nokia.com>
* Fix qml3d tests incl windows.Sarah Smith2012-05-0319-431/+75
| | | | | | | | | | | | | | | | | | There are a lot of problems with our tests on platforms where the fixed-function pipeline is in force, that is no shaders are available. We have code paths that are supposed to deal with that but they're poorly maintained and now crash. Try to fix a few of them, and work around others which are exposed by the qml3d tests on windows CI boxes (that have software OpenGL 1.x). We notice that QT_QPA_PLATFORM=minimal causes a crash with QML tests that have a test function without a surrounding TestCase element. Let's fix that and see if it helps also the mysterious windows test crashing problem. Task-number: QTBUG-25276 Change-Id: Ieeb67536f86467bb6819b62319ac3cee2219a8ae Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
* Fix mac test crash.Sarah Smith2012-05-022-3/+6
| | | | | | | | Looks like Mac display logic got changed. Task-number: QTBUG-25463 Change-Id: Ia2ab92d2cf563b6d8904acf3204a314e259a270c Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>