summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.cpp
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-07-11 15:14:13 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-07-11 16:42:01 +0200
commit3ef6cf060e984bca43956a23b61b32ec7347cfc7 (patch)
tree14810e4d0168c0cc3d69cb286574bf28375c07bc /src/corelib/kernel/qcoreapplication.cpp
parentb06304e164ba47351fa292662c1e6383c081b5ca (diff)
parent7b9d6cf844ece18fef884f51117e25ad4ac31db5 (diff)
Merge branch 'stable' into dev
Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index c9f4ab23ec..386ee9cbda 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -381,7 +381,7 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
, origArgc(aargc)
, origArgv(new char *[aargc])
#endif
- , application_type(0)
+ , application_type(QCoreApplicationPrivate::Tty)
#ifndef QT_NO_QOBJECT
, in_exec(false)
, aboutToQuitEmitted(false)
@@ -724,7 +724,7 @@ void QCoreApplication::init()
#endif
#ifdef QT_EVAL
- extern void qt_core_eval_init(uint);
+ extern void qt_core_eval_init(QCoreApplicationPrivate::Type);
qt_core_eval_init(d->application_type);
#endif
@@ -1451,7 +1451,7 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
// first, we diddle the event so that we can deliver
// it, and that no one will try to touch it later.
pe.event->posted = false;
- QScopedPointer<QEvent> e(pe.event);
+ QEvent *e = pe.event;
QObject * r = pe.receiver;
--r->d_func()->postedEvents;
@@ -1469,8 +1469,10 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type
};
MutexUnlocker unlocker(locker);
+ QScopedPointer<QEvent> event_deleter(e); // will delete the event (with the mutex unlocked)
+
// after all that work, it's time to deliver the event.
- QCoreApplication::sendEvent(r, e.data());
+ QCoreApplication::sendEvent(r, e);
// careful when adding anything below this point - the
// sendEvent() call might invalidate any invariants this