OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
628f139
)
explicitly convert the elapsed time to double
author
Ivailo Monev
<xakepa10@gmail.com>
Tue, 22 Nov 2022 18:42:18 +0000
(20:42 +0200)
committer
Ivailo Monev
<xakepa10@gmail.com>
Tue, 22 Nov 2022 18:42:18 +0000
(20:42 +0200)
QElapsedTimer::elapsed() returns qint64 btw
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/widgets/qeffects.cpp
patch
|
blob
|
history
diff --git
a/src/gui/widgets/qeffects.cpp
b/src/gui/widgets/qeffects.cpp
index
cafdbbc
..
327915d
100644
(file)
--- a/
src/gui/widgets/qeffects.cpp
+++ b/
src/gui/widgets/qeffects.cpp
@@
-34,7
+34,7
@@
QT_BEGIN_NAMESPACE
-static const
int s_duration = 15
0;
+static const
double s_duration = 150.
0;
/*!
\internal
@@
-86,8
+86,7
@@
QOpacityEffect::~QOpacityEffect()
*/
void QOpacityEffect::fade()
{
- const int tempel = checkTime.elapsed();
- const double alpha = tempel / double(s_duration);
+ const double alpha = (double(checkTime.elapsed()) / s_duration);
if (alpha >= 1.0 || !widget) {
anim.stop();