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
Konsole
Commits
a08f907c
Commit
a08f907c
authored
Oct 12, 2020
by
Gustavo Carneiro
Committed by
Kurt Hindenburg
Oct 16, 2020
Browse files
New library for characters
parent
b9bbbdba
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
a08f907c
...
...
@@ -102,13 +102,12 @@ add_subdirectory(colorscheme)
add_subdirectory
(
keyboardtranslator
)
add_subdirectory
(
profile
)
add_subdirectory
(
session
)
add_subdirectory
(
characters
)
set
(
konsoleprivate_SRCS
${
windowadaptors_SRCS
}
AutoScrollHandler.cpp
BookmarkHandler.cpp
BookmarkMenu.cpp
characters/CharacterFormat.cpp
characters/CharacterWidth.cpp
CheckableSessionModel.cpp
CompositeWidgetFocusWatcher.cpp
CopyInputDialog.cpp
...
...
@@ -120,7 +119,6 @@ set(konsoleprivate_SRCS ${windowadaptors_SRCS}
HistorySizeDialog.cpp
KeyBindingEditor.cpp
LabelsAligner.cpp
characters/LineBlockCharacters.cpp
NullProcessInfo.cpp
NullProcessInfo.cpp
PlainTextDecoder.cpp
...
...
@@ -231,6 +229,7 @@ target_link_libraries(konsoleprivate
konsolehelpers
konsolesession
konsoleprofile
konsolecharacters
${
konsole_LIBS
}
)
...
...
src/characters/CMakeLists.txt
0 → 100644
View file @
a08f907c
add_library
(
konsolecharacters
OBJECT
CharacterFormat.cpp
CharacterWidth.cpp
LineBlockCharacters.cpp
)
generate_export_header
(
konsolecharacters BASE_NAME konsolecharacters
)
target_include_directories
(
konsolecharacters PUBLIC
${
CMAKE_CURRENT_BINARY_DIR
}
)
target_link_libraries
(
konsolecharacters Qt5::Gui
)
src/characters/CharacterWidth.cpp
View file @
a08f907c
...
...
@@ -30,8 +30,7 @@
//
#include "CharacterWidth.h"
#include "konsoledebug.h"
#include "konsoleprivate_export.h"
#include "konsolecharacters_export.h"
struct
Range
{
...
...
@@ -136,7 +135,7 @@ static constexpr const RangeLut RANGE_LUT_LIST[] = {
static
constexpr
const
int
RANGE_LUT_LIST_SIZE
=
4
;
int
KONSOLE
PRIVATE
_EXPORT
characterWidth
(
uint
ucs4
)
{
int
KONSOLE
CHARACTERS
_EXPORT
characterWidth
(
uint
ucs4
)
{
if
(
Q_LIKELY
(
ucs4
<
sizeof
(
DIRECT_LUT
)))
{
return
DIRECT_LUT
[
ucs4
];
}
...
...
src/characters/CharacterWidth.src.cpp
View file @
a08f907c
...
...
@@ -44,8 +44,7 @@
//
#include "CharacterWidth.h"
#include "konsoledebug.h"
#include "konsoleprivate_export.h"
#include "konsolecharacters_export.h"
struct
Range
{
...
...
@@ -79,7 +78,7 @@ static constexpr const RangeLut RANGE_LUT_LIST[] = {«ranges-lut-list:
static
constexpr
const
int
RANGE_LUT_LIST_SIZE
=
«
ranges
-
lut
-
list
-
size
»
;
int
KONSOLE
PRIVATE
_EXPORT
characterWidth
(
uint
ucs4
)
{
int
KONSOLE
CHARACTERS
_EXPORT
characterWidth
(
uint
ucs4
)
{
if
(
Q_LIKELY
(
ucs4
<
sizeof
(
DIRECT_LUT
)))
{
return
DIRECT_LUT
[
ucs4
];
}
...
...
Write
Preview
Supports
Markdown
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