projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaced boost::shared_ptr with std::shared_ptr
[pulseview.git]
/
pv
/
prop
/
binding
/
deviceoptions.cpp
diff --git
a/pv/prop/binding/deviceoptions.cpp
b/pv/prop/binding/deviceoptions.cpp
index 26d4ef2a8fabe72dd3047525ca7e7c22112f0e99..a1ae6ba71e6fe50531b88286ef221320b6f054e1 100644
(file)
--- a/
pv/prop/binding/deviceoptions.cpp
+++ b/
pv/prop/binding/deviceoptions.cpp
@@
-22,6
+22,8
@@
#include <stdint.h>
#include <stdint.h>
+#include <QDebug>
+
#include "deviceoptions.h"
#include <pv/device/devinst.h>
#include "deviceoptions.h"
#include <pv/device/devinst.h>
@@
-35,9
+37,9
@@
using boost::bind;
using boost::function;
using boost::optional;
using boost::bind;
using boost::function;
using boost::optional;
-using boost::shared_ptr;
using std::make_pair;
using std::pair;
using std::make_pair;
using std::pair;
+using std::shared_ptr;
using std::string;
using std::vector;
using std::string;
using std::vector;
@@
-46,7
+48,7
@@
namespace prop {
namespace binding {
DeviceOptions::DeviceOptions(shared_ptr<pv::device::DevInst> dev_inst,
namespace binding {
DeviceOptions::DeviceOptions(shared_ptr<pv::device::DevInst> dev_inst,
- const sr_
probe
_group *group) :
+ const sr_
channel
_group *group) :
_dev_inst(dev_inst),
_group(group)
{
_dev_inst(dev_inst),
_group(group)
{
@@
-135,7
+137,11
@@
void DeviceOptions::bind_enum(const QString &name, int key,
vector< pair<GVariant*, QString> > values;
assert(_dev_inst);
vector< pair<GVariant*, QString> > values;
assert(_dev_inst);
- assert(gvar_list);
+ if (!gvar_list) {
+ qDebug() << "Config key " << key << " was listed, but no "
+ "options were given";
+ return;
+ }
g_variant_iter_init (&iter, gvar_list);
while ((gvar = g_variant_iter_next_value (&iter)))
g_variant_iter_init (&iter, gvar_list);
while ((gvar = g_variant_iter_next_value (&iter)))