diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/convertQJSPrimitiveValueToIntegral.h')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/convertQJSPrimitiveValueToIntegral.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/convertQJSPrimitiveValueToIntegral.h b/tests/auto/qml/qmlcppcodegen/data/convertQJSPrimitiveValueToIntegral.h new file mode 100644 index 0000000000..459dd62374 --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/convertQJSPrimitiveValueToIntegral.h @@ -0,0 +1,34 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef CONVERTQJSPRIMITIVEVALUETOINTEGRAL_H +#define CONVERTQJSPRIMITIVEVALUETOINTEGRAL_H + +#include <QtCore/qobject.h> +#include <QtQml/qqml.h> + +class Moo485 : public QObject +{ + Q_OBJECT + QML_ELEMENT + + Q_PROPERTY(int uid READ uid CONSTANT FINAL) + +public: + explicit Moo485(QObject *parent = nullptr) : QObject(parent) { } + int uid() const { return 4711; } +}; + +class Foo485 : public QObject +{ + Q_OBJECT + QML_ELEMENT + + Q_PROPERTY(quint16 uid MEMBER m_uid FINAL) + +public: + explicit Foo485(QObject *parent = nullptr) : QObject(parent) { } + quint16 m_uid = 0; +}; + +#endif // CONVERTQJSPRIMITIVEVALUETOINTEGRAL_H |