Make QWidgetPrivate accessible

This commit is contained in:
Ilya Fedin 2022-08-03 20:38:22 +04:00 committed by John Preston
parent f27d756bcd
commit f15218d36e

View file

@ -258,6 +258,8 @@ class RpWidgetWrap {
public:
virtual QWidget *rpWidget() = 0;
virtual const QWidget *rpWidget() const = 0;
virtual QObjectData *rpPrivate() = 0;
virtual const QObjectData *rpPrivate() const = 0;
rpl::producer<not_null<QEvent*>> events() const;
rpl::producer<QRect> geometryValue() const;
@ -336,6 +338,12 @@ public:
const QWidget *rpWidget() const final override {
return this;
}
QObjectData *rpPrivate() final override {
return qGetPtrHelper(this->d_ptr);
}
const QObjectData *rpPrivate() const final override {
return qGetPtrHelper(this->d_ptr);
}
void setVisible(bool visible) final override {
auto wasVisible = !this->isHidden();
setVisibleHook(visible);