nextcloud-desktop/src/gui/tray
Michael Schuster 44a9200c5d Fix crash caused by setting Tray window screen pointer on the QML side
Seems like Qt sometimes doesn't like the QML window's screen property to be set
to a C++ (QVariant) pointer value, so we use the index: Qt.application.screens[]

See Qt docs: https://doc.qt.io/qt-5/qml-qtquick-window-window.html#screen-prop

This fix returns the matching window's index from the QGuiApplication::screens()
list to the QML side, instead of the window pointer.

Steps to reproduce the crash with the previous code:
- Open the Tray menu and close it a few times,
  or scroll randomly up and down in its activity list.

Tested with Qt 5.12.5

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-15 12:32:25 +00:00
..
ActivityData.cpp More typo fix 2020-01-03 13:42:07 +01:00
ActivityData.h Retreive and svg data from icon property url for activity entries 2020-01-16 14:01:54 +01:00
ActivityListModel.cpp Replace prefixing of paths with file:// by QUrl::fromLocalFile() 2020-06-09 16:45:46 +02:00
ActivityListModel.h Implemented share functionality in tray window and changed actions / button logic. 2020-04-25 10:17:53 +02:00
NotificationHandler.cpp Use auto to avoiding repeating type names 2020-05-20 03:54:41 +02:00
NotificationHandler.h Retreive and svg data from icon property url for activity entries 2020-01-16 14:01:54 +01:00
UserLine.qml Merge pull request #1744 from nextcloud/qt-traygeometry-workaround 2020-03-01 07:07:47 +01:00
UserModel.cpp Simplify nullptr comparisons where appropriate 2020-06-11 00:27:30 +02:00
UserModel.h Hide openLocalFolderButton if no local folder is configured 2020-06-09 16:45:46 +02:00
Window.qml Fix crash caused by setting Tray window screen pointer on the QML side 2020-06-15 12:32:25 +00:00