From 2c287f5bae0adcc93ed623f3f2a05daf331e5816 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Wed, 18 Sep 2013 18:17:30 +0200 Subject: [PATCH] Model: Add Clear() method to empty out existing depot info. --- src/apps/haiku-depot/Model.cpp | 7 +++++++ src/apps/haiku-depot/Model.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/apps/haiku-depot/Model.cpp b/src/apps/haiku-depot/Model.cpp index 029bc2d4f1..c2c76e5bd0 100644 --- a/src/apps/haiku-depot/Model.cpp +++ b/src/apps/haiku-depot/Model.cpp @@ -287,6 +287,13 @@ Model::AddDepot(const DepotInfo& depot) } +void +Model::Clear() +{ + fDepots.Clear(); +} + + void Model::SetPackageState(const PackageInfoRef& package, PackageState state) { diff --git a/src/apps/haiku-depot/Model.h b/src/apps/haiku-depot/Model.h index f6f5087c20..2646cc8b01 100644 --- a/src/apps/haiku-depot/Model.h +++ b/src/apps/haiku-depot/Model.h @@ -35,6 +35,8 @@ public: const DepotList& Depots() const { return fDepots; } + void Clear(); + // Access to global categories const CategoryRef& CategoryAudio() const { return fCategoryAudio; }