summaryrefslogtreecommitdiff
diff options
-rw-r--r--UnityCore/DBusIndicators.cpp1
-rw-r--r--UnityCore/GLibDBusProxy.cpp2
-rw-r--r--UnityCore/GSettingsScopes.cpp2
-rw-r--r--UnityCore/Hud.cpp2
-rwxr-xr-xdash/CoverflowResultView.cpp4
-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/FilterMultiRangeButton.h2
-rw-r--r--dash/FilterRatingsButton.cpp4
-rwxr-xr-xdash/PlacesGroup.cpp4
-rw-r--r--dash/PreviewStateMachine.cpp4
-rw-r--r--dash/ResultRenderer.h1
-rw-r--r--dash/ResultRendererHorizontalTile.h1
-rw-r--r--dash/ResultRendererTile.h1
-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/DBusTestRunner.h1
-rw-r--r--dash/previews/GenericPreview.cpp2
-rw-r--r--dash/previews/LensDBusTestRunner.h4
-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.cpp5
-rw-r--r--dash/previews/StandaloneErrorPreview.cpp3
-rw-r--r--dash/previews/StandaloneMoviePreview.cpp3
-rw-r--r--dash/previews/StandaloneMusicPaymentPreview.cpp3
-rw-r--r--dash/previews/StandaloneMusicPreview.cpp9
-rw-r--r--dash/previews/StandaloneSocialPreview.cpp3
-rw-r--r--dash/previews/Track.cpp4
-rw-r--r--hud/HudButton.cpp12
-rw-r--r--hud/HudIconTextureSource.h2
-rw-r--r--hud/HudView.cpp6
-rw-r--r--hud/StandaloneHud.cpp10
-rw-r--r--launcher/BFBLauncherIcon.cpp2
-rw-r--r--launcher/EdgeBarrierController.cpp6
-rw-r--r--launcher/EdgeBarrierController.h1
-rw-r--r--launcher/FavoriteStoreGSettings.cpp2
-rw-r--r--launcher/Launcher.cpp12
-rw-r--r--launcher/LauncherDragWindow.h2
-rw-r--r--launcher/LauncherHideMachine.cpp4
-rw-r--r--launcher/LauncherIcon.cpp2
-rw-r--r--launcher/SwitcherController.cpp6
-rw-r--r--launcher/SwitcherControllerImpl.h1
-rw-r--r--launcher/TooltipManager.cpp2
-rw-r--r--panel/PanelController.cpp22
-rw-r--r--panel/PanelController.h2
-rw-r--r--panel/PanelMenuView.cpp2
-rw-r--r--panel/PanelTitlebarGrabAreaView.cpp4
-rw-r--r--panel/PanelView.cpp4
-rw-r--r--plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp6
-rw-r--r--plugins/unityshell/src/Monitor.h2
-rw-r--r--plugins/unityshell/src/UnityGestureTarget.h1
-rw-r--r--plugins/unityshell/src/WindowMinimizeSpeedController.cpp8
-rw-r--r--plugins/unityshell/src/unityshell.cpp67
-rw-r--r--tests/MockSwitcherController.h2
-rw-r--r--tests/mock-base-window.h2
-rw-r--r--tests/test-gestures/GesturalWindowSwitcherMock.h1
-rw-r--r--tests/test-gestures/UnityGestureTargetMock.h1
-rw-r--r--tests/test-gestures/test_gestural_window_switcher.cpp1
-rw-r--r--tests/test-gestures/test_gesture_broker.cpp2
-rw-r--r--tests/test-gestures/test_window_gesture_target.cpp3
-rw-r--r--tests/test_abstract_interface_generator.cpp1
-rw-r--r--tests/test_application_launcher_icon.cpp8
-rw-r--r--tests/test_dashview.cpp1
-rw-r--r--tests/test_edge_barrier_controller.cpp2
-rw-r--r--tests/test_favorite_store_gsettings.cpp2
-rw-r--r--tests/test_gsettings_scopes.cpp1
-rw-r--r--tests/test_im_text_entry.cpp2
-rw-r--r--tests/test_launcher_controller.cpp1
-rw-r--r--tests/test_launcher_drag_window.cpp1
-rw-r--r--tests/test_overlay_scrollbar.cpp2
-rw-r--r--tests/test_resultviewgrid.cpp2
-rw-r--r--tests/test_scope.cpp1
-rw-r--r--tests/test_scope_filter.cpp1
-rw-r--r--tests/test_ubus.cpp3
-rw-r--r--unity-shared/CoverArt.cpp2
-rw-r--r--unity-shared/DefaultThumbnailProvider.cpp1
-rw-r--r--unity-shared/IMTextEntry.h1
-rw-r--r--unity-shared/IconLoader.cpp2
-rw-r--r--unity-shared/IconTextureSource.h1
-rw-r--r--unity-shared/MockableBaseWindow.h1
-rw-r--r--unity-shared/OverlayWindowButtons.cpp2
-rw-r--r--unity-shared/PanelStyle.cpp8
-rw-r--r--unity-shared/PlacesOverlayVScrollBar.h1
-rw-r--r--unity-shared/PlacesVScrollBar.h2
-rw-r--r--unity-shared/RatingsButton.cpp4
-rw-r--r--unity-shared/ResizingBaseWindow.h2
-rw-r--r--unity-shared/SearchBar.cpp14
-rw-r--r--unity-shared/SearchBarSpinner.cpp2
-rw-r--r--unity-shared/TextInput.cpp4
-rw-r--r--unity-shared/TextureThumbnailProvider.cpp1
-rw-r--r--unity-shared/ThumbnailGenerator.cpp4
-rw-r--r--unity-shared/ThumbnailGenerator.h2
-rw-r--r--unity-shared/UBusServer.cpp2
-rw-r--r--unity-shared/UScreen.cpp4
-rw-r--r--unity-shared/UnityWindowView.cpp11
-rw-r--r--unity-shared/UserThumbnailProvider.cpp1
-rw-r--r--unity-shared/VScrollBarOverlayWindow.h1
-rw-r--r--unity-shared/WindowButtons.cpp6
116 files changed, 281 insertions, 227 deletions
diff --git a/UnityCore/DBusIndicators.cpp b/UnityCore/DBusIndicators.cpp
index 641867828..29b9467e0 100644
--- a/UnityCore/DBusIndicators.cpp
+++ b/UnityCore/DBusIndicators.cpp
@@ -48,6 +48,7 @@ class DBusIndicators::Impl
{
public:
Impl(std::string const& dbus_name, DBusIndicators* owner);
+ virtual ~Impl() {}
void CheckLocalService();
void RequestSyncAll();
diff --git a/UnityCore/GLibDBusProxy.cpp b/UnityCore/GLibDBusProxy.cpp
index 3ce27e590..18149f20e 100644
--- a/UnityCore/GLibDBusProxy.cpp
+++ b/UnityCore/GLibDBusProxy.cpp
@@ -136,7 +136,7 @@ void DBusProxy::Impl::StartReconnectionTimeout(unsigned timeout)
{
LOG_DEBUG(logger) << "Starting reconnection timeout for " << name_;
- auto callback = [&]
+ auto callback = [this]
{
if (!proxy_)
Connect();
diff --git a/UnityCore/GSettingsScopes.cpp b/UnityCore/GSettingsScopes.cpp
index 833040c4f..03b58590a 100644
--- a/UnityCore/GSettingsScopes.cpp
+++ b/UnityCore/GSettingsScopes.cpp
@@ -72,7 +72,7 @@ GSettingsScopesReader::Impl::Impl(GSettingsScopesReader* owner)
, loaded_(false)
, settings_(g_settings_new(SETTINGS_NAME.c_str()))
{
- auto change_func = [&] (GSettings*, gchar*)
+ auto change_func = [this] (GSettings*, gchar*)
{
if (loaded_)
{
diff --git a/UnityCore/Hud.cpp b/UnityCore/Hud.cpp
index 8883119d1..e79750c0d 100644
--- a/UnityCore/Hud.cpp
+++ b/UnityCore/Hud.cpp
@@ -52,7 +52,7 @@ public:
, parent_(parent)
{
LOG_DEBUG(logger) << "Hud init with name: " << dbus_name << "and path: " << dbus_path;
- proxy_.connected.connect([&]() {
+ proxy_.connected.connect([this]() {
LOG_DEBUG(logger) << "Hud Connected";
parent_->connected = true;
});
diff --git a/dash/CoverflowResultView.cpp b/dash/CoverflowResultView.cpp
index c0fe1f27e..b653f0936 100755
--- a/dash/CoverflowResultView.cpp
+++ b/dash/CoverflowResultView.cpp
@@ -43,7 +43,7 @@ class CoverflowResultItem : public nux::CoverflowItem
{
public:
CoverflowResultItem(Result& result, CoverflowResultView *parent, nux::CoverflowModel::Ptr model);
- ~CoverflowResultItem();
+ virtual ~CoverflowResultItem();
nux::ObjectPtr<nux::BaseTexture> GetTexture() const;
virtual void Activate(int button);
@@ -160,7 +160,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 08f572ff3..a54206e1a 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 969caa799..03783905d 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 cd3b11d1f..2e337e466 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/FilterMultiRangeButton.h b/dash/FilterMultiRangeButton.h
index 6ff734ac8..147c47a9e 100644
--- a/dash/FilterMultiRangeButton.h
+++ b/dash/FilterMultiRangeButton.h
@@ -55,7 +55,7 @@ class FilterMultiRangeButton : public nux::ToggleButton
NUX_DECLARE_OBJECT_TYPE(FilterMultiRangeButton, nux::ToggleButton);
public:
FilterMultiRangeButton (NUX_FILE_LINE_PROTO);
- ~FilterMultiRangeButton();
+ virtual ~FilterMultiRangeButton();
void SetFilter(FilterOption::Ptr const& filter);
FilterOption::Ptr GetFilter();
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 477bffdbc..3e11183fc 100755
--- a/dash/PlacesGroup.cpp
+++ b/dash/PlacesGroup.cpp
@@ -201,7 +201,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;
@@ -287,7 +287,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/ResultRenderer.h b/dash/ResultRenderer.h
index d9f3689c0..63a36bcd0 100644
--- a/dash/ResultRenderer.h
+++ b/dash/ResultRenderer.h
@@ -48,6 +48,7 @@ public:
};
ResultRenderer(NUX_FILE_LINE_PROTO);
+ virtual ~ResultRenderer() {}
virtual void Render(nux::GraphicsEngine& GfxContext,
Result& row,
diff --git a/dash/ResultRendererHorizontalTile.h b/dash/ResultRendererHorizontalTile.h
index 476c66ac7..2b9544d0c 100644
--- a/dash/ResultRendererHorizontalTile.h
+++ b/dash/ResultRendererHorizontalTile.h
@@ -39,6 +39,7 @@ public:
NUX_DECLARE_OBJECT_TYPE(ResultRendererHorizontalTile, ResultRendererTile);
ResultRendererHorizontalTile(NUX_FILE_LINE_PROTO);
+ virtual ~ResultRendererHorizontalTile() {}
virtual void Render(nux::GraphicsEngine& GfxContext,
Result& row,
diff --git a/dash/ResultRendererTile.h b/dash/ResultRendererTile.h
index 929f93f60..e556dd0e0 100644
--- a/dash/ResultRendererTile.h
+++ b/dash/ResultRendererTile.h
@@ -60,6 +60,7 @@ public:
NUX_DECLARE_OBJECT_TYPE(ResultRendererTile, ResultRenderer);
ResultRendererTile(NUX_FILE_LINE_PROTO);
+ virtual ~ResultRendererTile() {}
virtual void Render(nux::GraphicsEngine& GfxContext,
Result& row,
diff --git a/dash/ResultView.cpp b/dash/ResultView.cpp
index e41118925..556f19ab9 100644
--- a/dash/ResultView.cpp
+++ b/dash/ResultView.cpp
@@ -43,13 +43,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();
});
@@ -79,7 +79,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 1052baf80..757facca6 100644
--- a/dash/ResultViewGrid.cpp
+++ b/dash/ResultViewGrid.cpp
@@ -80,16 +80,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);
});
@@ -98,7 +98,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;
@@ -106,7 +106,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;
@@ -122,7 +122,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 bd97ae9ec..51eff3c28 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 4d7a50cfb..7fdbbb05b 100644
--- a/dash/ScopeBarIcon.cpp
+++ b/dash/ScopeBarIcon.cpp
@@ -55,7 +55,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 f8332045a..a59d874b4 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 508e65974..2bd21bcb8 100644
--- a/dash/previews/ActionButton.cpp
+++ b/dash/previews/ActionButton.cpp
@@ -75,7 +75,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 9f1438ee9..6c34b937d 100644
--- a/dash/previews/ActionLink.cpp
+++ b/dash/previews/ActionLink.cpp
@@ -80,12 +80,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 076ec8afe..6d8c6ecbe 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/DBusTestRunner.h b/dash/previews/DBusTestRunner.h
index 54b856151..95b1b9416 100644
--- a/dash/previews/DBusTestRunner.h
+++ b/dash/previews/DBusTestRunner.h
@@ -50,6 +50,7 @@ public:
proxy_->connected.connect(sigc::mem_fun(this, &DBusTestRunner::OnProxyConnectionChanged));
proxy_->disconnected.connect(sigc::mem_fun(this, &DBusTestRunner::OnProxyDisconnected));
}
+ virtual ~DBusTestRunner() {}
virtual void OnProxyConnectionChanged()
{
diff --git a/dash/previews/GenericPreview.cpp b/dash/previews/GenericPreview.cpp
index ecb1b73da..1b83d6ded 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/LensDBusTestRunner.h b/dash/previews/LensDBusTestRunner.h
index 657b006fb..6468726f1 100644
--- a/dash/previews/LensDBusTestRunner.h
+++ b/dash/previews/LensDBusTestRunner.h
@@ -46,6 +46,8 @@ public:
results_->end_transaction.connect(sigc::mem_fun(this, &ScopeDBusTestRunner::ResultsModelUpdated));
}
+ virtual ~ScopeDBusTestRunner() {}
+
void OnProxyConnectionChanged()
{
DBusTestRunner::OnProxyConnectionChanged();
@@ -258,4 +260,4 @@ protected:
} // namespace dash
} // namespace unity
-#endif // LENSDBUSTESTRUNNER_H \ No newline at end of file
+#endif // LENSDBUSTESTRUNNER_H
diff --git a/dash/previews/MoviePreview.cpp b/dash/previews/MoviePreview.cpp
index d17f779ea..4aa30069e 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 9fe6a1f36..135aeb7fc 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 f0b95f29e..49d5fbd4c 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 e9564eb71..9f27702a2 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 a1aa3cd92..69844b412 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 289fd2b8a..b73da08e6 100644
--- a/dash/previews/PreviewNavigator.cpp
+++ b/dash/previews/PreviewNavigator.cpp
@@ -140,7 +140,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 53a72ef35..1b36853e8 100644
--- a/dash/previews/PreviewRatingsWidget.cpp
+++ b/dash/previews/PreviewRatingsWidget.cpp
@@ -48,7 +48,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 1990d6669..d70538890 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 65e6f3e1c..2c096ffa4 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 3b9f37264..b11c321a2 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..7cbd9fa7c 100644
--- a/dash/previews/StandaloneApplicationPreview.cpp
+++ b/dash/previews/StandaloneApplicationPreview.cpp
@@ -65,6 +65,7 @@ public:
layout->AddView(view, 1, nux::MINOR_POSITION_CENTER);
SetLayout(layout);
}
+ virtual ~DummyView() {}
// Keyboard navigation
bool AcceptKeyNavFocus()
@@ -144,7 +145,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 +244,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..911a2ff2f 100644
--- a/dash/previews/StandaloneErrorPreview.cpp
+++ b/dash/previews/StandaloneErrorPreview.cpp
@@ -71,6 +71,7 @@ public:
layout->AddView(view, 1, nux::MINOR_POSITION_CENTER);
SetLayout(layout);
}
+ virtual ~DummyView() {}
// Keyboard navigation
bool AcceptKeyNavFocus()
@@ -147,7 +148,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..0cfc969ba 100644
--- a/dash/previews/StandaloneMoviePreview.cpp
+++ b/dash/previews/StandaloneMoviePreview.cpp
@@ -65,6 +65,7 @@ public:
layout->AddView(view, 1, nux::MINOR_POSITION_CENTER);
SetLayout(layout);
}
+ virtual ~DummyView() {}
// Keyboard navigation
bool AcceptKeyNavFocus()
@@ -143,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/StandaloneMusicPaymentPreview.cpp b/dash/previews/StandaloneMusicPaymentPreview.cpp
index 9ba2a7da9..4f21b093a 100644
--- a/dash/previews/StandaloneMusicPaymentPreview.cpp
+++ b/dash/previews/StandaloneMusicPaymentPreview.cpp
@@ -70,6 +70,7 @@ public:
layout->AddView(view, 1, nux::MINOR_POSITION_CENTER);
SetLayout(layout);
}
+ virtual ~DummyView() {}
// Keyboard navigation
bool AcceptKeyNavFocus()
@@ -146,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/StandaloneMusicPreview.cpp b/dash/previews/StandaloneMusicPreview.cpp
index c4680e587..b3c95fff1 100644
--- a/dash/previews/StandaloneMusicPreview.cpp
+++ b/dash/previews/StandaloneMusicPreview.cpp
@@ -68,6 +68,7 @@ public:
layout->AddView(view, 1, nux::MINOR_POSITION_CENTER);
SetLayout(layout);
}
+ virtual ~DummyView() {}
// Keyboard navigation
bool AcceptKeyNavFocus()
@@ -143,14 +144,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 +178,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 +187,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..cb1736f14 100644
--- a/dash/previews/StandaloneSocialPreview.cpp
+++ b/dash/previews/StandaloneSocialPreview.cpp
@@ -65,6 +65,7 @@ public:
layout->AddView(view, 1, nux::MINOR_POSITION_CENTER);
SetLayout(layout);
}
+ virtual ~DummyView() {}
// Keyboard navigation
bool AcceptKeyNavFocus()
@@ -144,7 +145,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 36d32aa34..bdaca0c7a 100644
--- a/dash/previews/Track.cpp
+++ b/dash/previews/Track.cpp
@@ -41,6 +41,7 @@ class TmpView : public nux::View
{
public:
TmpView(NUX_FILE_LINE_PROTO): View(NUX_FILE_LINE_PARAM) {}
+ virtual ~TmpView() {}
virtual void Draw(nux::GraphicsEngine& gfx_engine, bool force_draw) {}
virtual void DrawContent(nux::GraphicsEngine& gfx_engine, bool force_draw)
@@ -72,6 +73,7 @@ public:
, write_alpha_(write_alpha)
, rop_(ROP)
{}
+ virtual ~TrackProgressLayer() {}
virtual void Renderlayer(nux::GraphicsEngine& graphics_engine)
{
@@ -269,7 +271,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_)
{
diff --git a/hud/HudButton.cpp b/hud/HudButton.cpp
index bc709d041..ace27e0d1 100644
--- a/hud/HudButton.cpp
+++ b/hud/HudButton.cpp
@@ -64,28 +64,28 @@ HudButton::HudButton(NUX_FILE_LINE_DECL)
InitTheme();
- key_nav_focus_change.connect([&](nux::Area*, bool, nux::KeyNavDirection)
+ key_nav_focus_change.connect([this](nux::Area*, bool, nux::KeyNavDirection)
{
QueueDraw();
});
- fake_focused.changed.connect([&](bool)
+ fake_focused.changed.connect([this](bool)
{
QueueDraw();
});
- mouse_move.connect([&](int x, int y, int dx, int dy, unsigned int button, unsigned int key)
+ mouse_move.connect([this](int x, int y, int dx, int dy, unsigned int button, unsigned int key)
{
if (!fake_focused)
fake_focused = true;
});
- mouse_enter.connect([&](int x, int y, unsigned int button, unsigned int key)
+ mouse_enter.connect([this](int x, int y, unsigned int button, unsigned int key)
{
fake_focused = true;
});
- mouse_leave.connect([&](int x, int y, unsigned int button, unsigned int key)
+ mouse_leave.connect([this](int x, int y, unsigned int button, unsigned int key)
{
fake_focused = false;
});
@@ -93,7 +93,7 @@ HudButton::HudButton(NUX_FILE_LINE_DECL)
void HudButton::InitTheme()
{
- is_rounded.changed.connect([&](bool)
+ is_rounded.changed.connect([this](bool)
{
nux::Geometry const& geo = GetGeometry();
prelight_->Invalidate(geo);
diff --git a/hud/HudIconTextureSource.h b/hud/HudIconTextureSource.h
index 8f24ef1b1..19f4593e9 100644
--- a/hud/HudIconTextureSource.h
+++ b/hud/HudIconTextureSource.h
@@ -32,7 +32,7 @@ class HudIconTextureSource : public unity::ui::IconTextureSource
{
public:
HudIconTextureSource(nux::ObjectPtr<nux::BaseTexture> texture);
- ~HudIconTextureSource();
+ virtual ~HudIconTextureSource();
virtual nux::Color BackgroundColor() const;
virtual nux::BaseTexture* TextureForSize(int size);
diff --git a/hud/HudView.cpp b/hud/HudView.cpp
index caf449073..e7a78ce1c 100644
--- a/hud/HudView.cpp
+++ b/hud/HudView.cpp
@@ -82,7 +82,7 @@ View::View()
search_bar_->text_entry()->SetLoseKeyFocusOnKeyNavDirectionUp(false);
search_bar_->text_entry()->SetLoseKeyFocusOnKeyNavDirectionDown(false);
- search_bar_->text_entry()->key_nav_focus_change.connect([&](nux::Area *area, bool receiving, nux::KeyNavDirection direction)
+ search_bar_->text_entry()->key_nav_focus_change.connect([this](nux::Area *area, bool receiving, nux::KeyNavDirection direction)
{
// We get here when the Hud closes.
// The TextEntry should always have the keyboard focus as long as the hud is open.
@@ -238,7 +238,7 @@ void View::SetQueries(Hud::Queries queries)
button_views_->AddView(button.GetPointer(), 0, nux::MINOR_POSITION_START);
- button->click.connect([&](nux::View* view) {
+ button->click.connect([this](nux::View* view) {
query_activated.emit(dynamic_cast<HudButton*>(view)->GetQuery());
});
@@ -389,7 +389,7 @@ void View::SetupViews()
content_layout_->AddLayout(button_views_.GetPointer(), 1, nux::MINOR_POSITION_START);
}
- content_layout_->geometry_changed.connect([&](nux::Area*, nux::Geometry& geo)
+ content_layout_->geometry_changed.connect([this](nux::Area*, nux::Geometry& geo)
{
if (!timeline_animating_)
{
diff --git a/hud/StandaloneHud.cpp b/hud/StandaloneHud.cpp
index 33fbe1063..1c4c24434 100644
--- a/hud/StandaloneHud.cpp
+++ b/hud/StandaloneHud.cpp
@@ -72,7 +72,7 @@ void TestRunner::Init ()
nux::GetWindowThread()->SetLayout (layout);
// things the controller normally does
- hud_service_.queries_updated.connect([&] (unity::hud::Hud::Queries queries) {
+ hud_service_.queries_updated.connect([this] (unity::hud::Hud::Queries queries) {
hud_view_->SetQueries(queries);
std::string icon_name = "";
for (auto query = queries.begin(); query != queries.end(); query++)
@@ -89,19 +89,19 @@ void TestRunner::Init ()
});
- hud_view_->query_activated.connect([&] (unity::hud::Query::Ptr query) {
+ hud_view_->query_activated.connect([this] (unity::hud::Query::Ptr query) {
hud_service_.ExecuteQuery(query, 0);
});
- hud_view_->query_selected.connect([&] (unity::hud::Query::Ptr query) {
+ hud_view_->query_selected.connect([this] (unity::hud::Query::Ptr query) {
hud_view_->SetIcon(query->icon_name, 42, 52, 0);
});
- hud_view_->search_changed.connect([&] (std::string search_string) {
+ hud_view_->search_changed.connect([this] (std::string search_string) {
hud_service_.RequestQuery(search_string);
});
- hud_view_->search_activated.connect([&] (std::string search_string) {
+ hud_view_->search_activated.connect([this] (std::string search_string) {
hud_service_.ExecuteQueryBySearch(search_string, 0);
});
diff --git a/launcher/BFBLauncherIcon.cpp b/launcher/BFBLauncherIcon.cpp
index 15fe55cd3..d73bcac5c 100644
--- a/launcher/BFBLauncherIcon.cpp
+++ b/launcher/BFBLauncherIcon.cpp
@@ -42,7 +42,7 @@ BFBLauncherIcon::BFBLauncherIcon(LauncherHideMode hide_mode)
background_color_ = nux::color::White;
- mouse_enter.connect([&](int m) { ubus_manager_.SendMessage(UBUS_DASH_ABOUT_TO_SHOW, NULL); });
+ mouse_enter.connect([this](int m) { ubus_manager_.SendMessage(UBUS_DASH_ABOUT_TO_SHOW, NULL); });
ubus_manager_.RegisterInterest(UBUS_OVERLAY_SHOWN, sigc::bind(sigc::mem_fun(this, &BFBLauncherIcon::OnOverlayShown), true));
ubus_manager_.RegisterInterest(UBUS_OVERLAY_HIDDEN, sigc::bind(sigc::mem_fun(this, &BFBLauncherIcon::OnOverlayShown), false));
}
diff --git a/launcher/EdgeBarrierController.cpp b/launcher/EdgeBarrierController.cpp
index f310b24de..2c12e4610 100644
--- a/launcher/EdgeBarrierController.cpp
+++ b/launcher/EdgeBarrierController.cpp
@@ -87,7 +87,7 @@ EdgeBarrierController::Impl::Impl(EdgeBarrierController *parent)
ResizeBarrierList(monitors);
/* FIXME: Back to c++11 lambda once we get sigc::track_obj.
- uscreen->changed.connect(sigc::track_obj(([&](int primary, std::vector<nux::Geometry>& layout) {
+ uscreen->changed.connect(sigc::track_obj(([this](int primary, std::vector<nux::Geometry>& layout) {
ResizeBarrierList(layout);
SetupBarriers(layout);
}));*/
@@ -106,9 +106,9 @@ EdgeBarrierController::Impl::Impl(EdgeBarrierController *parent)
return false;
});
- parent_->options.changed.connect([&](launcher::Options::Ptr options) {
+ parent_->options.changed.connect([this](launcher::Options::Ptr options) {
/* FIXME: Back to c++11 lambda once we get sigc::track_obj.
- options->option_changed.connect([&]() {
+ options->option_changed.connect([this]() {
SetupBarriers(UScreen::GetDefault()->GetMonitors());
});*/
options->option_changed.connect(sigc::mem_fun(this, &EdgeBarrierController::Impl::OnOptionsChanged));
diff --git a/launcher/EdgeBarrierController.h b/launcher/EdgeBarrierController.h
index d55ffb49d..eb91f7df7 100644
--- a/launcher/EdgeBarrierController.h
+++ b/launcher/EdgeBarrierController.h
@@ -36,6 +36,7 @@ struct EdgeBarrierSubscriber
NEEDS_RELEASE
};
+ virtual ~EdgeBarrierSubscriber() {}
virtual Result HandleBarrierEvent(PointerBarrierWrapper* owner, BarrierEvent::Ptr event) = 0;
};
diff --git a/launcher/FavoriteStoreGSettings.cpp b/launcher/FavoriteStoreGSettings.cpp
index a9759917e..415a04bfe 100644
--- a/launcher/FavoriteStoreGSettings.cpp
+++ b/launcher/FavoriteStoreGSettings.cpp
@@ -49,7 +49,7 @@ FavoriteStoreGSettings::FavoriteStoreGSettings()
: ignore_signals_(false)
, settings_(g_settings_new(SETTINGS_NAME.c_str()))
{
- favorites_changed_.Connect(settings_, "changed::"+SETTINGS_KEY, [&] (GSettings*, gchar*)
+ favorites_changed_.Connect(settings_, "changed::"+SETTINGS_KEY, [this] (GSettings*, gchar*)
{
Changed();
});
diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp
index 30f732bd9..f881703d3 100644
--- a/launcher/Launcher.cpp
+++ b/launcher/Launcher.cpp
@@ -1638,12 +1638,6 @@ void Launcher::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw)
nux::Color clear_colour = nux::Color(0x00000000);
- if (Settings::Instance().GetLowGfxMode())
- {
- clear_colour = options()->background_color;
- clear_colour.alpha = 1.0f;
- }
-
// clear region
GfxContext.PushClippingRectangle(base);
gPainter.PushDrawColorLayer(GfxContext, base, clear_colour, true, ROP);
@@ -1776,6 +1770,12 @@ void Launcher::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw)
gPainter.Paint2DQuadColor(GfxContext, bkg_box, color);
}
}
+ else
+ {
+ nux::Color color = options()->background_color;
+ color.alpha = 1.0f;
+ gPainter.Paint2DQuadColor(GfxContext, bkg_box, color);
+ }
GfxContext.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);
diff --git a/launcher/LauncherDragWindow.h b/launcher/LauncherDragWindow.h
index 0d561dd47..f7a37f952 100644
--- a/launcher/LauncherDragWindow.h
+++ b/launcher/LauncherDragWindow.h
@@ -42,7 +42,7 @@ public:
typedef std::function<void(nux::GraphicsEngine&, nux::ObjectPtr<nux::IOpenGLBaseTexture> const&)> DeferredIconRenderer;
LauncherDragWindow(unsigned size, DeferredIconRenderer const&);
- ~LauncherDragWindow();
+ virtual ~LauncherDragWindow();
void SetAnimationTarget(int x, int y);
void StartQuickAnimation();
diff --git a/launcher/LauncherHideMachine.cpp b/launcher/LauncherHideMachine.cpp
index c057c2c05..f348778de 100644
--- a/launcher/LauncherHideMachine.cpp
+++ b/launcher/LauncherHideMachine.cpp
@@ -39,7 +39,7 @@ LauncherHideMachine::LauncherHideMachine()
, _should_hide(false)
, _latest_emit_should_hide(false)
{
- decaymulator_.value.changed.connect([&](int value) { reveal_progress = value / static_cast<float>(reveal_pressure); });
+ decaymulator_.value.changed.connect([this](int value) { reveal_progress = value / static_cast<float>(reveal_pressure); });
edge_decay_rate.changed.connect(sigc::mem_fun (this, &LauncherHideMachine::OnDecayRateChanged));
}
@@ -68,7 +68,7 @@ void LauncherHideMachine::SetShouldHide(bool value, bool skip_delay)
if (value && !skip_delay)
{
_hide_delay_timeout.reset(new glib::Timeout(HIDE_DELAY_TIMEOUT_LENGTH));
- _hide_delay_timeout->Run([&] () {
+ _hide_delay_timeout->Run([this] () {
EnsureHideState(true);
return false;
});
diff --git a/launcher/LauncherIcon.cpp b/launcher/LauncherIcon.cpp
index 21930cc0b..7e5679ec9 100644
--- a/launcher/LauncherIcon.cpp
+++ b/launcher/LauncherIcon.cpp
@@ -124,7 +124,7 @@ void LauncherIcon::LoadQuicklist()
_quicklist = new QuicklistView();
AddChild(_quicklist.GetPointer());
- _quicklist->mouse_down_outside_pointer_grab_area.connect([&] (int x, int y, unsigned long button_flags, unsigned long key_flags)
+ _quicklist->mouse_down_outside_pointer_grab_area.connect([this] (int x, int y, unsigned long button_flags, unsigned long key_flags)
{
_allow_quicklist_to_show = false;
});
diff --git a/launcher/SwitcherController.cpp b/launcher/SwitcherController.cpp
index 2b80e7fce..05ba0d7c2 100644
--- a/launcher/SwitcherController.cpp
+++ b/launcher/SwitcherController.cpp
@@ -301,7 +301,7 @@ Controller::Impl::Impl(Controller* obj,
};
// TODO We need to get actual timing data to suggest this is necessary.
- //sources_.AddTimeoutSeconds(construct_timeout_, [&] { ConstructWindow(); return false; }, LAZY_TIMEOUT);
+ //sources_.AddTimeoutSeconds(construct_timeout_, [this] { ConstructWindow(); return false; }, LAZY_TIMEOUT);
fade_animator_.updated.connect([this] (double opacity) {
if (view_window_)
@@ -345,8 +345,8 @@ void Controller::Impl::Show(ShowMode show, SortMode sort, std::vector<AbstractLa
if (real_wait > 0)
{
- sources_.AddIdle([&] { ConstructView(); return false; }, VIEW_CONSTRUCT_IDLE);
- sources_.AddTimeout(real_wait, [&] { ShowView(); return false; }, SHOW_TIMEOUT);
+ sources_.AddIdle([this] { ConstructView(); return false; }, VIEW_CONSTRUCT_IDLE);
+ sources_.AddTimeout(real_wait, [this] { ShowView(); return false; }, SHOW_TIMEOUT);
}
else
{
diff --git a/launcher/SwitcherControllerImpl.h b/launcher/SwitcherControllerImpl.h
index 1088208c8..2bba90e99 100644
--- a/launcher/SwitcherControllerImpl.h
+++ b/launcher/SwitcherControllerImpl.h
@@ -44,6 +44,7 @@ struct Controller::Impl : public sigc::trackable
Impl(Controller* obj,
unsigned int load_timeout,
Controller::WindowCreator const& create_window);
+ virtual ~Impl() {}
void Show(ShowMode show, SortMode sort, std::vector<launcher::AbstractLauncherIcon::Ptr> results);
void Hide(bool accept_state);
diff --git a/launcher/TooltipManager.cpp b/launcher/TooltipManager.cpp
index 94044b0a4..3fab52457 100644
--- a/launcher/TooltipManager.cpp
+++ b/launcher/TooltipManager.cpp
@@ -86,7 +86,7 @@ void TooltipManager::Reset()
void TooltipManager::ResetTimer(AbstractLauncherIcon::Ptr const& icon_under_mouse)
{
hover_timer_.reset(new glib::Timeout(TOOLTIPS_SHOW_TIMEOUT_LENGTH));
- hover_timer_->Run([&] () {
+ hover_timer_->Run([this, icon_under_mouse] () {
skip_timeout_ = true;
icon_under_mouse->ShowTooltip();
return false;
diff --git a/panel/PanelController.cpp b/panel/PanelController.cpp
index bb4100ebc..102a51f83 100644
--- a/panel/PanelController.cpp
+++ b/panel/PanelController.cpp
@@ -45,8 +45,6 @@ public:
void FirstMenuShow();
void QueueRedraw();
- std::vector<nux::Geometry> GetGeometries() const;
-
// NOTE: nux::Property maybe?
void SetLauncherWidth(int width);
void SetOpacity(float opacity);
@@ -59,6 +57,7 @@ public:
nux::ObjectPtr<PanelView> CreatePanel(Introspectable *iobj);
void OnScreenChanged(unsigned int primary_monitor, std::vector<nux::Geometry>& monitors, Introspectable *iobj);
+ void UpdatePanelGeometries();
typedef nux::ObjectPtr<nux::BaseWindow> BaseWindowPtr;
@@ -66,6 +65,7 @@ public:
ui::EdgeBarrierController::Ptr edge_barriers_;
PanelVector panels_;
+ std::vector<nux::Geometry> panel_geometries_;
std::vector<Window> tray_xids_;
float opacity_;
bool opacity_maximized_toggle_;
@@ -102,16 +102,14 @@ Controller::Impl::~Impl()
}
}
-std::vector<nux::Geometry> Controller::Impl::GetGeometries() const
+void Controller::Impl::UpdatePanelGeometries()
{
- std::vector<nux::Geometry> geometries;
+ panel_geometries_.reserve(panels_.size());
for (auto const& panel : panels_)
{
- geometries.push_back(panel->GetAbsoluteGeometry());
+ panel_geometries_.push_back(panel->GetAbsoluteGeometry());
}
-
- return geometries;
}
void Controller::Impl::FirstMenuShow()
@@ -212,11 +210,12 @@ void Controller::Impl::OnScreenChanged(unsigned int primary_monitor,
}
panels_[i]->SetMonitor(i);
+ panels_[i]->geometry_changed.connect([this] (nux::Area*, nux::Geometry&) { UpdatePanelGeometries(); });
tray_xids_[i] = panels_[i]->GetTrayXid();
edge_barriers_->AddHorizontalSubscriber(panels_[i].GetPointer(), panels_[i]->GetMonitor());
}
-
+
for (unsigned int i = last_panel; i < panels_size; ++i)
{
auto const& panel = panels_[i];
@@ -229,6 +228,7 @@ void Controller::Impl::OnScreenChanged(unsigned int primary_monitor,
}
panels_.resize(num_panels);
+ UpdatePanelGeometries();
}
@@ -287,7 +287,7 @@ Controller::Controller(ui::EdgeBarrierController::Ptr const& edge_barriers)
screen->changed.connect(sigc::mem_fun(this, &Controller::OnScreenChanged));
OnScreenChanged(screen->GetPrimaryMonitor(), screen->GetMonitors());
- launcher_width.changed.connect([&] (int width)
+ launcher_width.changed.connect([this] (int width)
{
pimpl->SetLauncherWidth(width);
});
@@ -334,9 +334,9 @@ Controller::PanelVector& Controller::panels() const
return pimpl->panels_;
}
-std::vector<nux::Geometry> Controller::GetGeometries() const
+std::vector<nux::Geometry> const& Controller::GetGeometries() const
{
- return pimpl->GetGeometries();
+ return pimpl->panel_geometries_;
}
float Controller::opacity() const
diff --git a/panel/PanelController.h b/panel/PanelController.h
index cab3f5e25..9208dde66 100644
--- a/panel/PanelController.h
+++ b/panel/PanelController.h
@@ -47,7 +47,7 @@ public:
std::vector<Window> const& GetTrayXids() const;
PanelVector& panels() const;
- std::vector<nux::Geometry> GetGeometries() const;
+ std::vector<nux::Geometry> const& GetGeometries() const;
nux::Property<int> launcher_width;
diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp
index 0c60efffe..402cef816 100644
--- a/panel/PanelMenuView.cpp
+++ b/panel/PanelMenuView.cpp
@@ -88,7 +88,7 @@ PanelMenuView::PanelMenuView()
SetupWindowManagerSignals();
SetupUBusManagerInterests();
- style_changed_connection_ = panel::Style::Instance().changed.connect([&] {
+ style_changed_connection_ = panel::Style::Instance().changed.connect([this] {
window_buttons_->ComputeContentSize();
layout_->SetLeftAndRightPadding(window_buttons_->GetContentWidth(), 0);
diff --git a/panel/PanelTitlebarGrabAreaView.cpp b/panel/PanelTitlebarGrabAreaView.cpp
index 5f4e895a7..6dce7602b 100644
--- a/panel/PanelTitlebarGrabAreaView.cpp
+++ b/panel/PanelTitlebarGrabAreaView.cpp
@@ -48,7 +48,7 @@ PanelTitlebarGrabArea::PanelTitlebarGrabArea()
mouse_up.connect(sigc::mem_fun(this, &PanelTitlebarGrabArea::OnMouseUp));
mouse_drag.connect(sigc::mem_fun(this, &PanelTitlebarGrabArea::OnGrabMove));
- mouse_double_click.connect([&] (int x, int y, unsigned long button_flags, unsigned long)
+ mouse_double_click.connect([this] (int x, int y, unsigned long button_flags, unsigned long)
{
if (nux::GetEventButton(button_flags) == 1)
restore_request.emit(x, y);
@@ -101,7 +101,7 @@ void PanelTitlebarGrabArea::OnMouseDown(int x, int y, unsigned long button_flags
mouse_down_point_.y = y;
mouse_down_timer_.reset(new glib::Timeout(MOUSE_DOWN_TIMEOUT));
- mouse_down_timer_->Run([&] () {
+ mouse_down_timer_->Run([this] () {
if (!grab_started_)
{
nux::Point const& mouse = nux::GetGraphicsDisplay()->GetMouseScreenCoord();
diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp
index ce1f33882..b8b663ae5 100644
--- a/panel/PanelView.cpp
+++ b/panel/PanelView.cpp
@@ -118,7 +118,7 @@ PanelView::PanelView(MockableBaseWindow* parent, indicator::DBusIndicators::Ptr
ubus_manager_.RegisterInterest(UBUS_OVERLAY_HIDDEN, sigc::mem_fun(this, &PanelView::OnOverlayHidden));
ubus_manager_.RegisterInterest(UBUS_OVERLAY_SHOWN, sigc::mem_fun(this, &PanelView::OnOverlayShown));
- ubus_manager_.RegisterInterest(UBUS_DASH_SIZE_CHANGED, [&] (GVariant *data) {
+ ubus_manager_.RegisterInterest(UBUS_DASH_SIZE_CHANGED, [this] (GVariant *data) {
int width, height;
g_variant_get(data, "(ii)", &width, &height);
stored_dash_width_ = width;
@@ -707,7 +707,7 @@ void PanelView::SetOpacityMaximizedToggle(bool enabled)
if (enabled)
{
WindowManager& win_manager = WindowManager::Default();
- auto update_bg_lambda = [&](guint32) { ForceUpdateBackground(); };
+ auto update_bg_lambda = [this](guint32) { ForceUpdateBackground(); };
auto conn = &maximized_opacity_toggle_connections_;
conn->Add(win_manager.window_minimized.connect(update_bg_lambda));
diff --git a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp
index c4ff2c333..08b811e02 100644
--- a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp
+++ b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handles.cpp
@@ -373,7 +373,7 @@ UnityMTGrabHandlesScreen::donePaint()
{
if (handles->needsAnimate())
{
- handles->forEachHandle ([&](const unity::MT::GrabHandle::Ptr &h)
+ handles->forEachHandle ([this](const unity::MT::GrabHandle::Ptr &h)
{
h->damage (nux::Geometry (h->x (),
h->y (),
@@ -422,7 +422,7 @@ UnityMTGrabHandlesWindow::allowHandles()
void
UnityMTGrabHandlesWindow::getOutputExtents(CompWindowExtents& output)
{
- auto f = [&] (const unity::MT::GrabHandle::Ptr &h)
+ auto f = [this, &output] (const unity::MT::GrabHandle::Ptr &h)
{
output.left = std::max (window->borderRect().left() + h->width () / 2, static_cast <unsigned int> (output.left));
output.right = std::max (window->borderRect().right() + h->width () / 2, static_cast <unsigned int> (output.right));
@@ -630,7 +630,7 @@ UnityMTGrabHandlesWindow::restackHandles()
if (!mHandles)
return;
- mHandles->forEachHandle ([&](const unity::MT::GrabHandle::Ptr &h)
+ mHandles->forEachHandle ([this](const unity::MT::GrabHandle::Ptr &h)
{ h->reposition (0, 0, unity::MT::PositionLock); });
}
diff --git a/plugins/unityshell/src/Monitor.h b/plugins/unityshell/src/Monitor.h
index ee6dfa6b9..11a28c456 100644
--- a/plugins/unityshell/src/Monitor.h
+++ b/plugins/unityshell/src/Monitor.h
@@ -29,6 +29,8 @@ namespace performance {
class Monitor
{
public:
+ virtual ~Monitor() {}
+
void Start();
GVariant* Stop();
virtual std::string GetName() const = 0;
diff --git a/plugins/unityshell/src/UnityGestureTarget.h b/plugins/unityshell/src/UnityGestureTarget.h
index f47996e63..574ba0148 100644
--- a/plugins/unityshell/src/UnityGestureTarget.h
+++ b/plugins/unityshell/src/UnityGestureTarget.h
@@ -34,6 +34,7 @@ class UnityGestureTarget : public nux::GestureTarget
{
public:
UnityGestureTarget();
+ virtual ~UnityGestureTarget() {}
virtual nux::GestureDeliveryRequest GestureEvent(const nux::GestureEvent &event);
diff --git a/plugins/unityshell/src/WindowMinimizeSpeedController.cpp b/plugins/unityshell/src/WindowMinimizeSpeedController.cpp
index a605b93f2..29df106fa 100644
--- a/plugins/unityshell/src/WindowMinimizeSpeedController.cpp
+++ b/plugins/unityshell/src/WindowMinimizeSpeedController.cpp
@@ -42,22 +42,22 @@ WindowMinimizeSpeedController::WindowMinimizeSpeedController()
, _duration(200) // going to be overridden anyway, but at least it is initialised
{
_minimize_count_changed.Connect(_settings, "changed::minimize-count",
- [&] (GSettings*, gchar* name) {
+ [this] (GSettings*, gchar* name) {
_minimize_count = g_settings_get_int(_settings, name);
SetDuration();
});
_minimize_speed_threshold_changed.Connect(_settings, "changed::minimize-speed-threshold",
- [&] (GSettings*, gchar* name) {
+ [this] (GSettings*, gchar* name) {
_minimize_speed_threshold = g_settings_get_int(_settings, name);
SetDuration();
});
_minimize_fast_duration_changed.Connect(_settings, "changed::minimize-fast-duration",
- [&] (GSettings*, gchar* name) {
+ [this] (GSettings*, gchar* name) {
_minimize_fast_duration = g_settings_get_int(_settings, name);
SetDuration();
});
_minimize_slow_duration_changed.Connect(_settings, "changed::minimize-slow-duration",
- [&] (GSettings*, gchar* name) {
+ [this] (GSettings*, gchar* name) {
_minimize_slow_duration = g_settings_get_int(_settings, name);
SetDuration();
});
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index ed7fc32f3..0fe0836a3 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -396,7 +396,7 @@ UnityScreen::UnityScreen(CompScreen* screen)
BackgroundEffectHelper::updates_enabled = true;
- ubus_manager_.RegisterInterest(UBUS_OVERLAY_SHOWN, [&](GVariant * data)
+ ubus_manager_.RegisterInterest(UBUS_OVERLAY_SHOWN, [this](GVariant * data)
{
unity::glib::String overlay_identity;
gboolean can_maximise = FALSE;
@@ -548,16 +548,16 @@ void UnityScreen::EnsureSuperKeybindings()
void UnityScreen::CreateSuperNewAction(char shortcut, impl::ActionModifiers flag)
{
- CompActionPtr action(new CompAction());
- const std::string key(optionGetShowLauncher().keyToString());
+ CompActionPtr action(new CompAction());
+ const std::string key(optionGetShowLauncher().keyToString());
- CompAction::KeyBinding binding;
- binding.fromString(impl::CreateActionString(key, shortcut, flag));
+ CompAction::KeyBinding binding;
+ binding.fromString(impl::CreateActionString(key, shortcut, flag));
- action->setKey(binding);
+ action->setKey(binding);
- screen->addAction(action.get());
- _shortcut_actions.push_back(action);
+ screen->addAction(action.get());
+ _shortcut_actions.push_back(action);
}
void UnityScreen::nuxPrologue()
@@ -569,16 +569,6 @@ void UnityScreen::nuxPrologue()
* bit, but we do that here in order to workaround a bug (?) in the NVIDIA
* drivers (lp:703140). */
glDisable(GL_LIGHTING);
-
- /* reset matrices */
- glPushAttrib(GL_VIEWPORT_BIT | GL_ENABLE_BIT |
- GL_TEXTURE_BIT | GL_COLOR_BUFFER_BIT | GL_SCISSOR_BIT);
-
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
-
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
#endif
glGetError();
@@ -587,30 +577,18 @@ void UnityScreen::nuxPrologue()
void UnityScreen::nuxEpilogue()
{
#ifndef USE_GLES
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glDepthRange(0, 1);
- glViewport(-1, -1, 2, 2);
- glRasterPos2f(0, 0);
-
- gScreen->resetRasterPos();
-
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-
- glPopAttrib();
+ /* In some unknown place inside nux drawing we change the viewport without
+ * setting it back to the default one, so we need to restore it before allowing
+ * compiz to take the scene */
+ auto* o = _last_output;
+ glViewport(o->x(), screen->height() - o->y2(), o->width(), o->height());
glDepthRange(0, 1);
#else
glDepthRangef(0, 1);
- gScreen->resetRasterPos();
#endif
+ gScreen->resetRasterPos();
glDisable(GL_SCISSOR_TEST);
}
@@ -1016,7 +994,7 @@ bool UnityScreen::DoesPointIntersectUnityGeos(nux::Point const& pt)
}
}
- for (nux::Geometry &panel_geo : panel_controller_->GetGeometries ())
+ for (nux::Geometry const& panel_geo : panel_controller_->GetGeometries ())
{
if (panel_geo.IsInside(pt))
{
@@ -1372,10 +1350,6 @@ void UnityScreen::glPaintTransformedOutput(const GLScreenPaintAttrib& attrib,
ignore_redraw_request_ = true;
compizDamageNux(CompRegionRef(output->region()));
ignore_redraw_request_ = false;
-
- /* Fetch all the presentation list geometries - this will have the side
- * effect of clearing any built-up damage state */
- std::vector<nux::Geometry> dirty = wt->GetPresentationListGeometries();
}
gScreen->glPaintTransformedOutput(attrib, transform, region, output, mask);
@@ -1570,17 +1544,18 @@ void UnityScreen::compizDamageNux(CompRegion const& damage)
}
/* Grab changed nux regions and add damage rects for them */
-void UnityScreen::determineNuxDamage(CompRegion &nux_damage)
+void UnityScreen::determineNuxDamage(CompRegion& nux_damage)
{
/* Fetch all the dirty geometry from nux and aggregate it */
- std::vector<nux::Geometry> dirty = wt->GetPresentationListGeometries();
+ auto const& dirty = wt->GetPresentationListGeometries();
+ auto const& panels_geometries = panel_controller_->GetGeometries();
for (auto const& dirty_geo : dirty)
{
nux_damage += CompRegionFromNuxGeo(dirty_geo);
/* Special case, we need to redraw the panel shadow on panel updates */
- for (auto const& panel_geo : panel_controller_->GetGeometries())
+ for (auto const& panel_geo : panels_geometries)
{
if (!dirty_geo.IsIntersecting(panel_geo))
continue;
@@ -2941,7 +2916,7 @@ void UnityWindow::windowNotify(CompWindowNotify n)
if (window->type() == CompWindowTypeDesktopMask) {
if (!focus_desktop_timeout_)
{
- focus_desktop_timeout_.reset(new glib::Timeout(1000, [&] {
+ focus_desktop_timeout_.reset(new glib::Timeout(1000, [this] {
for (CompWindow *w : screen->clientList())
{
if (!(w->type() & NO_FOCUS_MASK) && w->focus ())
@@ -3321,7 +3296,7 @@ void UnityScreen::ScheduleRelayout(guint timeout)
{
if (!sources_.GetSource(local::RELAYOUT_TIMEOUT))
{
- sources_.AddTimeout(timeout, [&] {
+ sources_.AddTimeout(timeout, [this] {
NeedsRelayout();
Relayout();
diff --git a/tests/MockSwitcherController.h b/tests/MockSwitcherController.h
index 83c4e0d47..4425fc486 100644
--- a/tests/MockSwitcherController.h
+++ b/tests/MockSwitcherController.h
@@ -37,6 +37,8 @@ class MockSwitcherController : public Controller::Impl
public:
typedef std::shared_ptr <MockSwitcherController> Ptr;
+ virtual ~MockSwitcherController() {}
+
MOCK_METHOD3(Show, void(ShowMode, SortMode, std::vector<launcher::AbstractLauncherIcon::Ptr>));
MOCK_METHOD1(Hide, void(bool));
MOCK_METHOD0(Visible, bool());
diff --git a/tests/mock-base-window.h b/tests/mock-base-window.h
index 39e19a9c5..ef2029b0a 100644
--- a/tests/mock-base-window.h
+++ b/tests/mock-base-window.h
@@ -42,6 +42,8 @@ public:
: MockBaseWindow([](nux::Geometry const& geo) { return geo; }, name)
{}
+ virtual ~MockBaseWindow() {}
+
MOCK_METHOD2(ShowWindow, void(bool, bool));
MOCK_METHOD1(SetOpacity, void(float));
};
diff --git a/tests/test-gestures/GesturalWindowSwitcherMock.h b/tests/test-gestures/GesturalWindowSwitcherMock.h
index b21a2f7b6..3faac2812 100644
--- a/tests/test-gestures/GesturalWindowSwitcherMock.h
+++ b/tests/test-gestures/GesturalWindowSwitcherMock.h
@@ -28,6 +28,7 @@ class GesturalWindowSwitcherMock : public nux::GestureTarget
{
public:
GesturalWindowSwitcherMock() {}
+ virtual ~GesturalWindowSwitcherMock() {}
virtual nux::GestureDeliveryRequest GestureEvent(const nux::GestureEvent &event)
{
diff --git a/tests/test-gestures/UnityGestureTargetMock.h b/tests/test-gestures/UnityGestureTargetMock.h
index 9fd621fb8..15d9bff4a 100644
--- a/tests/test-gestures/UnityGestureTargetMock.h
+++ b/tests/test-gestures/UnityGestureTargetMock.h
@@ -6,6 +6,7 @@
class UnityGestureTargetMock : public nux::GestureTarget
{
public:
+ virtual ~UnityGestureTargetMock() {}
virtual nux::GestureDeliveryRequest GestureEvent(const nux::GestureEvent &event)
{
return nux::GestureDeliveryRequest::NONE;
diff --git a/tests/test-gestures/test_gestural_window_switcher.cpp b/tests/test-gestures/test_gestural_window_switcher.cpp
index be0586992..2731b392b 100644
--- a/tests/test-gestures/test_gestural_window_switcher.cpp
+++ b/tests/test-gestures/test_gestural_window_switcher.cpp
@@ -30,6 +30,7 @@ using namespace unity;
class GesturalWindowSwitcherTest: public ::testing::Test
{
public:
+ virtual ~GesturalWindowSwitcherTest() {}
virtual void SetUp()
{
unity_screen = unity::UnityScreenMock::get(screen_mock);
diff --git a/tests/test-gestures/test_gesture_broker.cpp b/tests/test-gestures/test_gesture_broker.cpp
index 0dc8cb477..392aa1560 100644
--- a/tests/test-gestures/test_gesture_broker.cpp
+++ b/tests/test-gestures/test_gesture_broker.cpp
@@ -27,6 +27,8 @@
class GestureBrokerTest : public ::testing::Test
{
+ public:
+ virtual ~GestureBrokerTest() {}
protected:
virtual void SetUp()
{
diff --git a/tests/test-gestures/test_window_gesture_target.cpp b/tests/test-gestures/test_window_gesture_target.cpp
index 4491a9ca3..d5da9a617 100644
--- a/tests/test-gestures/test_window_gesture_target.cpp
+++ b/tests/test-gestures/test_window_gesture_target.cpp
@@ -26,6 +26,9 @@
class WindowGestureTargetTest : public ::testing::Test
{
+ public:
+ virtual ~WindowGestureTargetTest() {}
+
protected:
virtual void SetUp()
{
diff --git a/tests/test_abstract_interface_generator.cpp b/tests/test_abstract_interface_generator.cpp
index ab95fa7a0..007fe27cd 100644
--- a/tests/test_abstract_interface_generator.cpp
+++ b/tests/test_abstract_interface_generator.cpp
@@ -33,6 +33,7 @@ class AbstractObject
{
public:
+ virtual ~AbstractObject() {}
virtual void check() const = 0;
};
diff --git a/tests/test_application_launcher_icon.cpp b/tests/test_application_launcher_icon.cpp
index ee69ec7fe..4dbb955ce 100644
--- a/tests/test_application_launcher_icon.cpp
+++ b/tests/test_application_launcher_icon.cpp
@@ -85,6 +85,8 @@ MATCHER_P(AreArgsEqual, a, "")
struct TestApplicationLauncherIcon : testmocks::TestUnityAppBase
{
+ virtual ~TestApplicationLauncherIcon() {}
+
virtual void SetUp() override
{
usc_app = std::make_shared<MockApplication::Nice>(USC_DESKTOP, "softwarecenter");
@@ -982,7 +984,11 @@ TEST_F(TestApplicationLauncherIcon, QuicklistMenuItemRemoteIgnoresInvisible)
EXPECT_FALSE(HasMenuItemWithLabel(mock_icon, "InvisibleLabel"));
}
-struct QuitLabel : TestApplicationLauncherIcon, testing::WithParamInterface<std::string> {};
+struct QuitLabel : TestApplicationLauncherIcon, testing::WithParamInterface<std::string>
+{
+ virtual ~QuitLabel() {}
+};
+
INSTANTIATE_TEST_CASE_P(TestApplicationLauncherIcon, QuitLabel, testing::Values("Quit", "Exit", "Close"));
TEST_P(/*TestApplicationLauncherIcon*/QuitLabel, QuicklistMenuItemRemoteOverridesQuitByLabelNotRunning)
diff --git a/tests/test_dashview.cpp b/tests/test_dashview.cpp
index a41def09d..16e54c839 100644
--- a/tests/test_dashview.cpp
+++ b/tests/test_dashview.cpp
@@ -68,6 +68,7 @@ public:
TestDashView()
: application_starter_(std::make_shared<MockApplicationStarter>())
{}
+ virtual ~TestDashView() {}
virtual void SetUp() { Utils::init_gsettings_test_environment(); }
virtual void TearDown() { Utils::reset_gsettings_test_environment(); }
diff --git a/tests/test_edge_barrier_controller.cpp b/tests/test_edge_barrier_controller.cpp
index 3b0593bf7..f17cfa0ab 100644
--- a/tests/test_edge_barrier_controller.cpp
+++ b/tests/test_edge_barrier_controller.cpp
@@ -71,6 +71,8 @@ namespace ui {
class TestEdgeBarrierController : public Test
{
public:
+ virtual ~TestEdgeBarrierController() {}
+
virtual void SetUp()
{
bc.options = std::make_shared<launcher::Options>();
diff --git a/tests/test_favorite_store_gsettings.cpp b/tests/test_favorite_store_gsettings.cpp
index d4bdc161f..1e0769218 100644
--- a/tests/test_favorite_store_gsettings.cpp
+++ b/tests/test_favorite_store_gsettings.cpp
@@ -73,6 +73,8 @@ public:
std::unique_ptr<internal::FavoriteStoreGSettings> favorite_store;
glib::Object<GSettings> gsettings_client;
+ virtual ~TestFavoriteStoreGSettings() {}
+
virtual void SetUp()
{
// set the data directory so gsettings can find the schema
diff --git a/tests/test_gsettings_scopes.cpp b/tests/test_gsettings_scopes.cpp
index f71bfca54..18452b398 100644
--- a/tests/test_gsettings_scopes.cpp
+++ b/tests/test_gsettings_scopes.cpp
@@ -52,6 +52,7 @@ class TestGSettingsScopes : public testing::Test
public:
TestGSettingsScopes():scope_added(0),scope_removed(0),scopes_reordered(0)
{}
+ virtual ~TestGSettingsScopes() {}
virtual void SetUp() { Utils::init_gsettings_test_environment(); }
virtual void TearDown() { Utils::reset_gsettings_test_environment(); }
diff --git a/tests/test_im_text_entry.cpp b/tests/test_im_text_entry.cpp
index ba4b325f3..a0d6e9b52 100644
--- a/tests/test_im_text_entry.cpp
+++ b/tests/test_im_text_entry.cpp
@@ -45,6 +45,8 @@ struct TestEvent : nux::Event
struct MockTextEntry : public unity::IMTextEntry
{
+ virtual ~MockTextEntry() {}
+
MOCK_METHOD0(CutClipboard, void());
MOCK_METHOD0(CopyClipboard, void());
MOCK_METHOD0(PasteClipboard, void());
diff --git a/tests/test_launcher_controller.cpp b/tests/test_launcher_controller.cpp
index d71e701d3..e2ddb8bdf 100644
--- a/tests/test_launcher_controller.cpp
+++ b/tests/test_launcher_controller.cpp
@@ -215,6 +215,7 @@ struct TestLauncherController : testmocks::TestUnityAppBase
, edge_barriers_(std::make_shared<ui::EdgeBarrierController>())
, lc(xdnd_manager_, edge_barriers_)
{}
+ virtual ~TestLauncherController() {}
virtual void SetUp()
{
diff --git a/tests/test_launcher_drag_window.cpp b/tests/test_launcher_drag_window.cpp
index cd5f10b27..06e31587f 100644
--- a/tests/test_launcher_drag_window.cpp
+++ b/tests/test_launcher_drag_window.cpp
@@ -43,6 +43,7 @@ struct StubLauncherDragWindow : public LauncherDragWindow
{
struct DrawCallback
{
+ virtual ~DrawCallback() {}
MOCK_METHOD0(callback, void());
};
diff --git a/tests/test_overlay_scrollbar.cpp b/tests/test_overlay_scrollbar.cpp
index 94cec0ad7..6d38d87dd 100644
--- a/tests/test_overlay_scrollbar.cpp
+++ b/tests/test_overlay_scrollbar.cpp
@@ -97,6 +97,8 @@ class MockScrollBar : public unity::dash::PlacesOverlayVScrollBar
});
}
+ virtual ~MockScrollBar() {}
+
// ScrollDown/Up moves the mouse over the overlay scroll bar, then
// moves it down/up by scroll_dy
void ScrollDown(int scroll_dy)
diff --git a/tests/test_resultviewgrid.cpp b/tests/test_resultviewgrid.cpp
index 2fff84594..b95067217 100644
--- a/tests/test_resultviewgrid.cpp
+++ b/tests/test_resultviewgrid.cpp
@@ -48,6 +48,8 @@ public:
class TestResultViewGrid : public Test
{
public:
+ virtual ~TestResultViewGrid() {}
+
virtual void SetUp()
{
view = new NiceMock<MockResultViewGrid>();
diff --git a/tests/test_scope.cpp b/tests/test_scope.cpp
index 46bdf5e9d..ce2c20c46 100644
--- a/tests/test_scope.cpp
+++ b/tests/test_scope.cpp
@@ -49,6 +49,7 @@ class TestScope : public Test
{
public:
TestScope() { }
+ virtual ~TestScope() {}
virtual void SetUp()
{
diff --git a/tests/test_scope_filter.cpp b/tests/test_scope_filter.cpp
index dcef474e8..e66e1a8c1 100644
--- a/tests/test_scope_filter.cpp
+++ b/tests/test_scope_filter.cpp
@@ -51,6 +51,7 @@ class TestScopeFilter : public ::testing::Test
{
public:
TestScopeFilter() { }
+ virtual ~TestScopeFilter() {}
virtual void SetUp()
{
diff --git a/tests/test_ubus.cpp b/tests/test_ubus.cpp
index 1427359e9..1ca4b89a4 100644
--- a/tests/test_ubus.cpp
+++ b/tests/test_ubus.cpp
@@ -43,6 +43,8 @@ struct TestUBusServer : public testing::Test
unsigned callback_call_count;
glib::Variant last_msg_variant;
+ virtual ~TestUBusServer() {}
+
virtual void SetUp()
{
callback_called = false;
@@ -73,6 +75,7 @@ struct TestUBusManager : public testing::Test
unsigned callback_call_count;
glib::Variant last_msg_variant;
+ virtual ~TestUBusManager() {}
virtual void SetUp()
{
callback_called = false;
diff --git a/unity-shared/CoverArt.cpp b/unity-shared/CoverArt.cpp
index 2399214d6..99f003b8f 100644
--- a/unity-shared/CoverArt.cpp
+++ b/unity-shared/CoverArt.cpp
@@ -160,7 +160,7 @@ void CoverArt::StartWaiting()
rotate_matrix_.Rotate_z(0.0f);
rotation_ = 0.0f;
- spinner_timeout_.reset(new glib::TimeoutSeconds(IMAGE_TIMEOUT, [&]
+ spinner_timeout_.reset(new glib::TimeoutSeconds(IMAGE_TIMEOUT, [this]
{
StopWaiting();
diff --git a/unity-shared/DefaultThumbnailProvider.cpp b/unity-shared/DefaultThumbnailProvider.cpp
index 7545b21e5..5d16b4744 100644
--- a/unity-shared/DefaultThumbnailProvider.cpp
+++ b/unity-shared/DefaultThumbnailProvider.cpp
@@ -36,6 +36,7 @@ public:
DefaultThumbnailer(std::string const& name)
: name(name)
{}
+ virtual ~DefaultThumbnailer() {}
std::string name;
diff --git a/unity-shared/IMTextEntry.h b/unity-shared/IMTextEntry.h
index b39b37b85..086b23e51 100644
--- a/unity-shared/IMTextEntry.h
+++ b/unity-shared/IMTextEntry.h
@@ -32,6 +32,7 @@ class IMTextEntry : public nux::TextEntry
NUX_DECLARE_OBJECT_TYPE(IMTextEntry, nux::TextEntry);
public:
IMTextEntry();
+ virtual ~IMTextEntry() {}
bool im_preedit();
protected:
diff --git a/unity-shared/IconLoader.cpp b/unity-shared/IconLoader.cpp
index ee7db98df..bfa03fae7 100644
--- a/unity-shared/IconLoader.cpp
+++ b/unity-shared/IconLoader.cpp
@@ -830,7 +830,7 @@ IconLoader::Impl::Impl()
, theme_(::gtk_icon_theme_get_default())
, handle_counter_(0)
{
- theme_changed_signal_.Connect(theme_, "changed", [&] (GtkIconTheme*) {
+ theme_changed_signal_.Connect(theme_, "changed", [this] (GtkIconTheme*) {
/* Since the theme has been changed we can clear the cache, however we
* could include two improvements here:
* 1) clear only the themed icons in cache
diff --git a/unity-shared/IconTextureSource.h b/unity-shared/IconTextureSource.h
index 9388c979a..2a81c0902 100644
--- a/unity-shared/IconTextureSource.h
+++ b/unity-shared/IconTextureSource.h
@@ -46,6 +46,7 @@ public:
};
IconTextureSource();
+ virtual ~IconTextureSource() {}
std::vector<nux::Vector4> & GetTransform(TransformIndex index, int monitor);
diff --git a/unity-shared/MockableBaseWindow.h b/unity-shared/MockableBaseWindow.h
index fb52eef06..3fa051b12 100644
--- a/unity-shared/MockableBaseWindow.h
+++ b/unity-shared/MockableBaseWindow.h
@@ -37,6 +37,7 @@ public:
: nux::BaseWindow(window_name, NUX_TRACKER_LOCATION)
, struts_enabled_(false)
{}
+ virtual ~MockableBaseWindow() {}
/**
* Sets the window opacity.
diff --git a/unity-shared/OverlayWindowButtons.cpp b/unity-shared/OverlayWindowButtons.cpp
index 5e498ba52..97616548e 100644
--- a/unity-shared/OverlayWindowButtons.cpp
+++ b/unity-shared/OverlayWindowButtons.cpp
@@ -36,7 +36,7 @@ OverlayWindowButtons::OverlayWindowButtons()
: nux::BaseWindow("OverlayWindowButtons")
, window_buttons_(new WindowButtons())
{
- window_buttons_->queue_draw.connect([&] (nux::Layout* /*layout*/) {
+ window_buttons_->queue_draw.connect([this] (nux::Layout* /*layout*/) {
QueueDraw();
});
diff --git a/unity-shared/PanelStyle.cpp b/unity-shared/PanelStyle.cpp
index ba0768224..5ce50c1fa 100644
--- a/unity-shared/PanelStyle.cpp
+++ b/unity-shared/PanelStyle.cpp
@@ -96,22 +96,22 @@ Style::Style()
GtkSettings* settings = gtk_settings_get_default();
_style_changed_signal.Connect(settings, "notify::gtk-theme-name",
- [&] (GtkSettings*, GParamSpec*) {
+ [this] (GtkSettings*, GParamSpec*) {
Refresh();
});
_font_changed_signal.Connect(settings, "notify::gtk-font-name",
- [&] (GtkSettings*, GParamSpec*) {
+ [this] (GtkSettings*, GParamSpec*) {
changed.emit();
});
_dpi_changed_signal.Connect(settings, "notify::gtk-xft-dpi",
- [&] (GtkSettings*, GParamSpec*) {
+ [this] (GtkSettings*, GParamSpec*) {
changed.emit();
});
_settings_changed_signal.Connect(_gsettings, "changed::" + PANEL_TITLE_FONT_KEY,
- [&] (GSettings*, gchar*) {
+ [this] (GSettings*, gchar*) {
changed.emit();
});
diff --git a/unity-shared/PlacesOverlayVScrollBar.h b/unity-shared/PlacesOverlayVScrollBar.h
index a32e4f18a..b9697ef47 100644
--- a/unity-shared/PlacesOverlayVScrollBar.h
+++ b/unity-shared/PlacesOverlayVScrollBar.h
@@ -38,6 +38,7 @@ class PlacesOverlayVScrollBar: public PlacesVScrollBar
{
public:
PlacesOverlayVScrollBar(NUX_FILE_LINE_PROTO);
+ virtual ~PlacesOverlayVScrollBar() {}
protected:
void Draw(nux::GraphicsEngine& graphics_engine, bool force_draw);
diff --git a/unity-shared/PlacesVScrollBar.h b/unity-shared/PlacesVScrollBar.h
index 87f793ea9..c6bc201cb 100644
--- a/unity-shared/PlacesVScrollBar.h
+++ b/unity-shared/PlacesVScrollBar.h
@@ -36,7 +36,7 @@ class PlacesVScrollBar : public nux::VScrollBar
{
public:
PlacesVScrollBar(NUX_FILE_LINE_PROTO);
- ~PlacesVScrollBar();
+ virtual ~PlacesVScrollBar();
protected:
virtual void PreLayoutManagement();
diff --git a/unity-shared/RatingsButton.cpp b/unity-shared/RatingsButton.cpp
index 391e09e1e..ac3865db6 100644
--- a/unity-shared/RatingsButton.cpp
+++ b/unity-shared/RatingsButton.cpp
@@ -49,7 +49,7 @@ RatingsButton::RatingsButton(int star_size, int star_gap, NUX_FILE_LINE_DECL)
mouse_move.connect(sigc::mem_fun(this, &RatingsButton::RecvMouseMove));
mouse_drag.connect(sigc::mem_fun(this, &RatingsButton::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 && direction != nux::KEY_NAV_NONE)
focused_star_ = 0;
@@ -58,7 +58,7 @@ RatingsButton::RatingsButton(int star_size, int star_gap, NUX_FILE_LINE_DECL)
QueueDraw();
});
- key_nav_focus_activate.connect([&](nux::Area*) { SetRating(static_cast<float>(focused_star_+1)/num_stars); });
+ key_nav_focus_activate.connect([this](nux::Area*) { SetRating(static_cast<float>(focused_star_+1)/num_stars); });
key_down.connect(sigc::mem_fun(this, &RatingsButton::OnKeyDown));
}
diff --git a/unity-shared/ResizingBaseWindow.h b/unity-shared/ResizingBaseWindow.h
index 3d9080133..75d3721c7 100644
--- a/unity-shared/ResizingBaseWindow.h
+++ b/unity-shared/ResizingBaseWindow.h
@@ -50,6 +50,8 @@ public:
ResizingBaseWindow(char const* window_name,
GeometryAdjuster const& input_adjustment);
+ virtual ~ResizingBaseWindow() {}
+
/**
* Recalculates the input window geometry.
*
diff --git a/unity-shared/SearchBar.cpp b/unity-shared/SearchBar.cpp
index 19710bc56..f82cd39dd 100644
--- a/unity-shared/SearchBar.cpp
+++ b/unity-shared/SearchBar.cpp
@@ -165,8 +165,8 @@ void SearchBar::Init()
pango_entry_->SetFontFamily(PANGO_ENTRY_DEFAULT_FONT_FAMILY.c_str());
pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE);
pango_entry_->text_changed.connect(sigc::mem_fun(this, &SearchBar::OnSearchChanged));
- pango_entry_->activated.connect([&]() { activated.emit(); });
- pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); });
+ pango_entry_->activated.connect([this]() { activated.emit(); });
+ pango_entry_->cursor_moved.connect([this](int i) { QueueDraw(); });
pango_entry_->mouse_down.connect(sigc::mem_fun(this, &SearchBar::OnMouseButtonDown));
pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &SearchBar::OnEndKeyFocus));
pango_entry_->key_up.connect([this] (unsigned int, unsigned long, unsigned long) {
@@ -232,17 +232,17 @@ void SearchBar::Init()
show_filters_->SetMaximumWidth(style.GetFilterBarWidth() - arrow_layout_->GetBaseWidth() - 8);
// Lambda functions
- auto mouse_expand = [&](int, int, unsigned long, unsigned long)
+ auto mouse_expand = [this](int, int, unsigned long, unsigned long)
{
showing_filters = !showing_filters;
};
- 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*)
{
showing_filters = !showing_filters;
};
@@ -259,13 +259,13 @@ void SearchBar::Init()
sigc::mem_fun(this, &SearchBar::OnFontChanged));
OnFontChanged(gtk_settings_get_default());
- search_hint.changed.connect([&](std::string const& s) { OnSearchHintChanged(); });
+ search_hint.changed.connect([this](std::string const& s) { OnSearchHintChanged(); });
search_string.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_search_string));
search_string.SetSetterFunction(sigc::mem_fun(this, &SearchBar::set_search_string));
im_active.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_im_active));
im_preedit.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_im_preedit));
showing_filters.changed.connect(sigc::mem_fun(this, &SearchBar::OnShowingFiltersChanged));
- can_refine_search.changed.connect([&] (bool can_refine)
+ can_refine_search.changed.connect([this] (bool can_refine)
{
if (show_filter_hint_)
{
diff --git a/unity-shared/SearchBarSpinner.cpp b/unity-shared/SearchBarSpinner.cpp
index 639feef84..8263ee71e 100644
--- a/unity-shared/SearchBarSpinner.cpp
+++ b/unity-shared/SearchBarSpinner.cpp
@@ -175,7 +175,7 @@ SearchBarSpinner::SetState(SpinnerState state)
if (search_timeout_ > 0 && state_== STATE_SEARCHING)
{
- spinner_timeout_.reset(new glib::Timeout(search_timeout_, [&] {
+ spinner_timeout_.reset(new glib::Timeout(search_timeout_, [this] {
state_ = STATE_READY;
return false;
}));
diff --git a/unity-shared/TextInput.cpp b/unity-shared/TextInput.cpp
index 4aa01ee1c..8258e42e8 100644
--- a/unity-shared/TextInput.cpp
+++ b/unity-shared/TextInput.cpp
@@ -74,7 +74,7 @@ void TextInput::Init()
pango_entry_ = new IMTextEntry();
pango_entry_->SetFontFamily(PANGO_ENTRY_DEFAULT_FONT_FAMILY.c_str());
pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE);
- pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); });
+ pango_entry_->cursor_moved.connect([this](int i) { QueueDraw(); });
pango_entry_->mouse_down.connect(sigc::mem_fun(this, &TextInput::OnMouseButtonDown));
pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &TextInput::OnEndKeyFocus));
@@ -93,7 +93,7 @@ void TextInput::Init()
input_string.SetSetterFunction(sigc::mem_fun(this, &TextInput::set_input_string));
im_active.SetGetterFunction(sigc::mem_fun(this, &TextInput::get_im_active));
im_preedit.SetGetterFunction(sigc::mem_fun(this, &TextInput::get_im_preedit));
- input_hint.changed.connect([&](std::string const& s) { OnInputHintChanged(); });
+ input_hint.changed.connect([this](std::string const& s) { OnInputHintChanged(); });
}
diff --git a/unity-shared/TextureThumbnailProvider.cpp b/unity-shared/TextureThumbnailProvider.cpp
index 128daf8bf..0cfbc55e2 100644
--- a/unity-shared/TextureThumbnailProvider.cpp
+++ b/unity-shared/TextureThumbnailProvider.cpp
@@ -36,6 +36,7 @@ public:
GdkTextureThumbnailer(std::string const& name)
: name(name)
{}
+ virtual ~GdkTextureThumbnailer() {}
std::string name;
diff --git a/unity-shared/ThumbnailGenerator.cpp b/unity-shared/ThumbnailGenerator.cpp
index fae86ad91..9eef47bab 100644
--- a/unity-shared/ThumbnailGenerator.cpp
+++ b/unity-shared/ThumbnailGenerator.cpp
@@ -187,7 +187,7 @@ ThumbnailNotifier::Ptr ThumbnailGeneratorImpl::GetThumbnail(std::string const& u
if (!thread_create_timer_ && thumbnail_thread_is_running_ == false)
{
- thread_create_timer_.reset(new glib::Timeout(0, [&]()
+ thread_create_timer_.reset(new glib::Timeout(0, [this]()
{
thumbnail_thread_is_running_ = true;
pthread_create (&thumbnail_thread_, NULL, thumbnail_thread_start, this);
@@ -214,7 +214,7 @@ ThumbnailNotifier::Ptr ThumbnailGeneratorImpl::GetThumbnail(std::string const& u
void ThumbnailGeneratorImpl::StartCleanupTimer()
{
if (!cleanup_timer_)
- cleanup_timer_.reset(new glib::Timeout(CLEANUP_DURATION, [&]() { DoCleanup(); return false; }));
+ cleanup_timer_.reset(new glib::Timeout(CLEANUP_DURATION, [this]() { DoCleanup(); return false; }));
}
diff --git a/unity-shared/ThumbnailGenerator.h b/unity-shared/ThumbnailGenerator.h
index 387620945..b717216f8 100644
--- a/unity-shared/ThumbnailGenerator.h
+++ b/unity-shared/ThumbnailGenerator.h
@@ -33,6 +33,8 @@ class Thumbnailer
public:
typedef std::shared_ptr<Thumbnailer> Ptr;
+ virtual ~Thumbnailer() {}
+
virtual std::string GetName() const = 0;
virtual bool Run(int size, std::string const& input_file, std::string& output_file, std::string& error_hint) = 0;
diff --git a/unity-shared/UBusServer.cpp b/unity-shared/UBusServer.cpp
index 7016548a7..105983bfc 100644
--- a/unity-shared/UBusServer.cpp
+++ b/unity-shared/UBusServer.cpp
@@ -44,7 +44,7 @@ unsigned UBusServer::RegisterInterest(std::string const& interest_name,
void UBusServer::UnregisterInterest(unsigned connection_id)
{
auto it = std::find_if(interests_.begin(), interests_.end(),
- [&] (std::pair<std::string, UBusConnection::Ptr> const& p)
+ [connection_id] (std::pair<std::string, UBusConnection::Ptr> const& p)
{ return p.second->id == connection_id; });
if (it != interests_.end()) interests_.erase(it);
}
diff --git a/unity-shared/UScreen.cpp b/unity-shared/UScreen.cpp
index 6812a8325..869383824 100644
--- a/unity-shared/UScreen.cpp
+++ b/unity-shared/UScreen.cpp
@@ -35,7 +35,7 @@ UScreen::UScreen()
{
size_changed_signal_.Connect(screen_, "size-changed", sigc::mem_fun(this, &UScreen::Changed));
monitors_changed_signal_.Connect(screen_, "monitors-changed", sigc::mem_fun(this, &UScreen::Changed));
- proxy_.Connect("Resuming", [&] (GVariant* data) { resuming.emit(); });
+ proxy_.Connect("Resuming", [this] (GVariant* data) { resuming.emit(); });
Refresh();
}
@@ -101,7 +101,7 @@ void UScreen::Changed(GdkScreen* screen)
if (refresh_idle_)
return;
- refresh_idle_.reset(new glib::Idle([&] () {
+ refresh_idle_.reset(new glib::Idle([this] () {
Refresh();
refresh_idle_.reset();
diff --git a/unity-shared/UnityWindowView.cpp b/unity-shared/UnityWindowView.cpp
index 0638e9160..272ba9eaa 100644
--- a/unity-shared/UnityWindowView.cpp
+++ b/unity-shared/UnityWindowView.cpp
@@ -20,6 +20,7 @@
#include "UnityWindowView.h"
#include <Nux/VLayout.h>
+#include "unity-shared/UnitySettings.h"
#include "unity-shared/WindowManager.h"
namespace unity {
@@ -234,12 +235,20 @@ void UnityWindowView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
#ifndef NUX_OPENGLES_20
if (GfxContext.UsingGLSLCodePath())
+ {
+ auto temp_background_color = background_color();
+
+ if (Settings::Instance().GetLowGfxMode())
+ temp_background_color.alpha = 1.0f;
+
gPainter.PushDrawCompositionLayer(GfxContext, base,
bg_texture_,
texxform_blur_bg,
nux::color::White,
- background_color, nux::LAYER_BLEND_MODE_OVERLAY,
+ temp_background_color,
+ Settings::Instance().GetLowGfxMode() ? nux::LAYER_BLEND_MODE_NORMAL : nux::LAYER_BLEND_MODE_OVERLAY,
true, rop);
+ }
else
gPainter.PushDrawTextureLayer(GfxContext, base,
bg_texture_,
diff --git a/unity-shared/UserThumbnailProvider.cpp b/unity-shared/UserThumbnailProvider.cpp
index 2b8511480..5e4de6fa4 100644
--- a/unity-shared/UserThumbnailProvider.cpp
+++ b/unity-shared/UserThumbnailProvider.cpp
@@ -37,6 +37,7 @@ public:
: name(name)
, command_line(command_line)
{}
+ virtual ~UserThumbnailer() {}
std::string name;
std::string command_line;
diff --git a/unity-shared/VScrollBarOverlayWindow.h b/unity-shared/VScrollBarOverlayWindow.h
index 7dfc15d0b..ce78e8c14 100644
--- a/unity-shared/VScrollBarOverlayWindow.h
+++ b/unity-shared/VScrollBarOverlayWindow.h
@@ -32,6 +32,7 @@ class VScrollBarOverlayWindow : public nux::BaseWindow
{
public:
VScrollBarOverlayWindow(nux::Geometry const& geo);
+ virtual ~VScrollBarOverlayWindow() {}
void UpdateGeometry(nux::Geometry const& geo);
void SetThumbOffsetY(int y);
diff --git a/unity-shared/WindowButtons.cpp b/unity-shared/WindowButtons.cpp
index 1dc8c449e..ea5b3254c 100644
--- a/unity-shared/WindowButtons.cpp
+++ b/unity-shared/WindowButtons.cpp
@@ -261,17 +261,17 @@ WindowButtons::WindowButtons()
controlled_window.changed.connect(sigc::mem_fun(this, &WindowButtons::OnControlledWindowChanged));
focused.changed.connect(sigc::hide(sigc::mem_fun(this, &WindowButtons::QueueDraw)));
- auto lambda_enter = [&](int x, int y, unsigned long button_flags, unsigned long key_flags)
+ auto lambda_enter = [this](int x, int y, unsigned long button_flags, unsigned long key_flags)
{
mouse_enter.emit(x, y, button_flags, key_flags);
};
- auto lambda_leave = [&](int x, int y, unsigned long button_flags, unsigned long key_flags)
+ auto lambda_leave = [this](int x, int y, unsigned long button_flags, unsigned long key_flags)
{
mouse_leave.emit(x, y, button_flags, key_flags);
};
- auto lambda_moved = [&](int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
+ auto lambda_moved = [this](int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
{
mouse_move.emit(x, y, dx, dy, button_flags, key_flags);
};