Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KFind
Commits
69a0851d
Commit
69a0851d
authored
Nov 18, 2021
by
Laurent Montel
😁
Browse files
Port deprecated I18N_NOOP macro
parent
7611ffc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kfindtreeview.cpp
View file @
69a0851d
...
...
@@ -36,7 +36,18 @@
#include <kio_version.h>
// Permission strings
#include <ki18n_version.h>
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
#include <KLazyLocalizedString>
#undef I18N_NOOP
#define I18N_NOOP kli18n
#endif
#if KI18N_VERSION < QT_VERSION_CHECK(5, 89, 0)
static
const
char
*
const
perm
[
4
]
=
{
#else
const
KLazyLocalizedString
perm
[
4
]
=
{
#endif
I18N_NOOP
(
"Read-write"
),
I18N_NOOP
(
"Read-only"
),
I18N_NOOP
(
"Write-only"
),
...
...
@@ -238,8 +249,11 @@ KFindItem::KFindItem(const KFileItem &_fileItem, const QString &subDir, const QS
}
else
{
perm_index
=
fileInfo
.
isWritable
()
?
WO
:
NA
;
}
#if KI18N_VERSION < QT_VERSION_CHECK(5, 89, 0)
m_permission
=
i18n
(
perm
[
perm_index
]);
#else
m_permission
=
KLocalizedString
(
perm
[
perm_index
]).
toString
();
#endif
m_icon
=
QIcon
::
fromTheme
(
m_fileItem
.
iconName
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment