forked from qt-creator/qt-creator
CorePlugin: Pass context object to lambda connections
Remove some unneeded lambda () brackets. Change-Id: Id664cfc3b46685f63fb205beaf16a7c271ad95d9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -347,13 +347,11 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
|
||||
const QModelIndex sourceIndex = m_sortProxyModel->mapToSource(index);
|
||||
const auto filePath = Utils::FilePath::fromString(
|
||||
m_fileSystemModel->filePath(sourceIndex));
|
||||
// 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, [this, filePath] { setCrumblePath(filePath); },
|
||||
Qt::QueuedConnection);
|
||||
});
|
||||
connect(m_crumbLabel, &Utils::FileCrumbLabel::pathClicked, [this](const Utils::FilePath &path) {
|
||||
connect(m_crumbLabel, &Utils::FileCrumbLabel::pathClicked,
|
||||
this, [this](const Utils::FilePath &path) {
|
||||
const QModelIndex rootIndex = m_sortProxyModel->mapToSource(m_listView->rootIndex());
|
||||
const QModelIndex fileIndex = m_fileSystemModel->index(path.toString());
|
||||
if (!isChildOf(fileIndex, rootIndex))
|
||||
|
||||
Reference in New Issue
Block a user