diff options
-rwxr-xr-x | python/test.py | 3 | ||||
-rw-r--r-- | src/gatscon/gatstotree.cpp | 8 | ||||
-rw-r--r-- | src/gatscon/gatstotree.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/python/test.py b/python/test.py index a359893..0057fbf 100755 --- a/python/test.py +++ b/python/test.py | |||
@@ -8,3 +8,6 @@ print isinstance( 1, bool ) | |||
8 | print isinstance( 1, int ) | 8 | print isinstance( 1, int ) |
9 | 9 | ||
10 | print gats.loads( gats.dumps( [0, 1, 2, 3, None, {'hi': None, 'bye': 1}] ) ) | 10 | print gats.loads( gats.dumps( [0, 1, 2, 3, None, {'hi': None, 'bye': 1}] ) ) |
11 | |||
12 | gats.dump( [0, 1, 2, 3, None, {'hi': None, 'bye': 1}], open('test.gats', 'w') ) | ||
13 | gats.dump( 'hello', open('test-str.gats', 'w') ) | ||
diff --git a/src/gatscon/gatstotree.cpp b/src/gatscon/gatstotree.cpp index d01e4b8..e388d5e 100644 --- a/src/gatscon/gatstotree.cpp +++ b/src/gatscon/gatstotree.cpp | |||
@@ -31,6 +31,10 @@ void gatsToTree( QTreeWidgetItem *p, Gats::Object *pObj ) | |||
31 | case Gats::typeDictionary: | 31 | case Gats::typeDictionary: |
32 | gatsToTree( p, dynamic_cast<Gats::Dictionary *>( pObj ) ); | 32 | gatsToTree( p, dynamic_cast<Gats::Dictionary *>( pObj ) ); |
33 | break; | 33 | break; |
34 | |||
35 | case Gats::typeNull: | ||
36 | gatsToTree( p, dynamic_cast<Gats::Null *>( pObj ) ); | ||
37 | break; | ||
34 | } | 38 | } |
35 | } | 39 | } |
36 | 40 | ||
@@ -81,3 +85,7 @@ void gatsToTree( QTreeWidgetItem *p, Gats::Dictionary *pObj ) | |||
81 | } | 85 | } |
82 | } | 86 | } |
83 | 87 | ||
88 | void gatsToTree( QTreeWidgetItem *p, Gats::Null *pObj ) | ||
89 | { | ||
90 | p->setText( 1, "null"); | ||
91 | } | ||
diff --git a/src/gatscon/gatstotree.h b/src/gatscon/gatstotree.h index 26fb76c..a803017 100644 --- a/src/gatscon/gatstotree.h +++ b/src/gatscon/gatstotree.h | |||
@@ -23,5 +23,6 @@ void gatsToTree( QTreeWidgetItem *p, Gats::Float *pObj ); | |||
23 | void gatsToTree( QTreeWidgetItem *p, Gats::Boolean *pObj ); | 23 | void gatsToTree( QTreeWidgetItem *p, Gats::Boolean *pObj ); |
24 | void gatsToTree( QTreeWidgetItem *p, Gats::List *pObj ); | 24 | void gatsToTree( QTreeWidgetItem *p, Gats::List *pObj ); |
25 | void gatsToTree( QTreeWidgetItem *p, Gats::Dictionary *pObj ); | 25 | void gatsToTree( QTreeWidgetItem *p, Gats::Dictionary *pObj ); |
26 | void gatsToTree( QTreeWidgetItem *p, Gats::Null *pObj ); | ||
26 | 27 | ||
27 | #endif | 28 | #endif |