From 2b351cf6bfa48d8a22a60e62d400ea0a760f620b Mon Sep 17 00:00:00 2001 From: Justin Hammond Date: Wed, 6 Nov 2019 11:28:27 +0800 Subject: [PATCH] fix up assert for Notifications --- .gitignore | 2 ++ qt-openzwave/source/qtozwnotification.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5291a38..aba1508 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,5 @@ target_wrapper.* # QtCreator CMake CMakeLists.txt.user* + +.vscode \ No newline at end of file diff --git a/qt-openzwave/source/qtozwnotification.cpp b/qt-openzwave/source/qtozwnotification.cpp index d27530f..b899b1c 100644 --- a/qt-openzwave/source/qtozwnotification.cpp +++ b/qt-openzwave/source/qtozwnotification.cpp @@ -214,7 +214,10 @@ void OZWNotification::processNotification case OpenZWave::Notification::Type_UserAlerts: { - emit Get()->ozwUserAlert(_notification->GetNodeId(), static_cast(_notification->GetUserAlertType()), _notification->GetRetry()); + quint8 retry = 0; + if (static_cast(_notification->GetUserAlertType()) == OpenZWave::Notification::Alert_ApplicationStatus_Retry) + retry = _notification->GetRetry(); + emit Get()->ozwUserAlert(_notification->GetNodeId(), static_cast(_notification->GetUserAlertType()), retry); break; }