Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kde.cfg: added some *i18n() and *i18nc() functions #6365

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions cfg/kde.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,41 @@
<not-uninit/>
</arg>
</function>
<!-- QString i18n(const char*) -->
<!-- QString xi18n(const char*) -->
<function name="i18n,xi18n">
<noreturn>false</noreturn>
chrchr-github marked this conversation as resolved.
Show resolved Hide resolved
<pure/>
<leak-ignore/>
<returnValue type="QString"/>
<arg nr="1" direction="in"/>
</function>
<!-- KLocalizedString ki18n(const char*) -->
<function name="ki18n">
<noreturn>false</noreturn>
<pure/>
<leak-ignore/>
<returnValue type="KLocalizedString"/>
<arg nr="1" direction="in"/>
</function>
ki18ncp()
<!-- QString i18nc(const char*, const char*) -->
<!-- QString xi18nc(const char*, const char*) -->
<function name="i18nc,xi18nc">
<noreturn>false</noreturn>
<pure/>
<leak-ignore/>
<returnValue type="QString"/>
<arg nr="1" direction="in"/>
<arg nr="2" direction="in"/>
</function>
<!-- KLocalizedString ki18nc(const char*, const char*) -->
<function name="ki18nc">
<noreturn>false</noreturn>
<pure/>
<leak-ignore/>
<returnValue type="KLocalizedString"/>
<arg nr="1" direction="in"/>
<arg nr="2" direction="in"/>
</function>
</def>
11 changes: 11 additions & 0 deletions test/cfg/kde.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <cstdio>
#include <KDE/KGlobal>
#include <KDE/KConfigGroup>
#include <klocalizedstring.h>

class k_global_static_testclass1 {};
K_GLOBAL_STATIC(k_global_static_testclass1, k_global_static_testinstance1);
Expand All @@ -30,3 +31,13 @@ void ignoredReturnValue(const KConfigGroup& cfgGroup)
// cppcheck-suppress ignoredReturnValue
cfgGroup.readEntry("test");
}

void i18n_test()
{
(void)i18n("Text");
(void)xi18n("Text");
(void)ki18n("Text");
(void)i18nc("Text", "Context");
(void)xi18nc("Text", "Context");
(void)ki18nc("Text", "Context");
}
4 changes: 2 additions & 2 deletions tools/donate_cpu_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
# changes)
CLIENT_VERSION = "1.3.57"
CLIENT_VERSION = "1.3.58"

# Timeout for analysis with Cppcheck in seconds
CPPCHECK_TIMEOUT = 30 * 60
Expand Down Expand Up @@ -685,7 +685,7 @@ def __init__(self):
'ginac': ['<ginac/', '"ginac/'],
'googletest': ['<gtest/gtest.h>'],
'gtk': ['<gtk', '<glib.h>', '<glib-', '<glib/', '<gdk/', '<gnome'],
'kde': ['<KGlobal>', '<KApplication>', '<KDE/'],
'kde': ['<KGlobal>', '<KApplication>', '<KDE/', '<klocalizedstring.h>'],
'libcerror': ['<libcerror.h>'],
'libcurl': ['<curl/curl.h>'],
'libsigc++': ['<sigc++/'],
Expand Down
Loading