X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fprop%2Fint.cpp;h=31f518a8cbd481467d0e5195861058989574ae28;hp=0edba420b2e8538819d6f4b1d55c9c2a75ef26ba;hb=4c60462b00cc329e61daedd1c2e66724077bd412;hpb=2acdb232d6bb452cfdfaea3ef5218fb4da592329 diff --git a/pv/prop/int.cpp b/pv/prop/int.cpp index 0edba420..31f518a8 100644 --- 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), - spin_box_(NULL) + spin_box_(nullptr) { } @@ -57,13 +57,13 @@ QWidget* Int::get_widget(QWidget *parent, bool auto_commit) return spin_box_; if (!getter_) - return NULL; + return nullptr; value_ = getter_(); GVariant *value = value_.gobj(); if (!value) - return NULL; + return nullptr; spin_box_ = new QSpinBox(parent); spin_box_->setSuffix(suffix_); @@ -141,7 +141,7 @@ void Int::commit() if (!spin_box_) return; - GVariant *new_value = NULL; + GVariant *new_value = nullptr; const GVariantType *const type = g_variant_get_type(value_.gobj()); assert(type); @@ -154,7 +154,7 @@ void Int::commit() else if (g_variant_type_equal(type, G_VARIANT_TYPE_INT32)) new_value = g_variant_new_int32(spin_box_->value()); else if (g_variant_type_equal(type, G_VARIANT_TYPE_UINT32)) - new_value = g_variant_new_int32(spin_box_->value()); + new_value = g_variant_new_uint32(spin_box_->value()); else if (g_variant_type_equal(type, G_VARIANT_TYPE_INT64)) new_value = g_variant_new_int64(spin_box_->value()); else if (g_variant_type_equal(type, G_VARIANT_TYPE_UINT64))