Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
e5a339aa
Commit
e5a339aa
authored
Nov 12, 2022
by
Volker Krause
Browse files
Attempt to fix the unity build on binary factory
parent
d4c89c1e
Pipeline
#266715
passed with stage
in 3 minutes and 4 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/lib/asn1/uperelement.h
View file @
e5a339aa
...
...
@@ -11,7 +11,7 @@
namespace
KItinerary
{
// The property counter thing is based on the approach described here https://woboq.com/blog/verdigris-implementation-tricks.html
namespace
detail
{
namespace
uper_
detail
{
template
<
int
N
=
255
>
struct
num
:
public
num
<
N
-
1
>
{
static
constexpr
int
value
=
N
;
static
constexpr
num
<
N
-
1
>
prev
()
{
return
{};
}
...
...
@@ -22,13 +22,13 @@ template <> struct num<0> { static constexpr int value = 0; };
// start of an ASN.1 SEQUENCE definition
#define UPER_GADGET \
Q_GADGET \
static constexpr detail::num<0> _uper_optional_counter(detail::num<0>) { return {}; } \
static constexpr
uper_
detail::num<0> _uper_optional_counter(
uper_
detail::num<0>) { return {}; } \
static constexpr bool _uper_ExtensionMarker = false;
// same as UPER_GADGET, for SEQUENCES with an extension marker
#define UPER_EXTENDABLE_GADGET \
Q_GADGET \
static constexpr detail::num<0> _uper_optional_counter(detail::num<0>) { return {}; } \
static constexpr
uper_
detail::num<0> _uper_optional_counter(
uper_
detail::num<0>) { return {}; } \
static constexpr bool _uper_ExtensionMarker = true;
// ASN.1 ENUMERATED definitions, with or without extension marker
...
...
@@ -50,8 +50,8 @@ public: \
Q_PROPERTY(Type Name MEMBER Name CONSTANT) \
Q_PROPERTY(bool Name ## IsSet READ Name ## IsSet) \
private: \
static constexpr int _uper_ ## Name ## OptionalIndex = decltype(_uper_optional_counter(detail::num<>()))::value; \
static constexpr auto _uper_optional_counter(detail::num<decltype(_uper_optional_counter(detail::num<>()))::value + 1> n) \
static constexpr int _uper_ ## Name ## OptionalIndex = decltype(_uper_optional_counter(
uper_
detail::num<>()))::value; \
static constexpr auto _uper_optional_counter(
uper_
detail::num<decltype(_uper_optional_counter(
uper_
detail::num<>()))::value + 1> n) \
-> decltype(n) { return {}; } \
public: \
inline bool Name ## IsSet() const { return m_optionals[m_optionals.size() - _uper_ ## Name ## OptionalIndex - 1]; }
...
...
@@ -61,8 +61,8 @@ public: \
Type Name = DefaultValue; \
Q_PROPERTY(Type Name MEMBER Name CONSTANT) \
private: \
static constexpr int _uper_ ## Name ## OptionalIndex = decltype(_uper_optional_counter(detail::num<>()))::value; \
static constexpr auto _uper_optional_counter(detail::num<decltype(_uper_optional_counter(detail::num<>()))::value + 1> n) \
static constexpr int _uper_ ## Name ## OptionalIndex = decltype(_uper_optional_counter(
uper_
detail::num<>()))::value; \
static constexpr auto _uper_optional_counter(
uper_
detail::num<decltype(_uper_optional_counter(
uper_
detail::num<>()))::value + 1> n) \
-> decltype(n) { return {}; } \
inline bool Name ## IsSet() const { return m_optionals[m_optionals.size() - _uper_ ## Name ## OptionalIndex - 1]; }
}
...
...
@@ -71,7 +71,7 @@ private: \
public: \
void decode(UPERDecoder &decoder); \
private: \
static constexpr auto _uper_OptionalCount = decltype(_uper_optional_counter(detail::num<>()))::value; \
static constexpr auto _uper_OptionalCount = decltype(_uper_optional_counter(
uper_
detail::num<>()))::value; \
std::bitset<_uper_OptionalCount> m_optionals; \
inline void decodeSequence(UPERDecoder &decoder) { \
if constexpr (_uper_ExtensionMarker) { \
...
...
src/lib/json/jsonldfilterengine.cpp
View file @
e5a339aa
...
...
@@ -13,7 +13,7 @@
using
namespace
KItinerary
;
void
JsonLd
::
renameProperty
(
QJsonObject
&
obj
,
const
char
*
oldName
,
const
char
*
newName
)
void
KItinerary
::
JsonLd
::
renameProperty
(
QJsonObject
&
obj
,
const
char
*
oldName
,
const
char
*
newName
)
{
const
auto
value
=
obj
.
value
(
QLatin1String
(
oldName
));
if
(
!
value
.
isUndefined
()
&&
!
obj
.
contains
(
QLatin1String
(
newName
)))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment