summaryrefslogtreecommitdiffhomepage
path: root/api/plugin-api.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-12-03 22:23:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-12-04 12:19:26 +0100
commitb256886a5cb9f2ae3ebda70a2045b19ed9f4233e (patch)
tree4fa1e46de224cf834a05824dc1eb86001bdb3300 /api/plugin-api.cpp
parente89709a801e7874bc02c66848c638c6a0ccc85c1 (diff)
api: add status check for modules
Diffstat (limited to 'api/plugin-api.cpp')
-rw-r--r--api/plugin-api.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/api/plugin-api.cpp b/api/plugin-api.cpp
index c28b5d4e..eed377b0 100644
--- a/api/plugin-api.cpp
+++ b/api/plugin-api.cpp
@@ -26,6 +26,16 @@ void BaseDialog::closeEvent(QCloseEvent*)
bool ITracker::center() { return false; }
+module_status ITracker::status_ok()
+{
+ return module_status();
+}
+
+module_status ITracker::error(const QString& error)
+{
+ return module_status(error);
+}
+
Metadata::Metadata() {}
IFilter::IFilter() {}
IFilterDialog::IFilterDialog() {}
@@ -46,3 +56,14 @@ void BaseDialog::done(int)
IExtensionDialog::~IExtensionDialog()
{
}
+
+bool module_status::is_ok() const
+{
+ return error.isEmpty();
+}
+
+module_status::module_status(const QString& error) : error(error) {}
+
+module_status module_status_mixin::status_ok() { return module_status(); }
+
+module_status module_status_mixin::error(const QString& error) { return module_status(error); }