mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 06:25:56 +03:00
Merge pull request #3805 from nextcloud/bugfix/fixQmlContextLossEvents
set default format for QSurface to handle NVidia context loss events
This commit is contained in:
commit
71a5e2d477
1 changed files with 5 additions and 0 deletions
|
@ -39,6 +39,7 @@
|
|||
#include <QDebug>
|
||||
#include <QQuickStyle>
|
||||
#include <QQuickWindow>
|
||||
#include <QSurfaceFormat>
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
|
@ -113,6 +114,10 @@ int main(int argc, char **argv)
|
|||
}
|
||||
#endif
|
||||
|
||||
auto surfaceFormat = QSurfaceFormat::defaultFormat();
|
||||
surfaceFormat.setOption(QSurfaceFormat::ResetNotification);
|
||||
QSurfaceFormat::setDefaultFormat(surfaceFormat);
|
||||
|
||||
// check a environment variable for core dumps
|
||||
#ifdef Q_OS_UNIX
|
||||
if (!qEnvironmentVariableIsEmpty("OWNCLOUD_CORE_DUMP")) {
|
||||
|
|
Loading…
Reference in a new issue