aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-03-25 13:24:44 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-03-26 10:42:41 +0100
commit089b3ed0e440b454038a9d3cd6311f9dc189b699 (patch)
tree14c2161571b577040b4cd10c17d1ed713dd05142 /tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
parent8ab467835cdf590bcbc3a4d520f0e44dc8b457d9 (diff)
qmltyperegistrar: Accept extra foreign types files
If you add your own libraries with metatypes, qmake cannot determine where to look for their metatypes.json files. Add a qmake variable that allows the user to specify them. Fixes: QTBUG-82709 Change-Id: I3f5685146c134c89e541e4097ff3928de9af2aee Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h')
-rw-r--r--tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
new file mode 100644
index 0000000000..1cfcd25102
--- /dev/null
+++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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 TST_QMLTYPEREGISTRAR_H
+#define TST_QMLTYPEREGISTRAR_H
+
+#include "foreign.h"
+
+#include <QtQml/qqml.h>
+
+class Local : public Foreign
+{
+ Q_OBJECT
+ QML_ELEMENT
+};
+
+class tst_qmltyperegistrar : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void qmltypesHasForeign();
+};
+
+#endif // TST_QMLTYPEREGISTRAR_H