Prevent false positives in TWidgetPrivate::rhiConfig
QWidget::create could set the WA_WState_Created flag without creating actual window. Adding the check from the top of QWidgetPrivate::create should prevent such false positives.
This commit is contained in:
parent
d28afffcb9
commit
0bee95570e
1 changed files with 3 additions and 1 deletions
|
|
@ -23,7 +23,9 @@ public:
|
|||
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||
QPlatformBackingStoreRhiConfig rhiConfig() const override {
|
||||
const auto q = static_cast<TWidget*>(q_ptr);
|
||||
if (!q->testAttribute(Qt::WA_WState_Created)) {
|
||||
if (!q->testAttribute(Qt::WA_WState_Created)
|
||||
|| (!q->testAttribute(Qt::WA_NativeWindow)
|
||||
&& !q->isWindow())) {
|
||||
return QWidgetPrivate::rhiConfig();
|
||||
}
|
||||
if (const auto config = q->rhiConfig()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue