From 05af422a9c1bb301ca27f85356abc0cd75d8d46b Mon Sep 17 00:00:00 2001
From: Boris Kolpackov <boris@codesynthesis.com>
Date: Thu, 1 Dec 2011 18:02:51 +0200
Subject: 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).
---
 qt/driver.cxx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'qt')

diff --git a/qt/driver.cxx b/qt/driver.cxx
index 8240fd3..726b9c9 100644
--- a/qt/driver.cxx
+++ b/qt/driver.cxx
@@ -4,6 +4,8 @@
 
 #include <iostream>
 
+#include <QtCore/QCoreApplication>
+
 #include <odb/database.hxx>
 #include <odb/session.hxx>
 #include <odb/transaction.hxx>
@@ -25,6 +27,8 @@ operator<< (ostream& os, const QString& s)
 int
 main (int argc, char* argv[])
 {
+  QCoreApplication app (argc, argv);
+
   try
   {
     auto_ptr<database> db (createDatabase (argc, argv));
-- 
cgit v1.1