Commit a08f907c authored by Gustavo Carneiro's avatar Gustavo Carneiro Committed by Kurt Hindenburg
Browse files

New library for characters

parent b9bbbdba
......@@ -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}
)
......
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)
......@@ -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 KONSOLEPRIVATE_EXPORT characterWidth(uint ucs4) {
int KONSOLECHARACTERS_EXPORT characterWidth(uint ucs4) {
if(Q_LIKELY(ucs4 < sizeof(DIRECT_LUT))) {
return DIRECT_LUT[ucs4];
}
......
......@@ -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 KONSOLEPRIVATE_EXPORT characterWidth(uint ucs4) {
int KONSOLECHARACTERS_EXPORT characterWidth(uint ucs4) {
if(Q_LIKELY(ucs4 < sizeof(DIRECT_LUT))) {
return DIRECT_LUT[ucs4];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment