aboutsummaryrefslogtreecommitdiff
path: root/c++-qt/src/string.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-04-06 15:24:11 +0000
committerMike Buland <eichlan@xagasoft.com>2012-04-06 15:24:11 +0000
commitf55b26080c85ea0432a468aa793886d019e1e8c2 (patch)
treeeb49ba8244536f5394fe18bae68e07303c6e3d18 /c++-qt/src/string.cpp
parent52bac339b6267aa9aaa3e2e0d02c2a62e47f83e4 (diff)
downloadlibgats-f55b26080c85ea0432a468aa793886d019e1e8c2.tar.gz
libgats-f55b26080c85ea0432a468aa793886d019e1e8c2.tar.bz2
libgats-f55b26080c85ea0432a468aa793886d019e1e8c2.tar.xz
libgats-f55b26080c85ea0432a468aa793886d019e1e8c2.zip
The Qt API now supports cloning.
Diffstat (limited to '')
-rw-r--r--c++-qt/src/string.cpp7
1 files changed, 7 insertions, 0 deletions
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()
35{ 35{
36} 36}
37 37
38Gats::Object *Gats::String::clone() const
39{
40 QByteArray baClone = *this;
41 baClone.detach();
42 return new Gats::String( baClone );
43}
44
38void Gats::String::write( QIODevice &rOut ) const 45void Gats::String::write( QIODevice &rOut ) const
39{ 46{
40 rOut.write("s", 1 ); 47 rOut.write("s", 1 );