diff options
Diffstat (limited to 'tests/manual/corelib/tools/customtypesending/message.h')
-rw-r--r-- | tests/manual/corelib/tools/customtypesending/message.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/manual/corelib/tools/customtypesending/message.h b/tests/manual/corelib/tools/customtypesending/message.h new file mode 100644 index 0000000000..b16c92f177 --- /dev/null +++ b/tests/manual/corelib/tools/customtypesending/message.h @@ -0,0 +1,34 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef MESSAGE_H +#define MESSAGE_H + +#include <QMetaType> +#include <QStringList> + +//! [custom type definition] +class Message +{ +public: + Message() = default; + ~Message() = default; + Message(const Message &) = default; + Message &operator=(const Message &) = default; + + Message(const QString &body, const QStringList &headers); + + QString body() const; + QStringList headers() const; + +private: + QString m_body; + QStringList m_headers; +}; +//! [custom type definition] + +//! [custom type meta-type declaration] +Q_DECLARE_METATYPE(Message); +//! [custom type meta-type declaration] + +#endif |