summaryrefslogtreecommitdiffhomepage
path: root/compat/tr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/tr.hpp')
-rw-r--r--compat/tr.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/compat/tr.hpp b/compat/tr.hpp
new file mode 100644
index 00000000..c5a561e7
--- /dev/null
+++ b/compat/tr.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <QObject>
+
+// 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.
+
+struct TR : QObject
+{
+ TR() = default;
+ TR(const TR&) : QObject(nullptr) {}
+
+ TR& operator=(const TR&) { return *this; }
+};