Fix C++20 warning on implicit capture of this via [=]

This commit is contained in:
Yuriy Skalko 2020-12-28 20:59:48 +02:00
parent 197ea63631
commit 3971b1b35e
8 changed files with 9 additions and 9 deletions

View File

@ -113,7 +113,7 @@ GuiBibtex::GuiBibtex(GuiView & lv)
availableLV, SLOT(setFocus())); availableLV, SLOT(setFocus()));
#else #else
connect(filter_, &FancyLineEdit::downPressed, connect(filter_, &FancyLineEdit::downPressed,
availableLV, [=](){ focusAndHighlight(availableLV); }); availableLV, [=, this](){ focusAndHighlight(availableLV); });
#endif #endif
availableLV->setToolTip(formatToolTip(qt_("This list consists of all databases that are indexed by LaTeX and thus are found without a file path. " availableLV->setToolTip(formatToolTip(qt_("This list consists of all databases that are indexed by LaTeX and thus are found without a file path. "

View File

@ -157,7 +157,7 @@ GuiCitation::GuiCitation(GuiView & lv)
availableLV, SLOT(setFocus())); availableLV, SLOT(setFocus()));
#else #else
connect(filter_, &FancyLineEdit::downPressed, connect(filter_, &FancyLineEdit::downPressed,
availableLV, [=](){ focusAndHighlight(availableLV); }); availableLV, [=, this](){ focusAndHighlight(availableLV); });
#endif #endif
connect(regexp_, SIGNAL(triggered()), connect(regexp_, SIGNAL(triggered()),
this, SLOT(regexChanged())); this, SLOT(regexChanged()));

View File

@ -1673,7 +1673,7 @@ GuiDocument::GuiDocument(GuiView & lv)
modulesModule->availableLV, SLOT(setFocus())); modulesModule->availableLV, SLOT(setFocus()));
#else #else
connect(filter_, &FancyLineEdit::downPressed, connect(filter_, &FancyLineEdit::downPressed,
modulesModule->availableLV, [=](){ focusAndHighlight(modulesModule->availableLV); }); modulesModule->availableLV, [=, this](){ focusAndHighlight(modulesModule->availableLV); });
#endif #endif

View File

@ -197,7 +197,7 @@ GuiLyXFiles::GuiLyXFiles(GuiView & lv)
filesLW, SLOT(setFocus())); filesLW, SLOT(setFocus()));
#else #else
connect(filter_, &FancyLineEdit::downPressed, connect(filter_, &FancyLineEdit::downPressed,
filesLW, [=](){ focusAndHighlight(filesLW); }); filesLW, [=, this](){ focusAndHighlight(filesLW); });
#endif #endif
filterBarL->addWidget(filter_, 0); filterBarL->addWidget(filter_, 0);

View File

@ -67,7 +67,7 @@ GuiRef::GuiRef(GuiView & lv)
refsTW, SLOT(setFocus())); refsTW, SLOT(setFocus()));
#else #else
connect(filter_, &FancyLineEdit::downPressed, connect(filter_, &FancyLineEdit::downPressed,
refsTW, [=](){ focusAndHighlight(refsTW); }); refsTW, [=, this](){ focusAndHighlight(refsTW); });
#endif #endif
filterBarL->addWidget(filter_, 0); filterBarL->addWidget(filter_, 0);

View File

@ -220,7 +220,7 @@ void CacheItem::Impl::startMonitor()
return; return;
monitor_ = FileSystemWatcher::activeMonitor(filename_); monitor_ = FileSystemWatcher::activeMonitor(filename_);
// Disconnected at the same time as this is destroyed. // Disconnected at the same time as this is destroyed.
monitor_->connect([=](bool /* exists */){ startLoading(); }); monitor_->connect([this](bool /* exists */){ startLoading(); });
} }

View File

@ -648,7 +648,7 @@ void InsetExternal::updatePreview() const
renderer_ = make_unique<RenderMonitoredPreview>(this); renderer_ = make_unique<RenderMonitoredPreview>(this);
RenderMonitoredPreview * preview_ptr = renderer_->asMonitoredPreview(); RenderMonitoredPreview * preview_ptr = renderer_->asMonitoredPreview();
// This connection is closed at the same time as this is destroyed. // This connection is closed at the same time as this is destroyed.
preview_ptr->connect([=]() { fileChanged(); }); preview_ptr->connect([this]() { fileChanged(); });
add_preview_and_start_loading(*preview_ptr, *this, buffer()); add_preview_and_start_loading(*preview_ptr, *this, buffer());
break; break;
} }

View File

@ -185,7 +185,7 @@ InsetInclude::InsetInclude(Buffer * buf, InsetCommandParams const & p)
set_label_(false), label_(nullptr), child_buffer_(nullptr), file_exist_(false), set_label_(false), label_(nullptr), child_buffer_(nullptr), file_exist_(false),
recursion_error_(false) recursion_error_(false)
{ {
preview_->connect([=](){ fileChanged(); }); preview_->connect([this](){ fileChanged(); });
if (isListings(params())) { if (isListings(params())) {
InsetListingsParams listing_params(to_utf8(p["lstparams"])); InsetListingsParams listing_params(to_utf8(p["lstparams"]));
@ -201,7 +201,7 @@ InsetInclude::InsetInclude(InsetInclude const & other)
set_label_(false), label_(nullptr), child_buffer_(nullptr), set_label_(false), label_(nullptr), child_buffer_(nullptr),
file_exist_(other.file_exist_),recursion_error_(other.recursion_error_) file_exist_(other.file_exist_),recursion_error_(other.recursion_error_)
{ {
preview_->connect([=](){ fileChanged(); }); preview_->connect([this](){ fileChanged(); });
if (other.label_) if (other.label_)
label_ = new InsetLabel(*other.label_); label_ = new InsetLabel(*other.label_);