8 #include <QStringBuilder>
9 #include <QThreadStorage>
18 auto &jsonStack() noexcept {
return g_stack.localData(); }
21 void CJsonException::anchor() {}
29 QString CJsonException::stackString()
32 for (
const auto scope : std::as_const(jsonStack()))
34 list.
push_back(scope->m_string ? *scope->m_string : scope->m_latin1);
37 return list.
isEmpty() ? QStringLiteral(
"<document root>") : list.join(
'.');
40 void CJsonScope::push() const noexcept { jsonStack().push_back(
this); }
42 void CJsonScope::pop() const noexcept
44 Q_ASSERT(jsonStack().back() ==
this);
45 jsonStack().pop_back();
QString toString(const QString &prefix) const
As string info.
const QString & getStackTrace() const
Get a stack trace of where in the JSON object tree the error occurred.
Free functions in swift::misc.
QList< T >::reference back()
bool isEmpty() const const
void push_back(QList< T >::parameter_type value)
QString arg(Args &&... args) const const
bool isEmpty() const const
QString number(double n, char format, int precision)