2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 Intel Corporation.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2014-01-17 12:49:41 +00:00
|
|
|
|
|
|
|
#ifndef FORWARD_DECLARED_PARAM_H
|
|
|
|
#define FORWARD_DECLARED_PARAM_H
|
2012-09-03 10:55:38 +00:00
|
|
|
#include <qobject.h>
|
|
|
|
#include <qmetatype.h>
|
2020-03-19 09:47:29 +00:00
|
|
|
Q_MOC_INCLUDE("forwarddeclaredparam.h")
|
2012-09-03 10:55:38 +00:00
|
|
|
|
|
|
|
// test support for const refs to forward-declared structs in parameters
|
|
|
|
|
|
|
|
struct ForwardDeclaredParam;
|
|
|
|
template <typename T> class ForwardDeclaredContainer;
|
|
|
|
|
|
|
|
struct FullyDefined {};
|
2020-09-10 16:25:02 +00:00
|
|
|
inline size_t qHash(const FullyDefined &, size_t seed = 0) { return seed; }
|
|
|
|
inline bool operator==(const FullyDefined &, const FullyDefined &) { return true; }
|
2012-09-03 10:55:38 +00:00
|
|
|
Q_DECLARE_METATYPE(FullyDefined)
|
|
|
|
|
|
|
|
class ForwardDeclaredParamClass : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public slots:
|
|
|
|
void slotNaked(const ForwardDeclaredParam &) {}
|
|
|
|
void slotFDC(const ForwardDeclaredContainer<ForwardDeclaredParam> &) {}
|
|
|
|
void slotFDC(const ForwardDeclaredContainer<int> &) {}
|
|
|
|
void slotFDC(const ForwardDeclaredContainer<QString> &) {}
|
|
|
|
void slotFDC(const ForwardDeclaredContainer<FullyDefined> &) {}
|
|
|
|
void slotQSet(const QSet<ForwardDeclaredParam> &) {}
|
|
|
|
void slotQSet(const QSet<int> &) {}
|
|
|
|
void slotQSet(const QSet<QString> &) {}
|
|
|
|
void slotQSet(const QSet<FullyDefined> &) {}
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void signalNaked(const ForwardDeclaredParam &);
|
|
|
|
void signalFDC(const ForwardDeclaredContainer<ForwardDeclaredParam> &);
|
|
|
|
void signalFDC(const ForwardDeclaredContainer<int> &);
|
|
|
|
void signalFDC(const ForwardDeclaredContainer<QString> &);
|
|
|
|
void signalFDC(const ForwardDeclaredContainer<FullyDefined> &);
|
|
|
|
void signalQSet(const QSet<ForwardDeclaredParam> &);
|
|
|
|
void signalQSet(const QSet<int> &);
|
|
|
|
void signalQSet(const QSet<QString> &);
|
|
|
|
void signalQSet(const QSet<FullyDefined> &);
|
2014-01-17 12:49:41 +00:00
|
|
|
};
|
|
|
|
#endif // FORWARD_DECLARED_PARAM_H
|