mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 03:26:05 -04:00
Merge pull request #905 from kiwix/appimage-hack
Add a small hack to fix QWebEngine using appimage.
This commit is contained in:
commit
0d0aa054c8
@ -10,6 +10,15 @@
|
||||
#endif
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Small hack to make QtWebEngine works with AppImage.
|
||||
// See https://github.com/probonopd/linuxdeployqt/issues/554
|
||||
if (::getenv("APPIMAGE") != nullptr) {
|
||||
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu --no-sandbox");
|
||||
QApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||
}
|
||||
// End of hack ^^^
|
||||
|
||||
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
|
||||
QWebEngineUrlScheme scheme("zim");
|
||||
|
Loading…
x
Reference in New Issue
Block a user