Skip to content

Commit 1e04922

Browse files
committed
Remove setBlocked/isBlocked
It accidentally stayed behind. It was undocumented, and removed because its use tends to be a hack. The one remaining use did nothing: Signal::emit did not check isBlocked anymore, only EventSignal::emit did.
1 parent efe2fe8 commit 1e04922

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

src/Wt/WAbstractItemModel.C

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,11 @@ bool WAbstractItemModel::setItemData(const WModelIndex& index,
151151
{
152152
bool result = true;
153153

154-
bool wasBlocked = dataChanged().isBlocked();
155-
dataChanged().setBlocked(true);
156-
157154
for (DataMap::const_iterator i = values.begin(); i != values.end(); ++i)
158155
// if (i->first != ItemDataRole::Edit)
159156
if (!setData(index, i->second, i->first))
160157
result = false;
161158

162-
dataChanged().setBlocked(wasBlocked);
163159
dataChanged().emit(index, index);
164160

165161
return result;

src/Wt/WSignal.C

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,11 @@
1717
namespace Wt {
1818

1919
SignalBase::SignalBase()
20-
: blocked_(false)
2120
{ }
2221

2322
SignalBase::~SignalBase()
2423
{ }
2524

26-
void SignalBase::setBlocked(bool blocked)
27-
{
28-
blocked_ = blocked;
29-
}
30-
3125
EventSignalBase::EventSignalBase(const char *name, WObject *owner,
3226
bool autoLearn)
3327
: name_(name), owner_(owner), id_(nextId_++)

src/Wt/WSignal.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ class WT_API SignalBase
117117
*/
118118
virtual bool isConnected() const = 0;
119119

120-
void setBlocked(bool block);
121-
bool isBlocked() const { return blocked_; }
122-
123120
/*! \brief Connects to a slot.
124121
*
125122
* Every signal can be connected to a slot which does not take any
@@ -141,8 +138,6 @@ class WT_API SignalBase
141138

142139
private:
143140
SignalBase(const SignalBase& other);
144-
145-
bool blocked_;
146141
};
147142

148143
/*
@@ -894,9 +889,6 @@ EventSignal<E>::connect(WObject *target, WObject::Method method)
894889
template <typename E>
895890
void EventSignal<E>::emit(E e) const
896891
{
897-
if (isBlocked())
898-
return;
899-
900892
processLearnedStateless();
901893
processNonLearnedStateless();
902894

0 commit comments

Comments
 (0)