Bug #5684 ยป fix-web-widget-signal-bookkeeping.patch
src/Wt/WWebWidget | ||
---|---|---|
Signal<bool> scrollVisibilityChanged_;
|
||
JSignal<bool> *jsScrollVisibilityChanged_;
|
||
OtherImpl(WWebWidget *const self);
|
||
OtherImpl(WWebWidget *const self, const char *id = 0);
|
||
~OtherImpl();
|
||
};
|
||
src/Wt/WWebWidget.C | ||
---|---|---|
data(aData)
|
||
{ }
|
||
WWebWidget::OtherImpl::OtherImpl(WWebWidget *const self)
|
||
: id_(0),
|
||
WWebWidget::OtherImpl::OtherImpl(WWebWidget *const self, const char *id)
|
||
: id_(id ? new std::string(id) : 0),
|
||
attributes_(0),
|
||
jsMembers_(0),
|
||
jsStatements_(0),
|
||
... | ... | |
childrenChanged_(self),
|
||
scrollVisibilityMargin_(0),
|
||
scrollVisibilityChanged_(self),
|
||
jsScrollVisibilityChanged_(new JSignal<bool>(self, "scrollVisibilityChanged"))
|
||
jsScrollVisibilityChanged_(NULL)
|
||
{
|
||
self->otherImpl_ = this; // necessary, because next line calls WWebWidget::id()
|
||
jsScrollVisibilityChanged_ = new JSignal<bool>(self, "scrollVisibilityChanged");
|
||
jsScrollVisibilityChanged_->connect(self, &WWebWidget::jsScrollVisibilityChanged);
|
||
}
|
||
... | ... | |
void WWebWidget::setId(const std::string& id)
|
||
{
|
||
if (!otherImpl_)
|
||
otherImpl_ = new OtherImpl(this);
|
||
if (!otherImpl_->id_)
|
||
otherImpl_->id_ = new std::string();
|
||
*otherImpl_->id_ = id;
|
||
if (!otherImpl_) {
|
||
otherImpl_ = new OtherImpl(this, id.c_str());
|
||
} else {
|
||
if (!otherImpl_->id_)
|
||
otherImpl_->id_ = new std::string();
|
||
*otherImpl_->id_ = id;
|
||
}
|
||
}
|
||
void WWebWidget::setSelectable(bool selectable)
|