From c1c61c3bb468b9db7b3bf1ca49e8b71a146ff780 Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Fri, 5 Mar 2021 11:03:20 +0100 Subject: [PATCH 1/2] Doc: Fix section titles that confuse QDoc's autolinker Fixes: QTBUG-91620 Pick-to: 6.1 6.0 Change-Id: I7c407c7158324d1fbbeb78e47d2198e8ddf5daa0 Reviewed-by: Fabian Kosmale --- src/corelib/doc/src/qt6-changes.qdoc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/corelib/doc/src/qt6-changes.qdoc b/src/corelib/doc/src/qt6-changes.qdoc index 570dc45e937..7e048ead782 100644 --- a/src/corelib/doc/src/qt6-changes.qdoc +++ b/src/corelib/doc/src/qt6-changes.qdoc @@ -307,7 +307,7 @@ \section1 String related classes - \section2 QStringView + \section2 The QStringView class Starting with Qt6 it is generally recommended to use \l QStringView over \c QStringRef. \l QStringView references a contiguous portion of a UTF-16 @@ -332,7 +332,7 @@ string += ...; \endcode - \section2 QStringRef + \section2 The QStringRef class In Qt6 \l QStringRef got removed from Qt Core. To ease porting of existing applications without touching the whole code-base, the \c QStringRef class @@ -403,7 +403,7 @@ \section1 QFuture and Related Classes - \section2 QFuture + \section2 The QFuture class To avoid unintended usage of QFuture, there were some changes to QFuture API in Qt 6, which may introduce source compatibility breaks. @@ -470,14 +470,14 @@ \endlist - \section2 QPromise + \section2 The QPromise class In Qt 6, the new QPromise class should be used instead of unofficial QFutureInterface as a "setter" counterpart of QFuture. \section1 IO Classes - \section2 QProcess + \section2 The QProcess class In Qt 6, the QProcess::start() overload that interprets a single command string by splitting it into program name and arguments is renamed to QProcess::startCommand(). @@ -508,7 +508,7 @@ \section1 Meta-Type system - \section2 QVariant + \section2 The QVariant class \c QVariant has been rewritten to use \c QMetaType for all of its operations. This implies behavior changes in a few methods: @@ -529,7 +529,7 @@ \endlist - \section2 QMetaType + \section2 The QMetaType class In Qt 6, registration of comparators, and \cQDebug and \QDataStream streaming operators is done automatically. Consequently, \c QMetaType::registerEqualsComparator(), @@ -555,7 +555,7 @@ \section1 Regular expression classes - \section2 QRegularExpression + \section2 The QRegularExpression class In Qt6, all methods taking the \c QRegExp got removed from our code-base. Therefore it is very likely that you will have to port your application or @@ -786,7 +786,7 @@ {QRegularExpression::UseUnicodePropertiesOption} pattern option. - \section2 QRegExp + \section2 The QRegExp class In Qt6 \l QRegExp got removed from Qt Core. If your application cannot be ported right now, \c QRegExp still exists in Qt5Compat to keep these From a913002f13d8a2faad512ffda6c70f413b8e7ee5 Mon Sep 17 00:00:00 2001 From: Wang Yicun Date: Thu, 4 Mar 2021 17:19:55 +0800 Subject: [PATCH 2/2] Simplify code, remove redundant condition 'clazz || (!clazz && isCached)' is equivalent to 'clazz || isCached' Done-with: Tang Peng Pick-to: 6.1 Change-Id: Ie9eab4a94a61be2b360f64980c4666a622f3a209 Reviewed-by: Volker Hilsheimer --- src/corelib/kernel/qjni.cpp | 4 +--- src/corelib/kernel/qjniobject.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/corelib/kernel/qjni.cpp b/src/corelib/kernel/qjni.cpp index b593483e597..3750fdb9bc4 100644 --- a/src/corelib/kernel/qjni.cpp +++ b/src/corelib/kernel/qjni.cpp @@ -280,9 +280,7 @@ jclass QJNIEnvironmentPrivate::findClass(const char *className, JNIEnv *env) bool isCached = false; jclass clazz = getCachedClass(classDotEnc, &isCached); - const bool found = (clazz != 0) || (clazz == 0 && isCached); - - if (found) + if (clazz || isCached) return clazz; const QLatin1String key(classDotEnc); diff --git a/src/corelib/kernel/qjniobject.cpp b/src/corelib/kernel/qjniobject.cpp index 43840052ae1..f141c2d84e4 100644 --- a/src/corelib/kernel/qjniobject.cpp +++ b/src/corelib/kernel/qjniobject.cpp @@ -467,9 +467,7 @@ jclass QtAndroidPrivate::findClass(const char *className, JNIEnv *env) bool isCached = false; jclass clazz = getCachedClass(classDotEnc, &isCached); - const bool found = clazz || (!clazz && isCached); - - if (found) + if (clazz || isCached) return clazz; const QLatin1String key(classDotEnc);