Add a check for bundled Qt plugins

This commit is contained in:
Ilya Fedin 2020-05-14 21:03:36 +04:00 committed by John Preston
parent ced2652deb
commit 4c1f83daca
2 changed files with 13 additions and 2 deletions

View File

@ -271,6 +271,14 @@ bool IsGtkFileDialogForced() {
#endif // !TDESKTOP_FORCE_GTK_FILE_DIALOG
}
bool IsQtPluginsBundled() {
#ifdef DESKTOP_APP_USE_PACKAGED_LAZY
return true;
#else // DESKTOP_APP_USE_PACKAGED_LAZY
return false;
#endif // !DESKTOP_APP_USE_PACKAGED_LAZY
}
bool IsXDGDesktopPortalPresent() {
#ifdef TDESKTOP_DISABLE_DBUS_INTEGRATION
static const auto XDGDesktopPortalPresent = false;
@ -633,14 +641,16 @@ void start() {
if(IsStaticBinary()
|| InAppImage()
|| InSandbox()
|| InSnap()) {
|| InSnap()
|| IsQtPluginsBundled()) {
qputenv("QT_WAYLAND_DECORATION", "material");
}
if(IsStaticBinary()
|| InAppImage()
|| InSnap()
|| IsGtkFileDialogForced()) {
|| IsGtkFileDialogForced()
|| IsQtPluginsBundled()) {
LOG(("Checking for XDG Desktop Portal..."));
// this can give us a chance to use a proper file dialog for current session
if (IsXDGDesktopPortalPresent()) {

View File

@ -25,6 +25,7 @@ bool InSnap();
bool InAppImage();
bool IsStaticBinary();
bool IsGtkFileDialogForced();
bool IsQtPluginsBundled();
bool IsXDGDesktopPortalPresent();
bool UseXDGDesktopPortal();