forked from qt-creator/qt-creator
Use invokeMethod instead of single shot timer with 0 timeout
Refactor it in coreplugin. Change-Id: I6aaad1b9270a8ff8a4a0bea6a1fff806b2fe190b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -31,7 +31,6 @@
|
||||
#include <QScrollBar>
|
||||
#include <QStyle>
|
||||
#include <QStyleOptionSlider>
|
||||
#include <QTimer>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
@@ -105,7 +104,7 @@ void HighlightScrollBarOverlay::scheduleUpdate()
|
||||
return;
|
||||
|
||||
m_isCacheUpdateScheduled = true;
|
||||
QTimer::singleShot(0, this, QOverload<>::of(&QWidget::update));
|
||||
QMetaObject::invokeMethod(this, QOverload<>::of(&QWidget::update), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void HighlightScrollBarOverlay::paintEvent(QPaintEvent *paintEvent)
|
||||
|
||||
Reference in New Issue
Block a user