summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qvector.cpp23
-rw-r--r--src/corelib/plugin/qfactoryinterface.cpp1
-rw-r--r--src/corelib/thread/qrunnable.cpp1
-rw-r--r--src/corelib/tools/qarraydataops.h58
-rw-r--r--src/corelib/tools/qcontiguouscache.h10
-rw-r--r--src/corelib/tools/qcryptographichash.cpp100
-rw-r--r--src/corelib/tools/qcryptographichash.h2
-rw-r--r--src/corelib/tools/qvector.h64
-rw-r--r--src/corelib/tools/qvector.qdoc53
-rw-r--r--src/gui/accessible/qaccessible.cpp17
-rw-r--r--src/gui/kernel/qevent.cpp1
-rw-r--r--src/gui/kernel/qopenglcontext.cpp39
-rw-r--r--src/gui/kernel/qopenglcontext.h6
-rw-r--r--src/gui/kernel/qopenglcontext_p.h7
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.cpp1
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase.cpp18
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase_p.h2
-rw-r--r--src/printsupport/dialogs/qpagesetupdialog_unix.cpp14
-rw-r--r--src/widgets/accessible/rangecontrols.cpp2
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp4
-rw-r--r--src/widgets/doc/snippets/qstackedlayout/main.cpp2
-rw-r--r--src/widgets/doc/snippets/qstackedwidget/main.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.cpp31
-rw-r--r--src/widgets/widgets/qcombobox.h6
-rw-r--r--src/widgets/widgets/qspinbox.cpp34
-rw-r--r--src/widgets/widgets/qspinbox.h8
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp15
-rw-r--r--src/widgets/widgets/qtextbrowser.h4
28 files changed, 233 insertions, 292 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qvector.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qvector.cpp
index a05233049f..76a8d68f64 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qvector.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qvector.cpp
@@ -115,6 +115,29 @@ vector.append(std::move(three));
//! [move-append]
+//! [emplace]
+QVector<QString> vector{"a", "ccc"};
+vector.emplace(1, 2, 'b');
+// vector: ["a", "bb", "ccc"]
+//! [emplace]
+
+
+//! [emplace-back]
+QVector<QString> vector{"one", "two"};
+vector.emplaceBack(3, 'a');
+qDebug() << vector;
+// vector: ["one", "two", "aaa"]
+//! [emplace-back]
+
+
+//! [emplace-back-ref]
+QVector<QString> vector;
+auto &ref = vector.emplaceBack();
+ref = "one";
+// vector: ["one"]
+//! [emplace-back-ref]
+
+
//! [8]
QVector<QString> vector;
vector.prepend("one");
diff --git a/src/corelib/plugin/qfactoryinterface.cpp b/src/corelib/plugin/qfactoryinterface.cpp
index 353c2478f4..b503c245c5 100644
--- a/src/corelib/plugin/qfactoryinterface.cpp
+++ b/src/corelib/plugin/qfactoryinterface.cpp
@@ -43,7 +43,6 @@ QT_BEGIN_NAMESPACE
QFactoryInterface::~QFactoryInterface()
{
- // must be empty until ### Qt 6
}
QT_END_NAMESPACE
diff --git a/src/corelib/thread/qrunnable.cpp b/src/corelib/thread/qrunnable.cpp
index bd0a32b53d..b355ca605f 100644
--- a/src/corelib/thread/qrunnable.cpp
+++ b/src/corelib/thread/qrunnable.cpp
@@ -43,7 +43,6 @@ QT_BEGIN_NAMESPACE
QRunnable::~QRunnable()
{
- // Must be empty until ### Qt 6
}
/*!
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index 0d2be5d51c..1d74f49993 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -117,6 +117,9 @@ struct QPodArrayOps
this->size += int(n);
}
+ template <typename ...Args>
+ void emplaceBack(Args&&... args) { this->emplace(this->end(), T(std::forward<Args>(args)...)); }
+
void truncate(size_t newSize)
{
Q_ASSERT(this->isMutable());
@@ -163,16 +166,28 @@ struct QPodArrayOps
*where++ = t;
}
- void insert(T *where, T &&t)
+ template <typename ...Args>
+ void createInPlace(T *where, Args&&... args) { new (where) T(std::forward<Args>(args)...); }
+
+ template <typename ...Args>
+ void emplace(T *where, Args&&... args)
{
Q_ASSERT(!this->isShared());
Q_ASSERT(where >= this->begin() && where <= this->end());
Q_ASSERT(this->allocatedCapacity() - this->size >= 1);
- ::memmove(static_cast<void *>(where + 1), static_cast<void *>(where),
- (static_cast<const T*>(this->end()) - where) * sizeof(T));
- this->size += 1;
- new (where) T(std::move(t));
+ if (where == this->end()) {
+ new (this->end()) T(std::forward<Args>(args)...);
+ } else {
+ // Preserve the value, because it might be a reference to some part of the moved chunk
+ T t(std::forward<Args>(args)...);
+
+ ::memmove(static_cast<void *>(where + 1), static_cast<void *>(where),
+ (static_cast<const T*>(this->end()) - where) * sizeof(T));
+ *where = t;
+ }
+
+ ++this->size;
}
@@ -289,6 +304,12 @@ struct QGenericArrayOps
}
}
+ template <typename ...Args>
+ void emplaceBack(Args&&... args)
+ {
+ this->emplace(this->end(), std::forward<Args>(args)...);
+ }
+
void truncate(size_t newSize)
{
Q_ASSERT(this->isMutable());
@@ -444,31 +465,20 @@ struct QGenericArrayOps
}
}
- void insert(T *where, T &&t)
+ template <typename ...Args>
+ void createInPlace(T *where, Args&&... args) { new (where) T(std::forward<Args>(args)...); }
+
+ template <typename iterator, typename ...Args>
+ void emplace(iterator where, Args&&... args)
{
Q_ASSERT(!this->isShared());
Q_ASSERT(where >= this->begin() && where <= this->end());
Q_ASSERT(this->allocatedCapacity() - this->size >= 1);
- // Array may be truncated at where in case of exceptions
- T *const end = this->end();
-
- if (where != end) {
- // Move elements in array
- T *readIter = end - 1;
- T *writeIter = end;
- new (writeIter) T(std::move(*readIter));
- while (readIter > where) {
- --readIter;
- --writeIter;
- *writeIter = std::move(*readIter);
- }
- *where = std::move(t);
- } else {
- new (where) T(std::move(t));
- }
-
+ createInPlace(this->end(), std::forward<Args>(args)...);
++this->size;
+
+ std::rotate(where, this->end() - 1, this->end());
}
void erase(T *b, T *e)
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index 8cae7d1651..451ba3e8de 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -56,8 +56,6 @@ struct Q_CORE_EXPORT QContiguousCacheData
int count;
int start;
int offset;
- uint sharable : 1;
- uint reserved : 31;
// total is 24 bytes (HP-UX aCC: 40 bytes)
// the next entry is already aligned to 8 bytes
@@ -96,7 +94,7 @@ public:
typedef int size_type;
explicit QContiguousCache(int capacity = 0);
- QContiguousCache(const QContiguousCache<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
+ QContiguousCache(const QContiguousCache<T> &v) : d(v.d) { d->ref.ref(); }
inline ~QContiguousCache() { if (!d) return; if (!d->ref.deref()) freeData(p); }
@@ -178,8 +176,6 @@ void QContiguousCache<T>::detach_helper()
x.d->start = d->start;
x.d->offset = d->offset;
x.d->alloc = d->alloc;
- x.d->sharable = true;
- x.d->reserved = 0;
T *dest = x.p->array + x.d->start;
T *src = p->array + d->start;
@@ -267,7 +263,6 @@ void QContiguousCache<T>::clear()
x.d->ref.storeRelaxed(1);
x.d->alloc = d->alloc;
x.d->count = x.d->start = x.d->offset = 0;
- x.d->sharable = true;
if (!d->ref.deref()) freeData(p);
d = x.d;
}
@@ -287,7 +282,6 @@ QContiguousCache<T>::QContiguousCache(int cap)
d->ref.storeRelaxed(1);
d->alloc = cap;
d->count = d->start = d->offset = 0;
- d->sharable = true;
}
template <typename T>
@@ -297,8 +291,6 @@ QContiguousCache<T> &QContiguousCache<T>::operator=(const QContiguousCache<T> &o
if (!d->ref.deref())
freeData(p);
d = other.d;
- if (!d->sharable)
- detach_helper();
return *this;
}
diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp
index fa8d21e07a..1d4afabedd 100644
--- a/src/corelib/tools/qcryptographichash.cpp
+++ b/src/corelib/tools/qcryptographichash.cpp
@@ -359,53 +359,67 @@ void QCryptographicHash::reset()
Adds the first \a length chars of \a data to the cryptographic
hash.
*/
-void QCryptographicHash::addData(const char *data, int length)
+void QCryptographicHash::addData(const char *data, qsizetype length)
{
- switch (d->method) {
- case Sha1:
- sha1Update(&d->sha1Context, (const unsigned char *)data, length);
- break;
+ Q_ASSERT(length >= 0);
+
+#if QT_POINTER_SIZE == 8
+ // feed the data UINT_MAX bytes at a time, as some of the methods below
+ // take a uint (of course, feeding more than 4G of data into the hashing
+ // functions will be pretty slow anyway)
+ qsizetype remaining = length;
+ while (remaining) {
+ length = qMin(qsizetype(std::numeric_limits<uint>::max()), remaining);
+ remaining -= length;
+#else
+ {
+#endif
+ switch (d->method) {
+ case Sha1:
+ sha1Update(&d->sha1Context, (const unsigned char *)data, length);
+ break;
#ifdef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
- default:
- Q_ASSERT_X(false, "QCryptographicHash", "Method not compiled in");
- Q_UNREACHABLE();
- break;
+ default:
+ Q_ASSERT_X(false, "QCryptographicHash", "Method not compiled in");
+ Q_UNREACHABLE();
+ break;
#else
- case Md4:
- md4_update(&d->md4Context, (const unsigned char *)data, length);
- break;
- case Md5:
- MD5Update(&d->md5Context, (const unsigned char *)data, length);
- break;
- case Sha224:
- SHA224Input(&d->sha224Context, reinterpret_cast<const unsigned char *>(data), length);
- break;
- case Sha256:
- SHA256Input(&d->sha256Context, reinterpret_cast<const unsigned char *>(data), length);
- break;
- case Sha384:
- SHA384Input(&d->sha384Context, reinterpret_cast<const unsigned char *>(data), length);
- break;
- case Sha512:
- SHA512Input(&d->sha512Context, reinterpret_cast<const unsigned char *>(data), length);
- break;
- case RealSha3_224:
- case Keccak_224:
- sha3Update(&d->sha3Context, reinterpret_cast<const BitSequence *>(data), quint64(length) * 8);
- break;
- case RealSha3_256:
- case Keccak_256:
- sha3Update(&d->sha3Context, reinterpret_cast<const BitSequence *>(data), quint64(length) * 8);
- break;
- case RealSha3_384:
- case Keccak_384:
- sha3Update(&d->sha3Context, reinterpret_cast<const BitSequence *>(data), quint64(length) * 8);
- break;
- case RealSha3_512:
- case Keccak_512:
- sha3Update(&d->sha3Context, reinterpret_cast<const BitSequence *>(data), quint64(length) * 8);
- break;
+ case Md4:
+ md4_update(&d->md4Context, (const unsigned char *)data, length);
+ break;
+ case Md5:
+ MD5Update(&d->md5Context, (const unsigned char *)data, length);
+ break;
+ case Sha224:
+ SHA224Input(&d->sha224Context, reinterpret_cast<const unsigned char *>(data), length);
+ break;
+ case Sha256:
+ SHA256Input(&d->sha256Context, reinterpret_cast<const unsigned char *>(data), length);
+ break;
+ case Sha384:
+ SHA384Input(&d->sha384Context, reinterpret_cast<const unsigned char *>(data), length);
+ break;
+ case Sha512:
+ SHA512Input(&d->sha512Context, reinterpret_cast<const unsigned char *>(data), length);
+ break;
+ case RealSha3_224:
+ case Keccak_224:
+ sha3Update(&d->sha3Context, reinterpret_cast<const BitSequence *>(data), quint64(length) * 8);
+ break;
+ case RealSha3_256:
+ case Keccak_256:
+ sha3Update(&d->sha3Context, reinterpret_cast<const BitSequence *>(data), quint64(length) * 8);
+ break;
+ case RealSha3_384:
+ case Keccak_384:
+ sha3Update(&d->sha3Context, reinterpret_cast<const BitSequence *>(data), quint64(length) * 8);
+ break;
+ case RealSha3_512:
+ case Keccak_512:
+ sha3Update(&d->sha3Context, reinterpret_cast<const BitSequence *>(data), quint64(length) * 8);
+ break;
#endif
+ }
}
d->result.clear();
}
diff --git a/src/corelib/tools/qcryptographichash.h b/src/corelib/tools/qcryptographichash.h
index ad1de7c756..f76fe2d013 100644
--- a/src/corelib/tools/qcryptographichash.h
+++ b/src/corelib/tools/qcryptographichash.h
@@ -94,7 +94,7 @@ public:
void reset();
- void addData(const char *data, int length);
+ void addData(const char *data, qsizetype length);
void addData(const QByteArray &data);
bool addData(QIODevice* device);
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 3e98de41f4..2cfcb2e5dc 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -242,10 +242,14 @@ public:
void append(const_reference t)
{ append(const_iterator(std::addressof(t)), const_iterator(std::addressof(t)) + 1); }
void append(const_iterator i1, const_iterator i2);
- void append(value_type &&t);
+ void append(rvalue_ref t) { emplaceBack(std::move(t)); }
void append(const QVector<T> &l) { append(l.constBegin(), l.constEnd()); }
void prepend(rvalue_ref t);
void prepend(const T &t);
+
+ template <typename ...Args>
+ reference emplaceBack(Args&&... args) { return *emplace(count(), std::forward<Args>(args)...); }
+
iterator insert(int i, parameter_type t)
{ return insert(i, 1, t); }
iterator insert(int i, int n, parameter_type t);
@@ -264,7 +268,17 @@ public:
Q_ASSERT_X(isValidIterator(before), "QVector::insert", "The specified iterator argument 'before' is invalid");
return insert(std::distance(constBegin(), before), std::move(t));
}
- iterator insert(int i, rvalue_ref t);
+ iterator insert(int i, rvalue_ref t) { return emplace(i, std::move(t)); }
+
+ template <typename ...Args>
+ iterator emplace(const_iterator before, Args&&... args)
+ {
+ Q_ASSERT_X(isValidIterator(before), "QVector::emplace", "The specified iterator argument 'before' is invalid");
+ return emplace(std::distance(constBegin(), before), std::forward<Args>(args)...);
+ }
+
+ template <typename ...Args>
+ iterator emplace(int i, Args&&... args);
#if 0
template< class InputIt >
iterator insert( const_iterator pos, InputIt first, InputIt last );
@@ -388,6 +402,10 @@ public:
inline void push_front(const T &t) { prepend(t); }
void pop_back() { removeLast(); }
void pop_front() { removeFirst(); }
+
+ template <typename ...Args>
+ reference emplace_back(Args&&... args) { return emplaceBack(std::forward<Args>(args)...); }
+
inline bool empty() const
{ return d->size == 0; }
inline reference front() { return first(); }
@@ -538,27 +556,6 @@ inline void QVector<T>::append(const_iterator i1, const_iterator i2)
}
template <typename T>
-inline void QVector<T>::append(value_type &&t)
-{
- const size_t newSize = size() + 1;
- const bool isTooSmall = newSize > d->allocatedCapacity();
- const bool isOverlapping = std::addressof(*d->begin()) <= std::addressof(t)
- && std::addressof(t) < std::addressof(*d->end());
- if (isTooSmall || d->needsDetach() || Q_UNLIKELY(isOverlapping)) {
- typename Data::ArrayOptions flags = d->detachFlags();
- if (isTooSmall)
- flags |= Data::GrowsForward;
- DataPointer detached(Data::allocate(d->detachCapacity(newSize), flags));
- detached->copyAppend(constBegin(), constEnd());
- detached->moveAppend(std::addressof(t), std::addressof(t) + 1);
- d.swap(detached);
- } else {
- // we're detached and we can just move data around
- d->moveAppend(std::addressof(t), std::addressof(t) + 1);
- }
-}
-
-template <typename T>
inline typename QVector<T>::iterator
QVector<T>::insert(int i, int n, parameter_type t)
{
@@ -592,10 +589,11 @@ QVector<T>::insert(int i, int n, parameter_type t)
}
template <typename T>
+template <typename ...Args>
typename QVector<T>::iterator
-QVector<T>::insert(int i, rvalue_ref t)
+QVector<T>::emplace(int i, Args&&... args)
{
- Q_ASSERT_X(size_t(i) <= size_t(d->size), "QVector<T>::insert", "index out of range");
+ Q_ASSERT_X(i >= 0 && i <= d->size, "QVector<T>::insert", "index out of range");
const size_t newSize = size() + 1;
if (d->needsDetach() || newSize > d->allocatedCapacity()) {
@@ -605,12 +603,24 @@ QVector<T>::insert(int i, rvalue_ref t)
DataPointer detached(Data::allocate(d->detachCapacity(newSize), flags));
const_iterator where = constBegin() + i;
+
+ // First, create an element to handle cases, when a user moves
+ // the element from a container to the same container
+ detached->createInPlace(detached.begin() + i, std::forward<Args>(args)...);
+
+ // Then, put the first part of the elements to the new location
detached->copyAppend(constBegin(), where);
- detached->moveAppend(std::addressof(t), std::addressof(t) + 1);
+
+ // After that, increase the actual size, because we created
+ // one extra element
+ ++detached.size;
+
+ // Finally, put the rest of the elements to the new location
detached->copyAppend(where, constEnd());
+
d.swap(detached);
} else {
- d->insert(d.begin() + i, std::move(t));
+ d->emplace(d.begin() + i, std::forward<Args>(args)...);
}
return d.begin() + i;
}
diff --git a/src/corelib/tools/qvector.qdoc b/src/corelib/tools/qvector.qdoc
index 116d962411..a5ea4073f8 100644
--- a/src/corelib/tools/qvector.qdoc
+++ b/src/corelib/tools/qvector.qdoc
@@ -646,6 +646,28 @@
\sa append(), insert()
*/
+/*!
+ \fn template <typename T> template <typename ...Args> T &QVector<T>::emplaceBack(Args&&... args)
+ \fn template <typename T> template <typename ...Args> T &QVector<T>::emplace_back(Args&&... args)
+
+ Adds a new element to the end for the container. This new element
+ is constructed in-place using \a args as the arguments for its
+ construction.
+
+ Returns a reference to the new element.
+
+ Example:
+ \snippet code/src_corelib_tools_qvector.cpp emplace-back
+
+ It is also possible to access a newly created object by using
+ returned reference:
+ \snippet code/src_corelib_tools_qvector.cpp emplace-back-ref
+
+ This is the same as vector.emplace(vector.size(), \a args).
+
+ \sa emplace
+*/
+
/*! \fn template <typename T> void QVector<T>::insert(int i, const T &value)
\fn template <typename T> void QVector<T>::insert(int i, T &&value)
@@ -693,6 +715,26 @@
first of the inserted items.
*/
+/*!
+ \fn template <typename T> template <typename ...Args> QVector<T>::iterator QVector<T>::emplace(int i, Args&&... args)
+
+ Extends the container by inserting a new element at position \a i.
+ This new element is constructed in-place using \a args as the
+ arguments for its construction.
+
+ Returns an iterator to the new element.
+
+ Example:
+ \snippet code/src_corelib_tools_qvector.cpp emplace
+
+ \note It is garanteed that the element will be created in place
+ at the beginning, but after that it might be copied or
+ moved to the right position.
+
+ \sa emplaceBack
+*/
+
+
/*! \fn template <typename T> void QVector<T>::replace(int i, const T &value)
Replaces the item at index position \a i with \a value.
@@ -838,6 +880,17 @@
\sa takeFirst(), removeLast()
*/
+/*!
+ \fn template <typename T> template <typename ...Args> QVector<T>::iterator QVector<T>::emplace(QVector<T>::iterator before, Args&&... args)
+
+ \overload
+
+ Creates a new element in front of the item pointed to by the
+ iterator \a before. This new element is constructed in-place
+ using \a args as the arguments for its construction.
+
+ Returns an iterator to the new element.
+*/
/*! \fn template <typename T> QVector<T> &QVector<T>::fill(const T &value, int size = -1)
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index a789e65284..6edcd7befa 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -619,7 +619,6 @@ QAccessible::RootObjectHandler QAccessible::installRootObjectHandler(RootObjectH
QAccessible::ActivationObserver::~ActivationObserver()
{
- // must be empty until ### Qt 6
}
/*!
@@ -1334,7 +1333,6 @@ QColor QAccessibleInterface::backgroundColor() const
*/
QAccessibleEvent::~QAccessibleEvent()
{
- // must be empty until ### Qt 6
}
/*! \fn QAccessible::Event QAccessibleEvent::type() const
@@ -1414,7 +1412,6 @@ QAccessible::Id QAccessibleEvent::uniqueId() const
*/
QAccessibleValueChangeEvent::~QAccessibleValueChangeEvent()
{
- // must be empty until ### Qt 6
}
/*!
@@ -1458,7 +1455,6 @@ QAccessibleValueChangeEvent::~QAccessibleValueChangeEvent()
*/
QAccessibleStateChangeEvent::~QAccessibleStateChangeEvent()
{
- // must be empty until ### Qt 6
}
/*!
@@ -1538,7 +1534,6 @@ QAccessibleStateChangeEvent::~QAccessibleStateChangeEvent()
*/
QAccessibleTableModelChangeEvent::~QAccessibleTableModelChangeEvent()
{
- // must be empty until ### Qt 6
}
/*!
\class QAccessibleTextCursorEvent
@@ -1567,7 +1562,6 @@ QAccessibleTableModelChangeEvent::~QAccessibleTableModelChangeEvent()
*/
QAccessibleTextCursorEvent::~QAccessibleTextCursorEvent()
{
- // must be empty until ### Qt 6
}
@@ -1608,7 +1602,6 @@ QAccessibleTextCursorEvent::~QAccessibleTextCursorEvent()
*/
QAccessibleTextInsertEvent::~QAccessibleTextInsertEvent()
{
- // must be empty until ### Qt 6
}
@@ -1651,7 +1644,6 @@ QAccessibleTextInsertEvent::~QAccessibleTextInsertEvent()
*/
QAccessibleTextRemoveEvent::~QAccessibleTextRemoveEvent()
{
- // must be empty until ### Qt 6
}
/*!
@@ -1713,7 +1705,6 @@ QAccessibleTextRemoveEvent::~QAccessibleTextRemoveEvent()
*/
QAccessibleTextUpdateEvent::~QAccessibleTextUpdateEvent()
{
- // must be empty until ### Qt 6
}
@@ -1748,7 +1739,6 @@ QAccessibleTextUpdateEvent::~QAccessibleTextUpdateEvent()
*/
QAccessibleTextSelectionEvent::~QAccessibleTextSelectionEvent()
{
- // must be empty until ### Qt 6
}
@@ -1978,7 +1968,6 @@ QDebug operator<<(QDebug d, const QAccessibleEvent &ev)
*/
QAccessibleTextInterface::~QAccessibleTextInterface()
{
- // must be empty until ### Qt 6
}
/*!
@@ -2367,7 +2356,6 @@ QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible::TextBoun
*/
QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface()
{
- // must be empty until ### Qt 6
}
/*!
@@ -2412,7 +2400,6 @@ QAccessibleEditableTextInterface::~QAccessibleEditableTextInterface()
*/
QAccessibleValueInterface::~QAccessibleValueInterface()
{
- // must be empty until ### Qt 6
}
/*!
@@ -2476,7 +2463,6 @@ QAccessibleValueInterface::~QAccessibleValueInterface()
*/
QAccessibleImageInterface::~QAccessibleImageInterface()
{
- // must be empty until ### Qt 6
}
/*!
@@ -2496,7 +2482,6 @@ QAccessibleImageInterface::~QAccessibleImageInterface()
*/
QAccessibleTableCellInterface::~QAccessibleTableCellInterface()
{
- // must be empty until ### Qt 6
}
/*!
@@ -2564,7 +2549,6 @@ QAccessibleTableCellInterface::~QAccessibleTableCellInterface()
*/
QAccessibleTableInterface::~QAccessibleTableInterface()
{
- // must be empty until ### Qt 6
}
/*!
@@ -2740,7 +2724,6 @@ QAccessibleTableInterface::~QAccessibleTableInterface()
*/
QAccessibleActionInterface::~QAccessibleActionInterface()
{
- // must be empty until ### Qt 6
}
/*!
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 663573b640..c2dac71e0d 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -2063,7 +2063,6 @@ QInputMethodEvent::QInputMethodEvent(const QInputMethodEvent &other)
QInputMethodEvent::~QInputMethodEvent()
{
- // must be empty until ### Qt 6
}
/*!
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 6915433aed..ae5a98e832 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -623,7 +623,6 @@ bool QOpenGLContext::create()
*/
void QOpenGLContext::destroy()
{
- deleteQGLContext();
Q_D(QOpenGLContext);
if (d->platformGLContext)
emit aboutToBeDestroyed();
@@ -1177,44 +1176,6 @@ QScreen *QOpenGLContext::screen() const
}
/*!
- internal: Needs to have a pointer to qGLContext. But since this is in Qt GUI we can't
- have any type information.
-
- \internal
-*/
-void *QOpenGLContext::qGLContextHandle() const
-{
- Q_D(const QOpenGLContext);
- return d->qGLContextHandle;
-}
-
-/*!
- internal: If the delete function is specified QOpenGLContext "owns"
- the passed context handle and will use the delete function to destroy it.
-
- \internal
-*/
-void QOpenGLContext::setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *))
-{
- Q_D(QOpenGLContext);
- d->qGLContextHandle = handle;
- d->qGLContextDeleteFunction = qGLContextDeleteFunction;
-}
-
-/*!
- \internal
-*/
-void QOpenGLContext::deleteQGLContext()
-{
- Q_D(QOpenGLContext);
- if (d->qGLContextDeleteFunction && d->qGLContextHandle) {
- d->qGLContextDeleteFunction(d->qGLContextHandle);
- d->qGLContextDeleteFunction = nullptr;
- d->qGLContextHandle = nullptr;
- }
-}
-
-/*!
Returns the platform-specific handle for the OpenGL implementation that
is currently in use. (for example, a HMODULE on Windows)
diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h
index f19dde465a..a96ea56d7b 100644
--- a/src/gui/kernel/qopenglcontext.h
+++ b/src/gui/kernel/qopenglcontext.h
@@ -218,8 +218,6 @@ Q_SIGNALS:
void aboutToBeDestroyed();
private:
- friend class QGLContext;
- friend class QGLPixelBuffer;
friend class QOpenGLContextResourceBase;
friend class QOpenGLPaintDevice;
friend class QOpenGLGlyphTexture;
@@ -234,10 +232,6 @@ private:
friend class QAbstractOpenGLFunctionsPrivate;
friend class QOpenGLTexturePrivate;
- void *qGLContextHandle() const;
- void setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *));
- void deleteQGLContext();
-
QOpenGLVersionFunctionsStorage* functionsBackendStorage() const;
void insertExternalFunctions(QAbstractOpenGLFunctions *f);
void removeExternalFunctions(QAbstractOpenGLFunctions *f);
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index 7770b1ce02..d769f03fd3 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -197,9 +197,7 @@ class Q_GUI_EXPORT QOpenGLContextPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QOpenGLContext)
public:
QOpenGLContextPrivate()
- : qGLContextHandle(nullptr)
- , qGLContextDeleteFunction(nullptr)
- , platformGLContext(nullptr)
+ : platformGLContext(nullptr)
, shareContext(nullptr)
, shareGroup(nullptr)
, screen(nullptr)
@@ -228,9 +226,6 @@ public:
mutable QOpenGLVersionFunctionsStorage versionFunctionsStorage;
mutable QSet<QAbstractOpenGLFunctions *> externalVersionFunctions;
- void *qGLContextHandle;
- void (*qGLContextDeleteFunction)(void *handle);
-
QSurfaceFormat requestedFormat;
QPlatformOpenGLContext *platformGLContext;
QOpenGLContext *shareContext;
diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp
index 8528f59844..bfce38797a 100644
--- a/src/gui/text/qabstracttextdocumentlayout.cpp
+++ b/src/gui/text/qabstracttextdocumentlayout.cpp
@@ -53,7 +53,6 @@ QAbstractTextDocumentLayoutPrivate::~QAbstractTextDocumentLayoutPrivate()
QTextObjectInterface::~QTextObjectInterface()
{
- // must be empty until ### Qt 6
}
/*!
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase.cpp
index ff46866cb0..5b8707cdec 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase.cpp
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase.cpp
@@ -564,6 +564,7 @@ QSharedPointer<QWindowsFontEngineData> QWindowsFontDatabaseBase::data()
bool QWindowsFontDatabaseBase::init(QSharedPointer<QWindowsFontEngineData> d)
{
+#if !defined(QT_NO_DIRECTWRITE)
if (!d->directWriteFactory) {
createDirectWriteFactory(&d->directWriteFactory);
if (!d->directWriteFactory)
@@ -576,9 +577,11 @@ bool QWindowsFontDatabaseBase::init(QSharedPointer<QWindowsFontEngineData> d)
return false;
}
}
+#endif
return true;
}
+#if !defined(QT_NO_DIRECTWRITE)
// ### Qt 6: Link directly to dwrite instead
typedef HRESULT (WINAPI *DWriteCreateFactoryType)(DWRITE_FACTORY_TYPE, const IID &, IUnknown **);
static inline DWriteCreateFactoryType resolveDWriteCreateFactory()
@@ -601,14 +604,14 @@ void QWindowsFontDatabaseBase::createDirectWriteFactory(IDWriteFactory **factory
return;
IUnknown *result = nullptr;
-#if defined(QT_USE_DIRECTWRITE3)
+# if defined(QT_USE_DIRECTWRITE3)
dWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory3), &result);
-#endif
+# endif
-#if defined(QT_USE_DIRECTWRITE2)
+# if defined(QT_USE_DIRECTWRITE2)
if (result == nullptr)
dWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory2), &result);
-#endif
+# endif
if (result == nullptr) {
if (FAILED(dWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory), &result))) {
@@ -619,6 +622,7 @@ void QWindowsFontDatabaseBase::createDirectWriteFactory(IDWriteFactory **factory
*factory = static_cast<IDWriteFactory *>(result);
}
+#endif // !defined(QT_NO_DIRECTWRITE)
int QWindowsFontDatabaseBase::defaultVerticalDPI()
{
@@ -853,7 +857,11 @@ QFontEngine *QWindowsFontDatabaseBase::fontEngine(const QByteArray &fontData, qr
fontEngine->fontDef.hintingPreference = hintingPreference;
directWriteFontFace->Release();
-#endif // !defined(QT_NO_DIRECTWRITE)
+#else // !defined(QT_NO_DIRECTWRITE)
+ Q_UNUSED(fontData);
+ Q_UNUSED(pixelSize);
+ Q_UNUSED(hintingPreference);
+#endif
return fontEngine;
}
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase_p.h b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase_p.h
index 004889ab86..fbaa98b663 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase_p.h
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabasebase_p.h
@@ -94,7 +94,9 @@ public:
static int defaultVerticalDPI();
static QSharedPointer<QWindowsFontEngineData> data();
+#if !defined(QT_NO_DIRECTWRITE)
static void createDirectWriteFactory(IDWriteFactory **factory);
+#endif
static QFont systemDefaultFont();
static HFONT systemFont();
static LOGFONT fontDefToLOGFONT(const QFontDef &fontDef, const QString &faceName);
diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
index 78e5b8d1ef..185349af11 100644
--- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
+++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp
@@ -274,16 +274,16 @@ QPageSetupWidget::QPageSetupWidget(QWidget *parent)
initUnits();
initPagesPerSheet();
- connect(m_ui.unitCombo, QOverload<int>::of(&QComboBox::activated), this, &QPageSetupWidget::unitChanged);
+ connect(m_ui.unitCombo, &QComboBox::activated, this, &QPageSetupWidget::unitChanged);
connect(m_ui.pageSizeCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &QPageSetupWidget::pageSizeChanged);
- connect(m_ui.pageWidth, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::pageSizeChanged);
- connect(m_ui.pageHeight, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::pageSizeChanged);
+ connect(m_ui.pageWidth, &QDoubleSpinBox::valueChanged, this, &QPageSetupWidget::pageSizeChanged);
+ connect(m_ui.pageHeight, &QDoubleSpinBox::valueChanged, this, &QPageSetupWidget::pageSizeChanged);
- connect(m_ui.leftMargin, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::leftMarginChanged);
- connect(m_ui.topMargin, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::topMarginChanged);
- connect(m_ui.rightMargin, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::rightMarginChanged);
- connect(m_ui.bottomMargin, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &QPageSetupWidget::bottomMarginChanged);
+ connect(m_ui.leftMargin, &QDoubleSpinBox::valueChanged, this, &QPageSetupWidget::leftMarginChanged);
+ connect(m_ui.topMargin, &QDoubleSpinBox::valueChanged, this, &QPageSetupWidget::topMarginChanged);
+ connect(m_ui.rightMargin, &QDoubleSpinBox::valueChanged, this, &QPageSetupWidget::rightMarginChanged);
+ connect(m_ui.bottomMargin, &QDoubleSpinBox::valueChanged, this, &QPageSetupWidget::bottomMarginChanged);
connect(m_ui.portrait, &QRadioButton::clicked, this, &QPageSetupWidget::pageOrientationChanged);
connect(m_ui.landscape, &QRadioButton::clicked, this, &QPageSetupWidget::pageOrientationChanged);
diff --git a/src/widgets/accessible/rangecontrols.cpp b/src/widgets/accessible/rangecontrols.cpp
index b5b8608418..6c12b553b4 100644
--- a/src/widgets/accessible/rangecontrols.cpp
+++ b/src/widgets/accessible/rangecontrols.cpp
@@ -254,7 +254,6 @@ QAccessibleSpinBox::QAccessibleSpinBox(QWidget *w)
{
Q_ASSERT(spinBox());
addControllingSignal(QLatin1String("valueChanged(int)"));
- addControllingSignal(QLatin1String("valueChanged(QString)"));
}
/*!
@@ -272,7 +271,6 @@ QAccessibleDoubleSpinBox::QAccessibleDoubleSpinBox(QWidget *widget)
{
Q_ASSERT(qobject_cast<QDoubleSpinBox *>(widget));
addControllingSignal(QLatin1String("valueChanged(double)"));
- addControllingSignal(QLatin1String("valueChanged(QString)"));
}
/*!
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 6b82669f07..044401ac13 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -3108,7 +3108,7 @@ void QFileDialogPrivate::createWidgets()
QObject::connect(qFileDialogUi->buttonBox, SIGNAL(rejected()), q, SLOT(reject()));
qFileDialogUi->lookInCombo->setFileDialogPrivate(this);
- QObject::connect(qFileDialogUi->lookInCombo, SIGNAL(activated(QString)), q, SLOT(_q_goToDirectory(QString)));
+ QObject::connect(qFileDialogUi->lookInCombo, SIGNAL(textActivated(QString)), q, SLOT(_q_goToDirectory(QString)));
qFileDialogUi->lookInCombo->setInsertPolicy(QComboBox::NoInsert);
qFileDialogUi->lookInCombo->setDuplicatesEnabled(false);
@@ -3138,7 +3138,7 @@ void QFileDialogPrivate::createWidgets()
qFileDialogUi->fileTypeCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(int)),
q, SLOT(_q_useNameFilter(int)));
- QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(QString)),
+ QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(textActivated(QString)),
q, SIGNAL(filterSelected(QString)));
qFileDialogUi->listView->setFileDialogPrivate(this);
diff --git a/src/widgets/doc/snippets/qstackedlayout/main.cpp b/src/widgets/doc/snippets/qstackedlayout/main.cpp
index 9c61939dee..181eed87db 100644
--- a/src/widgets/doc/snippets/qstackedlayout/main.cpp
+++ b/src/widgets/doc/snippets/qstackedlayout/main.cpp
@@ -74,7 +74,7 @@ Widget::Widget(QWidget *parent)
pageComboBox->addItem(tr("Page 1"));
pageComboBox->addItem(tr("Page 2"));
pageComboBox->addItem(tr("Page 3"));
- connect(pageComboBox, QOverload<int>::of(&QComboBox::activated),
+ connect(pageComboBox, &QComboBox::activated,
stackedLayout, &QStackedLayout::setCurrentIndex);
//! [1]
diff --git a/src/widgets/doc/snippets/qstackedwidget/main.cpp b/src/widgets/doc/snippets/qstackedwidget/main.cpp
index 077c281830..c68a992332 100644
--- a/src/widgets/doc/snippets/qstackedwidget/main.cpp
+++ b/src/widgets/doc/snippets/qstackedwidget/main.cpp
@@ -74,7 +74,7 @@ Widget::Widget(QWidget *parent)
pageComboBox->addItem(tr("Page 1"));
pageComboBox->addItem(tr("Page 2"));
pageComboBox->addItem(tr("Page 3"));
- connect(pageComboBox, QOverload<int>::of(&QComboBox::activated),
+ connect(pageComboBox, &QComboBox::activated,
stackedWidget, &QStackedWidget::setCurrentIndex);
//! [1] //! [2]
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 9789004473..b249608ccc 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -905,20 +905,9 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const
The item's \a index is passed. Note that this signal is sent even
when the choice is not changed. If you need to know when the
choice actually changes, use signal currentIndexChanged().
-
*/
/*!
- \fn void QComboBox::activated(const QString &text)
-
- This signal is sent when the user chooses an item in the combobox.
- The item's \a text is passed. Note that this signal is sent even
- when the choice is not changed. If you need to know when the
- choice actually changes, use signal currentIndexChanged().
-
- \obsolete Use QComboBox::textActivated() instead
-*/
-/*!
\fn void QComboBox::textActivated(const QString &text)
\since 5.14
@@ -936,14 +925,6 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const
*/
/*!
- \fn void QComboBox::highlighted(const QString &text)
-
- This signal is sent when an item in the combobox popup list is
- highlighted by the user. The item's \a text is passed.
-
- \obsolete Use textHighlighted() instead
-*/
-/*!
\fn void QComboBox::textHighlighted(const QString &text)
\since 5.14
@@ -1424,12 +1405,6 @@ void QComboBoxPrivate::emitActivated(const QModelIndex &index)
QString text(itemText(index));
emit q->activated(index.row());
emit q->textActivated(text);
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- emit q->activated(text);
-QT_WARNING_POP
-#endif
}
void QComboBoxPrivate::_q_emitHighlighted(const QModelIndex &index)
@@ -1440,12 +1415,6 @@ void QComboBoxPrivate::_q_emitHighlighted(const QModelIndex &index)
QString text(itemText(index));
emit q->highlighted(index.row());
emit q->textHighlighted(text);
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- emit q->highlighted(text);
-QT_WARNING_POP
-#endif
}
void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index)
diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h
index 1b80f90c74..19bdf39233 100644
--- a/src/widgets/widgets/qcombobox.h
+++ b/src/widgets/widgets/qcombobox.h
@@ -233,12 +233,6 @@ Q_SIGNALS:
void currentIndexChanged(int index);
void currentIndexChanged(const QString &);
void currentTextChanged(const QString &);
-#if QT_DEPRECATED_SINCE(5, 15)
- QT_DEPRECATED_VERSION_X(5, 15, "Use textActivated() instead")
- void activated(const QString &);
- QT_DEPRECATED_VERSION_X(5, 15, "Use textHighlighted() instead")
- void highlighted(const QString &);
-#endif
protected:
void focusInEvent(QFocusEvent *e) override;
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index cbd600ec6c..6ac2e1cec2 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -191,17 +191,6 @@ public:
The new text is passed in \a text with prefix() and suffix().
*/
-#if QT_DEPRECATED_SINCE(5, 14)
-/*!
- \fn void QSpinBox::valueChanged(const QString &text)
-
- \overload
- \obsolete Use textChanged(QString) instead
-
- The new value is passed in \a text with prefix() and suffix().
-*/
-#endif
-
/*!
Constructs a spin box with 0 as minimum value and 99 as maximum value, a
step value of 1. The value is initially set to 0. It is parented to \a
@@ -663,17 +652,6 @@ void QSpinBox::fixup(QString &input) const
The new text is passed in \a text with prefix() and suffix().
*/
-#if QT_DEPRECATED_SINCE(5, 14)
-/*!
- \fn void QDoubleSpinBox::valueChanged(const QString &text);
-
- \overload
- \obsolete Use textChanged(QString) instead
-
- The new value is passed in \a text with prefix() and suffix().
-*/
-#endif
-
/*!
Constructs a spin box with 0.0 as minimum value and 99.99 as maximum value,
a step value of 1.0 and a precision of 2 decimal places. The value is
@@ -1095,12 +1073,6 @@ void QSpinBoxPrivate::emitSignals(EmitPolicy ep, const QVariant &old)
if (ep != NeverEmit) {
pendingEmit = false;
if (ep == AlwaysEmit || value != old) {
-#if QT_DEPRECATED_SINCE(5, 14)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- emit q->valueChanged(edit->displayText());
-QT_WARNING_POP
-#endif
emit q->textChanged(edit->displayText());
emit q->valueChanged(value.toInt());
}
@@ -1252,12 +1224,6 @@ void QDoubleSpinBoxPrivate::emitSignals(EmitPolicy ep, const QVariant &old)
if (ep != NeverEmit) {
pendingEmit = false;
if (ep == AlwaysEmit || value != old) {
-#if QT_DEPRECATED_SINCE(5, 14)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- emit q->valueChanged(edit->displayText());
-QT_WARNING_POP
-#endif
emit q->textChanged(edit->displayText());
emit q->valueChanged(value.toDouble());
}
diff --git a/src/widgets/widgets/qspinbox.h b/src/widgets/widgets/qspinbox.h
index 762dd4a46a..be5357b028 100644
--- a/src/widgets/widgets/qspinbox.h
+++ b/src/widgets/widgets/qspinbox.h
@@ -107,10 +107,6 @@ public Q_SLOTS:
Q_SIGNALS:
void valueChanged(int);
void textChanged(const QString &);
-#if QT_DEPRECATED_SINCE(5, 14)
- QT_DEPRECATED_X("Use textChanged(QString) instead")
- void valueChanged(const QString &);
-#endif
private:
Q_DISABLE_COPY(QSpinBox)
@@ -173,10 +169,6 @@ public Q_SLOTS:
Q_SIGNALS:
void valueChanged(double);
void textChanged(const QString &);
-#if QT_DEPRECATED_SINCE(5, 14)
- QT_DEPRECATED_X("Use textChanged(QString) instead")
- void valueChanged(const QString &);
-#endif
private:
Q_DISABLE_COPY(QDoubleSpinBox)
diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp
index 78fde94fad..dac7a9a608 100644
--- a/src/widgets/widgets/qtextbrowser.cpp
+++ b/src/widgets/widgets/qtextbrowser.cpp
@@ -156,11 +156,6 @@ public:
{
Q_Q(QTextBrowser);
emit q->highlighted(url);
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- emit q->highlighted(url.toString());
-#endif
}
};
Q_DECLARE_TYPEINFO(QTextBrowserPrivate::HistoryEntry, Q_MOVABLE_TYPE);
@@ -927,16 +922,6 @@ void QTextBrowser::doSetSource(const QUrl &url, QTextDocument::ResourceType type
anchor is passed in \a link.
*/
-/*! \fn void QTextBrowser::highlighted(const QString &link)
- \overload
- \obsolete
-
- Convenience signal that allows connecting to a slot
- that takes just a QString, like for example QStatusBar's
- message().
-*/
-
-
/*!
\fn void QTextBrowser::anchorClicked(const QUrl &link)
diff --git a/src/widgets/widgets/qtextbrowser.h b/src/widgets/widgets/qtextbrowser.h
index 4b3ec491ee..7f02999b02 100644
--- a/src/widgets/widgets/qtextbrowser.h
+++ b/src/widgets/widgets/qtextbrowser.h
@@ -107,10 +107,6 @@ Q_SIGNALS:
void historyChanged();
void sourceChanged(const QUrl &);
void highlighted(const QUrl &);
-#if QT_DEPRECATED_SINCE(5, 15)
- QT_DEPRECATED_VERSION_X_5_15("Use QTextBrowser::highlighted(QUrl) instead")
- void highlighted(const QString &);
-#endif
void anchorClicked(const QUrl &);
protected: