TreeModel: Add a StaticTreeItem(QString) convenience constructor

Covers the common case and hopefully avoids the recurring MSVC
problem with initializer lists in this location.

Change-Id: I1b2bbb083f9fc86af3b51b8f52615fb70c832b95
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
hjk
2016-06-17 08:24:47 +02:00
parent 9a8043d9ce
commit fb482846fc
7 changed files with 15 additions and 9 deletions

View File

@@ -142,8 +142,8 @@ public:
CMakeToolItemModel::CMakeToolItemModel()
{
setHeader({tr("Name"), tr("Location")});
rootItem()->appendChild(new StaticTreeItem(QStringList(tr("Auto-detected"))));
rootItem()->appendChild(new StaticTreeItem(QStringList(tr("Manual"))));
rootItem()->appendChild(new StaticTreeItem(tr("Auto-detected")));
rootItem()->appendChild(new StaticTreeItem(tr("Manual")));
foreach (const CMakeTool *item, CMakeToolManager::cmakeTools())
addCMakeTool(item, false);