Add missing tr() implementations

One specific string did not translate. First, Dirk and I (via IRC)
suspected a leading space was the issue (see commit eccac1321f).
However, I found out that the problem was still there. A non translated
string "%1 shown", when applying a filter on the divelist, and looking at
a trip line. It shows always untranslated "%1 shown". Extracting
to-be-translated strings from the code, I found 2 errors: Class
<classname> lacks Q_OBJECT macro.

This patch adds a missing tr() definition and implementation to 2 structs.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Jan Mulder 2015-10-20 14:36:53 +02:00 committed by Dirk Hohndel
parent f682ea0085
commit 604971ca0c

View file

@ -5,6 +5,8 @@
#include "dive.h" #include "dive.h"
struct DiveItem : public TreeItem { struct DiveItem : public TreeItem {
Q_DECLARE_TR_FUNCTIONS(TripItem)
public:
enum Column { enum Column {
NR, NR,
DATE, DATE,
@ -38,6 +40,8 @@ struct DiveItem : public TreeItem {
}; };
struct TripItem : public TreeItem { struct TripItem : public TreeItem {
Q_DECLARE_TR_FUNCTIONS(TripItem)
public:
virtual QVariant data(int column, int role) const; virtual QVariant data(int column, int role) const;
dive_trip_t *trip; dive_trip_t *trip;
}; };