From 72c3d675a09f3aab746112ef213db0fe65211061 Mon Sep 17 00:00:00 2001 From: Tapani Mattila Date: Tue, 21 Dec 2021 20:04:32 +0200 Subject: [PATCH] CMake generator: Make file picker a treeview Task-number: QDS-5836 Change-Id: Ib261ac8750baae7ce55d9c990b5dadb26fc6ac03 Reviewed-by: Thomas Hartmann Reviewed-by: Qt CI Bot --- src/plugins/qmldesigner/CMakeLists.txt | 5 +- .../qmldesigner/checkablefilelistmodel.cpp | 111 ----------- .../qmldesigner/checkablefiletreeitem.cpp | 67 +++++++ ...ilelistmodel.h => checkablefiletreeitem.h} | 36 ++-- .../qmldesigner/cmakegeneratordialog.cpp | 49 ++--- .../qmldesigner/cmakegeneratordialog.h | 12 +- .../cmakegeneratordialogtreemodel.cpp | 175 ++++++++++++++++++ .../cmakegeneratordialogtreemodel.h | 67 +++++++ src/plugins/qmldesigner/qmldesignerplugin.pri | 6 +- src/plugins/qmldesigner/qmldesignerplugin.qbs | 6 +- 10 files changed, 345 insertions(+), 189 deletions(-) delete mode 100644 src/plugins/qmldesigner/checkablefilelistmodel.cpp create mode 100644 src/plugins/qmldesigner/checkablefiletreeitem.cpp rename src/plugins/qmldesigner/{checkablefilelistmodel.h => checkablefiletreeitem.h} (61%) create mode 100644 src/plugins/qmldesigner/cmakegeneratordialogtreemodel.cpp create mode 100644 src/plugins/qmldesigner/cmakegeneratordialogtreemodel.h diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt index e7e83f748a9..aad701fc308 100644 --- a/src/plugins/qmldesigner/CMakeLists.txt +++ b/src/plugins/qmldesigner/CMakeLists.txt @@ -27,11 +27,12 @@ add_qtc_plugin(QmlDesigner designmodewidget.cpp designmodewidget.h documentmanager.cpp documentmanager.h documentwarningwidget.cpp documentwarningwidget.h - cmakegeneratordialog.h cmakegeneratordialog.cpp + checkablefiletreeitem.cpp checkablefiletreeitem.h + cmakegeneratordialog.cpp cmakegeneratordialog.h + cmakegeneratordialogtreemodel.cpp cmakegeneratordialogtreemodel.h generateresource.cpp generateresource.h generatecmakelists.cpp generatecmakelists.h generatecmakelistsconstants.h - checkablefilelistmodel.cpp checkablefilelistmodel.h openuiqmlfiledialog.cpp openuiqmlfiledialog.h openuiqmlfiledialog.ui qmldesignerconstants.h qmldesignericons.h diff --git a/src/plugins/qmldesigner/checkablefilelistmodel.cpp b/src/plugins/qmldesigner/checkablefilelistmodel.cpp deleted file mode 100644 index eb8336e9c34..00000000000 --- a/src/plugins/qmldesigner/checkablefilelistmodel.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2021 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Design Tooling -** -** 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. -** -****************************************************************************/ - -#include "checkablefilelistmodel.h" - -using namespace Utils; - -namespace QmlDesigner { - -CheckableFileListModel::CheckableFileListModel(const FilePath &rootDir, const FilePaths &files, bool checkedByDefault, QObject *parent) - :QStandardItemModel(parent), - rootDir(rootDir) -{ - for (const FilePath &file: files) { - appendRow(new CheckableStandardItem(file.toString(), checkedByDefault)); - } -} - -QList CheckableFileListModel::checkedItems() const -{ -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) - QList allItems = findItems("*", Qt::MatchWildcard); -#else - QList allItems = findItems(".*", Qt::MatchRegularExpression); -#endif - QList checkedItems; - for (QStandardItem *standardItem : allItems) { - CheckableStandardItem *item = static_cast(standardItem); - if (item->isChecked()) - checkedItems.append(item); - } - - return checkedItems; -} - -QVariant CheckableFileListModel::data(const QModelIndex &index, int role) const -{ - if (index.isValid()) { - if (role == Qt::CheckStateRole) { - CheckableStandardItem *item = static_cast(QStandardItemModel::item(index.row())); - return item->isChecked() ? Qt::Checked : Qt::Unchecked; - } - else if (role == Qt::DisplayRole) { - QVariant data = QStandardItemModel::data(index, role); - FilePath fullPath = FilePath::fromString(data.toString()); - FilePath relativePath = fullPath.relativeChildPath(rootDir); - return QVariant(relativePath.toString()); - } - } - - return QStandardItemModel::data(index, role); -} - -bool CheckableFileListModel::setData(const QModelIndex &index, const QVariant &value, int role) -{ - if (index.isValid() && role == Qt::CheckStateRole) - { - CheckableStandardItem *item = static_cast(QStandardItemModel::item(index.row())); - item->setChecked(value.value()); - - return true; - } - - return QStandardItemModel::setData(index, value, role); -} - -CheckableStandardItem::CheckableStandardItem(const QString &text, bool checked) - :QStandardItem(text), - checked(checked) -{ - setFlags(flags() |= Qt::ItemIsUserCheckable); -} - -void CheckableStandardItem::setChecked(bool checked) -{ - this->checked = checked; -} - -bool CheckableStandardItem::isChecked() const -{ - return this->checked; -} - -int CheckableStandardItem::type() const -{ - return QStandardItem::UserType + 0x74d4f1; -} - -} //QmlDesigner diff --git a/src/plugins/qmldesigner/checkablefiletreeitem.cpp b/src/plugins/qmldesigner/checkablefiletreeitem.cpp new file mode 100644 index 00000000000..ab1834133ed --- /dev/null +++ b/src/plugins/qmldesigner/checkablefiletreeitem.cpp @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Design Tooling +** +** 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. +** +****************************************************************************/ + +#include "checkablefiletreeitem.h" + +using namespace Utils; + +namespace QmlDesigner { + +CheckableFileTreeItem::CheckableFileTreeItem(const FilePath &filePath) + :QStandardItem(filePath.toString()) +{ + Qt::ItemFlags itemFlags = flags(); + if (isFile()) + itemFlags |= Qt::ItemIsUserCheckable; + itemFlags &= ~(Qt::ItemIsEditable | Qt::ItemIsSelectable); + setFlags(itemFlags); +} + +const FilePath CheckableFileTreeItem::toFilePath() const +{ + return FilePath::fromString(text()); +} + +bool CheckableFileTreeItem::isFile() const +{ + return FilePath::fromString(text()).isFile(); +} + +bool CheckableFileTreeItem::isDir() const +{ + return FilePath::fromString(text()).isDir(); +} + +void CheckableFileTreeItem::setChecked(bool checked) +{ + this->checked = checked; +} + +bool CheckableFileTreeItem::isChecked() const +{ + return this->checked; +} + +} //QmlDesigner diff --git a/src/plugins/qmldesigner/checkablefilelistmodel.h b/src/plugins/qmldesigner/checkablefiletreeitem.h similarity index 61% rename from src/plugins/qmldesigner/checkablefilelistmodel.h rename to src/plugins/qmldesigner/checkablefiletreeitem.h index 6721596b635..d7762a88043 100644 --- a/src/plugins/qmldesigner/checkablefilelistmodel.h +++ b/src/plugins/qmldesigner/checkablefiletreeitem.h @@ -23,43 +23,31 @@ ** ****************************************************************************/ -#ifndef CHECKABLEFILELISTMODEL_H -#define CHECKABLEFILELISTMODEL_H +#ifndef CHECKABLEFILETREEITEM_H +#define CHECKABLEFILETREEITEM_H #include -#include + +#include namespace QmlDesigner { -class CheckableStandardItem : public QStandardItem +class CheckableFileTreeItem : public QStandardItem { public: - explicit CheckableStandardItem(const QString &text = QString(), bool checked = false); + explicit CheckableFileTreeItem(const Utils::FilePath &text = Utils::FilePath()); + + const Utils::FilePath toFilePath() const; + bool isFile() const; + bool isDir() const; + bool isChecked() const; void setChecked(bool checked); - int type() const; private: bool checked; }; -class CheckableFileListModel : public QStandardItemModel -{ -public: - CheckableFileListModel(const Utils::FilePath &rootDir, - const Utils::FilePaths &files, - bool checkedByDefault = false, - QObject *parent = nullptr); - QVariant data(const QModelIndex &index, int role) const; - bool setData(const QModelIndex &index, const QVariant &value, int role); - QList checkedItems() const; - -protected: - Utils::FilePath rootDir; -}; - } //QmlDesigner -Q_DECLARE_METATYPE(QmlDesigner::CheckableStandardItem) - -#endif // CHECKABLEFILELISTMODEL_H +#endif // CHECKABLEFILETREEITEM_H diff --git a/src/plugins/qmldesigner/cmakegeneratordialog.cpp b/src/plugins/qmldesigner/cmakegeneratordialog.cpp index 2f910cf0eb5..43820b13a15 100644 --- a/src/plugins/qmldesigner/cmakegeneratordialog.cpp +++ b/src/plugins/qmldesigner/cmakegeneratordialog.cpp @@ -24,13 +24,14 @@ ****************************************************************************/ #include "cmakegeneratordialog.h" +#include "cmakegeneratordialogtreemodel.h" #include "generatecmakelistsconstants.h" #include #include #include #include -#include +#include using namespace Utils; @@ -51,12 +52,15 @@ CmakeGeneratorDialog::CmakeGeneratorDialog(const FilePath &rootDir, const FilePa connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject); - model = new CMakeGeneratorDialogModel(rootDir, files, this); + m_model = new CMakeGeneratorDialogTreeModel(rootDir, files, this); - QListView *list = new QListView(this); - list->setModel(model); + QTreeView *tree = new QTreeView(this); + tree->setModel(m_model); + tree->expandAll(); + tree->setHeaderHidden(true); + tree->setItemsExpandable(false); - layout->addWidget(list); + layout->addWidget(tree); layout->addWidget(buttons); } @@ -64,44 +68,13 @@ FilePaths CmakeGeneratorDialog::getFilePaths() { FilePaths paths; - QList items = model->checkedItems(); - for (CheckableStandardItem *item: items) { + QList items = m_model->checkedItems(); + for (CheckableFileTreeItem *item: items) { paths.append(FilePath::fromString(item->text())); } return paths; } -CMakeGeneratorDialogModel::CMakeGeneratorDialogModel(const Utils::FilePath &rootDir, const Utils::FilePaths &files, QObject *parent) - :CheckableFileListModel(rootDir, files, parent) -{ - for (int i=0; i(QStandardItemModel::item(i)); - item->setChecked(CMakeGeneratorDialogModel::checkedByDefault(FilePath::fromString(item->text()))); - } -} - -bool CMakeGeneratorDialogModel::checkedByDefault(const FilePath &path) const -{ - if (path.exists()) { - QString relativePath = path.relativeChildPath(rootDir).toString(); - if (relativePath.compare(QmlDesigner::GenerateCmake::Constants::FILENAME_CMAKELISTS) == 0) - return false; - if (relativePath.endsWith(QmlDesigner::GenerateCmake::Constants::FILENAME_CMAKELISTS) - && relativePath.length() > QString(QmlDesigner::GenerateCmake::Constants::FILENAME_CMAKELISTS).length()) - return true; - if (relativePath.compare(QmlDesigner::GenerateCmake::Constants::FILENAME_MODULES) == 0) - return true; - if (relativePath.compare( - FilePath::fromString(QmlDesigner::GenerateCmake::Constants::DIRNAME_CPP) - .pathAppended(QmlDesigner::GenerateCmake::Constants::FILENAME_MAINCPP_HEADER) - .toString()) - == 0) - return true; - } - - return !path.exists(); -} - } } diff --git a/src/plugins/qmldesigner/cmakegeneratordialog.h b/src/plugins/qmldesigner/cmakegeneratordialog.h index 8a11666ccb7..1a5b947348d 100644 --- a/src/plugins/qmldesigner/cmakegeneratordialog.h +++ b/src/plugins/qmldesigner/cmakegeneratordialog.h @@ -27,7 +27,7 @@ #ifndef CMAKEGENERATORDIALOG_H #define CMAKEGENERATORDIALOG_H -#include "checkablefilelistmodel.h" +#include "cmakegeneratordialogtreemodel.h" #include @@ -37,14 +37,6 @@ namespace QmlDesigner { namespace GenerateCmake { -class CMakeGeneratorDialogModel : public CheckableFileListModel -{ -public: - CMakeGeneratorDialogModel(const Utils::FilePath &rootDir, const Utils::FilePaths &files, QObject *parent = nullptr); -protected: - virtual bool checkedByDefault(const Utils::FilePath &file) const; -}; - class CmakeGeneratorDialog : public QDialog { public: @@ -52,7 +44,7 @@ public: Utils::FilePaths getFilePaths(); private: - CheckableFileListModel *model; + CMakeGeneratorDialogTreeModel *m_model; }; } diff --git a/src/plugins/qmldesigner/cmakegeneratordialogtreemodel.cpp b/src/plugins/qmldesigner/cmakegeneratordialogtreemodel.cpp new file mode 100644 index 00000000000..6c118d86bb0 --- /dev/null +++ b/src/plugins/qmldesigner/cmakegeneratordialogtreemodel.cpp @@ -0,0 +1,175 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Design Tooling +** +** 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. +** +****************************************************************************/ + +#include "cmakegeneratordialogtreemodel.h" +#include "generatecmakelistsconstants.h" +#include "checkablefiletreeitem.h" + +using namespace Utils; + +namespace QmlDesigner { +namespace GenerateCmake { + +CMakeGeneratorDialogTreeModel::CMakeGeneratorDialogTreeModel(const FilePath &rootDir, + const FilePaths &files, QObject *parent) + :QStandardItemModel(parent), + rootDir(rootDir), + m_icons(new QFileIconProvider()) +{ + createNodes(files, invisibleRootItem()); +} + +CMakeGeneratorDialogTreeModel::~CMakeGeneratorDialogTreeModel() +{ + delete m_icons; +} + +QVariant CMakeGeneratorDialogTreeModel::data(const QModelIndex &index, int role) const +{ + if (index.isValid()) { + const CheckableFileTreeItem *node = constNodeForIndex(index); + if (role == Qt::CheckStateRole) { + if (node->isFile()) + return node->isChecked() ? Qt::Checked : Qt::Unchecked; + return {}; + } + else if (role == Qt::DisplayRole) { + FilePath fullPath = node->toFilePath(); + return QVariant(fullPath.fileName()); + } + else if (role == Qt::DecorationRole) { + if (!node->isFile()) + return m_icons->icon(QFileIconProvider::Folder); + } + } + + return QStandardItemModel::data(index, role); +} + +bool CMakeGeneratorDialogTreeModel::setData(const QModelIndex &index, const QVariant &value, int role) +{ + if (index.isValid()) { + CheckableFileTreeItem *node = nodeForIndex(index); + if (role == Qt::CheckStateRole) { + node->setChecked(value.value()); + return true; + } + } + + return QStandardItemModel::setData(index, value, role);; +} + + +const QList CMakeGeneratorDialogTreeModel::checkedItems() const +{ +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + QList allItems = findItems("*", Qt::MatchWildcard); +#else + QList allItems = findItems(".*", Qt::MatchRegularExpression); +#endif + QList checkedItems; + for (QStandardItem *standardItem : allItems) { + CheckableFileTreeItem *item = static_cast(standardItem); + if (item->isChecked()) + checkedItems.append(item); + } + + return checkedItems; +} + +bool CMakeGeneratorDialogTreeModel::checkedByDefault(const Utils::FilePath &file) const +{ + if (file.exists()) { + QString relativePath = file.relativeChildPath(rootDir).toString(); + if (relativePath.compare(QmlDesigner::GenerateCmake::Constants::FILENAME_CMAKELISTS) == 0) + return false; + if (relativePath.endsWith(QmlDesigner::GenerateCmake::Constants::FILENAME_CMAKELISTS) + && relativePath.length() > QString(QmlDesigner::GenerateCmake::Constants::FILENAME_CMAKELISTS).length()) + return true; + if (relativePath.compare(QmlDesigner::GenerateCmake::Constants::FILENAME_MODULES) == 0) + return true; + if (relativePath.compare( + FilePath::fromString(QmlDesigner::GenerateCmake::Constants::DIRNAME_CPP) + .pathAppended(QmlDesigner::GenerateCmake::Constants::FILENAME_MAINCPP_HEADER) + .toString()) + == 0) + return true; + } + + return !file.exists(); +} + +void CMakeGeneratorDialogTreeModel::createNodes(const FilePaths &candidates, QStandardItem *parent) +{ + if (!parent) + return; + + CheckableFileTreeItem *checkParent = dynamic_cast(parent); + FilePath thisDir = (parent == invisibleRootItem()) ? rootDir : checkParent->toFilePath(); + + for (const FilePath &file : candidates) { + if (file.parentDir() == thisDir) { + CheckableFileTreeItem *fileNode = new CheckableFileTreeItem(file); + fileNode->setChecked(checkedByDefault(file)); + parent->appendRow(fileNode); + } + } + + FilePaths directSubDirs; + for (const FilePath &file : candidates) { + FilePath dir = file.parentDir(); + if (dir.parentDir() == thisDir && !directSubDirs.contains(dir)) + directSubDirs.append(dir); + } + + for (const FilePath &subDir : directSubDirs) { + CheckableFileTreeItem *dirNode = new CheckableFileTreeItem(subDir); + parent->appendRow(dirNode); + + FilePaths subDirCandidates; + for (const FilePath &file : candidates) + if (file.isChildOf(subDir)) + subDirCandidates.append(file); + + createNodes(subDirCandidates, dirNode); + } +} + +const CheckableFileTreeItem* CMakeGeneratorDialogTreeModel::constNodeForIndex(const QModelIndex &index) const +{ + const QStandardItem *parent = static_cast(index.constInternalPointer()); + const QStandardItem *item = parent->child(index.row(), index.column()); + return static_cast(item); +} + +CheckableFileTreeItem* CMakeGeneratorDialogTreeModel::nodeForIndex(const QModelIndex &index) +{ + QStandardItem *parent = static_cast(index.internalPointer()); + QStandardItem *item = parent->child(index.row(), index.column()); + return static_cast(item); +} + +} //GenerateCmake +} //QmlDesigner diff --git a/src/plugins/qmldesigner/cmakegeneratordialogtreemodel.h b/src/plugins/qmldesigner/cmakegeneratordialogtreemodel.h new file mode 100644 index 00000000000..f890d1d4737 --- /dev/null +++ b/src/plugins/qmldesigner/cmakegeneratordialogtreemodel.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Design Tooling +** +** 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. +** +****************************************************************************/ + +#ifndef CMAKEGENERATORDIALOGTREEMODEL_H +#define CMAKEGENERATORDIALOGTREEMODEL_H + +#include "checkablefiletreeitem.h" + +#include +#include + +#include + +namespace QmlDesigner { +namespace GenerateCmake { + +class CMakeGeneratorDialogTreeModel : public QStandardItemModel +{ +public: + CMakeGeneratorDialogTreeModel(const Utils::FilePath &rootDir, + const Utils::FilePaths &files, QObject *parent = nullptr); + ~CMakeGeneratorDialogTreeModel(); + + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + bool setData(const QModelIndex &index, const QVariant &value, int role); + + const QList checkedItems() const; + const CheckableFileTreeItem* constNodeForIndex(const QModelIndex &index) const; + CheckableFileTreeItem* nodeForIndex(const QModelIndex &index); + +protected: + bool checkedByDefault(const Utils::FilePath &file) const; + Utils::FilePath rootDir; + +private: + void createNodes(const Utils::FilePaths &candidates, QStandardItem *parent); + + QFileIconProvider* m_icons; +}; + +} //GenerateCmake +} //QmlDesigner + + +#endif // CMAKEGENERATORDIALOGTREEMODEL_H diff --git a/src/plugins/qmldesigner/qmldesignerplugin.pri b/src/plugins/qmldesigner/qmldesignerplugin.pri index f1cea5f9e2c..29be80cfd30 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.pri +++ b/src/plugins/qmldesigner/qmldesignerplugin.pri @@ -8,8 +8,9 @@ HEADERS += $$PWD/qmldesignerconstants.h \ $$PWD/generateresource.h \ $$PWD/generatecmakelists.h \ $$PWD/generatecmakelistsconstants.h \ - $$PWD/checkablefilelistmodel.h \ + $$PWD/checkablefiletreeitem.h \ $$PWD/cmakegeneratordialog.h \ + $$PWD/cmakegeneratordialogtreemodel.h \ $$PWD/settingspage.h \ $$PWD/designmodecontext.h \ $$PWD/documentmanager.h \ @@ -27,8 +28,9 @@ SOURCES += $$PWD/qmldesignerplugin.cpp \ $$PWD/editorproxy.cpp \ $$PWD/generateresource.cpp \ $$PWD/generatecmakelists.cpp \ - $$PWD/checkablefilelistmodel.cpp \ + $$PWD/checkablefiletreeitem.cpp \ $$PWD/cmakegeneratordialog.cpp \ + $$PWD/cmakegeneratordialogtreemodel.cpp \ $$PWD/settingspage.cpp \ $$PWD/designmodecontext.cpp \ $$PWD/documentmanager.cpp \ diff --git a/src/plugins/qmldesigner/qmldesignerplugin.qbs b/src/plugins/qmldesigner/qmldesignerplugin.qbs index ad5e60d2b99..776f9b2be3a 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.qbs +++ b/src/plugins/qmldesigner/qmldesignerplugin.qbs @@ -1018,8 +1018,10 @@ Project { "generatecmakelists.cpp", "generatecmakelists.h", "generatecmakelistsconstants.h", - "checkablefilelistmodel.cpp", - "checkablefilelistmodel.h", + "checkablefiletreeitem.cpp", + "checkablefiletreeitem.h", + "cmakegeneratordialogtreemodel.cpp", + "cmakegeneratordialogtreemodel.h", "cmakegeneratordialog.cpp", "cmakegeneratordialog.h", "designersettings.cpp",