From 181fa70b7ba06c92c3c0fdc4c70081b14e4b1bdf Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 16 Jan 2018 15:45:10 +0100 Subject: shiboken: Fix some clazy warnings - Mixing const/non-const iterators - Do not use operator[] on temporaries of type QVector - Remove unused nontrivial variables - Add Q_FALLTHROUGH() - Potential detach in range-based for Change-Id: I89391fdda616f119eadd7de529eb6cee69343f85 Reviewed-by: Cristian Maureira-Fredes Reviewed-by: Alexandru Croitor --- sources/shiboken2/generator/generator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sources/shiboken2/generator/generator.cpp') diff --git a/sources/shiboken2/generator/generator.cpp b/sources/shiboken2/generator/generator.cpp index a8e8735bb..71647a1c5 100644 --- a/sources/shiboken2/generator/generator.cpp +++ b/sources/shiboken2/generator/generator.cpp @@ -127,7 +127,7 @@ void Generator::addInstantiatedContainersAndSmartPointers(const AbstractMetaType QString piece = isContainer ? QStringLiteral("container") : QStringLiteral("smart pointer"); QString warning = QString::fromLatin1("Skipping instantiation of %1 '%2' because it has template" - " arguments.").arg(piece).arg(type->originalTypeDescription()); + " arguments.").arg(piece, type->originalTypeDescription()); if (!context.isEmpty()) warning.append(QStringLiteral(" Calling context: %1").arg(context)); @@ -443,7 +443,7 @@ QTextStream& formatCode(QTextStream &s, const QString& code, Indentor &indentor) for (QString line : lst) { if (!line.isEmpty() && !emptyLine.match(line).hasMatch()) { - while (line.end()->isSpace()) + while (line.constEnd()->isSpace()) line.chop(1); int limit = 0; for(int i = 0; i < spacesToRemove; ++i) { -- cgit v1.2.3