aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4ssa.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-01-29 15:11:14 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-29 19:15:15 +0100
commitb433c4b5a761cf035ccb0bfc0982e1b80d1c07b8 (patch)
treeb6d33ff5af553c0bca8f9d1515f649677f9e0fde /src/qml/compiler/qv4ssa.cpp
parente7cf8b10ff9e8d70f90c2f27df60f9e040be6911 (diff)
Remove static initialization of QObjectsv5.2.1
Statically initializing QObjects will cause e.g. the main thread pointer in QCoreApplication to be set when the library is loading. On Android, this is never the real main thread. The effect was a warning about QApplication not being initialized on main thread, and a race condition which sometimes caused apps to hang on startup. [ChangeLog][Android] Fixed possible hang on startup for Qt Quick applications. Task-number: QTBUG-36426 Change-Id: I7bd8a8f35ef1a2548949978563e3157f8dc854c7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r--src/qml/compiler/qv4ssa.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 7113dc7c26..d0602bf95b 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -77,7 +77,8 @@ using namespace V4IR;
namespace {
-QTextStream qout(stdout, QIODevice::WriteOnly);
+Q_GLOBAL_STATIC_WITH_ARGS(QTextStream, qout, (stderr, QIODevice::WriteOnly));
+#define qout *qout()
void showMeTheCode(Function *function)
{