summaryrefslogtreecommitdiff
path: root/src/search/SearchModel.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-07 13:23:26 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-07 13:23:26 (GMT)
commit61ed6e0276d580515d0acf5ddb96b1db95b9b191 (patch)
tree65d9ad219e0b0f6bb1a81813c1888888f2cbd7a4 /src/search/SearchModel.cpp
parent2e48fc6115ebe0d294a2c7ff7fe8774217676f44 (diff)
downloadpowder-61ed6e0276d580515d0acf5ddb96b1db95b9b191.zip
powder-61ed6e0276d580515d0acf5ddb96b1db95b9b191.tar.gz
Rename Save class to SaveInfo, introduce SaveFile for hanlding of local data (stamps and local saves). Rename Stamps browser to LocalBrowser, ready for sharing code with the local save browser
Diffstat (limited to 'src/search/SearchModel.cpp')
-rw-r--r--src/search/SearchModel.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/search/SearchModel.cpp b/src/search/SearchModel.cpp
index 76d0bb7..112adba 100644
--- a/src/search/SearchModel.cpp
+++ b/src/search/SearchModel.cpp
@@ -1,5 +1,5 @@
#include "SearchModel.h"
-#include "Save.h"
+#include "client/SaveInfo.h"
#include "client/Client.h"
@@ -28,7 +28,7 @@ void * SearchModel::updateSaveListT()
category = "Favourites";
if(showOwn && Client::Ref().GetAuthUser().ID)
category = "by:"+Client::Ref().GetAuthUser().Username;
- vector<Save*> * tempSaveList = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort=="new"?"date":"votes", category, resultCount);
+ vector<SaveInfo*> * tempSaveList = Client::Ref().SearchSaves((currentPage-1)*20, 20, lastQuery, currentSort=="new"?"date":"votes", category, resultCount);
updateSaveListFinished = true;
return tempSaveList;
}
@@ -55,16 +55,16 @@ void SearchModel::UpdateSaveList(int pageNumber, std::string query)
}
}
-void SearchModel::SetLoadedSave(Save * save)
+void SearchModel::SetLoadedSave(SaveInfo * save)
{
loadedSave = save;
}
-Save * SearchModel::GetLoadedSave(){
+SaveInfo * SearchModel::GetLoadedSave(){
return loadedSave;
}
-vector<Save*> SearchModel::GetSaveList()
+vector<SaveInfo*> SearchModel::GetSaveList()
{
return saveList;
}
@@ -78,7 +78,7 @@ void SearchModel::Update()
updateSaveListWorking = false;
lastError = "";
saveListLoaded = true;
- vector<Save*> * tempSaveList;
+ vector<SaveInfo*> * tempSaveList;
pthread_join(updateSaveListThread, (void**)(&tempSaveList));
saveList = *tempSaveList;
delete tempSaveList;