summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/common.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/qt-ui/common.h b/qt-ui/common.h
new file mode 100644
index 000000000..6e00c80ed
--- /dev/null
+++ b/qt-ui/common.h
@@ -0,0 +1,20 @@
+/*
+ * common.h
+ *
+ * shared by all Qt/C++ code
+ *
+ */
+
+#ifndef COMMON_H
+#define COMMON_H
+
+#include <glib/gi18n.h>
+#include <QString>
+
+/* use this instead of tr() for translated string literals */
+inline QString Qtr_(const char *str)
+{
+ return QString::fromUtf8(gettext(str));
+}
+
+#endif