aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysidesignal.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-01-21 15:41:58 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-01-21 18:04:29 +0100
commit948bb445b09870f2100ab61d912e3a2f1769c06e (patch)
tree260ae9bc5cbd2c476b298447673ab2c54d6bec59 /sources/pyside6/libpyside/pysidesignal.cpp
parent123e27090e0ec4f8d32f301700c9ff9d1b49ba2a (diff)
Clean up some warnings produced by Qt Creator's clang/clazy code checkers
- Remove unused variables - Remove assignments that do not have any effect - Fix mixing const/non-const iterators - Fix for loops, use const ref and/or qAsConst() Change-Id: I4b52f11030493c440026b194f18ec0151a3ea710 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pysidesignal.cpp')
-rw-r--r--sources/pyside6/libpyside/pysidesignal.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp
index 8533c2a48..63d5b0228 100644
--- a/sources/pyside6/libpyside/pysidesignal.cpp
+++ b/sources/pyside6/libpyside/pysidesignal.cpp
@@ -352,7 +352,6 @@ static PyObject *signalInstanceConnect(PyObject *self, PyObject *args, PyObject
bool isFunction = PyFunction_Check(slot);
bool matchedSlot = false;
- QByteArray functionName;
PySideSignalInstance *it = source;
if (isMethod || isFunction) {
@@ -896,9 +895,8 @@ void registerSignals(SbkObjectType *pyObj, const QMetaObject *metaObject)
// Empty signatures comes first! So they will be the default signal signature
std::stable_sort(it.value().begin(), it.value().end(), &compareSignals);
- SignalSigMap::mapped_type::const_iterator j = it.value().begin();
- SignalSigMap::mapped_type::const_iterator endJ = it.value().end();
- for (; j != endJ; ++j) {
+ const auto endJ = it.value().cend();
+ for (auto j = it.value().cbegin(); j != endJ; ++j) {
const SignalSignature &sig = *j;
appendSignature(self, sig);
}