From 5da88d1d0ec86281b5e6a982a82c63ed7eae5dd7 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Thu, 7 Sep 2023 20:55:16 -0400 Subject: [PATCH] Move UTF8 to core --- common/CMakeLists.txt | 1 - common/gbr_metadata.cpp | 2 +- common/swig/kicad.i | 4 ++-- cvpcb/cvpcb_association.h | 2 +- include/font/stroke_font.h | 2 +- include/lib_id.h | 2 +- include/markup_parser.h | 2 +- include/richio.h | 2 +- include/string_utf8_map.h | 2 +- libs/core/CMakeLists.txt | 1 + {include => libs/core/include/core}/utf8.h | 0 {common => libs/core}/utf8.cpp | 3 +-- pcbnew/CMakeLists.txt | 1 + qa/tests/common/test_utf8.cpp | 2 +- tools/utf8_tests.cpp | 2 +- 15 files changed, 14 insertions(+), 14 deletions(-) rename {include => libs/core/include/core}/utf8.h (100%) rename {common => libs/core}/utf8.cpp (99%) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index a714ecb278..d5baf2a915 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -402,7 +402,6 @@ set( COMMON_SRCS title_block.cpp trace_helpers.cpp undo_redo_container.cpp - utf8.cpp validators.cpp wildcards_and_files_ext.cpp drawing_sheet/ds_painter.cpp diff --git a/common/gbr_metadata.cpp b/common/gbr_metadata.cpp index 132d5aaaac..275fa80c2f 100644 --- a/common/gbr_metadata.cpp +++ b/common/gbr_metadata.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include wxString GbrMakeCreationDateAttributeString( GBR_NC_STRING_FORMAT aFormat ) diff --git a/common/swig/kicad.i b/common/swig/kicad.i index 6deddd0280..a0882395ad 100644 --- a/common/swig/kicad.i +++ b/common/swig/kicad.i @@ -164,8 +164,8 @@ typedef long time_t; %rename(utf8_to_wxstring) operator wxString () const; %rename(utf8_to_string) operator const std::string& () const; -#include -%include +#include +%include %extend UTF8 diff --git a/cvpcb/cvpcb_association.h b/cvpcb/cvpcb_association.h index c47f6cdb54..25462a9b00 100644 --- a/cvpcb/cvpcb_association.h +++ b/cvpcb/cvpcb_association.h @@ -22,7 +22,7 @@ #define CVPCB_ASSOCIATION_H #include -#include +#include /** * A class to define a footprint association to be made in cvpcb. diff --git a/include/font/stroke_font.h b/include/font/stroke_font.h index 7e2202656f..170b1f18eb 100644 --- a/include/font/stroke_font.h +++ b/include/font/stroke_font.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/lib_id.h b/include/lib_id.h index 76e6d263d6..46f500f314 100644 --- a/include/lib_id.h +++ b/include/lib_id.h @@ -27,7 +27,7 @@ #define _LIB_ID_H_ #include -#include +#include /** * A logical library item identifier and consists of various portions much like a URI. diff --git a/include/markup_parser.h b/include/markup_parser.h index 0007eede01..300269aac8 100644 --- a/include/markup_parser.h +++ b/include/markup_parser.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include namespace MARKUP diff --git a/include/richio.h b/include/richio.h index be6a97f953..49738b6361 100644 --- a/include/richio.h +++ b/include/richio.h @@ -30,7 +30,7 @@ #include -#include +#include // I really did not want to be dependent on wxWidgets in richio // but the errorText needs to be wide char so wxString rules. diff --git a/include/string_utf8_map.h b/include/string_utf8_map.h index 64d3f53860..8aa31cc134 100644 --- a/include/string_utf8_map.h +++ b/include/string_utf8_map.h @@ -23,7 +23,7 @@ #include #include -#include +#include /** diff --git a/libs/core/CMakeLists.txt b/libs/core/CMakeLists.txt index 4522cc6475..6c351a3143 100644 --- a/libs/core/CMakeLists.txt +++ b/libs/core/CMakeLists.txt @@ -9,6 +9,7 @@ add_library( core STATIC base64.cpp observable.cpp profile.cpp + utf8.cpp thread_pool.cpp version_compare.cpp wx_stl_compat.cpp diff --git a/include/utf8.h b/libs/core/include/core/utf8.h similarity index 100% rename from include/utf8.h rename to libs/core/include/core/utf8.h diff --git a/common/utf8.cpp b/libs/core/utf8.cpp similarity index 99% rename from common/utf8.cpp rename to libs/core/utf8.cpp index 144530afe8..c20ee2c9d1 100644 --- a/common/utf8.cpp +++ b/libs/core/utf8.cpp @@ -22,8 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include +#include #include #include #include diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index f66c924877..d3428d5522 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -417,6 +417,7 @@ set( SWIG_FLAGS -I${CMAKE_SOURCE_DIR}/scripting -I${CMAKE_SOURCE_DIR}/pcbnew/python/scripting -I${CMAKE_SOURCE_DIR}/common/swig + -I${CMAKE_SOURCE_DIR}/libs/core/include -I${CMAKE_SOURCE_DIR}/libs/kimath/include -I${CMAKE_BINARY_DIR} ) diff --git a/qa/tests/common/test_utf8.cpp b/qa/tests/common/test_utf8.cpp index 5f36caa405..afed6fd8f9 100644 --- a/qa/tests/common/test_utf8.cpp +++ b/qa/tests/common/test_utf8.cpp @@ -23,7 +23,7 @@ #include -#include +#include #include #include diff --git a/tools/utf8_tests.cpp b/tools/utf8_tests.cpp index be493c48ca..221367a253 100644 --- a/tools/utf8_tests.cpp +++ b/tools/utf8_tests.cpp @@ -1,7 +1,7 @@ #include -#include +#include #include