Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
4f6c8a7b
Commit
4f6c8a7b
authored
Dec 29, 2021
by
Laurent Montel
Browse files
Port deprecated I18N_NOOP2
parent
ab2cfec6
Pipeline
#115673
passed with stage
in 1 minute and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/colorscheme/ColorScheme.cpp
View file @
4f6c8a7b
...
...
@@ -30,7 +30,10 @@
#include
<QElapsedTimer>
#endif
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
#undef I18N_NOOP2
#define I18N_NOOP2 kli18nc
#endif
namespace
{
const
int
FGCOLOR_INDEX
=
0
;
...
...
@@ -119,7 +122,12 @@ const char *const ColorScheme::colorNames[TABLE_COLORS] = {
"Color6Faint"
,
"Color7Faint"
,
};
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
const
KLazyLocalizedString
ColorScheme
::
translatedColorNames
[
TABLE_COLORS
]
=
{
#else
const
char
*
const
ColorScheme
::
translatedColorNames
[
TABLE_COLORS
]
=
{
#endif
I18N_NOOP2
(
"@item:intable palette"
,
"Foreground"
),
I18N_NOOP2
(
"@item:intable palette"
,
"Background"
),
I18N_NOOP2
(
"@item:intable palette"
,
"Color 1"
),
...
...
@@ -162,8 +170,11 @@ QString ColorScheme::colorNameForIndex(int index)
QString
ColorScheme
::
translatedColorNameForIndex
(
int
index
)
{
Q_ASSERT
(
index
>=
0
&&
index
<
TABLE_COLORS
);
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
return
translatedColorNames
[
index
].
toString
();
#else
return
i18nc
(
"@item:intable palette"
,
translatedColorNames
[
index
]);
#endif
}
ColorScheme
::
ColorScheme
()
...
...
src/colorscheme/ColorScheme.h
View file @
4f6c8a7b
...
...
@@ -19,6 +19,11 @@
// Konsole
#include
"ColorSchemeWallpaper.h"
#include
<ki18n_version.h>
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
#include
<KLazyLocalizedString>
#endif
class
KConfig
;
class
QPixmap
;
class
QPainter
;
...
...
@@ -185,7 +190,11 @@ private:
ColorSchemeWallpaper
::
Ptr
_wallpaper
;
static
const
char
*
const
colorNames
[
TABLE_COLORS
];
#if KI18N_VERSION >= QT_VERSION_CHECK(5, 89, 0)
static
const
KLazyLocalizedString
translatedColorNames
[
TABLE_COLORS
];
#else
static
const
char
*
const
translatedColorNames
[
TABLE_COLORS
];
#endif
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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