From f55b26080c85ea0432a468aa793886d019e1e8c2 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 6 Apr 2012 15:24:11 +0000 Subject: The Qt API now supports cloning. --- c++-qt/src/string.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'c++-qt/src/string.cpp') diff --git a/c++-qt/src/string.cpp b/c++-qt/src/string.cpp index 0b9e4d8..ef23829 100644 --- a/c++-qt/src/string.cpp +++ b/c++-qt/src/string.cpp @@ -35,6 +35,13 @@ Gats::String::~String() { } +Gats::Object *Gats::String::clone() const +{ + QByteArray baClone = *this; + baClone.detach(); + return new Gats::String( baClone ); +} + void Gats::String::write( QIODevice &rOut ) const { rOut.write("s", 1 ); -- cgit v1.2.3