diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-10-22 11:22:11 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-11-07 16:10:50 +0100 |
commit | ce40ac9ed7255c36acdee69b06a7832e492c3fc8 (patch) | |
tree | dbe398ae0afecc181d9ab7cdabfe1f4d3fd799ef /tests/auto/qml/qqmltypeloader/declarativetesttype.h | |
parent | 50bce248ab6ec4d1e39b85029297dc5d5d80f195 (diff) |
Register compiled-in QML types
If we compile the QML types into the main application we cannot depend
on plugin loading for triggering the registration. Rather, we need to
register them immediately.
Change-Id: I910fb13359f8b7524eafd7693c85205cb4ed4cd8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmltypeloader/declarativetesttype.h')
-rw-r--r-- | tests/auto/qml/qqmltypeloader/declarativetesttype.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmltypeloader/declarativetesttype.h b/tests/auto/qml/qqmltypeloader/declarativetesttype.h new file mode 100644 index 0000000000..a21cdcfd1d --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/declarativetesttype.h @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DECLARATIVETESTTYPE_H +#define DECLARATIVETESTTYPE_H + +#include <QObject> +#include <qqml.h> + +class DeclarativeTestType : public QObject +{ + Q_OBJECT + QML_ELEMENT + +public: + explicit DeclarativeTestType(QObject *parent = nullptr) : QObject(parent) {} +}; + +#endif // DECLARATIVETESTTYPE_H |