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:
@@ -154,7 +154,6 @@
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QStatusBar>
|
||||
#include <QTimer>
|
||||
|
||||
using namespace Core::Internal;
|
||||
using namespace ExtensionSystem;
|
||||
@@ -834,7 +833,7 @@ public:
|
||||
{
|
||||
QTC_ASSERT(watched == m_widget, return false);
|
||||
if (event->type() == QEvent::Show)
|
||||
QTimer::singleShot(0, this, &ScreenShooter::helper);
|
||||
QMetaObject::invokeMethod(this, &ScreenShooter::helper, Qt::QueuedConnection);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user