MCPcopy Create free account
hub / github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings / notify

Method notify

src/utils/setup.h:50–62  ·  view source on GitHub ↗

Intercept event calls and log them on exceptions. From the official docs https://doc.qt.io/qt-5/qcoreapplication.html#notify: "Future direction: This function will not be called for objects that live outside the main thread in Qt 6. Applications that need that functionality should find other solutions for their event inspection needs in the meantime. The change may be extended to the main thread,

Source from the content-addressed store, hash-verified

48 // around. There are multiple suggestions for other solutions in the
49 // provided link.
50 virtual bool notify( QObject* receiver, QEvent* event ) override
51 {
52 try
53 {
54 return QApplication::notify( receiver, event );
55 }
56 catch ( std::exception& e )
57 {
58 LOG( ERROR ) << "Exception thrown from an event handler: "
59 << e.what();
60 }
61 return false;
62 }
63};
64
65void mainQtMessageHandler( QtMsgType type,

Callers

nothing calls this directly

Calls 1

whatMethod · 0.80

Tested by

no test coverage detected