Make hours qint64
AbandonedPublic

Authored by aacid on Thu, Oct 3, 7:38 PM.

Details

Reviewers
None
Summary

msec is qint64 and pretty sure the biggest qint64 / 3600000 still doesn't fit in an integer

Diff Detail

Repository
R244 KCoreAddons
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17307
Build 17325: arc lint + arc unit
aacid created this revision.Thu, Oct 3, 7:38 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptThu, Oct 3, 7:38 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
aacid requested review of this revision.Thu, Oct 3, 7:38 PM
usta added a subscriber: usta.Thu, Oct 3, 11:39 PM
usta added inline comments.
src/lib/util/kformatprivate.cpp
339

why dont we use quint64 in here ?

470

same problem here ( quint64 days and hours ) ( maybe not days but hours )
also days, hours , minutes and seconds also can be conts in here too

aacid planned changes to this revision.Fri, Oct 4, 6:44 PM
aacid added inline comments.
src/lib/util/kformatprivate.cpp
339

because its unnecessary, qint64 / number don't need a quint64 to store it.

470

true, i wonder why the checker didn't complain for this one, will update

aacid added inline comments.Sat, Oct 12, 8:44 AM
src/lib/util/kformatprivate.cpp
339

sorry i just realized ms is quint64, so yes sshould b quint64

aacid abandoned this revision.Sat, Oct 12, 8:49 AM

Meh, just realized this patch is useless since we end up passing the quint variable to formatSingleDuration that passes it to QObject::tr and that one only supports int, so at some point there's a potential loss of range anyway