From 75e933c612b63bd130c19078fdc1201738745e3e Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Mon, 26 Jun 2017 11:18:33 +0300 Subject: Fix QNdefNfcActRecord::action for platforms with unsigned char QByteArray operator [] has return type of char whose signedness is dependendent on platform and compiler. Casting char to an enum with negative value does not work on configurations with unsigned char type. Fixed by explicitly casting action to signed char before converting it to enum. Task-number: QTBUG-60268 Change-Id: I733520a70c321c3b8dac9c67cfb096ac97a64b94 Reviewed-by: Simon Hausmann Reviewed-by: Alex Blasche --- src/nfc/qndefnfcsmartposterrecord.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nfc/qndefnfcsmartposterrecord.cpp') diff --git a/src/nfc/qndefnfcsmartposterrecord.cpp b/src/nfc/qndefnfcsmartposterrecord.cpp index bc369980..5f2de2cc 100644 --- a/src/nfc/qndefnfcsmartposterrecord.cpp +++ b/src/nfc/qndefnfcsmartposterrecord.cpp @@ -720,7 +720,7 @@ QNdefNfcSmartPosterRecord::Action QNdefNfcActRecord::action() const QNdefNfcSmartPosterRecord::UnspecifiedAction; if (!p.isEmpty()) - value = QNdefNfcSmartPosterRecord::Action(p[0]); + value = QNdefNfcSmartPosterRecord::Action(static_cast(p[0])); return value; } -- cgit v1.2.3