aboutsummaryrefslogtreecommitdiff
path: root/qt/oracle/basic
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-12-01 18:02:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-12-01 18:02:51 +0200
commit176f05921d638aeb6e546126f11fcd8a13f0cb71 (patch)
treee16f3d34f0983c844a9d3f2a6874ca7b340e297e /qt/oracle/basic
parent178d0a28bd7d69799828d1640a02731cb42f1b4d (diff)
Instantiate QCoreApplication in Qt tests/examples
It performs Qt initialization/finalization and without it bad things will happen (like deleting TLS keys that don't belong to Qt).
Diffstat (limited to 'qt/oracle/basic')
-rw-r--r--qt/oracle/basic/driver.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt/oracle/basic/driver.cxx b/qt/oracle/basic/driver.cxx
index 908f2b4..9b37d67 100644
--- a/qt/oracle/basic/driver.cxx
+++ b/qt/oracle/basic/driver.cxx
@@ -11,6 +11,8 @@
#include <iostream>
#include <string>
+#include <QtCore/QCoreApplication>
+
#include <odb/oracle/database.hxx>
#include <odb/oracle/transaction.hxx>
@@ -25,6 +27,8 @@ using namespace odb::core;
int
main (int argc, char* argv[])
{
+ QCoreApplication app (argc, argv);
+
try
{
auto_ptr<database> db (create_database (argc, argv));