From 604971ca0c83e8d3993aed04261443692122109e Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Tue, 20 Oct 2015 14:36:53 +0200 Subject: [PATCH] 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 eccac1321f512d8). 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 lacks Q_OBJECT macro. This patch adds a missing tr() definition and implementation to 2 structs. Signed-off-by: Jan Mulder Signed-off-by: Dirk Hohndel --- qt-models/divetripmodel.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qt-models/divetripmodel.h b/qt-models/divetripmodel.h index 63dc806e7..31cee9633 100644 --- a/qt-models/divetripmodel.h +++ b/qt-models/divetripmodel.h @@ -5,6 +5,8 @@ #include "dive.h" struct DiveItem : public TreeItem { + Q_DECLARE_TR_FUNCTIONS(TripItem) +public: enum Column { NR, DATE, @@ -38,6 +40,8 @@ struct DiveItem : public TreeItem { }; struct TripItem : public TreeItem { + Q_DECLARE_TR_FUNCTIONS(TripItem) +public: virtual QVariant data(int column, int role) const; dive_trip_t *trip; };