summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-14 06:21:32 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-14 06:21:32 -0700
commitfc0e307f00ceb50771d1c7a1489c7b65721f4143 (patch)
tree06d04b0fb23878ecf658868a957ab5c0fff6625e /qt-ui
parentf5c958ad73db696e473aaa35e144f4c9d8ae24de (diff)
downloadsubsurface-fc0e307f00ceb50771d1c7a1489c7b65721f4143.tar.gz
Add common.h file
Oops Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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