summaryrefslogtreecommitdiffstats
path: root/logic/resources/ResourceHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/resources/ResourceHandler.cpp')
-rw-r--r--logic/resources/ResourceHandler.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/logic/resources/ResourceHandler.cpp b/logic/resources/ResourceHandler.cpp
new file mode 100644
index 00000000..46a4422c
--- /dev/null
+++ b/logic/resources/ResourceHandler.cpp
@@ -0,0 +1,28 @@
+#include "ResourceHandler.h"
+
+#include "Resource.h"
+
+void ResourceHandler::setResult(const QVariant &result)
+{
+ m_result = result;
+ if (m_resource)
+ {
+ m_resource->reportResult();
+ }
+}
+
+void ResourceHandler::setFailure(const QString &reason)
+{
+ if (m_resource)
+ {
+ m_resource->reportFailure(reason);
+ }
+}
+
+void ResourceHandler::setProgress(const int progress)
+{
+ if (m_resource)
+ {
+ m_resource->reportProgress(progress);
+ }
+}