summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-24 15:06:05 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-25 17:02:41 +0200
commit51e138b6958bd5911a5c354c2bed25aae5c75759 (patch)
tree4cff0c103b1e603a163e67b1509a9797a40bea80
parent7f3b62324e738c7b8a8a90c165ae957a55be0671 (diff)
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>
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp2
-rw-r--r--src/corelib/doc/src/objectmodel/metaobjects.qdoc2
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp14
-rw-r--r--src/corelib/serialization/qxmlstream.cpp4
4 files changed, 7 insertions, 15 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp
index 36b47e6f6e..9ef08f1c6b 100644
--- a/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp
@@ -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]
diff --git a/src/corelib/doc/src/objectmodel/metaobjects.qdoc b/src/corelib/doc/src/objectmodel/metaobjects.qdoc
index 53b34fe120..ada6a6dea1 100644
--- a/src/corelib/doc/src/objectmodel/metaobjects.qdoc
+++ b/src/corelib/doc/src/objectmodel/metaobjects.qdoc
@@ -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.
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 86530f0cfc..29d31304be 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -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
diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
index 7df0990922..3aa868e368 100644
--- a/src/corelib/serialization/qxmlstream.cpp
+++ b/src/corelib/serialization/qxmlstream.cpp
@@ -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>