summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp1
-rw-r--r--tests/auto/cmake/test_add_resources_binary_generated/main.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp b/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
index 46f4f1028d..b8b6ec7717 100644
--- a/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
+++ b/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
@@ -9,6 +9,7 @@ int main(int argc, char **argv)
if (QResource::registerResource("rcc_file.rcc") &&
QFile::exists("://resource_file.txt") && QFile::exists("://resource_file_two.txt"))
{
+ QResource::unregisterResource("rcc_file.rcc"); // avoid leaks
return 0;
}
diff --git a/tests/auto/cmake/test_add_resources_binary_generated/main.cpp b/tests/auto/cmake/test_add_resources_binary_generated/main.cpp
index 65d5ff306b..906232ca19 100644
--- a/tests/auto/cmake/test_add_resources_binary_generated/main.cpp
+++ b/tests/auto/cmake/test_add_resources_binary_generated/main.cpp
@@ -12,5 +12,9 @@ int main(int, char **)
|| !QFile::exists(":/resource2.txt")) {
return -1;
}
+
+ // Avoid leaks
+ QResource::unregisterResource(RESOURCE1_FULL_PATH);
+ QResource::unregisterResource(RESOURCE2_FULL_PATH);
return 0;
}