summaryrefslogtreecommitdiff
path: root/src/search/SearchController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-22 18:04:38 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-22 18:04:38 (GMT)
commiteb52f759de6f0805865fb7f31444f2b1421b4d25 (patch)
tree49b259400c8946a8bea84c7af3f758f86a59d976 /src/search/SearchController.cpp
parent55d90a44a8425f70b08d864570e255f4bad8ba4c (diff)
downloadpowder-eb52f759de6f0805865fb7f31444f2b1421b4d25.zip
powder-eb52f759de6f0805865fb7f31444f2b1421b4d25.tar.gz
Success/Failure return from Asyn Task, Prompt to visit website upon update failure
Diffstat (limited to 'src/search/SearchController.cpp')
-rw-r--r--src/search/SearchController.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/search/SearchController.cpp b/src/search/SearchController.cpp
index 68fe978..5e592ae 100644
--- a/src/search/SearchController.cpp
+++ b/src/search/SearchController.cpp
@@ -198,7 +198,7 @@ void SearchController::removeSelectedC()
std::vector<int> saves;
public:
RemoveSavesTask(std::vector<int> saves_) { saves = saves_; }
- virtual void doWork()
+ virtual bool doWork()
{
for(int i = 0; i < saves.size(); i++)
{
@@ -215,6 +215,7 @@ void SearchController::removeSelectedC()
usleep(100*1000);
notifyProgress((float(i+1)/float(saves.size())*100));
}
+ return true;
}
};
@@ -251,7 +252,7 @@ void SearchController::unpublishSelectedC()
std::vector<int> saves;
public:
UnpublishSavesTask(std::vector<int> saves_) { saves = saves_; }
- virtual void doWork()
+ virtual bool doWork()
{
for(int i = 0; i < saves.size(); i++)
{
@@ -268,6 +269,7 @@ void SearchController::unpublishSelectedC()
usleep(100*1000);
notifyProgress((float(i+1)/float(saves.size())*100));
}
+ return true;
}
};
@@ -284,7 +286,7 @@ void SearchController::FavouriteSelected()
std::vector<int> saves;
public:
FavouriteSavesTask(std::vector<int> saves_) { saves = saves_; }
- virtual void doWork()
+ virtual bool doWork()
{
for(int i = 0; i < saves.size(); i++)
{
@@ -301,6 +303,7 @@ void SearchController::FavouriteSelected()
usleep(100*1000);
notifyProgress((float(i+1)/float(saves.size())*100));
}
+ return true;
}
};