Utils: Introduce a class template TypedTreeItem

For better typesafety on the user side (and optional) for items with uniformly
typed children.  Use it for UniformTreeModels, and consequently WatchModel
to get rid of some of the static_casts there.

Change-Id: Ic20e507036e180c24997b236230f0f71b285202c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2016-06-09 15:26:33 +02:00
parent a823caa396
commit e2ba0aca9b
5 changed files with 36 additions and 23 deletions

View File

@@ -39,7 +39,7 @@ namespace Internal {
class GdbMi;
class WatchItem : public Utils::TreeItem
class WatchItem : public Utils::TypedTreeItem<WatchItem>
{
public:
WatchItem();