c++ - QTime Buffer Overflow? -


i writing program asks user large number of seconds , waits many seconds. issue waitsecs larger 9999 seconds, launchtime seems become random number. i've outputted waitsecs using qdebug , correct number (even when number larger 9999). help?

qtime launchtime = qtime::currenttime().addsecs(waitsecs); 

here code + output:

enter image description here

from qt documentation http://qt-project.org/doc/qt-4.8/qtime.html#addsecs:

qtime qtime::addsecs ( int s ) const 

returns qtime object containing time s seconds later time of object (or earlier if s negative).

note time wrap if passes midnight.

consider using qdatetime instead...


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -