aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-05-27 14:42:18 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:03 -0300
commit23889e6f48036ee7882f6097bb058130f78518db (patch)
tree2ee75ecbe034d7fbebd8c1b265ac529c2d6b8b7f /tests
parent14921132fd12abbf283c436ebf54d07ed54e50d0 (diff)
The initialisation of TypeDatabase must happen first in TestUtil constructor.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araujo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/testutil.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/testutil.h b/tests/testutil.h
index 7639a2535..640a9f78a 100644
--- a/tests/testutil.h
+++ b/tests/testutil.h
@@ -35,11 +35,12 @@ public:
{
ReportHandler::setSilent(silent);
m_builder = new AbstractMetaBuilder;
- TypeDatabase::instance()->setApiVersion(apiVersion);
+ TypeDatabase* td = TypeDatabase::instance(true);
+ td->setApiVersion(apiVersion);
QBuffer buffer;
// parse typesystem
buffer.setData(xmlCode);
- TypeDatabase::instance(true)->parseFile(&buffer);
+ td->parseFile(&buffer);
buffer.close();
// parse C++ code
buffer.setData(cppCode);