Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
438
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
a59d3f9d
Commit
a59d3f9d
authored
7 months ago
by
Pierre Lamot
Committed by
Steve Lhomme
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
qt: update rounding method for displaying playback time
parent
d1482d8b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!5640
qt: update rounding method for displaying playback time
Pipeline
#485393
passed with stage
in 11 minutes and 56 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/gui/qt/util/vlctick.cpp
+1
-2
1 addition, 2 deletions
modules/gui/qt/util/vlctick.cpp
modules/gui/qt/util/vlctick.hpp
+5
-0
5 additions, 0 deletions
modules/gui/qt/util/vlctick.hpp
with
6 additions
and
2 deletions
modules/gui/qt/util/vlctick.cpp
+
1
−
2
View file @
a59d3f9d
...
...
@@ -58,8 +58,7 @@ QString VLCTick::formatHMS() const
int64_t
t_ms
=
MS_FROM_VLC_TICK
(
m_ticks
);
if
(
t_ms
>=
1000
)
{
//round to the nearest second
t_ms
=
roundNearestMultiple
(
t_ms
,
1000
);
//truncate milliseconds toward 0
int64_t
t_sec
=
t_ms
/
1000
;
int
sec
=
t_sec
%
60
;
int
min
=
(
t_sec
/
60
)
%
60
;
...
...
This diff is collapsed.
Click to expand it.
modules/gui/qt/util/vlctick.hpp
+
5
−
0
View file @
a59d3f9d
...
...
@@ -40,6 +40,11 @@ public:
/**
* @brief formatHMS
* @return time as HH:MM:SS
*
* this method should be used to present running time or
* time that will be compared to a running time
*
* milliseconds will be truncated towards 0
*/
Q_INVOKABLE
QString
formatHMS
()
const
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment