summaryrefslogtreecommitdiff
path: root/dash
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-14 04:00:29 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-14 04:00:29 +0100
commit1868be7a56c2c73ab87bbb4a13a8dfd863a57d1b (patch)
treea31b13edb0de7559615b02f8a76fc39de4f12c2d /dash
parentbb7a257afe615e6bdb93894df1a2eab2ed29a6f6 (diff)
Unity: always prefer passing [this] to lambdas than [&]
(bzr r3592.2.1)
Diffstat (limited to 'dash')
-rwxr-xr-xdash/CoverflowResultView.cpp2
-rw-r--r--dash/DashController.cpp10
-rw-r--r--dash/DashView.cpp24
-rw-r--r--dash/FilterBasicButton.cpp4
-rw-r--r--dash/FilterExpanderLabel.cpp6
-rw-r--r--dash/FilterGenreButton.cpp6
-rw-r--r--dash/FilterMultiRangeButton.cpp4
-rw-r--r--dash/FilterRatingsButton.cpp4
-rwxr-xr-xdash/PlacesGroup.cpp4
-rw-r--r--dash/PreviewStateMachine.cpp4
-rw-r--r--dash/ResultView.cpp6
-rw-r--r--dash/ResultViewGrid.cpp14
-rw-r--r--dash/ScopeBar.cpp4
-rw-r--r--dash/ScopeBarIcon.cpp2
-rwxr-xr-xdash/ScopeView.cpp12
-rw-r--r--dash/previews/ActionButton.cpp2
-rw-r--r--dash/previews/ActionLink.cpp4
-rw-r--r--dash/previews/ApplicationPreview.cpp2
-rw-r--r--dash/previews/GenericPreview.cpp2
-rw-r--r--dash/previews/MoviePreview.cpp2
-rw-r--r--dash/previews/MusicPreview.cpp2
-rw-r--r--dash/previews/Preview.cpp2
-rw-r--r--dash/previews/PreviewContainer.cpp18
-rw-r--r--dash/previews/PreviewInfoHintWidget.cpp2
-rw-r--r--dash/previews/PreviewNavigator.cpp2
-rw-r--r--dash/previews/PreviewRatingsWidget.cpp2
-rw-r--r--dash/previews/SocialPreview.cpp2
-rw-r--r--dash/previews/SocialPreviewComments.cpp2
-rw-r--r--dash/previews/SocialPreviewContent.cpp2
-rw-r--r--dash/previews/StandaloneApplicationPreview.cpp4
-rw-r--r--dash/previews/StandaloneErrorPreview.cpp2
-rw-r--r--dash/previews/StandaloneMoviePreview.cpp2
-rw-r--r--dash/previews/StandaloneMusicPaymentPreview.cpp2
-rw-r--r--dash/previews/StandaloneMusicPreview.cpp8
-rw-r--r--dash/previews/StandaloneSocialPreview.cpp2
-rw-r--r--dash/previews/Track.cpp2
36 files changed, 87 insertions, 87 deletions
diff --git a/dash/CoverflowResultView.cpp b/dash/CoverflowResultView.cpp
index 3c9180ef5..370ba1314 100755
--- a/dash/CoverflowResultView.cpp
+++ b/dash/CoverflowResultView.cpp
@@ -161,7 +161,7 @@ CoverflowResultView::Impl::Impl(CoverflowResultView *parent)
coverflow_->y_offset = 0.15f;
coverflow_->reflection_size = .5f;
- ubus_.RegisterInterest(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, [&] (GVariant* data) {
+ ubus_.RegisterInterest(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, [this] (GVariant* data) {
int nav_mode = 0;
GVariant* local_result_variant = nullptr;
glib::String proposed_unique_id;
diff --git a/dash/DashController.cpp b/dash/DashController.cpp
index 59f4d3616..54e653891 100644
--- a/dash/DashController.cpp
+++ b/dash/DashController.cpp
@@ -73,13 +73,13 @@ Controller::Controller(Controller::WindowCreator const& create_window)
{
RegisterUBusInterests();
- ensure_timeout_.Run([&]() { EnsureDash(); return false; });
+ ensure_timeout_.Run([this]() { EnsureDash(); return false; });
timeline_animator_.updated.connect(sigc::mem_fun(this, &Controller::OnViewShowHideFrame));
// As a default. the create_window_ function should just create a base window.
if (create_window_ == nullptr)
{
- create_window_ = [&]() {
+ create_window_ = [this]() {
return new ResizingBaseWindow(dash::window_title,
[this](nux::Geometry const& geo) {
if (view_)
@@ -90,7 +90,7 @@ Controller::Controller(Controller::WindowCreator const& create_window)
}
SetupWindow();
- UScreen::GetDefault()->changed.connect([&] (int, std::vector<nux::Geometry>&) { Relayout(true); });
+ UScreen::GetDefault()->changed.connect([this] (int, std::vector<nux::Geometry>&) { Relayout(true); });
Settings::Instance().form_factor.changed.connect([this](FormFactor)
{
@@ -160,8 +160,8 @@ void Controller::RegisterUBusInterests()
ubus_manager_.RegisterInterest(UBUS_OVERLAY_CLOSE_REQUEST,
sigc::mem_fun(this, &Controller::OnExternalHideDash));
ubus_manager_.RegisterInterest(UBUS_DASH_ABOUT_TO_SHOW,
- [&] (GVariant*) { EnsureDash(); });
- ubus_manager_.RegisterInterest(UBUS_OVERLAY_SHOWN, [&] (GVariant *data)
+ [this] (GVariant*) { EnsureDash(); });
+ ubus_manager_.RegisterInterest(UBUS_OVERLAY_SHOWN, [this] (GVariant *data)
{
unity::glib::String overlay_identity;
gboolean can_maximise = FALSE;
diff --git a/dash/DashView.cpp b/dash/DashView.cpp
index 6c1416a17..c68d49d91 100644
--- a/dash/DashView.cpp
+++ b/dash/DashView.cpp
@@ -237,7 +237,7 @@ void DashView::BuildPreview(Preview::Ptr model)
preview_displaying_ = true;
// connect to nav left/right signals to request nav left/right movement.
- preview_container_->navigate_left.connect([&] () {
+ preview_container_->navigate_left.connect([this] () {
preview_navigation_mode_ = previews::Navigation::LEFT;
// sends a message to all result views, sending the the uri of the current preview result
@@ -245,7 +245,7 @@ void DashView::BuildPreview(Preview::Ptr model)
ubus_manager_.SendMessage(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, g_variant_new("(ivs)", -1, g_variant_ref(last_activated_result_.Variant()), stored_activated_unique_id_.c_str()));
});
- preview_container_->navigate_right.connect([&] () {
+ preview_container_->navigate_right.connect([this] () {
preview_navigation_mode_ = previews::Navigation::RIGHT;
// sends a message to all result views, sending the the uri of the current preview result
@@ -253,7 +253,7 @@ void DashView::BuildPreview(Preview::Ptr model)
ubus_manager_.SendMessage(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, g_variant_new("(ivs)", 1, g_variant_ref(last_activated_result_.Variant()), stored_activated_unique_id_.c_str()));
});
- preview_container_->request_close.connect([&] () { ClosePreview(); });
+ preview_container_->request_close.connect([this] () { ClosePreview(); });
}
else
{
@@ -303,7 +303,7 @@ void DashView::StartPreviewAnimation()
split_animation_->SetStartValue(animate_split_value_);
split_animation_->SetFinishValue(1.0f);
split_animation_->SetEasingCurve(na::EasingCurve(na::EasingCurve::Type::Linear));
- split_animation_->updated.connect([&](float const& linear_split_animate_value)
+ split_animation_->updated.connect([this](float const& linear_split_animate_value)
{
static na::EasingCurve split_animation_curve(na::EasingCurve::Type::InQuad);
@@ -319,7 +319,7 @@ void DashView::StartPreviewAnimation()
preview_container_animation_->SetStartValue(animate_preview_container_value_);
preview_container_animation_->SetFinishValue(1.0f);
preview_container_animation_->SetEasingCurve(na::EasingCurve(na::EasingCurve::Type::Linear));
- preview_container_animation_->updated.connect([&](float const& linear_preview_container_animate_value)
+ preview_container_animation_->updated.connect([this](float const& linear_preview_container_animate_value)
{
static na::EasingCurve preview_container_animation_curve(na::EasingCurve::Type::InQuad);
@@ -335,7 +335,7 @@ void DashView::StartPreviewAnimation()
preview_animation_->SetStartValue(animate_preview_value_);
preview_animation_->SetFinishValue(1.0f);
preview_animation_->SetEasingCurve(na::EasingCurve(na::EasingCurve::Type::Linear));
- preview_animation_->updated.connect([&](float const& linear_preview_animate_value)
+ preview_animation_->updated.connect([this](float const& linear_preview_animate_value)
{
animate_preview_value_ = linear_preview_animate_value;
QueueDraw();
@@ -372,7 +372,7 @@ void DashView::EndPreviewAnimation()
preview_animation_->SetStartValue(1.0f - animate_preview_value_);
preview_animation_->SetFinishValue(1.0f);
preview_animation_->SetEasingCurve(na::EasingCurve(na::EasingCurve::Type::Linear));
- preview_animation_->updated.connect([&](float const& preview_value)
+ preview_animation_->updated.connect([this](float const& preview_value)
{
animate_preview_value_ = 1.0f - preview_value;
QueueDraw();
@@ -386,7 +386,7 @@ void DashView::EndPreviewAnimation()
preview_container_animation_->SetStartValue(1.0f - animate_preview_container_value_);
preview_container_animation_->SetFinishValue(1.0f);
preview_container_animation_->SetEasingCurve(na::EasingCurve(na::EasingCurve::Type::Linear));
- preview_container_animation_->updated.connect([&](float const& linear_preview_container_animate_value)
+ preview_container_animation_->updated.connect([this](float const& linear_preview_container_animate_value)
{
static na::EasingCurve preview_container_animation_curve(na::EasingCurve::Type::InQuad);
@@ -401,7 +401,7 @@ void DashView::EndPreviewAnimation()
split_animation_->SetStartValue(1.0f - animate_split_value_);
split_animation_->SetFinishValue(1.0f);
split_animation_->SetEasingCurve(na::EasingCurve(na::EasingCurve::Type::Linear));
- split_animation_->updated.connect([&](float const& linear_split_animate_value)
+ split_animation_->updated.connect([this](float const& linear_split_animate_value)
{
static na::EasingCurve split_animation_curve(na::EasingCurve::Type::InQuad);
@@ -537,7 +537,7 @@ void DashView::SetupViews()
search_bar_->activated.connect(sigc::mem_fun(this, &DashView::OnEntryActivated));
search_bar_->search_changed.connect(sigc::mem_fun(this, &DashView::OnSearchChanged));
search_bar_->live_search_reached.connect(sigc::mem_fun(this, &DashView::OnLiveSearchReached));
- search_bar_->showing_filters.changed.connect([&] (bool showing)
+ search_bar_->showing_filters.changed.connect([this] (bool showing)
{
if (active_scope_view_)
{
@@ -1220,10 +1220,10 @@ void DashView::OnScopeAdded(Scope::Ptr const& scope, int position)
// set form factor used for the searches
scope->form_factor = "desktop";
scope->activated.connect(sigc::mem_fun(this, &DashView::OnResultActivatedReply));
- scope->connected.changed.connect([&] (bool value) { });
+ scope->connected.changed.connect([this] (bool value) { });
// Hook up to the new preview infrastructure
- scope->preview_ready.connect([&] (LocalResult const& result, Preview::Ptr model)
+ scope->preview_ready.connect([this] (LocalResult const& result, Preview::Ptr model)
{
// HACK: Atm we don't support well the fact that a preview can be sent from
// an ActionResponse and therefore transition does not work, this hack allows
diff --git a/dash/FilterBasicButton.cpp b/dash/FilterBasicButton.cpp
index 700998bde..104931857 100644
--- a/dash/FilterBasicButton.cpp
+++ b/dash/FilterBasicButton.cpp
@@ -75,12 +75,12 @@ void FilterBasicButton::Init()
clear_before_draw_ = true;
- key_nav_focus_change.connect([&] (nux::Area*, bool, nux::KeyNavDirection)
+ key_nav_focus_change.connect([this] (nux::Area*, bool, nux::KeyNavDirection)
{
QueueDraw();
});
- key_nav_focus_activate.connect([&](nux::Area*)
+ key_nav_focus_activate.connect([this](nux::Area*)
{
if (GetInputEventSensitivity())
Active() ? Deactivate() : Activate();
diff --git a/dash/FilterExpanderLabel.cpp b/dash/FilterExpanderLabel.cpp
index b2fda6b34..2b5c2e6bb 100644
--- a/dash/FilterExpanderLabel.cpp
+++ b/dash/FilterExpanderLabel.cpp
@@ -174,17 +174,17 @@ void FilterExpanderLabel::BuildLayout()
SetLayout(layout_);
// Lambda functions
- auto mouse_expand = [&](int x, int y, unsigned long b, unsigned long k)
+ auto mouse_expand = [this](int x, int y, unsigned long b, unsigned long k)
{
expanded = !expanded;
};
- auto key_redraw = [&](nux::Area*, bool, nux::KeyNavDirection)
+ auto key_redraw = [this](nux::Area*, bool, nux::KeyNavDirection)
{
QueueDraw();
};
- auto key_expand = [&](nux::Area*)
+ auto key_expand = [this](nux::Area*)
{
expanded = !expanded;
};
diff --git a/dash/FilterGenreButton.cpp b/dash/FilterGenreButton.cpp
index a0164d247..fce405702 100644
--- a/dash/FilterGenreButton.cpp
+++ b/dash/FilterGenreButton.cpp
@@ -33,7 +33,7 @@ FilterGenreButton::FilterGenreButton(std::string const& label, NUX_FILE_LINE_DEC
{
InitTheme();
- state_change.connect([&](nux::Button* button)
+ state_change.connect([this](nux::Button* button)
{
if (filter_)
filter_->active = Active();
@@ -45,7 +45,7 @@ FilterGenreButton::FilterGenreButton(NUX_FILE_LINE_DECL)
{
InitTheme();
- state_change.connect([&](nux::Button* button)
+ state_change.connect([this](nux::Button* button)
{
if (filter_)
filter_->active = Active();
@@ -59,7 +59,7 @@ void FilterGenreButton::SetFilter(FilterOption::Ptr const& filter)
SetActive(filter_->active);
- filter_->active.changed.connect([&](bool is_active)
+ filter_->active.changed.connect([this](bool is_active)
{
SetActive(is_active);
});
diff --git a/dash/FilterMultiRangeButton.cpp b/dash/FilterMultiRangeButton.cpp
index 7f2302775..ccd13ea85 100644
--- a/dash/FilterMultiRangeButton.cpp
+++ b/dash/FilterMultiRangeButton.cpp
@@ -62,8 +62,8 @@ void FilterMultiRangeButton::Init()
SetAcceptKeyNavFocusOnMouseEnter(false);
state_change.connect(sigc::mem_fun(this, &FilterMultiRangeButton::OnActivated));
- key_nav_focus_change.connect([&](nux::Area*, bool, nux::KeyNavDirection) { QueueDraw(); });
- key_nav_focus_activate.connect([&](nux::Area* area) { Active() ? Deactivate() : Activate(); });
+ key_nav_focus_change.connect([this](nux::Area*, bool, nux::KeyNavDirection) { QueueDraw(); });
+ key_nav_focus_activate.connect([this](nux::Area* area) { Active() ? Deactivate() : Activate(); });
}
void FilterMultiRangeButton::OnActivated(nux::Area* area)
diff --git a/dash/FilterRatingsButton.cpp b/dash/FilterRatingsButton.cpp
index c73df3a11..33c2ac44e 100644
--- a/dash/FilterRatingsButton.cpp
+++ b/dash/FilterRatingsButton.cpp
@@ -52,7 +52,7 @@ FilterRatingsButton::FilterRatingsButton(NUX_FILE_LINE_DECL)
mouse_move.connect(sigc::mem_fun(this, &FilterRatingsButton::RecvMouseMove));
mouse_drag.connect(sigc::mem_fun(this, &FilterRatingsButton::RecvMouseDrag));
- key_nav_focus_change.connect([&](nux::Area* area, bool has_focus, nux::KeyNavDirection direction)
+ key_nav_focus_change.connect([this](nux::Area* area, bool has_focus, nux::KeyNavDirection direction)
{
if (has_focus)
focused_star_ = 0;
@@ -62,7 +62,7 @@ FilterRatingsButton::FilterRatingsButton(NUX_FILE_LINE_DECL)
QueueDraw();
});
- key_nav_focus_activate.connect([&](nux::Area*) { filter_->rating = static_cast<float>(focused_star_+1)/num_stars; });
+ key_nav_focus_activate.connect([this](nux::Area*) { filter_->rating = static_cast<float>(focused_star_+1)/num_stars; });
key_down.connect(sigc::mem_fun(this, &FilterRatingsButton::OnKeyDown));
}
diff --git a/dash/PlacesGroup.cpp b/dash/PlacesGroup.cpp
index b67229a9c..8ca4ec53c 100755
--- a/dash/PlacesGroup.cpp
+++ b/dash/PlacesGroup.cpp
@@ -203,7 +203,7 @@ PlacesGroup::PlacesGroup(dash::StyleInterface& style)
_expand_label->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));
_expand_icon->mouse_click.connect(sigc::mem_fun(this, &PlacesGroup::RecvMouseClick));
- key_nav_focus_change.connect([&](nux::Area* area, bool has_focus, nux::KeyNavDirection direction)
+ key_nav_focus_change.connect([this](nux::Area* area, bool has_focus, nux::KeyNavDirection direction)
{
if (!has_focus)
return;
@@ -289,7 +289,7 @@ PlacesGroup::SetChildView(dash::ResultView* view)
_child_layout->SetLeftAndRightPadding(_style.GetPlacesGroupResultLeftPadding(), 0);
_group_layout->AddLayout(_child_layout, 1);
- view->results_per_row.changed.connect([&] (int results_per_row)
+ view->results_per_row.changed.connect([this] (int results_per_row)
{
_n_visible_items_in_unexpand_mode = results_per_row;
RefreshLabel();
diff --git a/dash/PreviewStateMachine.cpp b/dash/PreviewStateMachine.cpp
index 3e0c65c0b..2b549efc6 100644
--- a/dash/PreviewStateMachine.cpp
+++ b/dash/PreviewStateMachine.cpp
@@ -37,8 +37,8 @@ PreviewStateMachine::PreviewStateMachine()
split_positions_[pos] = -1;
}
- left_results.changed.connect([&] (int value) { CheckPreviewRequirementsFulfilled();});
- right_results.changed.connect([&] (int value) { CheckPreviewRequirementsFulfilled();});
+ left_results.changed.connect([this] (int value) { CheckPreviewRequirementsFulfilled();});
+ right_results.changed.connect([this] (int value) { CheckPreviewRequirementsFulfilled();});
}
PreviewStateMachine::~PreviewStateMachine()
diff --git a/dash/ResultView.cpp b/dash/ResultView.cpp
index 9fdd2ad74..cf63fb861 100644
--- a/dash/ResultView.cpp
+++ b/dash/ResultView.cpp
@@ -44,13 +44,13 @@ ResultView::ResultView(NUX_FILE_LINE_DECL)
, renderer_(NULL)
, cached_result_(nullptr, nullptr, nullptr)
{
- expanded.changed.connect([&](bool value)
+ expanded.changed.connect([this](bool value)
{
QueueRelayout();
NeedRedraw();
});
- desaturation_progress.changed.connect([&](float value)
+ desaturation_progress.changed.connect([this](float value)
{
NeedRedraw();
});
@@ -80,7 +80,7 @@ void ResultView::SetModelRenderer(ResultRenderer* renderer)
renderer_->UnReference();
renderer_ = renderer;
- renderer->NeedsRedraw.connect([&]()
+ renderer->NeedsRedraw.connect([this]()
{
NeedRedraw();
});
diff --git a/dash/ResultViewGrid.cpp b/dash/ResultViewGrid.cpp
index c1a218179..6850ffe66 100644
--- a/dash/ResultViewGrid.cpp
+++ b/dash/ResultViewGrid.cpp
@@ -81,16 +81,16 @@ ResultViewGrid::ResultViewGrid(NUX_FILE_LINE_DECL)
EnableDoubleClick(true);
SetAcceptKeyNavFocusOnMouseDown(false);
- auto needredraw_lambda = [&](int value) { NeedRedraw(); };
+ auto needredraw_lambda = [this](int value) { NeedRedraw(); };
horizontal_spacing.changed.connect(needredraw_lambda);
vertical_spacing.changed.connect(needredraw_lambda);
padding.changed.connect(needredraw_lambda);
selected_index_.changed.connect(needredraw_lambda);
- expanded.changed.connect([&](bool value) { if (value) all_results_preloaded_ = false; });
- results_per_row.changed.connect([&](int value) { if (value > 0) all_results_preloaded_ = false; });
+ expanded.changed.connect([this](bool value) { if (value) all_results_preloaded_ = false; });
+ results_per_row.changed.connect([this](int value) { if (value > 0) all_results_preloaded_ = false; });
key_nav_focus_change.connect(sigc::mem_fun(this, &ResultViewGrid::OnKeyNavFocusChange));
- key_nav_focus_activate.connect([&] (nux::Area *area)
+ key_nav_focus_activate.connect([this] (nux::Area *area)
{
Activate(focused_result_, selected_index_, ResultView::ActivateType::DIRECT);
});
@@ -99,7 +99,7 @@ ResultViewGrid::ResultViewGrid(NUX_FILE_LINE_DECL)
mouse_click.connect(sigc::mem_fun(this, &ResultViewGrid::MouseClick));
mouse_double_click.connect(sigc::mem_fun(this, &ResultViewGrid::MouseDoubleClick));
- mouse_down.connect([&](int x, int y, unsigned long mouse_state, unsigned long button_state)
+ mouse_down.connect([this](int x, int y, unsigned long mouse_state, unsigned long button_state)
{
last_mouse_down_x_ = x;
last_mouse_down_y_ = y;
@@ -107,7 +107,7 @@ ResultViewGrid::ResultViewGrid(NUX_FILE_LINE_DECL)
mouse_over_index_ = index;
});
- mouse_leave.connect([&](int x, int y, unsigned long mouse_state, unsigned long button_state)
+ mouse_leave.connect([this](int x, int y, unsigned long mouse_state, unsigned long button_state)
{
mouse_over_index_ = -1;
mouse_last_x_ = -1;
@@ -123,7 +123,7 @@ ResultViewGrid::ResultViewGrid(NUX_FILE_LINE_DECL)
g_variant_get (data, "(ii)", &recorded_dash_width_, &recorded_dash_height_);
});
- ubus_.RegisterInterest(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, [&] (GVariant* data) {
+ ubus_.RegisterInterest(UBUS_DASH_PREVIEW_NAVIGATION_REQUEST, [this] (GVariant* data) {
int nav_mode = 0;
GVariant* local_result_variant = NULL;
glib::String proposed_unique_id;
diff --git a/dash/ScopeBar.cpp b/dash/ScopeBar.cpp
index d2677bb02..fb437a4e7 100644
--- a/dash/ScopeBar.cpp
+++ b/dash/ScopeBar.cpp
@@ -80,8 +80,8 @@ void ScopeBar::AddScope(Scope::Ptr const& scope)
layout_->AddView(icon, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
AddChild(icon);
- icon->mouse_click.connect([&, icon] (int x, int y, unsigned long button, unsigned long keyboard) { SetActive(icon); });
- icon->key_nav_focus_activate.connect([&, icon](nux::Area*){ SetActive(icon); });
+ icon->mouse_click.connect([this, icon] (int x, int y, unsigned long button, unsigned long keyboard) { SetActive(icon); });
+ icon->key_nav_focus_activate.connect([this, icon](nux::Area*){ SetActive(icon); });
}
void ScopeBar::Activate(std::string id)
diff --git a/dash/ScopeBarIcon.cpp b/dash/ScopeBarIcon.cpp
index ed8519cc8..e1a42e5dd 100644
--- a/dash/ScopeBarIcon.cpp
+++ b/dash/ScopeBarIcon.cpp
@@ -57,7 +57,7 @@ ScopeBarIcon::ScopeBarIcon(std::string id_, std::string icon_hint)
SetAcceptKeyNavFocusOnMouseEnter(true);
active.changed.connect(sigc::mem_fun(this, &ScopeBarIcon::OnActiveChanged));
- key_nav_focus_change.connect([&](nux::Area*, bool, nux::KeyNavDirection){ QueueDraw(); });
+ key_nav_focus_change.connect([this](nux::Area*, bool, nux::KeyNavDirection){ QueueDraw(); });
}
ScopeBarIcon::~ScopeBarIcon()
diff --git a/dash/ScopeView.cpp b/dash/ScopeView.cpp
index d087b1335..4ae96c115 100755
--- a/dash/ScopeView.cpp
+++ b/dash/ScopeView.cpp
@@ -59,7 +59,7 @@ public:
{
SetVScrollBar(scroll_bar);
- OnVisibleChanged.connect([&] (nux::Area* /*area*/, bool visible) {
+ OnVisibleChanged.connect([this] (nux::Area* /*area*/, bool visible) {
if (m_horizontal_scrollbar_enable)
_hscrollbar->SetVisible(visible);
if (m_vertical_scrollbar_enable)
@@ -178,7 +178,7 @@ ScopeView::ScopeView(Scope::Ptr const& scope, nux::Area* show_filters)
conn_manager_.Add(scope_->filters.changed.connect(sigc::mem_fun(this, &ScopeView::SetupFilters)));
SetupFilters(scope->filters);
- scope_->connected.changed.connect([&](bool is_connected)
+ scope_->connected.changed.connect([this](bool is_connected)
{
// We need to search again if we were reconnected after being connected before.
if (scope_connected_ && !is_connected)
@@ -193,7 +193,7 @@ ScopeView::ScopeView(Scope::Ptr const& scope, nux::Area* show_filters)
});
}
- ubus_manager_.RegisterInterest(UBUS_RESULT_VIEW_KEYNAV_CHANGED, [&] (GVariant* data) {
+ ubus_manager_.RegisterInterest(UBUS_RESULT_VIEW_KEYNAV_CHANGED, [this] (GVariant* data) {
// we get this signal when a result view keynav changes,
// its a bad way of doing this but nux ABI needs to be broken
// to do it properly
@@ -220,7 +220,7 @@ ScopeView::ScopeView(Scope::Ptr const& scope, nux::Area* show_filters)
}
});
- OnVisibleChanged.connect([&] (nux::Area* area, bool visible) {
+ OnVisibleChanged.connect([this] (nux::Area* area, bool visible) {
scroll_view_->SetVisible(visible);
if ((filters_expanded && visible) || !visible)
@@ -757,7 +757,7 @@ void ScopeView::QueueCategoryCountsCheck()
{
if (!model_updated_timeout_)
{
- model_updated_timeout_.reset(new glib::Idle([&] () {
+ model_updated_timeout_.reset(new glib::Idle([this] () {
// Check if all results so far are from one category
// If so, then expand that category.
CheckCategoryCounts();
@@ -830,7 +830,7 @@ bool ScopeView::PerformSearch(std::string const& search_query, SearchCallback co
if (scope_)
{
// 150ms to hide the no reults message if its take a while to return results
- hide_message_delay_.reset(new glib::Timeout(150, [&] () {
+ hide_message_delay_.reset(new glib::Timeout(150, [this] () {
HideResultsMessage();
return false;
}));
diff --git a/dash/previews/ActionButton.cpp b/dash/previews/ActionButton.cpp
index b76bab00b..ddd1f4f23 100644
--- a/dash/previews/ActionButton.cpp
+++ b/dash/previews/ActionButton.cpp
@@ -76,7 +76,7 @@ void ActionButton::Init()
{
InitTheme();
- key_nav_focus_activate.connect([&](nux::Area*)
+ key_nav_focus_activate.connect([this](nux::Area*)
{
if (GetInputEventSensitivity())
activate.emit(this, action_hint_);
diff --git a/dash/previews/ActionLink.cpp b/dash/previews/ActionLink.cpp
index 317800bde..c0cddeb17 100644
--- a/dash/previews/ActionLink.cpp
+++ b/dash/previews/ActionLink.cpp
@@ -81,12 +81,12 @@ void ActionLink::Init()
font_hint.SetSetterFunction(sigc::mem_fun(this, &ActionLink::set_font_hint));
font_hint.SetGetterFunction(sigc::mem_fun(this, &ActionLink::get_font_hint));
- key_nav_focus_change.connect([&] (nux::Area*, bool, nux::KeyNavDirection)
+ key_nav_focus_change.connect([this] (nux::Area*, bool, nux::KeyNavDirection)
{
QueueDraw();
});
- key_nav_focus_activate.connect([&](nux::Area*)
+ key_nav_focus_activate.connect([this](nux::Area*)
{
if (GetInputEventSensitivity())
activate.emit(this, action_hint_);
diff --git a/dash/previews/ApplicationPreview.cpp b/dash/previews/ApplicationPreview.cpp
index 7ab91a2d2..49a18b93c 100644
--- a/dash/previews/ApplicationPreview.cpp
+++ b/dash/previews/ApplicationPreview.cpp
@@ -119,7 +119,7 @@ void ApplicationPreview::SetupViews()
previews::Style& style = dash::previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
nux::HLayout* image_data_layout = new nux::HLayout();
image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth());
diff --git a/dash/previews/GenericPreview.cpp b/dash/previews/GenericPreview.cpp
index b912722dd..e34e6630e 100644
--- a/dash/previews/GenericPreview.cpp
+++ b/dash/previews/GenericPreview.cpp
@@ -111,7 +111,7 @@ void GenericPreview::SetupViews()
}
previews::Style& style = dash::previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
nux::HLayout* image_data_layout = new nux::HLayout();
image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth());
diff --git a/dash/previews/MoviePreview.cpp b/dash/previews/MoviePreview.cpp
index 5edcb5db3..ec2e96e3c 100644
--- a/dash/previews/MoviePreview.cpp
+++ b/dash/previews/MoviePreview.cpp
@@ -121,7 +121,7 @@ void MoviePreview::SetupViews()
}
previews::Style& style = dash::previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
nux::HLayout* image_data_layout = new nux::HLayout();
image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth());
diff --git a/dash/previews/MusicPreview.cpp b/dash/previews/MusicPreview.cpp
index d41a7767f..960655f0a 100644
--- a/dash/previews/MusicPreview.cpp
+++ b/dash/previews/MusicPreview.cpp
@@ -128,7 +128,7 @@ void MusicPreview::SetupViews()
}
previews::Style& style = dash::previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
nux::HLayout* image_data_layout = new nux::HLayout();
image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth());
diff --git a/dash/previews/Preview.cpp b/dash/previews/Preview.cpp
index c32038444..c57f76afa 100644
--- a/dash/previews/Preview.cpp
+++ b/dash/previews/Preview.cpp
@@ -200,7 +200,7 @@ void Preview::UpdateCoverArtImage(CoverArt* cover_art)
previews::Style& style = dash::previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
std::string image_hint;
if (preview_model_->image.Get())
diff --git a/dash/previews/PreviewContainer.cpp b/dash/previews/PreviewContainer.cpp
index 644095669..93d6d95a1 100644
--- a/dash/previews/PreviewContainer.cpp
+++ b/dash/previews/PreviewContainer.cpp
@@ -68,7 +68,7 @@ public:
, nav_complete_(0)
, relative_nav_index_(0)
{
- geometry_changed.connect([&](nux::Area*, nux::Geometry& geo)
+ geometry_changed.connect([this](nux::Area*, nux::Geometry& geo)
{
// Need to update the preview geometries when updating the container geo.
UpdateAnimationProgress(progress_, curve_progress_);
@@ -229,7 +229,7 @@ public:
void StartPreviewWait()
{
- preview_wait_timer_.reset(new glib::Timeout(PREVIEW_SPINNER_WAIT, [&] () {
+ preview_wait_timer_.reset(new glib::Timeout(PREVIEW_SPINNER_WAIT, [this] () {
if (waiting_preview_)
return false;
@@ -469,7 +469,7 @@ void PreviewContainer::SetupViews()
AddChild(nav_left_);
nav_left_->SetMinimumWidth(style.GetNavigatorWidth());
nav_left_->SetMaximumWidth(style.GetNavigatorWidth());
- nav_left_->activated.connect([&]() { navigate_left.emit(); });
+ nav_left_->activated.connect([this]() { navigate_left.emit(); });
layout_content_->AddView(nav_left_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);
preview_layout_ = new PreviewContent(this);
@@ -481,13 +481,13 @@ void PreviewContainer::SetupViews()
AddChild(nav_right_);
nav_right_->SetMinimumWidth(style.GetNavigatorWidth());
nav_right_->SetMaximumWidth(style.GetNavigatorWidth());
- nav_right_->activated.connect([&]() { navigate_right.emit(); });
+ nav_right_->activated.connect([this]() { navigate_right.emit(); });
layout_content_->AddView(nav_right_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);
layout_content_->AddSpace(0, 1);
layout->AddSpace(0, 1);
- preview_layout_->start_navigation.connect([&]()
+ preview_layout_->start_navigation.connect([this]()
{
// reset animation clock.
if (navigation_count_ == 0)
@@ -500,19 +500,19 @@ void PreviewContainer::SetupViews()
QueueAnimation();
});
- preview_layout_->continue_navigation.connect([&]()
+ preview_layout_->continue_navigation.connect([this]()
{
QueueAnimation();
});
- preview_layout_->end_navigation.connect([&]()
+ preview_layout_->end_navigation.connect([this]()
{
navigation_count_ = 0;
navigation_progress_speed_ = 0;
});
- navigate_right.connect( [&]() { preview_layout_->StartPreviewWait(); } );
- navigate_left.connect( [&]() { preview_layout_->StartPreviewWait(); } );
+ navigate_right.connect( [this]() { preview_layout_->StartPreviewWait(); } );
+ navigate_left.connect( [this]() { preview_layout_->StartPreviewWait(); } );
}
void PreviewContainer::Draw(nux::GraphicsEngine& gfx_engine, bool force_draw)
diff --git a/dash/previews/PreviewInfoHintWidget.cpp b/dash/previews/PreviewInfoHintWidget.cpp
index 46ebfb0e3..f30fbdeaa 100644
--- a/dash/previews/PreviewInfoHintWidget.cpp
+++ b/dash/previews/PreviewInfoHintWidget.cpp
@@ -148,7 +148,7 @@ void PreviewInfoHintWidget::SetupViews()
previews::Style& style = previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); };
nux::VLayout* layout = new nux::VLayout();
layout->SetSpaceBetweenChildren(6);
diff --git a/dash/previews/PreviewNavigator.cpp b/dash/previews/PreviewNavigator.cpp
index d71c2217c..afe52252d 100644
--- a/dash/previews/PreviewNavigator.cpp
+++ b/dash/previews/PreviewNavigator.cpp
@@ -141,7 +141,7 @@ void PreviewNavigator::SetupViews()
AddChild(texture_);
layout_->AddView(texture_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
- texture_->mouse_click.connect([&](int, int, unsigned long, unsigned long) { activated.emit(); });
+ texture_->mouse_click.connect([this](int, int, unsigned long, unsigned long) { activated.emit(); });
texture_->mouse_enter.connect(sigc::mem_fun(this, &PreviewNavigator::TexRecvMouseEnter));
texture_->mouse_leave.connect(sigc::mem_fun(this, &PreviewNavigator::TexRecvMouseLeave));
}
diff --git a/dash/previews/PreviewRatingsWidget.cpp b/dash/previews/PreviewRatingsWidget.cpp
index 1e4454bc6..3aa358915 100644
--- a/dash/previews/PreviewRatingsWidget.cpp
+++ b/dash/previews/PreviewRatingsWidget.cpp
@@ -49,7 +49,7 @@ PreviewRatingsWidget::PreviewRatingsWidget(NUX_FILE_LINE_DECL)
previews::Style& style = previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); };
ratings_ = new RatingsButton(18,2);
ratings_->SetEditable(false);
diff --git a/dash/previews/SocialPreview.cpp b/dash/previews/SocialPreview.cpp
index a1513c019..02869889b 100644
--- a/dash/previews/SocialPreview.cpp
+++ b/dash/previews/SocialPreview.cpp
@@ -120,7 +120,7 @@ void SocialPreview::SetupViews()
previews::Style& style = dash::previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_->OnMouseDown(x, y, button_flags, key_flags); };
nux::HLayout* image_data_layout = new nux::HLayout();
image_data_layout->SetSpaceBetweenChildren(style.GetPanelSplitWidth());
diff --git a/dash/previews/SocialPreviewComments.cpp b/dash/previews/SocialPreviewComments.cpp
index 653854896..8893659be 100644
--- a/dash/previews/SocialPreviewComments.cpp
+++ b/dash/previews/SocialPreviewComments.cpp
@@ -128,7 +128,7 @@ void SocialPreviewComments::SetupViews()
previews::Style& style = previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); };
nux::VLayout* layout = new nux::VLayout();
layout->SetSpaceBetweenChildren(6);
diff --git a/dash/previews/SocialPreviewContent.cpp b/dash/previews/SocialPreviewContent.cpp
index 7c4b287ce..6b5b66a3e 100644
--- a/dash/previews/SocialPreviewContent.cpp
+++ b/dash/previews/SocialPreviewContent.cpp
@@ -130,7 +130,7 @@ void SocialPreviewContent::SetupViews()
{
dash::previews::Style const& style = dash::previews::Style::Instance();
- auto on_mouse_down = [&](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); };
+ auto on_mouse_down = [this](int x, int y, unsigned long button_flags, unsigned long key_flags) { this->preview_container_.OnMouseDown(x, y, button_flags, key_flags); };
text_ = new StaticCairoText("", false, NUX_TRACKER_LOCATION);
text_->SetLines(-8);
diff --git a/dash/previews/StandaloneApplicationPreview.cpp b/dash/previews/StandaloneApplicationPreview.cpp
index 409785ecf..c254544e2 100644
--- a/dash/previews/StandaloneApplicationPreview.cpp
+++ b/dash/previews/StandaloneApplicationPreview.cpp
@@ -144,7 +144,7 @@ void TestRunner::Init ()
container_ = new previews::PreviewContainer(NUX_TRACKER_LOCATION);
container_->navigate_right.connect(sigc::mem_fun(this, &TestRunner::NavRight));
container_->navigate_left.connect(sigc::mem_fun(this, &TestRunner::NavLeft));
- container_->request_close.connect([&]() { exit(0); });
+ container_->request_close.connect([this]() { exit(0); });
DummyView* dummyView = new DummyView(container_.GetPointer());
layout_ = new nux::VLayout(NUX_TRACKER_LOCATION);
@@ -243,7 +243,7 @@ The service allows users to communicate with peers by voice, video, and instant
void TestRunner::NavLeft()
{
- preview_wait_timer_.reset(new glib::Timeout(2000, [&] () {
+ preview_wait_timer_.reset(new glib::Timeout(2000, [this] () {
std::stringstream app_name;
diff --git a/dash/previews/StandaloneErrorPreview.cpp b/dash/previews/StandaloneErrorPreview.cpp
index 5d778ab6e..b15529be6 100644
--- a/dash/previews/StandaloneErrorPreview.cpp
+++ b/dash/previews/StandaloneErrorPreview.cpp
@@ -147,7 +147,7 @@ TestRunner::~TestRunner ()
void TestRunner::Init ()
{
container_ = new previews::PreviewContainer(NUX_TRACKER_LOCATION);
- container_->request_close.connect([&]() { exit(0); });
+ container_->request_close.connect([this]() { exit(0); });
container_->DisableNavButton(previews::Navigation::BOTH);
DummyView* dummyView = new DummyView(container_.GetPointer());
diff --git a/dash/previews/StandaloneMoviePreview.cpp b/dash/previews/StandaloneMoviePreview.cpp
index 6289b6607..bfd43e70a 100644
--- a/dash/previews/StandaloneMoviePreview.cpp
+++ b/dash/previews/StandaloneMoviePreview.cpp
@@ -143,7 +143,7 @@ void TestRunner::Init ()
container_ = new previews::PreviewContainer(NUX_TRACKER_LOCATION);
container_->navigate_right.connect(sigc::mem_fun(this, &TestRunner::NavRight));
container_->navigate_left.connect(sigc::mem_fun(this, &TestRunner::NavLeft));
- container_->request_close.connect([&]() { exit(0); });
+ container_->request_close.connect([this]() { exit(0); });
DummyView* dummyView = new DummyView(container_.GetPointer());
layout_ = new nux::VLayout(NUX_TRACKER_LOCATION);
diff --git a/dash/previews/StandaloneMusicPaymentPreview.cpp b/dash/previews/StandaloneMusicPaymentPreview.cpp
index 9ba2a7da9..b3324b779 100644
--- a/dash/previews/StandaloneMusicPaymentPreview.cpp
+++ b/dash/previews/StandaloneMusicPaymentPreview.cpp
@@ -146,7 +146,7 @@ TestRunner::~TestRunner ()
void TestRunner::Init ()
{
container_ = new previews::PreviewContainer(NUX_TRACKER_LOCATION);
- container_->request_close.connect([&]() { exit(0); });
+ container_->request_close.connect([this]() { exit(0); });
container_->DisableNavButton(previews::Navigation::BOTH);
DummyView* dummyView = new DummyView(container_.GetPointer());
diff --git a/dash/previews/StandaloneMusicPreview.cpp b/dash/previews/StandaloneMusicPreview.cpp
index c4680e587..bc9296321 100644
--- a/dash/previews/StandaloneMusicPreview.cpp
+++ b/dash/previews/StandaloneMusicPreview.cpp
@@ -143,14 +143,14 @@ TestRunner::TestRunner (std::string const& search_string)
nav_iter = 0;
nav_direction_ = previews::Navigation::RIGHT;
- connected.connect([&](bool connected) {
+ connected.connect([this](bool connected) {
if (connected)
{
Search(search_string_);
}
});
- results_->result_added.connect([&](Result const& result)
+ results_->result_added.connect([this](Result const& result)
{
previews::Navigation navDisabled = previews::Navigation::BOTH;
if (nav_iter < results_->count.Get() - 1)
@@ -177,7 +177,7 @@ void TestRunner::Init ()
container_ = new previews::PreviewContainer(NUX_TRACKER_LOCATION);
container_->navigate_right.connect(sigc::mem_fun(this, &TestRunner::NavRight));
container_->navigate_left.connect(sigc::mem_fun(this, &TestRunner::NavLeft));
- container_->request_close.connect([&]() { exit(0); });
+ container_->request_close.connect([this]() { exit(0); });
DummyView* dummyView = new DummyView(container_.GetPointer());
layout_ = new nux::VLayout(NUX_TRACKER_LOCATION);
@@ -186,7 +186,7 @@ void TestRunner::Init ()
container_->DisableNavButton(previews::Navigation::BOTH);
- preview_ready.connect([&](std::string const& uri, dash::Preview::Ptr preview_model)
+ preview_ready.connect([this](std::string const& uri, dash::Preview::Ptr preview_model)
{
container_->Preview(preview_model, nav_direction_);
});
diff --git a/dash/previews/StandaloneSocialPreview.cpp b/dash/previews/StandaloneSocialPreview.cpp
index 9280305e9..2ab5a76e9 100644
--- a/dash/previews/StandaloneSocialPreview.cpp
+++ b/dash/previews/StandaloneSocialPreview.cpp
@@ -144,7 +144,7 @@ void TestRunner::Init ()
container_ = new previews::PreviewContainer(NUX_TRACKER_LOCATION);
container_->navigate_right.connect(sigc::mem_fun(this, &TestRunner::NavRight));
container_->navigate_left.connect(sigc::mem_fun(this, &TestRunner::NavLeft));
- container_->request_close.connect([&]() { exit(0); });
+ container_->request_close.connect([this]() { exit(0); });
DummyView* dummyView = new DummyView(container_.GetPointer());
layout_ = new nux::VLayout(NUX_TRACKER_LOCATION);
diff --git a/dash/previews/Track.cpp b/dash/previews/Track.cpp
index a9898d61f..2bdd906d7 100644
--- a/dash/previews/Track.cpp
+++ b/dash/previews/Track.cpp
@@ -270,7 +270,7 @@ void Track::SetupViews()
mouse_enter.connect(sigc::mem_fun(this, &Track::OnTrackControlMouseEnter));
mouse_leave.connect(sigc::mem_fun(this, &Track::OnTrackControlMouseLeave));
- mouse_click.connect([&](int, int, unsigned long, unsigned long)
+ mouse_click.connect([this](int, int, unsigned long, unsigned long)
{
switch (play_state_)
{