diff options
Diffstat (limited to 'tests/auto/qdoc/generatedoutput/testdata')
3 files changed, 95 insertions, 0 deletions
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/properties.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/properties.qdocconf new file mode 100644 index 000000000..610b96948 --- /dev/null +++ b/tests/auto/qdoc/generatedoutput/testdata/configs/properties.qdocconf @@ -0,0 +1,10 @@ +include(testcpp.qdocconf) + +defines += test_properties + +sources += ../testcpp/properties.qdoc + +outputformats = HTML DocBook +{HTML.nosubdirs,DocBook.nosubdirs} = true +HTML.outputsubdir = properties +DocBook.outputsubdir = properties-docbook diff --git a/tests/auto/qdoc/generatedoutput/testdata/testcpp/properties.qdoc b/tests/auto/qdoc/generatedoutput/testdata/testcpp/properties.qdoc new file mode 100644 index 000000000..a7ebd3960 --- /dev/null +++ b/tests/auto/qdoc/generatedoutput/testdata/testcpp/properties.qdoc @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the tools applications 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$ +** +****************************************************************************/ + +/*! + \property TestQDoc::TestDerived::bindableProp + Some property. +*/ + +/*! + \property TestQDoc::TestDerived::someProp + Another property. +*/ + +/*! + \property TestQDoc::TestDerived::intProp + An integer property. +*/ + +/*! + \property TestQDoc::TestDerived::boolProp + A boolean property. +*/ + +/*! + //! avoid link warnings for auto-generated links to QProperty + \externalpage https://wiki.qt.io/QProperty + \title QProperty +*/ diff --git a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h index b950dfec9..684b5fff4 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h +++ b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h @@ -26,6 +26,13 @@ ** ****************************************************************************/ #pragma once + +#ifdef test_properties +#include <QtCore/qmetaobject.h> +#include <QtCore/qproperty.h> +#include <QtCore/qstring.h> +#endif + #define QDOCTEST_MACRO test #define QDOCTEST_MACRO2(x) (x) < 0 ? 0 : (x)) @@ -75,10 +82,35 @@ protected: }; class TestDerived : public Test { +#ifdef test_properties + Q_OBJECT + + Q_PROPERTY(QString bindableProp READ bindableProp WRITE setBindableProp NOTIFY bindablePropChanged BINDABLE bindableProp) + Q_PROPERTY(QString someProp READ someProp BINDABLE somBindableProp) + Q_PROPERTY(int *intProp READ getInt STORED false CONSTANT FINAL) + QDOC_PROPERTY(bool boolProp READ boolProp WRITE setBoolProp NOTIFY boolPropChanged RESET resetBoolProp REVISION 1) +#endif + public: using DerivedType = Test::SomeType; using NotTypedef = int; void virtualFun() override; +#ifdef test_properties + QBindable<QString> bindableProp(); + QBindable<QString> someBindableProp(); + const QString &someProp(); + int *getInt(); + bool boolProp(); + +Q_SIGNALS: + void bindablePropChanged(); + Q_REVISION(1) void boolPropChanged(); + +public Q_SLOTS: + void setBindableProp(const QString &s); + void setBoolProp(bool b); + void resetBoolProp(); +#endif }; } // namespace TestQDoc |