qt: support other QPA platforms
Platform::Invalid was renamed to Platform::Other when platform identification moved to SalInstance, but the Qt VCL plugin retained the assertions and aborts used for the former invalid sentinel. Allow unrecognised Qt platform plugins to use the generic native-window path. This lets third-party QPA plugins operate without requiring an explicit LibreOffice platform classification. Tested with the MWS (Mercurius Window System) Qt 5 QPA plugin by starting LibreOffice Writer. Also exercised with Impress editing an image-heavy presentation. Change-Id: Idb0be3d7d0b5508565d6beb17729f768e552bb85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211434 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
committed by
Michael Weghorn
parent
56f02227d7
commit
8b00664342
+1
-3
@@ -221,10 +221,8 @@ QWindow* QtFrame::windowHandle() const
|
||||
case Platform::Windows:
|
||||
case Platform::Xcb:
|
||||
case Platform::Mac:
|
||||
pChild->setAttribute(Qt::WA_NativeWindow);
|
||||
break;
|
||||
case Platform::Other:
|
||||
std::abort();
|
||||
pChild->setAttribute(Qt::WA_NativeWindow);
|
||||
break;
|
||||
}
|
||||
return pChild->windowHandle();
|
||||
|
||||
@@ -652,7 +652,6 @@ Platform QtInstance::GetPlatform() const
|
||||
if (sPlatformName == u"cocoa")
|
||||
return Platform::Mac;
|
||||
|
||||
assert(false && "Unsupported qt VCL platform");
|
||||
return Platform::Other;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user