summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-11-18 14:42:05 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-11-18 14:42:05 +0200
commite78db00d1436a4d32d79b12bf52670ed9ddfb0f2 (patch)
tree49a205db192eea55b67d107bd800e483138e1143 /indra/newview
parent9fdae4414f7307f4599d395cfed912cec1d825bd (diff)
parent764afa899ee3a4b2f1fa1f32c13a918c2caad9a9 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llnavigationbar.cpp1
-rw-r--r--indra/newview/llsearchhistory.h11
2 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 0c2782fd8a..114d26af8a 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -186,7 +186,6 @@ LLNavigationBar::LLNavigationBar()
LLNavigationBar::~LLNavigationBar()
{
mTeleportFinishConnection.disconnect();
- LLSearchHistory::getInstance()->save();
}
BOOL LLNavigationBar::postBuild()
diff --git a/indra/newview/llsearchhistory.h b/indra/newview/llsearchhistory.h
index 253ef21e9e..eb6efdb86f 100644
--- a/indra/newview/llsearchhistory.h
+++ b/indra/newview/llsearchhistory.h
@@ -34,12 +34,15 @@
#define LL_LLSEARCHHISTORY_H
#include "llsingleton.h"
+#include "llui.h"
+
/**
* Search history container able to save and load history from file.
* History is stored in chronological order, most recent at the beginning.
*/
-class LLSearchHistory : public LLSingleton<LLSearchHistory>
+class LLSearchHistory : public LLSingleton<LLSearchHistory>, private LLDestroyClass<LLSearchHistory>
{
+ friend class LLDestroyClass<LLSearchHistory>;
public:
// Forward declaration
@@ -130,6 +133,12 @@ protected:
private:
+ // Implementation of LLDestroyClass<LLSearchHistory>
+ static void destroyClass()
+ {
+ LLSearchHistory::getInstance()->save();
+ }
+
search_history_list_t mSearchHistory;
};