mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 04:08:54 +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 <QDebug>
|
||||||
#include <QQuickStyle>
|
#include <QQuickStyle>
|
||||||
#include <QQuickWindow>
|
#include <QQuickWindow>
|
||||||
|
#include <QSurfaceFormat>
|
||||||
|
|
||||||
using namespace OCC;
|
using namespace OCC;
|
||||||
|
|
||||||
|
@ -113,6 +114,10 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
auto surfaceFormat = QSurfaceFormat::defaultFormat();
|
||||||
|
surfaceFormat.setOption(QSurfaceFormat::ResetNotification);
|
||||||
|
QSurfaceFormat::setDefaultFormat(surfaceFormat);
|
||||||
|
|
||||||
// check a environment variable for core dumps
|
// check a environment variable for core dumps
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
if (!qEnvironmentVariableIsEmpty("OWNCLOUD_CORE_DUMP")) {
|
if (!qEnvironmentVariableIsEmpty("OWNCLOUD_CORE_DUMP")) {
|
||||||
|
|
Loading…
Reference in a new issue