summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-05-05 09:50:11 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-05-10 10:30:54 +0200
commitccd3b28aab33bd36f9c382cd38352f82396d25da (patch)
tree3fb9620986c9297a7eb396f4a342c48a06b4742c /tests
parent0306247f5a5d057fedfa183da06a78cc41139d1d (diff)
downloadqtbase-ccd3b28aab33bd36f9c382cd38352f82396d25da.tar.gz
Rename QFunctorSlotObject to QCallableObject
After the recent changes we only have a single implementation of QSlotObjectBase, which can handle free functions, member functions, functors, and lambdas. Rename it to callable, and explicitly hide the static implementation function so that it doesn't become a symbol of static libraries using Qt. Also rename makeSlotObject to makeCallableObject, and polish coding style and comments in the qobjectdefs_impl header a bit. Change-Id: Id19107cedfe9c624f807cd8089beb80e9eb99f50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index e721187b1e..16f53d58da 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -8387,7 +8387,7 @@ public:
slotObject = nullptr;
}
QtPrivate::AssertCompatibleFunctions<Prototype0, Functor>();
- slotObject = QtPrivate::makeSlotObject<Prototype0>(std::forward<Functor>(func));
+ slotObject = QtPrivate::makeCallableObject<Prototype0>(std::forward<Functor>(func));
return true;
}
@@ -8405,7 +8405,7 @@ public:
slotObject = nullptr;
}
QtPrivate::AssertCompatibleFunctions<Prototype1, Functor>();
- slotObject = QtPrivate::makeSlotObject<Prototype1>(std::forward<Functor>(func));
+ slotObject = QtPrivate::makeCallableObject<Prototype1>(std::forward<Functor>(func));
return true;
}
@@ -8544,7 +8544,7 @@ void tst_QObject::asyncCallbackHelper()
QCOMPARE(result, QLatin1String(expectedPayload).length());
// mutable lambda; same behavior as mutableFunctor - we copy the functor
- // in the QFunctorSlotObject, so the original is not modified
+ // in the QCallableObject, so the original is not modified
int status = 0;
auto mutableLambda1 = [&status, calls = 0]() mutable { status = ++calls; };