From 91bb74c21872cd9340b25cf0684e7c4b5cd07f57 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Wed, 16 Nov 2016 13:45:32 +0100 Subject: [PATCH] fix(Notifications/Notification): remove binding loop --- tests/src/components/notifier/Notifier.cpp | 5 ++++- .../ui/modules/Linphone/Notifications/Notification.qml | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/src/components/notifier/Notifier.cpp b/tests/src/components/notifier/Notifier.cpp index df360bb6f..f95be23eb 100644 --- a/tests/src/components/notifier/Notifier.cpp +++ b/tests/src/components/notifier/Notifier.cpp @@ -106,7 +106,10 @@ void Notifier::showCallMessage ( m_mutex.unlock(); // Display notification. - QMetaObject::invokeMethod(object, "show", Qt::DirectConnection); + QMetaObject::invokeMethod( + object, NOTIFICATION_SHOW_METHOD_NAME, + Qt::DirectConnection + ); // Destroy it after timeout. QTimer::singleShot(timeout, this, [object,this]() { diff --git a/tests/ui/modules/Linphone/Notifications/Notification.qml b/tests/ui/modules/Linphone/Notifications/Notification.qml index a0de0c015..43a9d98a8 100644 --- a/tests/ui/modules/Linphone/Notifications/Notification.qml +++ b/tests/ui/modules/Linphone/Notifications/Notification.qml @@ -35,9 +35,13 @@ DesktopPopup { window.y = Qt.binding(function () { var screen = window.Screen - return screen != null - ? screen.desktopAvailableHeight - window.height - notificationOffset - : 0 + + if (screen == null) { + return 0 + } + + var height = screen.desktopAvailableHeight - window.height + return height - notificationOffset % height }) } }