summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/directfb/qdirectfbintegration.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2011-09-19 00:11:24 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-21 16:54:45 +0200
commit405894fc39cdab937c38b917adf4e8d390f80790 (patch)
tree797a134165df57f998be73132cd614c0c0d234cb /src/plugins/platforms/directfb/qdirectfbintegration.cpp
parentacd09c21f7e3f261b584eaf9136966439eaf3a8b (diff)
[directfb] Make QDirectFBInput a QThread to allow proper exits
Without this patch the application will get stuck waiting for the IDFBEventBuffer to report an event. We will use the IDFBEventBuffer::WakeUp function to interrupt the waiting but this produces the below error on exit: QEventLoop: Cannot be used without QApplication QThread: Destroyed while thread is still running This is solved by making the QDirectFBInput a QThread, reimplement the run() method to handle the events. It should work as this is only posting events to the QApplication event loop. Change-Id: I24adf2b080f96c72ede6a5499f484ac33fdd44fc Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins/platforms/directfb/qdirectfbintegration.cpp')
-rw-r--r--src/plugins/platforms/directfb/qdirectfbintegration.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfbintegration.cpp b/src/plugins/platforms/directfb/qdirectfbintegration.cpp
index 96ba391a38..cc667f4666 100644
--- a/src/plugins/platforms/directfb/qdirectfbintegration.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbintegration.cpp
@@ -106,17 +106,14 @@ QDirectFbIntegration::QDirectFbIntegration()
QDirectFbScreen *primaryScreen = new QDirectFbScreen(0);
screenAdded(primaryScreen);
- m_inputRunner.reset(new QThread);
- m_input.reset(new QDirectFbInput(0));
- m_input->moveToThread(m_inputRunner.data());
- QObject::connect(m_inputRunner.data(), SIGNAL(started()),
- m_input.data(), SLOT(runInputEventLoop()));
- m_inputRunner->start();
+ m_input.reset(new QDirectFbInput());
+ m_input->start();
}
QDirectFbIntegration::~QDirectFbIntegration()
{
m_input->stopInputEventLoop();
+ m_input->wait();
}
QPlatformPixmap *QDirectFbIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const