From 2ff47e1785c4596d1a85c7d5bb79138f8c816023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 9 Apr 2009 09:39:58 +0000 Subject: [PATCH] * Fixed bug I introduced when deleting parameters (no more crashing). * Removed the BParameterWeb::{Start|Stop}Watching() methods again, as the same thing can be achieved using the BMediaRoster already (even though it doesn't seem to work yet). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30058 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/media/ParameterWeb.h | 5 ----- src/kits/media/ParameterWeb.cpp | 26 ++------------------------ 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/headers/os/media/ParameterWeb.h b/headers/os/media/ParameterWeb.h index c6a890eb12..b64240fb04 100644 --- a/headers/os/media/ParameterWeb.h +++ b/headers/os/media/ParameterWeb.h @@ -91,11 +91,6 @@ public: int32 CountParameters(); BParameter* ParameterAt(int32 index); - status_t StartWatching(const BMessenger& target, - int32 notificationType); - status_t StopWatching(const BMessenger& target, - int32 notificationType); - // BFlattenable implementation virtual bool IsFixedSize() const; virtual type_code TypeCode() const; diff --git a/src/kits/media/ParameterWeb.cpp b/src/kits/media/ParameterWeb.cpp index e2cc3078bf..69eca9f773 100644 --- a/src/kits/media/ParameterWeb.cpp +++ b/src/kits/media/ParameterWeb.cpp @@ -420,28 +420,6 @@ BParameterWeb::ParameterAt(int32 index) } -status_t -BParameterWeb::StartWatching(const BMessenger& target, int32 notificationType) -{ - if (BMediaRoster::CurrentRoster() == NULL) - return B_ERROR; - - return BMediaRoster::CurrentRoster()->StartWatching(target, fNode, - notificationType); -} - - -status_t -BParameterWeb::StopWatching(const BMessenger& target, int32 notificationType) -{ - if (BMediaRoster::CurrentRoster() == NULL) - return B_ERROR; - - return BMediaRoster::CurrentRoster()->StopWatching(target, fNode, - notificationType); -} - - bool BParameterWeb::IsFixedSize() const { @@ -685,12 +663,12 @@ BParameterGroup::~BParameterGroup() CALLED(); for (int i = fControls->CountItems(); i-- > 0;) { - delete static_cast(fControls->ItemAt(0)); + delete static_cast(fControls->ItemAt(i)); } delete fControls; for (int i = fGroups->CountItems(); i-- > 0;) { - delete static_cast(fGroups->ItemAt(0)); + delete static_cast(fGroups->ItemAt(i)); } delete fGroups;