Commit 200e910f authored by Gustavo Carneiro's avatar Gustavo Carneiro Committed by Tomaz Canabrava
Browse files

Move decoders to a new library konsoledecoders.

parent 86baf22c
......@@ -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}
)
......
......@@ -12,9 +12,10 @@
#include <QSet>
#include <QTextStream>
// Konsole
#include "../decoders/PlainTextDecoder.h"
#include "../decoders/HTMLDecoder.h"
// Konsole decoders
#include <PlainTextDecoder.h>
#include <HTMLDecoder.h>
#include "history/HistoryType.h"
#include "history/HistoryScrollNone.h"
#include "characters/ExtendedCharTable.h"
......
......@@ -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)
......@@ -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}
......
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)
......@@ -7,9 +7,11 @@
// Own
#include "HTMLDecoder.h"
// Konsole
#include "colorscheme/ColorSchemeManager.h"
#include "../characters/ExtendedCharTable.h"
// Konsole colorScheme
#include <ColorSchemeManager.h>
// Konsole characters
#include <ExtendedCharTable.h>
// Qt
#include <QTextStream>
......
......@@ -7,7 +7,7 @@
#ifndef HTMLDECODER_H
#define HTMLDECODER_H
// Konsole
// Konsole decoders
#include "TerminalCharacterDecoder.h"
#include <QFont>
......@@ -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:
/**
......
......@@ -7,8 +7,8 @@
// Own
#include "PlainTextDecoder.h"
// Konsole
#include "../characters/ExtendedCharTable.h"
// Konsole characters
#include <ExtendedCharTable.h>
// Qt
#include <QList>
......
......@@ -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();
......
......@@ -11,9 +11,11 @@
#include <QList>
#include <QExplicitlySharedDataPointer>
// Konsole
#include "../characters/Character.h"
#include "konsoleprivate_export.h"
// Konsole characters
#include <Character.h>
// 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()
......
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