summaryrefslogtreecommitdiff
path: root/net-libs/kdsoap/files/kdsoap-2.1.0-fix-cppcheck-warnings.patch
blob: f0d56869729ee80b75649a3016177a7c09ba5153 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
From e9df81fa01188371d2f62f29ebf0d08eb6e50ef2 Mon Sep 17 00:00:00 2001
From: David Faure <david.faure@kdab.com>
Date: Tue, 13 Sep 2022 09:50:52 +0200
Subject: [PATCH] Fix cppcheck warnings

---
 src/KDSoapClient/KDSoapClientInterface.h       | 3 +++
 src/KDSoapServer/KDSoapServerObjectInterface.h | 3 +++
 unittests/serverlib/test_serverlib.cpp         | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/KDSoapClient/KDSoapClientInterface.h b/src/KDSoapClient/KDSoapClientInterface.h
index e89d44f7..9c5450f0 100644
--- a/src/KDSoapClient/KDSoapClientInterface.h
+++ b/src/KDSoapClient/KDSoapClientInterface.h
@@ -79,6 +79,9 @@ class KDSOAP_EXPORT KDSoapClientInterface
      */
     ~KDSoapClientInterface();
 
+    KDSoapClientInterface(const KDSoapClientInterface &) = delete;
+    KDSoapClientInterface &operator=(const KDSoapClientInterface &) = delete;
+
     /**
      * Calls the method \p method on this interface and passes the arguments specified in \p message
      * to the method.
diff --git a/src/KDSoapServer/KDSoapServerObjectInterface.h b/src/KDSoapServer/KDSoapServerObjectInterface.h
index 69c69100..0c881b63 100644
--- a/src/KDSoapServer/KDSoapServerObjectInterface.h
+++ b/src/KDSoapServer/KDSoapServerObjectInterface.h
@@ -68,6 +68,9 @@ class KDSOAPSERVER_EXPORT KDSoapServerObjectInterface
      */
     virtual ~KDSoapServerObjectInterface();
 
+    KDSoapServerObjectInterface(const KDSoapServerObjectInterface &) = delete;
+    KDSoapServerObjectInterface &operator =(const KDSoapServerObjectInterface &) = delete;
+
     /**
      * Handle \p request and return \p response.
      * The default implementation in this base class is to simply return
diff --git a/unittests/serverlib/test_serverlib.cpp b/unittests/serverlib/test_serverlib.cpp
index f4d4818d..eb6af065 100644
--- a/unittests/serverlib/test_serverlib.cpp
+++ b/unittests/serverlib/test_serverlib.cpp
@@ -1450,7 +1450,7 @@ public Q_SLOTS:
         return QString::fromUtf8("David Ä Faure France");
     }
 
-    void verifySocketResponse(ClientSocket &socket, const QByteArray employeeName)
+    void verifySocketResponse(ClientSocket &socket, const QByteArray &employeeName)
     {
         QVERIFY(socket.waitForReadyRead());
         const QByteArray response = socket.readAll();