projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Untangle the time formatting functions a bit
[pulseview.git]
/
pv
/
prop
/
int.cpp
diff --git
a/pv/prop/int.cpp
b/pv/prop/int.cpp
index 55b7ab3e09fa8bd4f00cb37ff4886a5f795d7fb3..812b751608f3c561dd4ad8d45af4dc1e79008869 100644
(file)
--- a/
pv/prop/int.cpp
+++ b/
pv/prop/int.cpp
@@
-41,7
+41,7
@@
Int::Int(QString name,
Property(name, getter, setter),
suffix_(suffix),
range_(range),
Property(name, getter, setter),
suffix_(suffix),
range_(range),
- spin_box_(
NULL
)
+ spin_box_(
nullptr
)
{
}
{
}
@@
-51,19
+51,20
@@
Int::~Int()
QWidget* Int::get_widget(QWidget *parent, bool auto_commit)
{
QWidget* Int::get_widget(QWidget *parent, bool auto_commit)
{
- int64_t int_val = 0, range_min = 0, range_max = 0;
+ int64_t int_val = 0, range_min = 0;
+ uint64_t range_max = 0;
if (spin_box_)
return spin_box_;
if (!getter_)
if (spin_box_)
return spin_box_;
if (!getter_)
- return
NULL
;
+ return
nullptr
;
value_ = getter_();
GVariant *value = value_.gobj();
if (!value)
value_ = getter_();
GVariant *value = value_.gobj();
if (!value)
- return
NULL
;
+ return
nullptr
;
spin_box_ = new QSpinBox(parent);
spin_box_->setSuffix(suffix_);
spin_box_ = new QSpinBox(parent);
spin_box_->setSuffix(suffix_);
@@
-118,7
+119,7
@@
QWidget* Int::get_widget(QWidget *parent, bool auto_commit)
// custom widget.
range_min = max(range_min, (int64_t)INT_MIN);
// custom widget.
range_min = max(range_min, (int64_t)INT_MIN);
- range_max = min(range_max, (int64_t)INT_MAX);
+ range_max = min(range_max, (
u
int64_t)INT_MAX);
if (range_)
spin_box_->setRange((int)range_->first, (int)range_->second);
if (range_)
spin_box_->setRange((int)range_->first, (int)range_->second);
@@
-141,7
+142,7
@@
void Int::commit()
if (!spin_box_)
return;
if (!spin_box_)
return;
- GVariant *new_value =
NULL
;
+ GVariant *new_value =
nullptr
;
const GVariantType *const type = g_variant_get_type(value_.gobj());
assert(type);
const GVariantType *const type = g_variant_get_type(value_.gobj());
assert(type);