--- konsole-23.04.1/src/characters/Character.h_orig 2023-05-06 14:09:17.000000000 +0600 +++ konsole-23.04.1/src/characters/Character.h 2023-05-19 09:20:18.240773762 +0600 @@ -24,7 +24,7 @@ class LineProperty { public: - explicit constexpr LineProperty(quint16 f = 0, uint l = 0, uint c = 0) + explicit inline LineProperty(quint16 f = 0, uint l = 0, uint c = 0) : flags({f}) , length(l) , counter(c) @@ -189,21 +189,21 @@ /** * returns true if the format (color, rendition flag) of the compared characters is equal */ - constexpr bool equalsFormat(const Character &other) const; + bool equalsFormat(const Character &other) const; /** * Compares two characters and returns true if they have the same unicode character value, * rendition and colors. */ - friend constexpr bool operator==(const Character &a, const Character &b); + friend bool operator==(const Character &a, const Character &b); /** * Compares two characters and returns true if they have different unicode character values, * renditions or colors. */ - friend constexpr bool operator!=(const Character &a, const Character &b); + friend bool operator!=(const Character &a, const Character &b); - constexpr bool isSpace() const + inline bool isSpace() const { if (rendition.f.extended) { return false; @@ -212,7 +212,7 @@ } } - int width() const + inline int width() const { return width(character); } @@ -399,21 +399,21 @@ } }; -constexpr bool operator==(const Character &a, const Character &b) +inline bool operator==(const Character &a, const Character &b) { return a.character == b.character && a.equalsFormat(b); } -constexpr bool operator!=(const Character &a, const Character &b) +inline bool operator!=(const Character &a, const Character &b) { return !operator==(a, b); } -constexpr bool Character::equalsFormat(const Character &other) const +inline bool Character::equalsFormat(const Character &other) const { return backgroundColor == other.backgroundColor && foregroundColor == other.foregroundColor && rendition.all == other.rendition.all; } } -Q_DECLARE_TYPEINFO(Konsole::Character, Q_MOVABLE_TYPE); +Q_DECLARE_TYPEINFO(Konsole::Character, Q_PRIMITIVE_TYPE); #endif // CHARACTER_H --- konsole-23.04.1/src/characters/CharacterColor.h_orig 2023-05-19 09:23:16.269680184 +0600 +++ konsole-23.04.1/src/characters/CharacterColor.h 2023-05-06 14:09:17.000000000 +0600 @@ -92,7 +92,7 @@ public: /** Constructs a new CharacterColor whose color and color space are undefined. */ - CharacterColor() + constexpr CharacterColor() : _colorSpace(COLOR_SPACE_UNDEFINED) , _u(0) , _v(0) @@ -110,7 +110,7 @@ * * TODO : Add documentation about available color spaces. */ - CharacterColor(quint8 colorSpace, int co) + constexpr CharacterColor(quint8 colorSpace, int co) : _colorSpace(colorSpace) , _u(0) , _v(0) @@ -137,11 +137,11 @@ } } - quint8 colorSpace() const + constexpr quint8 colorSpace() const { return _colorSpace; } - void termColor(int *u, int *v, int *w) + constexpr void termColor(int *u, int *v, int *w) { *u = _u; *v = _v; @@ -151,7 +151,7 @@ /** * Returns true if this character color entry is valid. */ - bool isValid() const + constexpr bool isValid() const { return _colorSpace != COLOR_SPACE_UNDEFINED; } @@ -178,13 +178,13 @@ * The @p base is only used if this color is one of the 16 system colors, otherwise * it is ignored. */ - QColor color(const QColor *base) const; + constexpr QColor color(const QColor *base) const; /** * Compares two colors and returns true if they represent the same color value and * use the same color space. */ - friend bool operator==(const CharacterColor a, const CharacterColor b) + friend constexpr bool operator==(const CharacterColor a, const CharacterColor b) { return std::tie(a._colorSpace, a._u, a._v, a._w) == std::tie(b._colorSpace, b._u, b._v, b._w); } @@ -192,7 +192,7 @@ * Compares two colors and returns true if they represent different color values * or use different color spaces. */ - friend bool operator!=(const CharacterColor a, const CharacterColor b) + friend constexpr bool operator!=(const CharacterColor a, const CharacterColor b) { return !operator==(a, b); } @@ -206,7 +206,7 @@ quint8 _w; }; -inline QColor color256(quint8 u, const QColor *base) +constexpr QColor color256(quint8 u, const QColor *base) { // 0.. 16: system colors if (u < 8) { @@ -232,7 +232,7 @@ return QColor(gray, gray, gray); } -inline QColor CharacterColor::color(const QColor *base) const +constexpr QColor CharacterColor::color(const QColor *base) const { switch (_colorSpace) { case COLOR_SPACE_DEFAULT: