File wengophone_qt4_crashes.patch of Package wengophone
Index: /wengophone-ng/branches/wengophone-2.1/libs/qtutil/src/QObjectThreadSafe.cpp
===================================================================
--- /wengophone-ng/branches/wengophone-2.1/libs/qtutil/src/QObjectThreadSafe.cpp (revision 7175)
+++ /wengophone-ng/branches/wengophone-2.1/libs/qtutil/src/QObjectThreadSafe.cpp (revision 11804)
@@ -21,8 +21,14 @@
#include <QtCore/QCoreApplication>
+#include <QtCore/QThread>
QObjectThreadSafe::QObjectThreadSafe(QObject * parent)
: QObject(parent) {
-
+ // If an object has a parent, its thread must be the current one. See
+ // http://doc.trolltech.com/4.3/qobject.html#moveToThread for more info.
+ assert(!parent || parent->thread() == QThread::currentThread());
+ if(!parent) {
+ moveToThread(QCoreApplication::instance()->thread());
+ }
_blockEvents = false;
}