captures.removeFirst(); // remove entire match
QString str = captures.join("");
setValue(pv::util::Timestamp(str.toStdString()));
- }
- else {
+ } else {
// replace the malformed entered string with the old value
updateEdit();
}
void TimestampSpinBox::updateEdit()
{
- QString newtext = pv::util::format_si_value(
- value_, "s", pv::util::SIPrefix::none, precision_);
+ QString newtext = pv::util::format_time_si(
+ value_, pv::util::SIPrefix::none, precision_);
lineEdit()->setText(newtext);
}