forked from qt-creator/qt-creator
Utils: Add guard to SpinBox onTextChanged
Change-Id: I2a29541473f1ad201be45810703e61aff8148827 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -880,9 +880,9 @@ void SpinBox::setValue(int val)
|
||||
access(this)->setValue(val);
|
||||
}
|
||||
|
||||
void SpinBox::onTextChanged(const std::function<void (QString)> &func)
|
||||
void SpinBox::onTextChanged(const std::function<void(QString)> &func, QObject *guard)
|
||||
{
|
||||
QObject::connect(access(this), &QSpinBox::textChanged, func);
|
||||
QObject::connect(access(this), &QSpinBox::textChanged, guard, func);
|
||||
}
|
||||
|
||||
// TextEdit
|
||||
|
@@ -299,7 +299,7 @@ public:
|
||||
SpinBox(std::initializer_list<I> ps);
|
||||
|
||||
void setValue(int);
|
||||
void onTextChanged(const std::function<void(QString)> &);
|
||||
void onTextChanged(const std::function<void(QString)> &, QObject *guard);
|
||||
};
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT PushButton : public Widget
|
||||
|
Reference in New Issue
Block a user