git-svn-id: svn://db.shs.com.ru/libs@398 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-06-07 13:32:34 +00:00
parent 6967dcc747
commit ad39a1b02e
12 changed files with 84 additions and 2 deletions

View File

@@ -179,7 +179,7 @@ bool QCDCore::bindWidget(QWidget * w, const CDType & k) {
connect(w, SIGNAL(destroyed(QObject*)), this, SLOT(slotDestroyed(QObject*)), Qt::UniqueConnection);
setWidgetValue(w, k);
if (!ok) return false;
piCout << k.name() << k.path();
//piCout << k.name() << k.path();
binded_widgets.insert(w, k.path());
return true;
}
@@ -187,11 +187,17 @@ bool QCDCore::bindWidget(QWidget * w, const CDType & k) {
void QCDCore::updateBindedWidgets() {
QMapIterator<QWidget * , PIDeque<int> > it(binded_widgets);
QWidgetList to_remove;
updating = true;
while (it.hasNext()) {
QWidget * w = it.next().key();
setWidgetValue(w, K[it.value()]);
if (!K.exists(it.value()))
to_remove << w;
else
setWidgetValue(w, K[it.value()]);
}
foreach (QWidget * w, to_remove)
unbindWidget(w);
updating = false;
}