Remove traces of QObject::trUtf8 from documentation

... and from the duplicated Q_DECLARE_TR_FUNCTION macro for QXmlStream.
We expect source code to be utf8 encoded in Qt 6, so the function is gone.

Change-Id: Ie25329a54e709dc92a22893ad5ab023852300d81
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
bb10
Volker Hilsheimer 2020-09-24 15:06:05 +02:00
parent 7f3b62324e
commit 51e138b695
4 changed files with 7 additions and 15 deletions

View File

@ -126,8 +126,6 @@ private:
//! [6]
static inline QString tr(const char *sourceText,
const char *comment = nullptr);
static inline QString trUtf8(const char *sourceText,
const char *comment = nullptr);
//! [6]

View File

@ -72,7 +72,7 @@
\li QObject::inherits() function returns whether an object is an
instance of a class that inherits a specified class within the
QObject inheritance tree.
\li QObject::tr() and QObject::trUtf8() translate strings for
\li QObject::tr() translates strings for
\l{Internationalization with Qt}{internationalization}.
\li QObject::setProperty() and QObject::property()
dynamically set and get properties by name.

View File

@ -660,8 +660,7 @@ void QCoreApplicationPrivate::initLocale()
Translation files can be added or removed
using installTranslator() and removeTranslator(). Application
strings can be translated using translate(). The QObject::tr()
and QObject::trUtf8() functions are implemented in terms of
translate().
function is implemented in terms of translate().
\section1 Accessing Command Line Arguments
@ -3027,14 +3026,13 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
\macro Q_DECLARE_TR_FUNCTIONS(context)
\relates QCoreApplication
The Q_DECLARE_TR_FUNCTIONS() macro declares and implements two
translation functions, \c tr() and \c trUtf8(), with these
signatures:
The Q_DECLARE_TR_FUNCTIONS() macro declares and implements the
translation function \c tr() with this signature:
\snippet code/src_corelib_kernel_qcoreapplication.cpp 6
This macro is useful if you want to use QObject::tr() or
QObject::trUtf8() in classes that don't inherit from QObject.
This macro is useful if you want to use QObject::tr() in classes
that don't inherit from QObject.
Q_DECLARE_TR_FUNCTIONS() must appear at the very top of the
class definition (before the first \c{public:} or \c{protected:}).
@ -3045,7 +3043,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
The \a context parameter is normally the class name, but it can
be any text.
\sa Q_OBJECT, QObject::tr(), QObject::trUtf8()
\sa Q_OBJECT, QObject::tr()
*/
QT_END_NAMESPACE

View File

@ -59,12 +59,8 @@
public: \
static inline QString tr(const char *sourceText, const char *comment = nullptr) \
{ Q_UNUSED(comment); return QString::fromUtf8(sourceText); } \
static inline QString trUtf8(const char *sourceText, const char *comment = nullptr) \
{ Q_UNUSED(comment); return QString::fromUtf8(sourceText); } \
static inline QString tr(const char *sourceText, const char*, int) \
{ return QString::fromUtf8(sourceText); } \
static inline QString trUtf8(const char *sourceText, const char*, int) \
{ return QString::fromUtf8(sourceText); } \
private:
#endif
#include <private/qmemory_p.h>