From c3d7220739bba07ade5708bf48e5b6eea0ef77cc Mon Sep 17 00:00:00 2001 From: Iakov 'Jake' Kirilenko Date: Fri, 29 Mar 2024 15:26:02 +0300 Subject: [PATCH] Fix build with PYTHONQT_DEBUG enabled --- generator/generatorsetqtscript.cpp | 2 +- generator/typeparser.cpp | 1 + generator/typesystem.cpp | 2 +- src/PythonQtClassInfo.cpp | 2 +- src/PythonQtMethodInfo.cpp | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/generator/generatorsetqtscript.cpp b/generator/generatorsetqtscript.cpp index e96556461..78e2d3735 100644 --- a/generator/generatorsetqtscript.cpp +++ b/generator/generatorsetqtscript.cpp @@ -54,7 +54,7 @@ GeneratorSetQtScript::GeneratorSetQtScript() QString GeneratorSetQtScript::usage() { QString usage = "QtScript:\n" - " --nothing-to-report-yet \n"; + " --nothing-to-report-yet \n" " --max-classes-per-file= \n"; return usage; diff --git a/generator/typeparser.cpp b/generator/typeparser.cpp index 90a68e568..5d70cc1bb 100644 --- a/generator/typeparser.cpp +++ b/generator/typeparser.cpp @@ -122,6 +122,7 @@ Scanner::Token Scanner::nextToken() m_pos += 2; break; } + Q_FALLTHROUGH(); default: if (c.isLetterOrNumber() || c == '_') tok = Identifier; diff --git a/generator/typesystem.cpp b/generator/typesystem.cpp index 0d5b7c4be..a37630a20 100644 --- a/generator/typesystem.cpp +++ b/generator/typesystem.cpp @@ -155,8 +155,8 @@ class Handler : public QXmlDefaultHandler public: Handler(TypeDatabase *database, unsigned int qtVersion, bool generate) : m_database(database) - , m_qtVersion(qtVersion) , m_generate(generate ? TypeEntry::GenerateAll : TypeEntry::GenerateForSubclass) + , m_qtVersion(qtVersion) { m_current_enum = 0; current = 0; diff --git a/src/PythonQtClassInfo.cpp b/src/PythonQtClassInfo.cpp index 765d4ff84..5e17f0d11 100644 --- a/src/PythonQtClassInfo.cpp +++ b/src/PythonQtClassInfo.cpp @@ -295,7 +295,7 @@ bool PythonQtClassInfo::lookForEnumAndCache(const QMetaObject* meta, const char* PythonQtMemberInfo newInfo(enumValuePtr); _cachedMembers.insert(memberName, newInfo); #ifdef PYTHONQT_DEBUG - std::cout << "caching enum " << memberName << " on " << meta->className()->constData() << std::endl; + std::cout << "caching enum " << memberName << " on " << meta->className() << std::endl; #endif found = true; break; diff --git a/src/PythonQtMethodInfo.cpp b/src/PythonQtMethodInfo.cpp index be68743bd..f428ce5f2 100644 --- a/src/PythonQtMethodInfo.cpp +++ b/src/PythonQtMethodInfo.cpp @@ -52,7 +52,7 @@ bool PythonQtSlotInfo::_globalShouldAllowThreads = false; PythonQtMethodInfo::PythonQtMethodInfo(const QMetaMethod& meta, PythonQtClassInfo* classInfo) { #ifdef PYTHONQT_DEBUG - QByteArray sig = PythonQtUtils::signature(meta)); + QByteArray sig = PythonQtUtils::signature(meta); sig = sig.mid(sig.indexOf('(')); QByteArray fullSig = QByteArray(meta.typeName()) + " " + sig; std::cout << "caching " << fullSig.data() << std::endl;