Commit 0ddc8a49 authored by EXT Arnaud Clère's avatar EXT Arnaud Clère

small fix

parent d61e9ac9
......@@ -271,7 +271,7 @@ public:
Val<Rec<T_>> item( QName n) { return outer->_item(n) ? Val<Rec<T_>>(std::move(*this)) : Val<Rec<T_>>(); }
// Sequence comprehension support
T_ bindSequence(QName n, QBindSeqFunction<TResult> customBind) { return item(n).bindSequence(customBind); }
T_ bindSequence(QName n, QBindSeqFunction<TResult> customBind) { return item(n).bindSequence(customBind).out(); }
// Shortcuts
/**/ Seq<Rec<T_>> sequence(QName n, quint32* s=nullptr) { return item(n).sequence ( s); }
......
......@@ -991,7 +991,7 @@ void doGuiExample() {
QModelWriter<>(& tableModel ).meta({{qmColumns , "names,age"} }).bind(persons);
// Various possible designs for flexible custom bind
#if 1
#if 0
// Safest design that works for Read/Write but requires several cumbersome functions
QModelWriter<>(&customModel).sequence().from(persons, [](Person& p, Val<Cursor>&& item)->Cursor { // ADL cannot deduce Person
return item
......@@ -1020,7 +1020,6 @@ void doGuiExample() {
}
return std::move(s);
});
//.out();
}
return std::move(s); // So caller stops calling IBind if user function was unable to keep track of the active Cursor
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment