![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qbenchmarkevent_p.h>
Public Member Functions | |
| QBenchmarkEvent () | |
| ~QBenchmarkEvent () | |
| void | start () override |
| void | updateMeasurement () override |
| QList< Measurement > | stop () override |
| bool | isMeasurementAccepted (Measurement measurement) override |
| int | adjustIterationCount (int suggestion) override |
| int | adjustMedianCount (int suggestion) override |
| bool | nativeEventFilter (const QByteArray &eventType, void *message, qintptr *result) override |
| This method is called for every native event. | |
| Public Member Functions inherited from QBenchmarkMeasurerBase | |
| virtual | ~QBenchmarkMeasurerBase ()=default |
| virtual void | resetMetricsResults () |
| virtual bool | needsWarmupIteration () |
| Public Member Functions inherited from QAbstractNativeEventFilter | |
| QAbstractNativeEventFilter () | |
| Creates a native event filter. | |
| virtual | ~QAbstractNativeEventFilter () |
| Destroys the native event filter. | |
Public Attributes | |
| qint64 | eventCounter = 0 |
| Public Attributes inherited from QBenchmarkMeasurerBase | |
| QTestPrivate::MeanAndVarianceAccumulator | accumulator |
Definition at line 25 of file qbenchmarkevent_p.h.
|
default |
|
default |
|
overridevirtual |
Implements QBenchmarkMeasurerBase.
Definition at line 46 of file qbenchmarkevent.cpp.
|
overridevirtual |
Implements QBenchmarkMeasurerBase.
Definition at line 51 of file qbenchmarkevent.cpp.
|
overridevirtual |
Implements QBenchmarkMeasurerBase.
Definition at line 40 of file qbenchmarkevent.cpp.
|
overridevirtual |
This method is called for every native event.
It is called by the QPA platform plugin. On Windows, it is called by the event dispatcher.
The type of event eventType is specific to the platform plugin chosen at run-time, and can be used to cast message to the right type.
On X11, eventType is set to "xcb_generic_event_t", and the message can be casted to a xcb_generic_event_t pointer.
On Windows, eventType is set to "windows_generic_MSG" for messages sent to toplevel windows, and "windows_dispatcher_MSG" for system-wide messages such as messages from a registered hot key. In both cases, the message can be casted to a MSG pointer. The result pointer is only used on Windows, and corresponds to the LRESULT pointer.
On macOS, eventType is set to "mac_generic_NSEvent", and the message can be casted to an NSEvent pointer.
In your reimplementation of this function, if you want to filter the message out, i.e. stop it being handled further, return true; otherwise return false.
{Linux example}
{Windows example}
{macOS example}
mycocoaeventfilter.h:
mycocoaeventfilter.mm:
myapp.pro:
Implements QAbstractNativeEventFilter.
Definition at line 58 of file qbenchmarkevent.cpp.
|
overridevirtual |
Implements QBenchmarkMeasurerBase.
Definition at line 15 of file qbenchmarkevent.cpp.
|
overridevirtual |
Implements QBenchmarkMeasurerBase.
Definition at line 29 of file qbenchmarkevent.cpp.
|
overridevirtual |
Reimplemented from QBenchmarkMeasurerBase.
Definition at line 21 of file qbenchmarkevent.cpp.
| qint64 QBenchmarkEvent::eventCounter = 0 |
Definition at line 37 of file qbenchmarkevent_p.h.