X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fprop%2Fint.cpp;h=31f518a8cbd481467d0e5195861058989574ae28;hp=ef962e5a7ca5ae09ef9846261ca0fce46fb885b1;hb=3e5bc2687fc23309ad46872fc5accde2af82ea87;hpb=8dbbc7f0b9ea59d0f0d62225772f8a56eee125f5 diff --git a/pv/prop/int.cpp b/pv/prop/int.cpp index ef962e5a..31f518a8 100644 --- a/pv/prop/int.cpp +++ b/pv/prop/int.cpp @@ -23,7 +23,7 @@ #include -#include "int.h" +#include "int.hpp" using boost::optional; using std::max; @@ -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))