Skip to content

Commit e1128ec

Browse files
committed
fix: start a timer in another thread
as title Log: as title Pms: BUG-297399
1 parent 74c73c3 commit e1128ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

panels/notification/server/notificationmanager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,8 @@ void NotificationManager::onHandingPendingEntities()
596596
// find last point to restart pendingTimeout
597597
m_lastTimeoutPoint = points.first();
598598
auto newInterval = m_lastTimeoutPoint - current;
599-
m_pendingTimeout->setInterval(newInterval);
600-
m_pendingTimeout->start();
599+
// let timer start in main thread
600+
QMetaObject::invokeMethod(m_pendingTimeout, "start", Qt::QueuedConnection, Q_ARG(int, newInterval));
601601
} else {
602602
// reset m_lastTimeoutPoint
603603
m_lastTimeoutPoint = std::numeric_limits<qint64>::max();

0 commit comments

Comments
 (0)