Don't defer platform backingstore creation if we already have a platform window
The creation was made lazy in 18f415e46d
, for those platforms (macOS) that
need a platform window to successfully create a platform backingstore. But we
don't need to delay creation if we actually have a platform window at the time
of constructing the QBackingStore.
Change-Id: I6367736ddca82900dec2751a85a8bc35cc742bb5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
e1b0dfc1d4
commit
29b1ac0697
@ -95,6 +95,11 @@ public:
|
||||
QBackingStore::QBackingStore(QWindow *window)
|
||||
: d_ptr(new QBackingStorePrivate(window))
|
||||
{
|
||||
if (window->handle()) {
|
||||
// Create platform backingstore up front if we have a platform window,
|
||||
// otherwise delay the creation until absolutely necessary.
|
||||
handle();
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user