QgsMessageLogNotifyBlocker class

Temporarily blocks the application QgsMessageLog (see QgsApplication::messageLog()) from emitting the messageReceived( bool ) signal for the lifetime of the object.

Using this blocker allows messages to be logged without causing user interface hints flagging message log errors to be created.

QgsMessageLogNotifyBlocker supports "stacked" blocking, so two QgsMessageLogNotifyBlocker created will both need to be destroyed before the messageReceived( bool ) signal is emitted again.

Constructors, destructors, conversion operators

QgsMessageLogNotifyBlocker()
Constructor for QgsMessageLogNotifyBlocker.
QgsMessageLogNotifyBlocker(const QgsMessageLogNotifyBlocker& other) deleted
QgsMessageLogNotifyBlocker cannot be copied.

Public functions

auto operator=(const QgsMessageLogNotifyBlocker& other) -> QgsMessageLogNotifyBlocker& deleted
QgsMessageLogNotifyBlocker cannot be copied.

Function documentation

QgsMessageLogNotifyBlocker::QgsMessageLogNotifyBlocker()

Constructor for QgsMessageLogNotifyBlocker.

This will block the log from emitting the messageReceived( bool ) signal for the lifetime of this object.