Skip to content
Permalink
Browse files

Fix recording timer not properly displaying in Qt 5 version of Mumble.

Apparently Qt 5 changed QTime's behavior with regards to invalidity.
A default constructed QTime is midnight time and invalid. We added
some milliseconds and converted to string. Both Qt 4 and 5 docs state
that an invalid time will yield an empty string. In Qt 4 however our
use did give us the time string we wanted instead of an empty string.
This patch simply removes the use of the default constructor in favor
of manually creating a valid midnight QTime to work with.

Fixes #1426
  • Loading branch information...
hacst committed Oct 11, 2014
1 parent 7647538 commit fc0e20bb69e768c348b389948f2fc099888810e6
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/mumble/VoiceRecorderDialog.cpp
@@ -252,10 +252,8 @@ void VoiceRecorderDialog::on_qtTimer_timeout() {
return;
}

QTime t, n;
n = t.addMSecs(static_cast<int>(recorder->getElapsedTime() / 1000));

qlTime->setText(n.toString(QLatin1String("hh:mm:ss")));
const QTime elapsedTime = QTime(0,0).addMSecs(static_cast<int>(recorder->getElapsedTime() / 1000));
qlTime->setText(elapsedTime.toString());
}

void VoiceRecorderDialog::on_qpbTargetDirectoryBrowse_clicked() {

0 comments on commit fc0e20b

Please sign in to comment.
You can’t perform that action at this time.