diff options
Diffstat (limited to 'share/qtcreator/templates')
5 files changed, 61 insertions, 1 deletions
diff --git a/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.cpp b/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.cpp index b6c9c4b430..921267d015 100644 --- a/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.cpp +++ b/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.cpp @@ -35,6 +35,24 @@ int %{CN}::rowCount(const QModelIndex &parent) const // FIXME: Implement me! } +@if %{DynamicFetch} + +bool %{CN}::hasChildren(const QModelIndex &parent) const +{ + // FIXME: Implement me! +} + +bool %{CN}::canFetchMore(const QModelIndex &parent) const +{ + // FIXME: Implement me! + return false; +} + +void %{CN}::fetchMore(const QModelIndex &parent) +{ + // FIXME: Implement me! +} +@endif QVariant %{CN}::data(const QModelIndex &index, int role) const { diff --git a/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.h b/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.h index 87812bdb59..fe1ef78cc6 100644 --- a/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.h +++ b/share/qtcreator/templates/wizards/classes/itemmodel/listmodel.h @@ -28,6 +28,14 @@ public: // Basic functionality: int rowCount(const QModelIndex &parent = QModelIndex()) const override; +@if %{DynamicFetch} + // Fetch data dynamically: + bool hasChildren(const QModelIndex &parent = QModelIndex()) const override; + + bool canFetchMore(const QModelIndex &parent) const override; + void fetchMore(const QModelIndex &parent) override; + +@endif QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; @if %{Editable} diff --git a/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.cpp b/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.cpp index cda910e6f7..e8c71f18bb 100644 --- a/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.cpp +++ b/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.cpp @@ -42,6 +42,24 @@ int %{CN}::columnCount(const QModelIndex &parent) const // FIXME: Implement me! } +@if %{DynamicFetch} + +bool %{CN}::hasChildren(const QModelIndex &parent) const +{ + // FIXME: Implement me! +} + +bool %{CN}::canFetchMore(const QModelIndex &parent) const +{ + // FIXME: Implement me! + return false; +} + +void %{CN}::fetchMore(const QModelIndex &parent) +{ + // FIXME: Implement me! +} +@endif QVariant %{CN}::data(const QModelIndex &index, int role) const { diff --git a/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.h b/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.h index f6a0ad59c2..b629356306 100644 --- a/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.h +++ b/share/qtcreator/templates/wizards/classes/itemmodel/tablemodel.h @@ -29,6 +29,14 @@ public: int rowCount(const QModelIndex &parent = QModelIndex()) const override; int columnCount(const QModelIndex &parent = QModelIndex()) const override; +@if %{DynamicFetch} + // Fetch data dynamically: + bool hasChildren(const QModelIndex &parent = QModelIndex()) const override; + + bool canFetchMore(const QModelIndex &parent) const override; + void fetchMore(const QModelIndex &parent) override; + +@endif QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; @if %{Editable} diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflows_build_cmake.yml b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflows_build_cmake.yml index bd5571b1d0..18ba641639 100644 --- a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflows_build_cmake.yml +++ b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflows_build_cmake.yml @@ -212,10 +212,18 @@ jobs: set(ENV{NINJA_STATUS} "[%f/%t %o/sec] ") + set(build_plugin_py "scripts/build_plugin.py") + foreach(dir "share/qtcreator/scripts" "Qt Creator.app/Contents/Resources/scripts" "Contents/Resources/scripts") + if(EXISTS "${{ steps.qt_creator.outputs.qtc_dir }}/${dir}/build_plugin.py") + set(build_plugin_py "${dir}/build_plugin.py") + break() + endif() + endforeach() + execute_process( COMMAND python -u - ${{ steps.qt_creator.outputs.qtc_dir }}/scripts/build_plugin.py + "${{ steps.qt_creator.outputs.qtc_dir }}/${build_plugin_py}" --name "$ENV{PLUGIN_NAME}-$ENV{QT_CREATOR_VERSION}-${{ matrix.config.artifact }}" --src . --build build |