diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-04-14 06:21:32 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-14 06:21:32 -0700 |
commit | fc0e307f00ceb50771d1c7a1489c7b65721f4143 (patch) | |
tree | 06d04b0fb23878ecf658868a957ab5c0fff6625e | |
parent | f5c958ad73db696e473aaa35e144f4c9d8ae24de (diff) | |
download | subsurface-fc0e307f00ceb50771d1c7a1489c7b65721f4143.tar.gz |
Add common.h file
Oops
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/common.h | 20 |
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 |