UnitTests: Fix warning

Change-Id: I834095e1e8f40cb063b6014e98bf79ae8d8e439b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
Marco Bubke
2023-07-13 09:06:16 +02:00
parent fa28c29781
commit 90b0fd2869
2 changed files with 10 additions and 9 deletions

View File

@@ -221,6 +221,7 @@ std::ostream &operator<<(std::ostream &out, const ValueView &value)
} }
namespace { namespace {
[[maybe_unused]]
Utils::SmallStringView operationText(int operation) Utils::SmallStringView operationText(int operation)
{ {
switch (operation) { switch (operation) {
@@ -235,9 +236,9 @@ Utils::SmallStringView operationText(int operation)
return {}; return {};
} }
std::ostream &operator<<(std::ostream &out, sqlite3_changeset_iter *iter)
{
#if 0 #if 0
std::ostream &operator<<(std::ostream &out, [[maybe_unused]] sqlite3_changeset_iter *iter)
{
out << "("; out << "(";
const char *tableName = nullptr; const char *tableName = nullptr;
@@ -280,9 +281,9 @@ std::ostream &operator<<(std::ostream &out, sqlite3_changeset_iter *iter)
} }
out << "})"; out << "})";
#endif
return out; return out;
} }
#endif
const char *toText(Operation operation) const char *toText(Operation operation)
{ {
@@ -315,7 +316,7 @@ const char *toText(LockingMode lockingMode)
} }
} // namespace } // namespace
std::ostream &operator<<(std::ostream &out, const SessionChangeSet &changeset) std::ostream &operator<<(std::ostream &out, [[maybe_unused]] const SessionChangeSet &changeset)
{ {
#if 0 #if 0
sqlite3_changeset_iter *iter = nullptr; sqlite3_changeset_iter *iter = nullptr;

View File

@@ -83,11 +83,11 @@ TEST_F(ModelUtils, component_file_path_for_invalid_node_is_empty)
TEST_F(ModelUtils, component_file_path_for_node_without_metainfo_is_empty) TEST_F(ModelUtils, component_file_path_for_node_without_metainfo_is_empty)
{ {
auto typeId = projectStorageMock.createType(moduleId, projectStorageMock.createType(moduleId,
"Foo", "Foo",
QmlDesigner::Storage::TypeTraits::IsFileComponent, QmlDesigner::Storage::TypeTraits::IsFileComponent,
{}, {},
sourceId); sourceId);
auto node = model.createModelNode("Foo"); auto node = model.createModelNode("Foo");
auto path = QmlDesigner::ModelUtils::componentFilePath(node); auto path = QmlDesigner::ModelUtils::componentFilePath(node);