forked from qt-creator/qt-creator
TreeModel: Introduce a StaticTreeItem
This splits out the case of static string displays from the TreeItem base class, making the base more lightweight. Change-Id: If1f442011ec60094399a41b65d9b5015f432f82e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -142,8 +142,8 @@ public:
|
||||
CMakeToolItemModel::CMakeToolItemModel()
|
||||
{
|
||||
setHeader(QStringList() << tr("Name") << tr("Location"));
|
||||
rootItem()->appendChild(new TreeItem(QStringList() << tr("Auto-detected") << QString() << QString()));
|
||||
rootItem()->appendChild(new TreeItem(QStringList() << tr("Manual") << QString() << QString()));
|
||||
rootItem()->appendChild(new StaticTreeItem({ tr("Auto-detected") }));
|
||||
rootItem()->appendChild(new StaticTreeItem({ tr("Manual") }));
|
||||
|
||||
foreach (const CMakeTool *item, CMakeToolManager::cmakeTools())
|
||||
addCMakeTool(item, false);
|
||||
|
||||
Reference in New Issue
Block a user