summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/util
Commit message (Collapse)AuthorAgeFilesLines
* GLSL 1.00 ES must be selected using "#version 100"Kevin Ottens2017-08-041-3/+3
| | | | | | | | I was mistaken before, the "es" part for that version isn't optional, it *must* be omitted. Change-Id: I9e83d2317523fb0a905e40b95a56033cf693b93b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Implement graph layers support in QShaderGeneratorKevin Ottens2017-08-021-2/+185
| | | | | Change-Id: I823f7866bc5e1f3b262f1aacf4c341dabda7305d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for layers in QShaderGraphLoader formatKevin Ottens2017-08-021-8/+14
| | | | | Change-Id: I5038600e73523ac7eb37a88ddff1f942af18f18e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Implement graph layers support in QShaderGraphKevin Ottens2017-08-021-0/+117
| | | | | | | | | | | When creating the statements, it is now possible to pass a list of enabled layer names. Every node or edge which is not in the list of enabled layers will be pruned from the graph prior to traversal. Note that an empty layer list for a node or an edge means it is on all layers. Change-Id: I61a4df7d395b4beb42ee55ce08fef8ebe04263c9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add the layer concept to QShaderNode and QShaderGraph::EdgeKevin Ottens2017-08-022-2/+12
| | | | | | | This will be used in further commits Change-Id: I49977f1ea482b97dc0a159f69a0d2eda3865ec44 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for QShaderLanguage enums in QShaderGeneratorKevin Ottens2017-08-021-0/+357
| | | | | Change-Id: I93306d783309cda09fedae3713afde851df3e9a3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Extend the parameter support in QShaderGraphLoader for richer typesKevin Ottens2017-08-021-13/+28
| | | | | | | In particular, go through QMetaType/QMetaEnum to deal with enums. Change-Id: I2e847ba328eb46609b86b3dfd6c4dbf532d78b7d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Extend the parameter support in QShaderNodeLoader for richer typesKevin Ottens2017-08-021-1/+17
| | | | | | | In particular, go through QMetaType/QMetaEnum to deal with enums. Change-Id: Idbe16c913c1d471a4a91d219f77876e498c192d9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for parameters in QShaderGeneratorKevin Ottens2017-07-081-6/+7
| | | | | Change-Id: Iff8fec51ddbf9b018cb5ec3aff357125134013eb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for node parameters in QShaderGraphLoaderKevin Ottens2017-07-081-32/+39
| | | | | | | | Now the parameters from the prototypes are used as default values and the graph file can overload them. Change-Id: I9a8a73963c7e578bd0a34e96f76f147a12224f4f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for node parameters in QShaderNodesLoaderKevin Ottens2017-07-081-13/+26
| | | | | | | | This will allow to make the prototypes more extensible when referred to from a graph file while providing some sane defaults. Change-Id: I1ae10182427d8a7d29c51a64e19e99139494ea92 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add parameters to QShaderNodeKevin Ottens2017-07-081-2/+47
| | | | | | | | | This will allow to create nodes having an entry point for tuning, still need to be exploited by the loaders and the shader generator. Coming in further commits. Change-Id: I8384b0f528c9919e9f8d35102adde2b307f08b80 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Complete the QShaderGraphLoader tests to introspect nodesKevin Ottens2017-07-081-0/+45
| | | | | | | | We forgot to check that the node content was correct and complete when loading the graph. Change-Id: Id4ee6aaba6ca268b0785e7fa3fb51a19817e7c9c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Sort the keys before comparing them in the testKevin Ottens2017-06-221-1/+6
| | | | | | | | The return order of the keys is random, so let's sort both first, then we can compare the lists. Should get rid of the test flakiness. Change-Id: I2e89d3cc603da6a4667b3677350baa4d40d59b45 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* [Shader Graph Gen.] Introduce QShaderNodesLoaderKevin Ottens2017-06-203-0/+295
| | | | | | | | | This class allows to node definitions from a JSON representation. This will come in handy to ship preset prototypes for use with QShaderGraphLoader. Change-Id: I3f3b5d7852e17d484069b4814ee6e5910997c613 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [Shader Graph Gen.] Introduce QShaderGraphLoaderKevin Ottens2017-06-203-0/+558
| | | | | | | | | | This class allows to load a shader graph from its JSON representation. To avoid duplicating the shader snippets inside of the JSON which would be a maintenance nightmare, we instead allow to register a set of node prototypes by their name and only refer to said names inside the JSON. Change-Id: I3e7b39e8b3c25f51f331a0a59dda883ac8e2bc57 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [Shader Graph Gen.] Introduce QShaderGeneratorKevin Ottens2017-06-203-0/+360
| | | | | | | This class is meant to generate code from shader graphs Change-Id: I1cf22352387f3f9f55e7589aa77a296689836911 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [Shader Graph Gen.] Introduce QShaderGraph::StatementKevin Ottens2017-06-201-0/+408
| | | | | | | | This is our "byte code" representing a flattened graph. It will be used as input for the code generation. Change-Id: Ie02a60d07c035f3d16872e79931eb7cde168a8d1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [Shader Graph Gen.] Introduce QShaderGraphKevin Ottens2017-06-203-0/+257
| | | | | | | | This allows to connect our nodes together via ports. This way user code can assemble a shader from simpler blocks. Change-Id: I168dcf4af6aa11ad47b68d91e5a55e96ca922678 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [Shader Graph Gen.] Introduce QShaderNodeKevin Ottens2017-06-201-0/+159
| | | | | | | | Nodes will allow to describe inputs, outputs or value transformations in a shader graph. Change-Id: I44f806d9595fd0e68fc9026cda2b4fa0a62af283 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [Shader Graph Gen.] Introduce QShaderNodePortKevin Ottens2017-06-201-0/+56
| | | | | | | The ports will be used to connect nodes from our shader graphs. Change-Id: I9d4fbb1f7bd8320c4373ebb166a4fe13bd1482c9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [Shader Graph Gen.] Introduce QShaderFormatKevin Ottens2017-06-203-0/+287
| | | | | | | | | | | This is the first building block toward a node based generator for shader programs. QShaderFormat will be used by the other classes to qualify in which format the code snippets and includes used are. Change-Id: I11aefc6bb359832a853ed1b6bec302dc3516cfc4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix test for WinRTMaurice Kalinowski2016-09-231-1/+1
| | | | | | | Only on win32 we can omit creating a new window. Change-Id: Ie49ef45ccb745aaa43f58096e7810c71671124ba Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QtGui: Remove Windows CE.Friedemann Kleint2016-03-301-1/+1
| | | | | | | | | Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, and tests. Task-number: QTBUG-51673 Change-Id: I55f61845c3b54027c467a5c59c122e7d16955358 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-215-85/+60
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Tests: Remove empty init/cleanup slots, constructors and destructors.Friedemann Kleint2015-12-102-49/+0
| | | | | | | | Move some code (like registrations of meta types) from init() to initTestCase() in the process. Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Add flags to omit/reject padding in scientific notation exponentsUlf Hermann2015-11-231-0/+57
| | | | | | | | | | | | | | The EcmaScript format for printing doubles in exponent form differs from Qt's format only in this aspect. EcmaScript explicitly prohibits leading zeroes in exponents. It is thus worthwhile to add those flags in order to be able to generate and parse doubles in compliance with EcmaScript. [ChangeLog][QtCore][QLocale] Additional flags in QLocale::NumberOption allow generating and parsing doubles in EcmaScript compliant format. Change-Id: Ia7b82c2e67bb8b80bd890014ff5cd4563faf2a03 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-141-1/+4
|\ | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
| * tst_qdesktopservices: Use regular expression to suppress error message.Friedemann Kleint2015-10-021-1/+4
| | | | | | | | | | | | | | | | | | | | The error return has been observed to vary. Task-number: QTBUG-48566 Change-Id: Iecfe7819898a6a8a482c1b2251543193ecfa4841 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-055-5/+1
|/ | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-312-24/+24
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I624deb320c378c18a29b3707f48583d53bfd5186 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-115-35/+35
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Observe QLocale::RejectGroupSeparator in QInt/DoubleValidator.Friedemann Kleint2014-11-201-9/+18
| | | | | | | | Pass it as additional boolean parameter to QLocaleData::validateChars(). Task-number: QTBUG-42522 Change-Id: I4b2367f4e2fdcbd17e343d215edad57e6687697a Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Allow empty string as intermediate matchPaul Olav Tvete2014-11-201-0/+3
| | | | | | | | | | | QRegularExpressionValidator and QRegularExpression disagree on what a partial match means. [ChangeLog][QtGui][QRegularExpressionValidator] Allow empty string as intermediate match Change-Id: Ia6c55beb54870b1be5c88b6ef3eceebc8ca3f86b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Update license headers and add new license filesMatti Paaso2014-09-245-95/+55
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Bugfix QDesktopServices on WindowsThiago Macieira2013-07-111-0/+1
| | | | | | | | | It was doing tricks with URLs that it shouldn't be doing... including running QDir::toNativeSeparators on a URL. Task-number: QTBUG-32311 Change-Id: I5b6f640919956998c00dcf507f931045f21a9e53 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Debao Zhang2013-03-273-3/+0
| | | | | Change-Id: I48c83fa0c5eccd86a5242fc8ed51ac6d7623f7f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-224-4/+4
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-184-4/+4
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Introduce QRegularExpressionValidatorGiuseppe D'Angelo2013-01-074-0/+126
|/ | | | | | | | QRegularExpression counterpart for QRegExpValidator. Change-Id: Ib391e73dd49e32aeb9b48e6f2217b67a17a83a11 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix QRegExpValidator::validate docs about the pos parameterGiuseppe D'Angelo2012-10-221-2/+9
| | | | | | | | | | | | | | | | | | | The code sets it to input.length() iff the regexp doesn't match the string, while the docs say it's *always* set. Therefore, make the docs match what the code does and add a simple test to enforce it. We're not changing the code to match the docs because 1) it's better to stay conservative (we don't want to break existing behaviour); 2) this behaviour mimics what the int/double validators do (they don't move pos at all). Change-Id: I958074558de6b0fc5944101c6535fc7e00442ae9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* normalise signal/slot signatures [QtGui tests]Marc Mutz2012-10-221-1/+1
| | | | | Change-Id: I42e11de9ef1d8a04b2a8e200afb84f2245f3361a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make QValidator tests do not require a QApplicationGiuseppe D'Angelo2012-10-132-2/+2
| | | | | | | | Change-Id: I9aae997e33672203470b0429cc061a1adf88dfe9 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Move QValidator tests to QtGuiGiuseppe D'Angelo2012-10-1010-2/+852
| | | | | | | | Q*Validator classes are not in QtWidgets, so move them where they should stay. Change-Id: Ie6ea45a026e640fad131002bc9762c575235f3f4 Reviewed-by: David Faure <david.faure@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | | 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: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add CONFIG+=parallel_test to suspected parallel-safe tests.Rohan McGovern2012-05-281-0/+1
| | | | | | | | | These tests have passed a parallel stress test on all three of Linux, Mac, Windows. Mark them with CONFIG+=parallel_test to allow CI to run them in parallel, saving time. Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Restore Qt4 compat in QDesktopServices::DataLocationDavid Faure2012-03-241-2/+33
| | | | | | | "/data/" was appended to the base directory. Change-Id: I220f2ce74c36b795bc49c7c84106feb0709d1547 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clean up some auto tests of guiDebao Zhang2012-03-122-2/+1
| | | | | | | | These unit tests do not depent on QtWidget. Change-Id: I95526125c563885c0531da7ebfee06bca9a87b1c Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>