projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #1201 by letting more accurate matches replace previous ones
[pulseview.git]
/
pv
/
widgets
/
timestampspinbox.cpp
diff --git
a/pv/widgets/timestampspinbox.cpp
b/pv/widgets/timestampspinbox.cpp
index 59af82f65407629b0937ec66bc14308b190188d1..21b3d0d7a50c1610a3365bcabbe16730dcca696b 100644
(file)
--- a/
pv/widgets/timestampspinbox.cpp
+++ b/
pv/widgets/timestampspinbox.cpp
@@
-14,8
+14,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "timestampspinbox.hpp"
*/
#include "timestampspinbox.hpp"
@@
-88,7
+87,7
@@
void TimestampSpinBox::setValue(const pv::util::Timestamp& val)
value_ = val;
updateEdit();
value_ = val;
updateEdit();
-
Q_EMIT
valueChanged(value_);
+ valueChanged(value_);
}
void TimestampSpinBox::on_editingFinished()
}
void TimestampSpinBox::on_editingFinished()
@@
-104,8
+103,7
@@
void TimestampSpinBox::on_editingFinished()
captures.removeFirst(); // remove entire match
QString str = captures.join("");
setValue(pv::util::Timestamp(str.toStdString()));
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();
}
// replace the malformed entered string with the old value
updateEdit();
}
@@
-113,10
+111,10
@@
void TimestampSpinBox::on_editingFinished()
void TimestampSpinBox::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);
}
lineEdit()->setText(newtext);
}
-}
//
widgets
-}
//
pv
+}
// namespace
widgets
+}
// namespace
pv