File: 0027-Fix-some-deprecated-QChar-constructor-issues-in-unit.patch

package info (click to toggle)
qtpim-opensource-src 5.0~git20201102.f9a8f0fc%2Bdfsg1-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 18,236 kB
  • sloc: cpp: 82,965; xml: 91; makefile: 81; javascript: 67
file content (40 lines) | stat: -rw-r--r-- 2,151 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 98b42d2c93c02e601bbf4a311851df369d865d3b Mon Sep 17 00:00:00 2001
From: Chris Adams <chris.adams@qinetic.com.au>
Date: Fri, 12 Feb 2021 15:56:01 +1000
Subject: [PATCH 27/32] Fix some deprecated QChar constructor issues in unit
 tests

Change-Id: Iac3c14fa14e930370f5e2ffeebb58b91d8fa2dda
Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
---
 .../unittest/tst_qcontactmanagerfiltering.cpp               | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/auto/contacts/qcontactmanagerfiltering/unittest/tst_qcontactmanagerfiltering.cpp b/tests/auto/contacts/qcontactmanagerfiltering/unittest/tst_qcontactmanagerfiltering.cpp
index f91e8343..e0efba9b 100644
--- a/tests/auto/contacts/qcontactmanagerfiltering/unittest/tst_qcontactmanagerfiltering.cpp
+++ b/tests/auto/contacts/qcontactmanagerfiltering/unittest/tst_qcontactmanagerfiltering.cpp
@@ -409,7 +409,7 @@ QString tst_QContactManagerFiltering::convertIds(QList<QContactId> allIds, QList
     /* Expected is of the form "abcd".. it's possible that there are some extra contacts */
     for (int i = 0; i < ids.size(); i++) {
         if (allIds.indexOf(ids.at(i)) >= 0) {
-            QChar curr = ('a' + static_cast<int>(allIds.indexOf(ids.at(i))));
+            QChar curr = (static_cast<ushort>('a' + allIds.indexOf(ids.at(i))));
             if (curr >= minimumContact && curr <= maximumContact) {
                 ret += curr;
             }
@@ -2155,7 +2155,9 @@ void tst_QContactManagerFiltering::relationshipFiltering()
         QCOMPARE_UNSORTED(output, expected);
         QCOMPARE(ids2, QList<QContactId>());
     } else {
-        QString msg = "Manager does not support relationship type " + relationshipType + " between " + contactA.type() + " and " + contactB.type() + " type contacts.";
+        QString msg = "Manager does not support relationship type " + relationshipType
+                    + " between " + QString::number(contactA.type())
+                    + " and " + QString::number(contactB.type()) + " type contacts.";
         QSKIP(msg.toLatin1());
     }
 }
-- 
2.30.2