projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ec0156
)
Use g_variant_equal() instead of g_variant_compare() to compare enums.
author
Marcus Comstedt
<marcus@mc.pp.se>
Sun, 4 Aug 2013 14:32:37 +0000
(16:32 +0200)
committer
Marcus Comstedt
<marcus@mc.pp.se>
Sun, 4 Aug 2013 14:32:37 +0000
(16:32 +0200)
g_variant_compare() doesn't support tuples, and we're only interrested
in equality anyway.
pv/prop/enum.cpp
patch
|
blob
|
history
diff --git
a/pv/prop/enum.cpp
b/pv/prop/enum.cpp
index ced2f2bb0c79664b98af758a2ecf42b6d711316a..2249b570851fd183aeb943cb857923584902608a 100644
(file)
--- a/
pv/prop/enum.cpp
+++ b/
pv/prop/enum.cpp
@@
-56,7
+56,7
@@
QWidget* Enum::get_widget(QWidget *parent)
for (unsigned int i = 0; i < _values.size(); i++) {
const pair<GVariant*, QString> &v = _values[i];
_selector->addItem(v.second, qVariantFromValue((void*)v.first));
- if (value && g_variant_
compare(v.first, value) == 0
)
+ if (value && g_variant_
equal(v.first, value)
)
_selector->setCurrentIndex(i);
}