summaryrefslogtreecommitdiffstats
path: root/examples/corelib/tools/customtypesending/message.h
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals.cid@kdab.com>2019-09-27 16:17:22 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-10-30 07:46:35 +0200
commitf121f319b9a90e58eda1bf3fb186d4e8a7861ad2 (patch)
treefec3fc9b51e755528a7fd5f1c57f4be8eb2ca4f4 /examples/corelib/tools/customtypesending/message.h
parentd05ca484cfef805f3b442ad29e50d5f219049336 (diff)
examples: Fix -Wdeprecated-copy warnings
examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::sendMessage()’: examples/corelib/tools/customtypesending/window.cpp:79:71: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy] 79 | thisMessage = Message(editor->toPlainText(), thisMessage.headers()); | ^ In file included from examples/corelib/tools/customtypesending/window.h:55, from examples/corelib/tools/customtypesending/window.cpp:52: examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’ 62 | Message(const Message &other); | ^~~~~~~ examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::setMessage(const Message&)’: examples/corelib/tools/customtypesending/window.cpp:87:19: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy] 87 | thisMessage = message; | ^~~~~~~ In file included from examples/corelib/tools/customtypesending/window.h:55, from examples/corelib/tools/customtypesending/window.cpp:52: examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’ 62 | Message(const Message &other); | ^~~~~~~ Change-Id: I563d53f7dd1e0e0dc5fd4db06299b2d0a70c62ff Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'examples/corelib/tools/customtypesending/message.h')
-rw-r--r--examples/corelib/tools/customtypesending/message.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/corelib/tools/customtypesending/message.h b/examples/corelib/tools/customtypesending/message.h
index a93f111e45..38b5c8205f 100644
--- a/examples/corelib/tools/customtypesending/message.h
+++ b/examples/corelib/tools/customtypesending/message.h
@@ -58,9 +58,10 @@
class Message
{
public:
- Message();
- Message(const Message &other);
- ~Message();
+ Message() = default;
+ ~Message() = default;
+ Message(const Message &) = default;
+ Message &operator=(const Message &) = default;
Message(const QString &body, const QStringList &headers);