diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-06-17 20:42:19 +0200 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2018-06-24 20:31:14 +0200 |
commit | 61b8add59078f3a55dc02dc63639173be03fdf41 (patch) | |
tree | 9aa606dbfafd454a8fa3cc29f10517cdf904f77c /core/gaspressures.h | |
parent | 8406cbf1876658dc11f41784c3336908b3dc49a7 (diff) | |
download | subsurface-61b8add59078f3a55dc02dc63639173be03fdf41.tar.gz |
Localization: don't go via C-string in qthelper.cpp
The purpose of the gettextFromC class is twofold:
1) It provides a static storage of C strings if the C part needs
a translation and doesn't want to deal with memory-management.
2) It severs as a catch-all class for translations that do not come
from a proper class (i.e. from helper functions).
The second case was used a few times in qthelper.cpp. By using the
trGettext() function, a cached C-string was obtained. But in every
single instance, this C-string was then back-converted into a QString.
Therefore, use the gettextFromC::tr() function directly, which
returns a QString. Not only is the resulting code simpler - this also
avoids superfluous caching of translation strings.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/gaspressures.h')
0 files changed, 0 insertions, 0 deletions