summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2011-09-25 19:31:02 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-21 16:54:45 +0200
commit91e99d142018ed0f9ace057f19984fd60571f7cc (patch)
treefc8cf9ad86584f8f23bc8b8e4f3d29786bf22bd4 /src/plugins
parent500dc2a6f888e283c6d40730bdf7c2998ee0437b (diff)
directfb: Initialize m_dfb after DirectFBInit has been called
The QDirectFBIntegration is responsibe for deleting the DirectFB instance but it can only initialize the DirectFB instance after the DirectFBInit has been called. Change the order. This issue got introduced by myself in 3faa89f4. Change-Id: Ia67d439152d895e2e0a47f35eed57348c629f79f Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/directfb/qdirectfbintegration.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfbintegration.cpp b/src/plugins/platforms/directfb/qdirectfbintegration.cpp
index ab96733027..e2fadb41fa 100644
--- a/src/plugins/platforms/directfb/qdirectfbintegration.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbintegration.cpp
@@ -79,8 +79,7 @@ QDirectFbScreen::QDirectFbScreen(int display)
}
QDirectFbIntegration::QDirectFbIntegration()
- : m_dfb(QDirectFbConvenience::dfbInterface())
- , m_fontDb(new QGenericUnixFontDatabase())
+ : m_fontDb(new QGenericUnixFontDatabase())
, m_eventDispatcher(createUnixEventDispatcher())
{
QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher);
@@ -102,6 +101,9 @@ QDirectFbIntegration::QDirectFbIntegration()
delete[] argv[i];
delete[] argv;
+ // This must happen after DirectFBInit.
+ m_dfb.reset(QDirectFbConvenience::dfbInterface());
+
m_primaryScreen.reset(new QDirectFbScreen(0));
screenAdded(m_primaryScreen.data());