Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Laszlo Agocs
qtrhi
Commits
986fa3a0
Commit
986fa3a0
authored
Mar 11, 2019
by
Laszlo Agocs
Browse files
Remove old shadertools tests
parent
be7bda45
Changes
21
Hide whitespace changes
Inline
Side-by-side
tests/manual/shadertools/oneshaderthreecontexts_prebaked/color.frag
deleted
100644 → 0
View file @
be7bda45
#version 440
layout
(
location
=
0
)
in
vec3
v_color
;
layout
(
location
=
0
)
out
vec4
fragColor
;
void
main
()
{
fragColor
=
vec4
(
v_color
,
1
.
0
);
}
tests/manual/shadertools/oneshaderthreecontexts_prebaked/color.frag.qsb
deleted
100644 → 0
View file @
be7bda45
File deleted
tests/manual/shadertools/oneshaderthreecontexts_prebaked/color.vert
deleted
100644 → 0
View file @
be7bda45
#version 440
layout
(
location
=
0
)
in
vec4
position
;
layout
(
location
=
1
)
in
vec3
color
;
layout
(
location
=
0
)
out
vec3
v_color
;
layout
(
std140
,
binding
=
0
)
uniform
buf
{
mat4
mvp
;
}
ubuf
;
out
gl_PerVertex
{
vec4
gl_Position
;
};
void
main
()
{
v_color
=
color
;
gl_Position
=
ubuf
.
mvp
*
position
;
}
tests/manual/shadertools/oneshaderthreecontexts_prebaked/color.vert.qsb
deleted
100644 → 0
View file @
be7bda45
File deleted
tests/manual/shadertools/oneshaderthreecontexts_prebaked/main.cpp
deleted
100644 → 0
View file @
be7bda45
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
// This application ships with pre-generated shader variants + reflection info
// based on the original Vulkan-style GLSL shaders.
//
// It opens two OpenGL windows using the two GLSL shaders (taking the uniform
// buffer vs. struct differences into account), and a Vulkan window that uses
// the SPIR-V binary.
#include <QGuiApplication>
#include <QBakedShader>
#include <QDebug>
#include <QOpenGLContext>
#include <QFile>
#include "renderwindow.h"
#if QT_CONFIG(vulkan)
#include "vulkantrianglerenderer.h"
class
VulkanWindow
:
public
QVulkanWindow
{
public:
VulkanWindow
(
const
QByteArray
&
vs
,
const
QByteArray
&
fs
)
:
m_vs
(
vs
),
m_fs
(
fs
)
{
}
QVulkanWindowRenderer
*
createRenderer
()
override
;
private:
QByteArray
m_vs
;
QByteArray
m_fs
;
};
QVulkanWindowRenderer
*
VulkanWindow
::
createRenderer
()
{
return
new
TriangleRenderer
(
this
,
m_vs
,
m_fs
,
true
);
}
#endif // vulkan
static
QByteArray
readFile
(
const
char
*
fn
)
{
QFile
f
(
QString
::
fromUtf8
(
fn
));
if
(
f
.
open
(
QIODevice
::
ReadOnly
))
return
f
.
readAll
();
return
QByteArray
();
}
int
main
(
int
argc
,
char
**
argv
)
{
QGuiApplication
app
(
argc
,
argv
);
// our pre-generated .qsb files contain the reflection data, GLSL 100 es,
// 120, 330 sources, and the SPIR-V binary
QBakedShader
vs
=
QBakedShader
::
fromSerialized
(
readFile
(
":/color.vert.qsb"
));
QBakedShader
fs
=
QBakedShader
::
fromSerialized
(
readFile
(
":/color.frag.qsb"
));
qDebug
()
<<
"vertex shader reflection info:"
<<
vs
.
description
();
qDebug
()
<<
"fragment shader reflection info:"
<<
fs
.
description
();
// GL 2.0-compatible context
QSurfaceFormat
fmt
;
RenderWindow
w
(
vs
,
fs
,
fmt
);
w
.
resize
(
800
,
600
);
w
.
setTitle
(
QLatin1String
(
"GL 2"
));
w
.
show
();
// 3.3 core
QScopedPointer
<
RenderWindow
>
cw
;
if
(
QOpenGLContext
::
openGLModuleType
()
==
QOpenGLContext
::
LibGL
)
{
QSurfaceFormat
coreFmt
;
coreFmt
.
setVersion
(
3
,
3
);
coreFmt
.
setProfile
(
QSurfaceFormat
::
CoreProfile
);
cw
.
reset
(
new
RenderWindow
(
vs
,
fs
,
coreFmt
));
cw
->
resize
(
800
,
600
);
cw
->
setTitle
(
QLatin1String
(
"GL 3.3 core"
));
cw
->
show
();
}
// Vulkan
#if QT_CONFIG(vulkan)
QVulkanInstance
inst
;
const
QByteArray
vsSpv
=
vs
.
shader
({
QBakedShaderKey
::
SpirvShader
,
QBakedShaderVersion
(
100
)
}).
shader
();
const
QByteArray
fsSpv
=
fs
.
shader
({
QBakedShaderKey
::
SpirvShader
,
QBakedShaderVersion
(
100
)
}).
shader
();
VulkanWindow
vkw
(
vsSpv
,
fsSpv
);
if
(
inst
.
create
())
{
vkw
.
setVulkanInstance
(
&
inst
);
vkw
.
resize
(
800
,
600
);
vkw
.
setTitle
(
QLatin1String
(
"Vulkan"
));
vkw
.
show
();
}
else
{
qDebug
(
"Vulkan not supported"
);
}
#endif
return
app
.
exec
();
}
tests/manual/shadertools/oneshaderthreecontexts_prebaked/oneshaderthreecontexts_prebaked.pro
deleted
100644 → 0
View file @
be7bda45
TEMPLATE
=
app
QT
+=
shadertools
SOURCES
=
\
main
.
cpp
\
renderwindow
.
cpp
HEADERS
=
\
renderwindow
.
h
qtConfig
(
vulkan
)
{
SOURCES
+=
..
/
shared
/
vulkantrianglerenderer
.
cpp
HEADERS
+=
..
/
shared
/
vulkantrianglerenderer
.
h
}
INCLUDEPATH
+=
..
/
shared
RESOURCES
=
tri
.
qrc
target
.
path
=
$$
[
QT_INSTALL_EXAMPLES
]
/
shadertools
/
oneshaderthreecontexts_prebaked
INSTALLS
+=
target
tests/manual/shadertools/oneshaderthreecontexts_prebaked/renderwindow.cpp
deleted
100644 → 0
View file @
be7bda45
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "renderwindow.h"
#include <QTimer>
#include <QMatrix4x4>
#include <QOpenGLContext>
#include <QOpenGLShaderProgram>
#include <QOpenGLExtraFunctions>
#include <QBakedShader>
RenderWindow
::
RenderWindow
(
const
QBakedShader
&
vs
,
const
QBakedShader
&
fs
,
const
QSurfaceFormat
&
format
)
:
m_context
(
0
),
m_initialized
(
false
),
m_angle
(
0.0
f
),
m_vs
(
vs
),
m_fs
(
fs
)
{
setSurfaceType
(
QWindow
::
OpenGLSurface
);
setFormat
(
format
);
m_context
=
new
QOpenGLContext
(
this
);
m_context
->
setFormat
(
requestedFormat
());
if
(
!
m_context
->
create
())
qWarning
(
"Failed to create context"
);
}
void
RenderWindow
::
exposeEvent
(
QExposeEvent
*
)
{
if
(
isExposed
())
render
();
}
static
GLfloat
vertices
[]
=
{
0.0
f
,
0.5
f
,
-
0.5
f
,
-
0.5
f
,
0.5
f
,
-
0.5
f
};
static
GLfloat
colors
[]
=
{
1.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
1.0
f
,
0.0
f
,
0.0
f
,
0.0
f
,
1.0
f
};
void
RenderWindow
::
init
()
{
m_program
=
new
QOpenGLShaderProgram
(
this
);
QSurfaceFormat
format
=
m_context
->
format
();
// Now the fun part:
int
version
=
120
;
const
bool
es
=
format
.
renderableType
()
==
QSurfaceFormat
::
OpenGLES
;
if
(
!
es
&&
format
.
profile
()
==
QSurfaceFormat
::
CoreProfile
)
version
=
330
;
QBakedShaderVersion
::
Flags
flags
=
0
;
if
(
es
)
{
version
=
100
;
flags
|=
QBakedShaderVersion
::
GlslEs
;
}
const
QByteArray
vertexShaderSource
=
m_vs
.
shader
(
QBakedShaderKey
(
QBakedShaderKey
::
GlslShader
,
QBakedShaderVersion
(
version
,
flags
))).
shader
();
const
QByteArray
fragmentShaderSource
=
m_fs
.
shader
(
QBakedShaderKey
(
QBakedShaderKey
::
GlslShader
,
QBakedShaderVersion
(
version
,
flags
))).
shader
();
if
(
!
m_program
->
addShaderFromSourceCode
(
QOpenGLShader
::
Vertex
,
vertexShaderSource
))
{
emit
error
(
m_program
->
log
());
return
;
}
if
(
!
m_program
->
addShaderFromSourceCode
(
QOpenGLShader
::
Fragment
,
fragmentShaderSource
))
{
emit
error
(
m_program
->
log
());
return
;
}
if
(
!
m_program
->
link
())
{
emit
error
(
m_program
->
log
());
return
;
}
m_posAttr
=
m_program
->
attributeLocation
(
"position"
);
m_colAttr
=
m_program
->
attributeLocation
(
"color"
);
const
QShaderDescription
vsDesc
=
m_vs
.
description
();
// ### maybe move this to a helper api?
if
(
version
==
330
)
{
// use a true uniform buffer
QOpenGLExtraFunctions
*
f
=
m_context
->
extraFunctions
();
const
QString
bname
=
vsDesc
.
uniformBlocks
()[
0
].
blockName
;
GLuint
blockIdx
=
f
->
glGetUniformBlockIndex
(
m_program
->
programId
(),
bname
.
toUtf8
().
constData
());
if
(
blockIdx
==
GL_INVALID_INDEX
)
qWarning
(
"uniform block %s not found?!"
,
qPrintable
(
bname
));
f
->
glUniformBlockBinding
(
m_program
->
programId
(),
blockIdx
,
0
);
f
->
glGenBuffers
(
1
,
&
m_ubo
);
f
->
glBindBufferBase
(
GL_UNIFORM_BUFFER
,
0
,
m_ubo
);
}
else
{
// without uniform buffer support we have a mere struct
const
QString
uniName
=
vsDesc
.
uniformBlocks
()[
0
].
structName
+
QLatin1String
(
".mvp"
);
m_matrixUniform
=
m_program
->
uniformLocation
(
uniName
);
}
m_vbo
.
create
();
m_vbo
.
bind
();
m_vbo
.
allocate
(
vertices
,
sizeof
(
vertices
)
+
sizeof
(
colors
));
m_vbo
.
write
(
sizeof
(
vertices
),
colors
,
sizeof
(
colors
));
m_vbo
.
release
();
QOpenGLVertexArrayObject
::
Binder
vaoBinder
(
&
m_vao
);
if
(
m_vao
.
isCreated
())
setupVertexAttribs
();
}
void
RenderWindow
::
setupVertexAttribs
()
{
m_vbo
.
bind
();
m_program
->
setAttributeBuffer
(
m_posAttr
,
GL_FLOAT
,
0
,
2
);
m_program
->
setAttributeBuffer
(
m_colAttr
,
GL_FLOAT
,
sizeof
(
vertices
),
3
);
m_program
->
enableAttributeArray
(
m_posAttr
);
m_program
->
enableAttributeArray
(
m_colAttr
);
m_vbo
.
release
();
}
void
RenderWindow
::
render
()
{
if
(
!
m_context
->
makeCurrent
(
this
))
{
emit
error
(
tr
(
"makeCurrent() failed"
));
return
;
}
QOpenGLExtraFunctions
*
f
=
m_context
->
extraFunctions
();
if
(
!
m_initialized
)
{
m_initialized
=
true
;
f
->
glEnable
(
GL_DEPTH_TEST
);
f
->
glClearColor
(
0
,
0
,
0
,
1
);
init
();
emit
ready
();
}
if
(
!
m_vbo
.
isCreated
())
return
;
const
qreal
retinaScale
=
devicePixelRatio
();
f
->
glViewport
(
0
,
0
,
width
()
*
retinaScale
,
height
()
*
retinaScale
);
f
->
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
m_program
->
bind
();
QMatrix4x4
matrix
;
matrix
.
perspective
(
45.0
f
,
width
()
/
float
(
height
()),
0.01
f
,
100.0
f
);
matrix
.
translate
(
0.0
f
,
0.0
f
,
-
4.0
f
);
matrix
.
rotate
(
m_angle
,
0.0
f
,
1.0
f
,
0.0
f
);
if
(
m_vao
.
isCreated
())
m_vao
.
bind
();
else
setupVertexAttribs
();
if
(
m_ubo
)
{
f
->
glBufferData
(
GL_UNIFORM_BUFFER
,
64
,
matrix
.
constData
(),
GL_DYNAMIC_DRAW
);
}
else
{
m_program
->
setUniformValue
(
m_matrixUniform
,
matrix
);
}
f
->
glDrawArrays
(
GL_TRIANGLES
,
0
,
3
);
m_vao
.
release
();
m_program
->
release
();
m_context
->
swapBuffers
(
this
);
m_angle
+=
1.0
f
;
const
int
interval
=
5
;
QTimer
::
singleShot
(
interval
,
this
,
&
RenderWindow
::
render
);
}
tests/manual/shadertools/oneshaderthreecontexts_prebaked/renderwindow.h
deleted
100644 → 0
View file @
be7bda45
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef RENDERWINDOW_H
#define RENDERWINDOW_H
#include <QWindow>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer>
class
QOpenGLContext
;
class
QOpenGLShaderProgram
;
class
QBakedShader
;
class
RenderWindow
:
public
QWindow
{
Q_OBJECT
public:
RenderWindow
(
const
QBakedShader
&
vs
,
const
QBakedShader
&
fs
,
const
QSurfaceFormat
&
format
);
QOpenGLContext
*
context
()
{
return
m_context
;
}
void
exposeEvent
(
QExposeEvent
*
)
override
;
signals:
void
ready
();
void
error
(
const
QString
&
msg
);
private
slots
:
void
render
();
private:
void
init
();
void
setupVertexAttribs
();
QOpenGLContext
*
m_context
;
bool
m_initialized
;
QOpenGLShaderProgram
*
m_program
;
int
m_posAttr
,
m_colAttr
,
m_matrixUniform
;
QOpenGLVertexArrayObject
m_vao
;
QOpenGLBuffer
m_vbo
;
float
m_angle
;
GLuint
m_ubo
=
0
;
const
QBakedShader
&
m_vs
;
const
QBakedShader
&
m_fs
;
};
#endif // RENDERWINDOW_H
tests/manual/shadertools/oneshaderthreecontexts_prebaked/tri.qrc
deleted
100644 → 0
View file @
be7bda45
<!DOCTYPE RCC>
<RCC
version=
"1.0"
>
<qresource>
<file>
color.vert.qsb
</file>
<file>
color.frag.qsb
</file>
</qresource>
</RCC>
tests/manual/shadertools/oneshaderthreecontexts_runtime/color.frag
deleted
100644 → 0
View file @
be7bda45
#version 440
layout
(
location
=
0
)
in
vec3
v_color
;
layout
(
location
=
0
)
out
vec4
fragColor
;
void
main
()
{
fragColor
=
vec4
(
v_color
,
1
.
0
);
}
tests/manual/shadertools/oneshaderthreecontexts_runtime/color.vert
deleted
100644 → 0
View file @
be7bda45
#version 440
layout
(
location
=
0
)
in
vec4
position
;
layout
(
location
=
1
)
in
vec3
color
;
layout
(
location
=
0
)
out
vec3
v_color
;
layout
(
std140
,
binding
=
0
)
uniform
buf
{
mat4
mvp
;
}
ubuf
;
out
gl_PerVertex
{
vec4
gl_Position
;
};
void
main
()
{
v_color
=
color
;
gl_Position
=
ubuf
.
mvp
*
position
;
}
tests/manual/shadertools/oneshaderthreecontexts_runtime/main.cpp
deleted
100644 → 0
View file @
be7bda45
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.