Resolve corelib's remaining ### Qt 6 comments

No action taken at Qt 6, suggesting it shall never happen.
Four removed, one converted to Qt 7, others converted to unversioned TODOs.
Filed Jira tasks, and referenced in comments, for those retained.

There remain two "once bootstrap builds are obsolete" comments and
one other on which pending action may yet happen.

Fixes: QTBUG-85700
Change-Id: Ib140a6a21c63370e51e4734cc591f67573a29d9a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Edward Welbourne 2020-10-26 13:23:55 +01:00
parent 4703e07a7c
commit 5b57ce06a8
9 changed files with 11 additions and 16 deletions

View File

@ -1160,7 +1160,7 @@ template <typename Ptr> inline auto qGetPtrHelper(Ptr &ptr) noexcept -> decltype
#define QT_TRANSLATE_NOOP3(scope, x, comment) {x, comment}
#define QT_TRANSLATE_NOOP3_UTF8(scope, x, comment) {x, comment}
#ifndef QT_NO_TRANSLATION // ### Qt6: This should enclose the NOOPs above
#ifndef QT_NO_TRANSLATION
#define QT_TR_N_NOOP(x) x
#define QT_TRANSLATE_N_NOOP(scope, x) x

View File

@ -890,7 +890,6 @@ QString QFileInfo::suffix() const
QDir QFileInfo::dir() const
{
Q_D(const QFileInfo);
// ### Qt 6: Maybe rename this to parentDirectory(), considering what it actually does?
return QDir(d->fileEntry.path());
}

View File

@ -98,7 +98,7 @@ public:
virtual bool open(OpenMode mode);
virtual void close();
// ### Qt 6: pos() and seek() should not be virtual, and
// ### Qt 7 - QTBUG-76492: pos() and seek() should not be virtual, and
// ### seek() should call a virtual seekData() function.
virtual qint64 pos() const;
virtual qint64 size() const;

View File

@ -2104,7 +2104,7 @@ bool QAbstractItemModel::clearItemData(const QModelIndex &index)
*/
bool QAbstractItemModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles)
{
// ### Qt 6: Consider change the semantics of this function,
// ### TODO: Consider change the semantics of this function,
// or deprecating/removing it altogether.
//
// For instance, it should try setting *all* the data

View File

@ -1282,7 +1282,7 @@ void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags)
*/
void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags, int ms)
{
// ### Qt 6: consider splitting this method into a public and a private
// ### TODO: consider splitting this method into a public and a private
// one, so that a user-invoked processEvents can be detected
// and handled properly.
QThreadData *data = QThreadData::current();
@ -1645,7 +1645,7 @@ bool QCoreApplication::compressEvent(QEvent *event, QObject *receiver, QPostEven
*/
void QCoreApplication::sendPostedEvents(QObject *receiver, int event_type)
{
// ### Qt 6: consider splitting this method into a public and a private
// ### TODO: consider splitting this method into a public and a private
// one, so that a user-invoked sendPostedEvents can be detected
// and handled properly.
QThreadData *data = QThreadData::current();

View File

@ -62,8 +62,7 @@
#include <QtCore/qvarlengtharray.h>
QT_BEGIN_NAMESPACE
// ### TODO Qt6: add a proper namespace with Q_NAMESPACE and use scoped enums
// A namespace and scoped are needed to avoid enum clashes
// ### TODO - QTBUG-87869: wrap in a proper Q_NAMESPACE and use scoped enums, to avoid name clashes
enum PropertyFlags {
Invalid = 0x00000000,

View File

@ -1025,8 +1025,6 @@ void QThread::requestInterruption()
return;
}
Q_D(QThread);
// ### Qt 6: use std::atomic_flag, and document that
// requestInterruption/isInterruptionRequested do not synchronize with each other
QMutexLocker locker(&d->mutex);
if (!d->running || d->finished || d->isInFinish)
return;

View File

@ -236,7 +236,6 @@ class QDateTimePrivate;
class Q_CORE_EXPORT QDateTime
{
// ### Qt 6: revisit the optimization
struct ShortData {
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
quintptr status : 8;

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2020 Intel Corporation.
** Copyright (C) 2019 Klarälvdalens Datakonsult AB.
** Contact: https://www.qt.io/licensing/
@ -692,8 +692,8 @@ public:
value = actual;
}
// ### Qt 6: remove users of this API; no one should ever access
// a weak pointer's data but the weak pointer itself
// ### TODO - QTBUG-88102: remove all users of this API; no one should ever
// access a weak pointer's data but the weak pointer itself
inline T *internalData() const noexcept
{
return d == nullptr || d->strongref.loadRelaxed() == 0 ? nullptr : value;
@ -889,8 +889,8 @@ qobject_cast(const QWeakPointer<T> &src)
return qSharedPointerObjectCast<typename QtSharedPointer::RemovePointer<X>::Type, T>(src);
}
/// ### Qt 6: make this use toStrongRef() (once support for storing
/// non-managed QObjects in QWeakPointer is removed)
/// ### TODO - QTBUG-88102: make this use toStrongRef() (once support for
/// storing non-managed QObjects in QWeakPointer is removed)
template<typename T>
QWeakPointer<typename std::enable_if<QtPrivate::IsPointerToTypeDerivedFromQObject<T*>::Value, T>::type>
qWeakPointerFromVariant(const QVariant &variant)