From dc7c41e3a2214fbde04cbb99fd5343810429ac1b Mon Sep 17 00:00:00 2001 From: silverqx Date: Tue, 4 Apr 2023 15:57:54 +0200 Subject: [PATCH] tests bugfix Q_ASSERT() in Release build --- .../functional/orm/schema/schemabuilder/tst_schemabuilder.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/functional/orm/schema/schemabuilder/tst_schemabuilder.cpp b/tests/auto/functional/orm/schema/schemabuilder/tst_schemabuilder.cpp index df198cef5..78c568680 100644 --- a/tests/auto/functional/orm/schema/schemabuilder/tst_schemabuilder.cpp +++ b/tests/auto/functional/orm/schema/schemabuilder/tst_schemabuilder.cpp @@ -473,7 +473,9 @@ QVariant tst_SchemaBuilder::getTableComment_Postgres(const QString &table, "select obj_description('%1.%2'::regclass) as table_comment") .arg(schema, table)); - Q_ASSERT(query.first()); + [[maybe_unused]] + const auto ok = query.first(); + Q_ASSERT(ok); Q_ASSERT(query.isValid()); return query.value(QStringLiteral("table_comment"));