McuSupport: Extend CMake targets tree for QtMCUs QmlProject projects

CMake project relies on the CMake's file-api to fill the Project View,

QtMCUs 2.4 will be using a different method to read input files (Qml,
Fonts, Images, Headers...) using qmlprojectexporter process, that
process is still called from CMake thus a CMakeProject is still used in
QtMCUs kits, but unlike previous versions add_sources is not called on
QtMCUs target making the list of input files read by the file-api empty
and as a result an empty Project Tree.

This commit extend uses the SessionManager to listen to when the the
projects are loaded and then use input.json file to populate QtMCUs
projects trees for projects using qmlprojectexporter the same tool
generating input.json .

Task-number: QTCREATORBUG-28516
Change-Id: I30a9daf1032e727692b8d71d01ab65634d0ae2a6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Yasser Grimes
2023-01-19 10:17:21 +02:00
parent 3d79244dd5
commit 862f484af5
7 changed files with 199 additions and 0 deletions

View File

@@ -108,6 +108,9 @@ QVariant CMakeTargetNode::data(Id role) const
return {};
};
if (role == Constants::BUILD_FOLDER_ROLE)
return m_buildDirectory.toVariant();
if (role == Android::Constants::AndroidAbi)
return value(Android::Constants::ANDROID_ABI);