Fix recursive static init (#2196)
* Removed default config for abstract logger that sends a system notification, also cleaned up a useless ifdef * Send notifications from event loop on Win and Mac (#2197) Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com> Co-authored-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
@@ -40,7 +40,14 @@ void SystemNotification::sendMessage(const QString& text,
|
||||
}
|
||||
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_WIN)
|
||||
Controller::getInstance()->sendTrayNotification(text, title, timeout);
|
||||
QMetaObject::invokeMethod(
|
||||
this,
|
||||
[&]() {
|
||||
// The call is queued to avoid recursive static initialization of
|
||||
// Controller and ConfigHandler.
|
||||
Controller::getInstance()->sendTrayNotification(text, title, timeout);
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
#else
|
||||
QList<QVariant> args;
|
||||
QVariantMap hintsMap;
|
||||
|
||||
Reference in New Issue
Block a user