summary refs log tree commit diff
path: root/src/QuickSwitcher.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-20 17:09:11 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-20 17:09:11 +0200
commitf95998a64bebcb12ffe07fcb6f23cdabff434641 (patch)
tree3a2388ebd9a271f59e3c8a8d36bb906c40fe3386 /src/QuickSwitcher.cc
parentScale down the preview image to fit in the application window (diff)
downloadnheko-f95998a64bebcb12ffe07fcb6f23cdabff434641.tar.xz
Be explicit about the captured parameters in lambdas
Diffstat (limited to 'src/QuickSwitcher.cc')
-rw-r--r--src/QuickSwitcher.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/QuickSwitcher.cc b/src/QuickSwitcher.cc

index 6cc82501..5fcc5770 100644 --- a/src/QuickSwitcher.cc +++ b/src/QuickSwitcher.cc
@@ -23,7 +23,8 @@ RoomSearchInput::RoomSearchInput(QWidget *parent) : TextField(parent) -{} +{ +} bool RoomSearchInput::focusNextPrevChild(bool next) @@ -78,7 +79,7 @@ QuickSwitcher::QuickSwitcher(QWidget *parent) topLayout_->addWidget(roomSearch_); connect(completer_, SIGNAL(highlighted(QString)), roomSearch_, SLOT(setText(QString))); - connect(roomSearch_, &QLineEdit::textEdited, this, [=](const QString &prefix) { + connect(roomSearch_, &QLineEdit::textEdited, this, [this](const QString &prefix) { if (prefix.isEmpty()) { completer_->popup()->hide(); selection_ = -1; @@ -96,7 +97,7 @@ QuickSwitcher::QuickSwitcher(QWidget *parent) completer_->complete(); }); - connect(roomSearch_, &RoomSearchInput::selectNextCompletion, this, [=]() { + connect(roomSearch_, &RoomSearchInput::selectNextCompletion, this, [this]() { selection_ += 1; if (!completer_->setCurrentRow(selection_)) { @@ -107,7 +108,7 @@ QuickSwitcher::QuickSwitcher(QWidget *parent) completer_->popup()->setCurrentIndex(completer_->currentIndex()); }); - connect(roomSearch_, &RoomSearchInput::selectPreviousCompletion, this, [=]() { + connect(roomSearch_, &RoomSearchInput::selectPreviousCompletion, this, [this]() { selection_ -= 1; if (!completer_->setCurrentRow(selection_)) { @@ -119,8 +120,8 @@ QuickSwitcher::QuickSwitcher(QWidget *parent) }); connect( - roomSearch_, &RoomSearchInput::hiding, this, [=]() { completer_->popup()->hide(); }); - connect(roomSearch_, &QLineEdit::returnPressed, this, [=]() { + roomSearch_, &RoomSearchInput::hiding, this, [this]() { completer_->popup()->hide(); }); + connect(roomSearch_, &QLineEdit::returnPressed, this, [this]() { emit closing(); QString text("");