summaryrefslogtreecommitdiffhomepage
path: root/compat/tr.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-04-03 12:26:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-04-05 03:23:13 +0200
commiteb32a2ac02c6d1adcfeb0a1a5522f8aaea442489 (patch)
treeb15b4ab34600e9c5d5da17eac33ea687167bbfc7 /compat/tr.hpp
parent22a853b388597e9549125df69508c1c38706dd1d (diff)
i18n: provide for non-QObject classes
See compat/tr.hpp for comment.
Diffstat (limited to 'compat/tr.hpp')
-rw-r--r--compat/tr.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/compat/tr.hpp b/compat/tr.hpp
new file mode 100644
index 00000000..7bb4fb71
--- /dev/null
+++ b/compat/tr.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <QObject>
+#include "export.hpp"
+
+// The class does nothing except provide a fake assignment operator for QObject
+// It's meant to be used inside classes that need i18n support but are returned by value.
+
+class OTR_COMPAT_EXPORT TR : public QObject
+{
+ Q_OBJECT
+
+public:
+ TR();
+ TR(const TR&);
+ ~TR() override;
+
+ TR& operator=(const TR& other);
+};