Commit Graph

57 Commits

Author SHA1 Message Date
Kevin Ottens
b6c3f55b93 GLSL 1.00 ES must be selected using "#version 100"
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>
2017-08-04 11:19:30 +00:00
Kevin Ottens
4bfff6a98b Implement graph layers support in QShaderGenerator
Change-Id: I823f7866bc5e1f3b262f1aacf4c341dabda7305d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:56 +00:00
Kevin Ottens
236284357f Add support for layers in QShaderGraphLoader format
Change-Id: I5038600e73523ac7eb37a88ddff1f942af18f18e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:52 +00:00
Kevin Ottens
f3c70ab9f3 Implement graph layers support in QShaderGraph
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>
2017-08-02 17:34:48 +00:00
Kevin Ottens
32281653bf Add the layer concept to QShaderNode and QShaderGraph::Edge
This will be used in further commits

Change-Id: I49977f1ea482b97dc0a159f69a0d2eda3865ec44
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:44 +00:00
Kevin Ottens
3d5c4ce01e Add support for QShaderLanguage enums in QShaderGenerator
Change-Id: I93306d783309cda09fedae3713afde851df3e9a3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:40 +00:00
Kevin Ottens
dd04551504 Extend the parameter support in QShaderGraphLoader for richer types
In particular, go through QMetaType/QMetaEnum to deal with enums.

Change-Id: I2e847ba328eb46609b86b3dfd6c4dbf532d78b7d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:35 +00:00
Kevin Ottens
50775424be Extend the parameter support in QShaderNodeLoader for richer types
In particular, go through QMetaType/QMetaEnum to deal with enums.

Change-Id: Idbe16c913c1d471a4a91d219f77876e498c192d9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-08-02 17:34:30 +00:00
Kevin Ottens
0d196b4268 Add support for parameters in QShaderGenerator
Change-Id: Iff8fec51ddbf9b018cb5ec3aff357125134013eb
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-07-08 09:05:23 +00:00
Kevin Ottens
13ecd686b9 Add support for node parameters in QShaderGraphLoader
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>
2017-07-08 09:05:19 +00:00
Kevin Ottens
5667c870fb Add support for node parameters in QShaderNodesLoader
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>
2017-07-08 09:05:16 +00:00
Kevin Ottens
f7fefed2ea Add parameters to QShaderNode
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>
2017-07-08 09:05:13 +00:00
Kevin Ottens
74e9a11386 Complete the QShaderGraphLoader tests to introspect nodes
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>
2017-07-08 09:05:10 +00:00
Kevin Ottens
7e7cd1c294 Sort the keys before comparing them in the test
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>
2017-06-22 11:57:33 +00:00
Kevin Ottens
4d70e03002 [Shader Graph Gen.] Introduce QShaderNodesLoader
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>
2017-06-20 21:35:51 +00:00
Kevin Ottens
093752faf3 [Shader Graph Gen.] Introduce QShaderGraphLoader
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>
2017-06-20 21:35:46 +00:00
Kevin Ottens
ad2faa3c63 [Shader Graph Gen.] Introduce QShaderGenerator
This class is meant to generate code from shader graphs

Change-Id: I1cf22352387f3f9f55e7589aa77a296689836911
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-06-20 21:35:40 +00:00
Kevin Ottens
4212451884 [Shader Graph Gen.] Introduce QShaderGraph::Statement
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>
2017-06-20 21:35:36 +00:00
Kevin Ottens
29a748511a [Shader Graph Gen.] Introduce QShaderGraph
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>
2017-06-20 21:35:30 +00:00
Kevin Ottens
3a78c62bb2 [Shader Graph Gen.] Introduce QShaderNode
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>
2017-06-20 21:35:25 +00:00
Kevin Ottens
22cd7b02bf [Shader Graph Gen.] Introduce QShaderNodePort
The ports will be used to connect nodes from our shader graphs.

Change-Id: I9d4fbb1f7bd8320c4373ebb166a4fe13bd1482c9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2017-06-20 21:35:18 +00:00
Kevin Ottens
57b6b2f527 [Shader Graph Gen.] Introduce QShaderFormat
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>
2017-06-20 21:35:12 +00:00
Maurice Kalinowski
9888a2c138 Fix test for WinRT
Only on win32 we can omit creating a new window.

Change-Id: Ie49ef45ccb745aaa43f58096e7810c71671124ba
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-09-23 07:20:53 +00:00
Friedemann Kleint
bf537516a9 QtGui: Remove Windows CE.
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>
2016-03-30 17:35:41 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
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>
2016-01-21 18:55:18 +00:00
Friedemann Kleint
1289bc8172 Tests: Remove empty init/cleanup slots, constructors and destructors.
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>
2015-12-10 05:26:05 +00:00
Ulf Hermann
15b5b3b3f0 Add flags to omit/reject padding in scientific notation exponents
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>
2015-11-23 14:13:42 +00:00
Liang Qi
4456984da7 Merge remote-tracking branch 'origin/5.6' into dev
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
2015-10-14 15:45:35 +02:00
Friedemann Kleint
bbb2c95d7a tst_qdesktopservices: Use regular expression to suppress error message.
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>
2015-10-02 09:34:41 +00:00
Friedemann Kleint
76cf88157f Tests: Remove CONFIG += parallel_test.
The keyword no longer has a meaning for the new CI.

Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-05 07:16:50 +00:00
Friedemann Kleint
3859b304e8 tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- 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>
2015-07-31 08:29:15 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
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>
2015-02-11 06:49:51 +00:00
Friedemann Kleint
94e40c7c78 Observe QLocale::RejectGroupSeparator in QInt/DoubleValidator.
Pass it as additional boolean parameter to QLocaleData::validateChars().

Task-number: QTBUG-42522
Change-Id: I4b2367f4e2fdcbd17e343d215edad57e6687697a
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-11-20 16:38:23 +01:00
Paul Olav Tvete
71ed74e72e Allow empty string as intermediate match
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>
2014-11-20 14:58:39 +01:00
Matti Paaso
974c210835 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3
- Removed LICENSE.GPL

Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-24 12:26:19 +02:00
Thiago Macieira
eb5749e8d9 Bugfix QDesktopServices on Windows
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>
2013-07-11 10:56:49 +02:00
Debao Zhang
dd4220b6e6 QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
Change-Id: I48c83fa0c5eccd86a5242fc8ed51ac6d7623f7f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-27 03:54:42 +01:00
Frederik Gladhorn
c608ec8254 Merge remote-tracking branch 'origin/stable' into dev
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
2013-01-22 18:40:13 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Giuseppe D'Angelo
2d8910cbed Introduce QRegularExpressionValidator
QRegularExpression counterpart for QRegExpValidator.

Change-Id: Ib391e73dd49e32aeb9b48e6f2217b67a17a83a11
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-07 12:04:53 +01:00
Giuseppe D'Angelo
bbda968a0a Fix QRegExpValidator::validate docs about the pos parameter
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>
2012-10-22 22:42:26 +02:00
Marc Mutz
2ec2edc24d normalise signal/slot signatures [QtGui tests]
Change-Id: I42e11de9ef1d8a04b2a8e200afb84f2245f3361a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-22 08:41:27 +02:00
Giuseppe D'Angelo
491247acd4 Make QValidator tests do not require a QApplication
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>
2012-10-13 05:51:19 +02:00
Giuseppe D'Angelo
361ab4fe86 Move QValidator tests to QtGui
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>
2012-10-10 23:27:03 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
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>
2012-09-22 19:20:11 +02:00
Thiago Macieira
672b5b7ab6 Set the Qt API level to compatibility mode in all tests.
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>
2012-08-01 15:37:46 +02:00
Rohan McGovern
177070cb7b Add CONFIG+=parallel_test to suspected parallel-safe tests.
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>
2012-05-28 07:33:01 +02:00
David Faure
518a4cb5ab Restore Qt4 compat in QDesktopServices::DataLocation
"/data/" was appended to the base directory.

Change-Id: I220f2ce74c36b795bc49c7c84106feb0709d1547
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-03-24 19:07:22 +01:00
Debao Zhang
57cf7c8a1b Clean up some auto tests of gui
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>
2012-03-12 13:14:05 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
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>
2012-01-30 03:54:59 +01:00