Skip to content

Commit

Permalink
fix: crash at DApplicationPrivate::cancelNotification
Browse files Browse the repository at this point in the history
  • Loading branch information
zccrs authored and hualet committed Mar 22, 2019
1 parent 836b438 commit e84643f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/widgets/dapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ DApplicationPrivate::DApplicationPrivate(DApplication *q) :
q->setOverrideCursor(Qt::ArrowCursor);
}
};
QObject::connect(monitor, &StartupNotificationMonitor::appStartup, [this, q, &cancelNotification](const QString id) {
QObject::connect(monitor, &StartupNotificationMonitor::appStartup,
q, [this, q, cancelNotification](const QString id) {
m_monitoredStartupApps.append(id);
q->setOverrideCursor(Qt::WaitCursor);
// Set a timeout of 15s in case that some apps like pamac-tray started
// with StartupNotify but don't show a window after startup finished.
QTimer::singleShot(15 * 1000, q, [id, &cancelNotification](){
QTimer::singleShot(15 * 1000, q, [id, cancelNotification](){
cancelNotification(id);
});
});
Expand Down

0 comments on commit e84643f

Please sign in to comment.