summaryrefslogtreecommitdiffstats
path: root/src/corelib/compat
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-07-27 21:46:34 +0300
committerAhmad Samir <a.samirh78@gmail.com>2023-10-27 18:44:34 +0300
commit4ecbe42ff44ace881ed4962744e9cd6c8fa65dab (patch)
tree5e3d52b018774333a6341d01f281ab9c4b265352 /src/corelib/compat
parent56b8048ab98aae3780962fb84709b968a81f62ab (diff)
QMetaObject: add indexOfEnumerator(QBAV) overload
And remove the indexOfEnumerator(const char *) overload. Taking by view so that it works with string data that isn't necessarily null-terminated (e.g. a sliced() or chopped() view). QMetaObjectPrivate::indexOfEnumerator needs to be a member function because it usess a private QMetaEnum constructor (QMetaObjectPrivate is a friend of QMetaEnum). [ChangeLog][QtCore][QMetaObject] Added indexOfEnumerator(QByteArrayView) overload. And deprecated indexOfEnumerator(const char *) overload. Change-Id: Ie2f4f1a9af69373c19a5d7bd92499544e95e9289 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/compat')
-rw-r--r--src/corelib/compat/removed_api.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp
index 6f0bb2bf10..964597a2da 100644
--- a/src/corelib/compat/removed_api.cpp
+++ b/src/corelib/compat/removed_api.cpp
@@ -775,6 +775,11 @@ QString QLocale::bcp47Name() const
#include "qobjectdefs.h"
+int QMetaObject::indexOfEnumerator(const char *name) const
+{
+ return indexOfEnumerator(QByteArrayView(name));
+}
+
bool QMetaObject::invokeMethodImpl(QObject *object, QtPrivate::QSlotObjectBase *slot, Qt::ConnectionType type, void *ret)
{
return invokeMethodImpl(object, slot, type, 1, &ret, nullptr, nullptr);
@@ -835,6 +840,7 @@ QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode mode)
return QUrl::fromEncoded(QByteArrayView(input), mode);
}
+
// #include "qotherheader.h"
// // implement removed functions from qotherheader.h
// order sections alphabetically to reduce chances of merge conflicts