forked from qt-creator/qt-creator
Use typed syntax in calls to QMetaObject::invokeMethod
We do it wherever possible. Some places can't be fixed since they still rely on dynamic introspection (mainly QQuickItem cases). Change-Id: Ia00b4a04d8b995c9a43b7bf2dbe76a60364bb8ca Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -388,10 +388,8 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
|
||||
// QTimer::singleShot only posts directly onto the event loop if you use the SLOT("...")
|
||||
// notation, so using a singleShot with a lambda would flicker
|
||||
// QTimer::singleShot(0, this, [this, filePath]() { setCrumblePath(filePath); });
|
||||
QMetaObject::invokeMethod(this,
|
||||
"setCrumblePath",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(Utils::FilePath, filePath));
|
||||
QMetaObject::invokeMethod(this, [this, filePath] { setCrumblePath(filePath); },
|
||||
Qt::QueuedConnection);
|
||||
});
|
||||
connect(m_crumbLabel, &Utils::FileCrumbLabel::pathClicked, [this](const Utils::FilePath &path) {
|
||||
const QModelIndex rootIndex = m_sortProxyModel->mapToSource(m_listView->rootIndex());
|
||||
|
||||
Reference in New Issue
Block a user