From 75634c9a53133d03c245bbaab4b2047ff823ef03 Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Mon, 29 Apr 2019 10:39:37 +0200 Subject: Reduce amount of tracepoints required for event tracking Encode the consumed/filtered state in the _exit tracepoint and remove the separate tracking of receiver event handling. Combined, this reduces the size of the trace file. Change-Id: Icb3cb2dd47798543905cea450046d6fad559a15b Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/corelib/kernel/qcoreapplication.cpp') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 596941b5a9..e5f39a8d35 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1197,28 +1197,26 @@ bool QCoreApplicationPrivate::notify_helper(QObject *receiver, QEvent * event) { // Note: when adjusting the tracepoints in here // consider adjusting QApplicationPrivate::notify_helper too. - Q_TRACE_SCOPE(QCoreApplication_notify, receiver, event, event->type()); + Q_TRACE(QCoreApplication_notify_entry, receiver, event, event->type()); + bool consumed = false; + bool filtered = false; + Q_TRACE_EXIT(QCoreApplication_notify_exit, consumed, filtered); // send to all application event filters (only does anything in the main thread) if (QCoreApplication::self && receiver->d_func()->threadData->thread == mainThread() && QCoreApplication::self->d_func()->sendThroughApplicationEventFilters(receiver, event)) { - Q_TRACE(QCoreApplication_notify_event_filtered, receiver, event, event->type()); - return true; + filtered = true; + return filtered; } // send to all receiver event filters if (sendThroughObjectEventFilters(receiver, event)) { - Q_TRACE(QCoreApplication_notify_event_filtered, receiver, event, event->type()); - return true; + filtered = true; + return filtered; } - Q_TRACE(QCoreApplication_notify_before_delivery, receiver, event, event->type()); - // deliver the event - const bool consumed = receiver->event(event); - - Q_TRACE(QCoreApplication_notify_after_delivery, receiver, event, event->type(), consumed); - + consumed = receiver->event(event); return consumed; } -- cgit v1.2.3 From 615b02bfa2fb861f362c511087e6962660c25ea3 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 28 Apr 2019 13:39:29 +0200 Subject: QtCore: compile with QT_DISABLE_DEPRECATED_BEFORE=0x050d00 Don't call or implement functions which are not available when compiling with QT_DISABLE_DEPRECATED_BEFORE=0x050d00 Change-Id: I949b12bba880c516391f312f58c8748303a1790d Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/kernel/qcoreapplication.cpp') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 0711914e2d..69b2a9bf41 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1013,6 +1013,7 @@ void QCoreApplication::setQuitLockEnabled(bool enabled) quitLockRefEnabled = enabled; } +#if QT_DEPRECATED_SINCE(5, 6) /*! \internal \deprecated @@ -1024,6 +1025,7 @@ bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event) { return notifyInternal2(receiver, event); } +#endif /*! \internal -- cgit v1.2.3