Skip to content
Permalink
Browse files

single-shot clearMessage timer

single-shot-timers fires only once, non-single-shot-timers fire every timeout milliseconds
so in this section non-single-shot-timers seems a little bit annoying for main thread
  • Loading branch information
Unknown authored and nyalldawson committed May 2, 2021
1 parent 101b81f commit fb1ac59cc333dfaecc894aa28d406dd559b26df9
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/gui/qgsstatusbar.cpp
@@ -76,6 +76,7 @@ void QgsStatusBar::showMessage( const QString &text, int timeout )
{
mTempMessageTimer = new QTimer( this );
connect( mTempMessageTimer, &QTimer::timeout, this, &QgsStatusBar::clearMessage );
mTempMessageTimer->setSingleShot( true );
}
mTempMessageTimer->start( timeout );
}

0 comments on commit fb1ac59

Please sign in to comment.