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
OpenFlipper-Free
OpenFlipper
Commits
b415bedd
Commit
b415bedd
authored
May 08, 2020
by
Jan Möbius
Browse files
Merge branch 'Fix_Qt_5.14_dep_warnings' into 'master'
Fix qt 5.14 dep warnings See merge request
!184
parents
245e85a1
45edb590
Changes
15
Hide whitespace changes
Inline
Side-by-side
Core/Core.cc
View file @
b415bedd
...
...
@@ -226,7 +226,7 @@ Core::init() {
connect
(
scenegraphCheckTimer_
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
checkScenegraphDirty
()),
Qt
::
DirectConnection
);
// Will measure the time between redraws
redrawTime_
=
new
QTime
();
redrawTime_
=
new
Q
Elapsed
Time
r
();
redrawTime_
->
start
();
if
(
OpenFlipperSettings
().
value
(
"Core/Gui/splash"
,
true
).
toBool
()
)
{
...
...
Core/Core.hh
View file @
b415bedd
...
...
@@ -928,8 +928,8 @@ private slots:
void
stopVideoCapture
();
private:
QTimer
videoTimer_
;
QTime
lastVideoTime_
;
QTimer
videoTimer_
;
Q
Elapsed
Time
r
lastVideoTime_
;
int
captureType_
;
...
...
@@ -1472,7 +1472,7 @@ private slots:
QTimer
*
scenegraphCheckTimer_
;
/// Holds the time since last redraw
QTime
*
redrawTime_
;
Q
Elapsed
Time
r
*
redrawTime_
;
/** @} */
...
...
Core/PluginLoader.cc
View file @
b415bedd
...
...
@@ -341,7 +341,7 @@ void Core::loadPlugins()
emit
log
(
LOGOUT
,
"================================================================================"
);
QTime
time
;
Q
Elapsed
Time
r
time
;
time
.
start
();
...
...
libs_required/ACG/GL/FilterKernels.cc
View file @
b415bedd
...
...
@@ -238,8 +238,7 @@ void GaussianBlurFilter::updateKernel()
for
(
int
i
=
0
;
i
<
samples_
;
++
i
)
weights_
[
i
]
/=
weightSum
;
QString
blurSamplesMacro
;
blurSamplesMacro
.
sprintf
(
"#define BLUR_SAMPLES %i"
,
samples_
);
QString
blurSamplesMacro
=
QString
(
"#define BLUR_SAMPLES %1"
).
arg
(
samples_
);
macros_
.
clear
();
macros_
.
push_back
(
blurSamplesMacro
);
}
...
...
@@ -345,8 +344,7 @@ void BilateralBlurFilter::updateKernel()
macros_
.
clear
();
QString
radiusMacro
;
radiusMacro
.
sprintf
(
"#define BLUR_SAMPLES %i"
,
samples_
);
QString
radiusMacro
=
QString
(
"#define BLUR_SAMPLES %1"
).
arg
(
samples_
);
int
numChannels
=
GLFormatInfo
(
internalFormat
()).
channelCount
();
numChannels
=
std
::
max
(
std
::
min
(
numChannels
,
4
),
1
);
...
...
@@ -359,8 +357,8 @@ void BilateralBlurFilter::updateKernel()
"BLUR_RGBA"
};
QString
channelMacro
;
channelMacro
.
sp
rin
tf
(
"#define BLUR_CHANNELS %
s"
,
blurChannels
[
numChannels
-
1
]);
// %1 printed as %s
QString
channelMacro
=
QSt
rin
g
(
"#define BLUR_CHANNELS %
1"
).
arg
(
blurChannels
[
numChannels
-
1
]);
macros_
.
push_back
(
radiusMacro
);
macros_
.
push_back
(
channelMacro
);
...
...
@@ -449,8 +447,8 @@ void RadialBlurFilter::setKernel( int _numSamples )
samples_
=
_numSamples
;
macros_
.
clear
();
QString
sampleMacro
;
sampleMacro
.
sp
rin
tf
(
"#define BLUR_SAMPLES %
i"
,
_numSamples
);
QString
sampleMacro
=
QSt
rin
g
(
"#define BLUR_SAMPLES %
1"
).
arg
(
_numSamples
);
macros_
.
push_back
(
sampleMacro
);
}
...
...
@@ -633,8 +631,7 @@ PoissonBlurFilter::PoissonBlurFilter(float _radius, float _sampleDistance, int _
samplesScaled_
=
samples_
;
QString
samplesMacro
;
samplesMacro
.
sprintf
(
"#define BLUR_SAMPLES %i"
,
numSamples
);
QString
samplesMacro
=
QString
(
"#define BLUR_SAMPLES %1"
).
arg
(
numSamples
);
macros_
.
push_back
(
samplesMacro
);
}
...
...
libs_required/ACG/GL/FilterKernels.hh
View file @
b415bedd
...
...
@@ -207,8 +207,7 @@ protected:
private:
int
radius_
,
samples_
;
int
radius_
,
samples_
;
/// blur std
float
sigma_
;
...
...
libs_required/ACG/GL/GLFormatInfo.cc
View file @
b415bedd
...
...
@@ -188,10 +188,7 @@ GLFormatInfo::GLFormatInfo( GLenum _intfmt, GLenum _fmt, GLenum _type, int _r, i
if
(
channelCount_
>
3
)
strfmt
+=
"A"
;
QString
bitCount
;
bitCount
.
sprintf
(
"%i"
,
channelBits_
[
0
]);
strfmt
+=
bitCount
;
strfmt
+=
QString
(
"%1"
).
arg
(
channelBits_
[
0
]);
if
(
isNormalized
())
{
...
...
libs_required/ACG/GL/ShaderCache.cc
View file @
b415bedd
...
...
@@ -156,8 +156,7 @@ GLSL::Program* ACG::ShaderCache::getProgram( const ShaderGenDesc* _desc, const s
{
static
int
counter
=
0
;
QString
fileName
;
fileName
.
sprintf
(
"shader_%02d.glsl"
,
counter
++
);
QString
fileName
=
QString
(
"shader_%1.glsl"
).
arg
(
counter
++
,
2
,
10
,
QLatin1Char
(
'0'
))
;
fileName
=
dbgOutputDir_
+
QDir
::
separator
()
+
fileName
;
QFile
fileOut
(
fileName
);
...
...
@@ -517,8 +516,7 @@ GLSL::Program* ACG::ShaderCache::getComputeProgram(const char* _computeShaderFil
}
}
QString
fnv_string
;
fnv_string
.
sprintf
(
"%X"
,
fnv_hash
);
QString
fnv_string
=
QString
::
number
(
fnv_hash
,
16
).
toUpper
();
std
::
string
dumpFilename
=
QString
(
dbgOutputDir_
+
QDir
::
separator
()
+
fileInfo
.
fileName
()
+
fnv_string
).
toStdString
();
...
...
libs_required/ACG/GL/ShaderGenerator.cc
View file @
b415bedd
...
...
@@ -220,7 +220,7 @@ void ShaderGenerator::initVertexShaderIO(const ShaderGenDesc* _desc, const Defau
QString
texcoordType
;
if
(
texdim
>
1
)
texcoordType
.
sp
rin
tf
(
"vec%
i"
,
texdim
);
texcoordType
=
QSt
rin
g
(
"vec%
1"
).
arg
(
texdim
);
else
texcoordType
=
"float"
;
...
...
@@ -402,12 +402,14 @@ void ShaderGenerator::initDefaultUniforms()
}
#define ADDLIGHT(x)
(sz.sprintf(x"_%d", lightIndex_), addUniform(sz)
)
#define ADDLIGHT(x)
addUniform( QString( QString(x) + "_%1").arg(lightIndex_)
)
void
ShaderGenerator
::
addLight
(
int
lightIndex_
,
ShaderGenLightType
_light
)
{
QString
sz
;
QTextStream
stream
(
&
sz
);
ADDLIGHT
(
"vec3 g_cLightDiffuse"
);
ADDLIGHT
(
"vec3 g_cLightAmbient"
);
ADDLIGHT
(
"vec3 g_cLightSpecular"
);
...
...
@@ -553,8 +555,7 @@ void ShaderGenerator::addIOToCode(const QStringList& _cmds)
void
ShaderGenerator
::
buildShaderCode
(
QStringList
*
_pMainCode
,
const
QStringList
&
_defaultLightingFunctions
)
{
QString
glslversion
;
glslversion
.
sprintf
(
"#version %d"
,
version_
);
QString
glslversion
=
QString
(
"#version %1"
).
arg
(
version_
);
code_
.
push_back
(
glslversion
);
...
...
@@ -1053,8 +1054,7 @@ void ShaderProgGenerator::initGenDefines(ShaderGenerator* _gen)
_gen
->
addDefine
(
"SG_POSOS 1"
);
// # lights define
QString
strNumLights
;
strNumLights
.
sprintf
(
"SG_NUM_LIGHTS %d"
,
desc_
.
numLights
);
QString
strNumLights
=
QString
(
"SG_NUM_LIGHTS %1"
).
arg
(
desc_
.
numLights
);
_gen
->
addDefine
(
strNumLights
);
// light types define
...
...
@@ -1065,11 +1065,8 @@ void ShaderProgGenerator::initGenDefines(ShaderGenerator* _gen)
_gen
->
addDefine
(
lightTypeNames
[
i
]);
for
(
int
i
=
0
;
i
<
desc_
.
numLights
;
++
i
)
{
QString
strLightType
;
strLightType
.
sprintf
(
"SG_LIGHT_TYPE_%d %s"
,
i
,
lightTypeNames
[
desc_
.
lightTypes
[
i
]]);
_gen
->
addDefine
(
strLightType
);
for
(
int
i
=
0
;
i
<
desc_
.
numLights
;
++
i
)
{
_gen
->
addDefine
(
QString
(
"SG_LIGHT_TYPE_%1 %2"
).
arg
(
i
).
arg
(
lightTypeNames
[
desc_
.
lightTypes
[
i
]])
);
}
_gen
->
addDefine
(
"SG_ALPHA g_vMaterial.y"
);
...
...
@@ -1986,7 +1983,7 @@ void ShaderProgGenerator::addTexGenCode( QStringList* _code, bool _fragmentShade
if
(
texcoordVarDim
==
1
)
texcoordVarInit
=
"float sg_vTexCoord"
;
else
texcoordVarInit
.
sp
rin
tf
(
"vec%
i
sg_vTexCoord"
,
texcoordVarDim
);
texcoordVarInit
=
QSt
rin
g
(
"vec%
1
sg_vTexCoord"
).
arg
(
texcoordVarDim
);
// init with default value: input or zero
if
(
ioDesc_
.
inputTexCoord_
&&
!
generateTexCoord
)
...
...
@@ -2072,20 +2069,16 @@ void ShaderProgGenerator::addTexGenCode( QStringList* _code, bool _fragmentShade
_code
->
push_back
(
"vec3 sg_TexGenRefl2 = sg_TexGenRefl; sg_TexGenRefl2.z += 1.0;"
);
_code
->
push_back
(
"float sg_TexGenMRcp = 0.5 * inversesqrt(dot(sg_TexGenRefl2, sg_TexGenRefl2));"
);
for
(
int
i
=
0
;
i
<
desc_
.
texGenDim
;
++
i
)
{
QString
assignmentInstrString
;
assignmentInstrString
.
sprintf
(
"sg_vTexCoord.%s = sg_TexGenRefl.%s * sg_TexGenMRcp + 0.5;"
,
texGenCoordString
[
i
],
texGenCoordString
[
i
]);
_code
->
push_back
(
assignmentInstrString
);
{
_code
->
push_back
(
QString
(
"sg_vTexCoord.%1 = sg_TexGenRefl.%2 * sg_TexGenMRcp + 0.5;"
).
arg
(
texGenCoordString
[
i
]).
arg
(
texGenCoordString
[
i
]));
}
}
break
;
case
GL_NORMAL_MAP
:
{
for
(
int
i
=
0
;
i
<
desc_
.
texGenDim
;
++
i
)
{
QString
assignmentInstrString
;
assignmentInstrString
.
sprintf
(
"sg_vTexCoord.%s = sg_vNormalVS.%s;"
,
texGenCoordString
[
i
],
texGenCoordString
[
i
]);
_code
->
push_back
(
assignmentInstrString
);
{
_code
->
push_back
(
QString
(
"sg_vTexCoord.%1 = sg_vNormalVS.%2;"
).
arg
(
texGenCoordString
[
i
]).
arg
(
texGenCoordString
[
i
])
);
}
}
break
;
...
...
@@ -2095,9 +2088,8 @@ void ShaderProgGenerator::addTexGenCode( QStringList* _code, bool _fragmentShade
_code
->
push_back
(
"vec3 sg_TexGenRefl = reflect(sg_vPosVS_unit, sg_vNormalVS);"
);
for
(
int
i
=
0
;
i
<
desc_
.
texGenDim
;
++
i
)
{
QString
assignmentInstrString
;
assignmentInstrString
.
sprintf
(
"sg_vTexCoord.%s = sg_TexGenRefl.%s;"
,
texGenCoordString
[
i
],
texGenCoordString
[
i
]);
_code
->
push_back
(
assignmentInstrString
);
_code
->
push_back
(
QString
(
"sg_vTexCoord.%1 = sg_TexGenRefl.%2;"
).
arg
(
texGenCoordString
[
i
]).
arg
(
texGenCoordString
[
i
])
);
}
}
break
;
...
...
libs_required/ACG/QtWidgets/QtApplication.hh
View file @
b415bedd
...
...
@@ -60,8 +60,7 @@
#include
<QApplication>
#include
<QObject>
#include
<QEvent>
#include
<QDateTime>
#include
<QElapsedTimer>
#include
<QTimerEvent>
// stdc++
...
...
@@ -184,7 +183,7 @@ private:
int
timer_id_
;
// stop Time
QTime
time_
;
Q
Elapsed
Time
r
time_
;
// vector to store events and top-levels sizes
FootPrints
events_
,
toplevels_
;
...
...
libs_required/ACG/QtWidgets/QtBaseViewer.cc
View file @
b415bedd
...
...
@@ -793,7 +793,7 @@ void QtBaseViewer::updateGL()
void
QtBaseViewer
::
drawScene
()
{
QTime
timer
;
Q
Elapsed
Time
r
timer
;
timer
.
start
();
...
...
libs_required/ACG/QtWidgets/QtBaseViewer.hh
View file @
b415bedd
...
...
@@ -76,7 +76,7 @@
#include
<QString>
#include
<QMenu>
#include
<QToolBar>
#include
<QTime>
#include
<Q
Elapsed
Time
r
>
#include
<vector>
#include
<string>
...
...
@@ -89,7 +89,7 @@ class QPushButton;
class
QToolButton
;
class
QStatusBar
;
class
QSplitter
;
class
QTimer
;
class
Q
Elapsed
Timer
;
class
QImage
;
class
QSocketNotifier
;
class
QGraphicsWidget
;
...
...
@@ -906,7 +906,7 @@ private:
std
::
vector
<
QAction
*
>
drawMenuActions_
;
// Used to calculate the time passed between redraws
QTime
redrawTime_
;
Q
Elapsed
Time
r
redrawTime_
;
//===========================================================================
/** @name view handling
...
...
libs_required/ACG/QtWidgets/QtExaminerViewer.cc
View file @
b415bedd
...
...
@@ -402,7 +402,7 @@ bool QtExaminerViewer::mapToSphere(const QPoint& _v2D, Vec3d& _v3D) const
void
QtExaminerViewer
::
slotAnimation
()
{
QTime
t
;
Q
Elapsed
Time
r
t
;
t
.
start
();
makeCurrent
();
rotate
(
lastRotationAxis_
,
lastRotationAngle_
);
...
...
libs_required/ACG/QtWidgets/QtExaminerViewer.hh
View file @
b415bedd
...
...
@@ -58,6 +58,7 @@
#include
"QtBaseViewer.hh"
#include
<QElapsedTimer>
#include
<QTime>
#include
<QMouseEvent>
#include
<QWheelEvent>
...
...
@@ -160,7 +161,7 @@ private:
// animation stuff
Vec3d
lastRotationAxis_
;
double
lastRotationAngle_
;
Q
Time
lastMoveTime_
;
Q
ElapsedTimer
lastMoveTime_
;
QTimer
*
timer_
;
};
...
...
widgets/glWidget/QtBaseViewer.cc
View file @
b415bedd
...
...
@@ -174,7 +174,7 @@ glViewer::glViewer( QGraphicsScene* _scene,
sp
.
setVerticalStretch
(
1
);
setSizePolicy
(
sp
);
redrawTime_
.
start
();
redrawTime_
.
start
();
// timer for animation
timer_
=
new
QTimer
(
this
);
...
...
@@ -543,7 +543,7 @@ void glViewer::drawScene(double _aspect)
// Inside the glWidget rendering, the system should not send extra updates
properties_
.
blockSignals
(
true
);
QTime
timer
;
Q
Elapsed
Time
r
timer
;
timer
.
start
();
// *****************************************************************
...
...
@@ -1595,7 +1595,7 @@ void glViewer::mousePressEvent(QGraphicsSceneMouseEvent* _e)
if
(
clickTimer_
.
isActive
())
{
clickTime_
=
QTime
();
clickTime_
.
invalidate
();
clickTimer_
.
stop
();
}
else
...
...
@@ -1720,9 +1720,9 @@ void glViewer::mouseReleaseEvent(QGraphicsSceneMouseEvent* _e)
case
Viewer
::
ExamineMode
:
viewMouseEvent
(
&
me
);
if
(
!
clickTime_
.
is
Null
())
if
(
clickTime_
.
is
Valid
())
{
int
elapsed
=
clickTime_
.
elapsed
();
int
elapsed
=
clickTime_
.
elapsed
();
QPoint
diff
=
clickEvent_
.
pos
()
-
me
.
pos
();
if
(
abs
(
diff
.
x
())
<=
1
&&
abs
(
diff
.
y
())
<=
1
&&
elapsed
<=
QApplication
::
doubleClickInterval
()
/
2
)
...
...
@@ -1733,7 +1733,7 @@ void glViewer::mouseReleaseEvent(QGraphicsSceneMouseEvent* _e)
}
else
{
clickTime_
=
QTime
();
clickTime_
.
invalidate
();
clickTimer_
.
stop
();
}
}
...
...
widgets/glWidget/QtBaseViewer.hh
View file @
b415bedd
...
...
@@ -76,6 +76,7 @@
#include
<QTimer>
#include
<QMouseEvent>
#include
<QTime>
#include
<QElapsedTimer>
//== FORWARDDECLARATIONS ======================================================
...
...
@@ -618,7 +619,7 @@ private:
std
::
vector
<
QAction
*
>
drawMenuActions_
;
// Used to calculate the time passed between redraws
QTime
redrawTime_
;
Q
Elapsed
Time
r
redrawTime_
;
// Default VAO needed in core profile mode
ACG
::
VertexArrayObject
defaultVAO_
;
...
...
@@ -955,12 +956,12 @@ private:
ACG
::
Vec3d
lastRotationAxis_
;
ACG
::
Vec3d
constrainedRotationAxis_
;
double
lastRotationAngle_
;
Q
Time
lastMoveTime_
;
Q
ElapsedTimer
lastMoveTime_
;
QTimer
*
timer_
;
double
fovyModifier_
;
QTimer
clickTimer_
;
Q
Time
clickTime_
;
Q
ElapsedTimer
clickTime_
;
QMouseEvent
clickEvent_
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment