4#include "private/qqmltranslation_p.h"
13 using T = std::decay_t<
decltype(
arg)>;
14 if constexpr (!std::is_same_v<T, std::nullptr_t>)
15 return arg.translate();
17 Q_ASSERT_X(
false,
"QQmlTranslation",
"Uninitialized Translation");
28 using T = std::decay_t<
decltype(
arg)>;
29 if constexpr (!std::is_same_v<T, std::nullptr_t>)
30 return arg.serializeForQmltc();
32 Q_ASSERT_X(
false,
"QQmlTranslation",
"Uninitialized Translation");
43 using T = std::decay_t<
decltype(
arg)>;
44 if constexpr (!std::is_same_v<T, std::nullptr_t>)
45 return arg.idForQmlDebug();
47 Q_ASSERT_X(
false,
"QQmlTranslation",
"Uninitialized Translation");
71#if !QT_CONFIG(translation)
104#if !QT_CONFIG(translation)
114 QStringLiteral("%1"),
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
QString translate() const
QString idForQmlDebug() const
QsTrData(const QString &fileNameForContext, const QString &text, const QString &comment, int number)
QString serializeForQmltc() const
QString serializeForQmltc() const
QsTrIdData(const QString &id, int number)
QString translate() const
QString idForQmlDebug() const
QString idForQmlDebug() const
QString serializeForQmltc() const
static QString contextFromQmlFilename(const QString &qmlFilename)
std::variant< std::nullptr_t, QsTrData, QsTrIdData > Data
QString translate() const
QString toString() const
Returns a deep copy of this string view's data as a QString.
\macro QT_RESTRICTED_CAST_FROM_ASCII
qsizetype lastIndexOf(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
qsizetype size() const
Returns the number of characters in this string.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define Q_ASSERT_X(cond, x, msg)
#define QStringLiteral(str)
Q_CORE_EXPORT QString qtTrId(const char *id, int n=-1)
\inmodule QtCore \reentrant