diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-29 17:12:35 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-29 17:12:35 (GMT) |
| commit | 80aa7219a2d47632efa5d72b79bbb4fc65721631 (patch) | |
| tree | 257086419a3380872195415ffffb47ec52fff972 /src/search | |
| parent | 680a36549adaed0c3ce7e8906fadbdf190b0b3b0 (diff) | |
| download | powder-80aa7219a2d47632efa5d72b79bbb4fc65721631.zip powder-80aa7219a2d47632efa5d72b79bbb4fc65721631.tar.gz | |
Vote view in save preview, better handling of controller destruction
Diffstat (limited to 'src/search')
| -rw-r--r-- | src/search/Save.h | 3 | ||||
| -rw-r--r-- | src/search/SearchController.cpp | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/search/Save.h b/src/search/Save.h index 5c471e1..4176e13 100644 --- a/src/search/Save.h +++ b/src/search/Save.h @@ -11,12 +11,13 @@ using namespace std; class Save { private: +public: int id; int date; int votesUp, votesDown; unsigned char * data; int dataLength; -public: + Save(Save & save); Save(int _id, int _date, int _votesUp, int _votesDown, string _userName, string _name); diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp index 6aff962..efd33ac 100644 --- a/src/search/SearchController.cpp +++ b/src/search/SearchController.cpp @@ -68,9 +68,13 @@ void SearchController::Exit() SearchController::~SearchController() { + if(activePreview) + delete activePreview; + if(ui::Engine::Ref().GetWindow() == searchView) + { + ui::Engine::Ref().CloseWindow(); + } delete searchModel; - if(searchView) - delete searchView; } void SearchController::DoSearch(std::string query) |
