From 130990ffef0af61a31610d0e9cf264e07a115eb4 Mon Sep 17 00:00:00 2001
From: Joe Hermaszewski <expipiplus1@gmail.com>
Date: Thu, 2 Feb 2012 11:37:19 +0000
Subject: [PATCH] Added support for std::unique_ptr in the debugging helper

Change-Id: I812234fbcf6a1ed11fc29c11fb6ffe63ca3abffe
Reviewed-by: hjk <qthjk@ovi.com>
---
 share/qtcreator/dumper/qttypes.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/share/qtcreator/dumper/qttypes.py b/share/qtcreator/dumper/qttypes.py
index e7d1966fbea..73cffd3a784 100644
--- a/share/qtcreator/dumper/qttypes.py
+++ b/share/qtcreator/dumper/qttypes.py
@@ -1897,6 +1897,19 @@ def qdump__std__string(d, value):
     d.putNumChild(0)
 
 
+def qdump__std__unique_ptr(d, value):
+    i = value["_M_t"]["_M_head_impl"]
+    if isNull(i):
+        d.putValue( "(null)" )
+        d.putNumChild(0)
+        return
+
+    d.putValue( "@0x%x" % long(i) )
+    d.putNumChild(1)
+    with Children(d,1):
+        d.putSubItem("data", i.dereference())
+
+
 def qedit__std__vector(expr, value):
     values = value.split(',')
     n = len(values)
-- 
GitLab