diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4234937b..04cc3405 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -103,6 +103,7 @@ add_subdirectory(keyboardtranslator) add_subdirectory(profile) add_subdirectory(session) add_subdirectory(characters) +add_subdirectory(decoders) set(konsoleprivate_SRCS ${windowadaptors_SRCS} BookmarkHandler.cpp @@ -112,13 +113,11 @@ set(konsoleprivate_SRCS ${windowadaptors_SRCS} Emulation.cpp EscapeSequenceUrlExtractor.cpp FontDialog.cpp - decoders/HTMLDecoder.cpp HistorySizeDialog.cpp KeyBindingEditor.cpp LabelsAligner.cpp NullProcessInfo.cpp NullProcessInfo.cpp - decoders/PlainTextDecoder.cpp PrintOptions.cpp PrintOptions.cpp ProcessInfo.cpp @@ -233,6 +232,7 @@ target_link_libraries(konsoleprivate konsolesession konsoleprofile konsolecharacters + konsoledecoders ${konsole_LIBS} ) diff --git a/src/Screen.cpp b/src/Screen.cpp index ad61a0fd..bba16a97 100644 --- a/src/Screen.cpp +++ b/src/Screen.cpp @@ -12,9 +12,10 @@ #include #include -// Konsole -#include "../decoders/PlainTextDecoder.h" -#include "../decoders/HTMLDecoder.h" +// Konsole decoders +#include +#include + #include "history/HistoryType.h" #include "history/HistoryScrollNone.h" #include "characters/ExtendedCharTable.h" diff --git a/src/characters/CMakeLists.txt b/src/characters/CMakeLists.txt index 364ad4c9..3f5c45fe 100644 --- a/src/characters/CMakeLists.txt +++ b/src/characters/CMakeLists.txt @@ -15,5 +15,7 @@ ecm_qt_declare_logging_category( add_library(konsolecharacters OBJECT ${konsolecharacters_SRCS}) generate_export_header(konsolecharacters BASE_NAME konsolecharacters) -target_include_directories(konsolecharacters PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(konsolecharacters + PUBLIC ${CMAKE_CURRENT_BINARY_DIR} + INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(konsolecharacters Qt5::Gui) diff --git a/src/colorscheme/CMakeLists.txt b/src/colorscheme/CMakeLists.txt index b1e4fc6a..fe46a8d4 100644 --- a/src/colorscheme/CMakeLists.txt +++ b/src/colorscheme/CMakeLists.txt @@ -24,7 +24,10 @@ add_library(konsolecolorscheme ${konsole_colorscheme_SRCS} ) generate_export_header(konsolecolorscheme BASE_NAME konsolecolorscheme) -target_include_directories(konsolecolorscheme PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(konsolecolorscheme + PUBLIC ${CMAKE_CURRENT_BINARY_DIR} + INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries( konsolecolorscheme ${konsole_LIBS} diff --git a/src/decoders/CMakeLists.txt b/src/decoders/CMakeLists.txt new file mode 100644 index 00000000..9f445af1 --- /dev/null +++ b/src/decoders/CMakeLists.txt @@ -0,0 +1,13 @@ + +add_library(konsoledecoders + OBJECT + PlainTextDecoder.cpp + HTMLDecoder.cpp +) +generate_export_header(konsoledecoders BASE_NAME konsoledecoders) +target_include_directories(konsoledecoders + PUBLIC ${CMAKE_CURRENT_BINARY_DIR} + INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) + +# TODO: remove the konsolecolorscheme dependencies +target_link_libraries(konsoledecoders konsolecharacters konsolecolorscheme) diff --git a/src/decoders/HTMLDecoder.cpp b/src/decoders/HTMLDecoder.cpp index 54ce7f7a..961480b4 100644 --- a/src/decoders/HTMLDecoder.cpp +++ b/src/decoders/HTMLDecoder.cpp @@ -7,9 +7,11 @@ // Own #include "HTMLDecoder.h" -// Konsole -#include "colorscheme/ColorSchemeManager.h" -#include "../characters/ExtendedCharTable.h" +// Konsole colorScheme +#include + +// Konsole characters +#include // Qt #include diff --git a/src/decoders/HTMLDecoder.h b/src/decoders/HTMLDecoder.h index a64a84b6..dc6c6ca0 100644 --- a/src/decoders/HTMLDecoder.h +++ b/src/decoders/HTMLDecoder.h @@ -7,7 +7,7 @@ #ifndef HTMLDECODER_H #define HTMLDECODER_H -// Konsole +// Konsole decoders #include "TerminalCharacterDecoder.h" #include @@ -18,7 +18,7 @@ namespace Konsole /** * A terminal character decoder which produces pretty HTML markup */ - class KONSOLEPRIVATE_EXPORT HTMLDecoder : public TerminalCharacterDecoder + class KONSOLEDECODERS_EXPORT HTMLDecoder : public TerminalCharacterDecoder { public: /** diff --git a/src/decoders/PlainTextDecoder.cpp b/src/decoders/PlainTextDecoder.cpp index 553cc1f5..59d60b44 100644 --- a/src/decoders/PlainTextDecoder.cpp +++ b/src/decoders/PlainTextDecoder.cpp @@ -7,8 +7,8 @@ // Own #include "PlainTextDecoder.h" -// Konsole -#include "../characters/ExtendedCharTable.h" +// Konsole characters +#include // Qt #include diff --git a/src/decoders/PlainTextDecoder.h b/src/decoders/PlainTextDecoder.h index 471730e6..132033bd 100644 --- a/src/decoders/PlainTextDecoder.h +++ b/src/decoders/PlainTextDecoder.h @@ -7,8 +7,7 @@ #ifndef PLAINTEXTDECODER_H #define PLAINTEXTDECODER_H -#include "konsoleprivate_export.h" - +// Konsole decoders #include "TerminalCharacterDecoder.h" class QTextStream; @@ -20,7 +19,7 @@ namespace Konsole * A terminal character decoder which produces plain text, ignoring colors and other appearance-related * properties of the original characters. */ - class KONSOLEPRIVATE_EXPORT PlainTextDecoder : public TerminalCharacterDecoder + class KONSOLEDECODERS_EXPORT PlainTextDecoder : public TerminalCharacterDecoder { public: PlainTextDecoder(); diff --git a/src/decoders/TerminalCharacterDecoder.h b/src/decoders/TerminalCharacterDecoder.h index 4055cc2e..f6159363 100644 --- a/src/decoders/TerminalCharacterDecoder.h +++ b/src/decoders/TerminalCharacterDecoder.h @@ -11,9 +11,11 @@ #include #include -// Konsole -#include "../characters/Character.h" -#include "konsoleprivate_export.h" +// Konsole characters +#include + +// Konsole decoders +#include "konsoledecoders_export.h" class QTextStream; @@ -28,7 +30,7 @@ namespace Konsole { * Derived classes may produce either plain text with no other color or appearance information, or * they may produce text which incorporates these additional properties. */ -class KONSOLEPRIVATE_EXPORT TerminalCharacterDecoder +class KONSOLEDECODERS_EXPORT TerminalCharacterDecoder { public: virtual ~TerminalCharacterDecoder()