1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2017-01-08 20:02:51 +01:00
parent 1586a5e912
commit 7e6ed0933c
3 changed files with 16 additions and 22 deletions

View File

@ -863,17 +863,17 @@
<context>
<name>RouteItem</name>
<message>
<location filename="../src/routeitem.cpp" line="15"/>
<location filename="../src/routeitem.cpp" line="14"/>
<source>Name</source>
<translation>Název</translation>
</message>
<message>
<location filename="../src/routeitem.cpp" line="17"/>
<location filename="../src/routeitem.cpp" line="16"/>
<source>Description</source>
<translation>Popis</translation>
</message>
<message>
<location filename="../src/routeitem.cpp" line="18"/>
<location filename="../src/routeitem.cpp" line="17"/>
<source>Distance</source>
<translation>Vzdálenost</translation>
</message>
@ -967,27 +967,27 @@
<context>
<name>TrackItem</name>
<message>
<location filename="../src/trackitem.cpp" line="14"/>
<location filename="../src/trackitem.cpp" line="13"/>
<source>Name</source>
<translation>Název</translation>
</message>
<message>
<location filename="../src/trackitem.cpp" line="16"/>
<location filename="../src/trackitem.cpp" line="15"/>
<source>Description</source>
<translation>Popis</translation>
</message>
<message>
<location filename="../src/trackitem.cpp" line="17"/>
<location filename="../src/trackitem.cpp" line="16"/>
<source>Distance</source>
<translation>Vzdálenost</translation>
</message>
<message>
<location filename="../src/trackitem.cpp" line="20"/>
<location filename="../src/trackitem.cpp" line="18"/>
<source>Time</source>
<translation>Čas</translation>
</message>
<message>
<location filename="../src/trackitem.cpp" line="23"/>
<location filename="../src/trackitem.cpp" line="20"/>
<source>Date</source>
<translation>Datum</translation>
</message>

View File

@ -1,4 +1,3 @@
#include <QApplication>
#include <QPainter>
#include "format.h"
#include "waypoint.h"
@ -12,11 +11,10 @@ QString RouteItem::toolTip()
ToolTip tt;
if (!_name.isEmpty())
tt.insert(qApp->translate("RouteItem", "Name"), _name);
tt.insert(tr("Name"), _name);
if (!_desc.isEmpty())
tt.insert(qApp->translate("RouteItem", "Description"), _desc);
tt.insert(qApp->translate("RouteItem", "Distance"),
Format::distance(_distance.last(), _units));
tt.insert(tr("Description"), _desc);
tt.insert(tr("Distance"), Format::distance(_distance.last(), _units));
return tt.toString();
}

View File

@ -1,4 +1,3 @@
#include <QApplication>
#include <QCursor>
#include <QPainter>
#include "format.h"
@ -11,17 +10,14 @@ QString TrackItem::toolTip()
ToolTip tt;
if (!_name.isEmpty())
tt.insert(qApp->translate("TrackItem", "Name"), _name);
tt.insert(tr("Name"), _name);
if (!_desc.isEmpty())
tt.insert(qApp->translate("TrackItem", "Description"), _desc);
tt.insert(qApp->translate("TrackItem", "Distance"),
Format::distance(_distance.last(), _units));
tt.insert(tr("Description"), _desc);
tt.insert(tr("Distance"), Format::distance(_distance.last(), _units));
if (_time > 0)
tt.insert(qApp->translate("TrackItem", "Time"),
Format::timeSpan(_time));
tt.insert(tr("Time"), Format::timeSpan(_time));
if (!_date.isNull())
tt.insert(qApp->translate("TrackItem", "Date"),
_date.toString(Qt::SystemLocaleShortDate));
tt.insert(tr("Date"), _date.toString(Qt::SystemLocaleShortDate));
return tt.toString();
}