diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-12-01 18:02:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-12-01 18:02:51 +0200 |
commit | 05af422a9c1bb301ca27f85356abc0cd75d8d46b (patch) | |
tree | adc9f9e732063fd86897764132ed6de2eb4c6084 | |
parent | 9e174d2cde0e1f1f9bcaff1699134bb7b853df53 (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).
-rw-r--r-- | qt/driver.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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)); |