summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index a7afc08a345..41004e6f30e 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -104,8 +104,9 @@ static int *queuedConnectionTypes(const QMetaMethod &method)
}
// ### Future work: replace with an array of QMetaType or QtPrivate::QMetaTypeInterface *
-static int *queuedConnectionTypes(const QArgumentType *argumentTypes, int argc)
+static int *queuedConnectionTypes(QSpan<const QArgumentType> argumentTypes)
{
+ const int argc = int(argumentTypes.size());
auto types = std::make_unique<int[]>(argc + 1);
for (int i = 0; i < argc; ++i) {
const QArgumentType &type = argumentTypes[i];
@@ -3154,8 +3155,7 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign
// ### Future work: attempt get the metatypes from the meta object first
// because it's possible they're all registered.
int *types = nullptr;
- if ((type == Qt::QueuedConnection)
- && !(types = queuedConnectionTypes(signalTypes.constData(), signalTypes.size()))) {
+ if (type == Qt::QueuedConnection && !(types = queuedConnectionTypes(signalTypes))) {
return QMetaObject::Connection(nullptr);
}