diff options
author | Albert Astals Cid <aacid@kde.org> | 2018-10-31 17:52:51 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2018-10-31 18:06:51 +0100 |
commit | 2be4ba842e023ea8662755b11b905c22e733e4c8 (patch) | |
tree | 6cf52547c23e801e8ffb7efcce7828c5c9ec4f75 | |
parent | aeb2c1798ef39b5d3a167f4531e9f09dcb18e88d (diff) |
qt5: Test two leaks in a test
-rw-r--r-- | qt5/tests/check_annotations.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt5/tests/check_annotations.cpp b/qt5/tests/check_annotations.cpp index b4b505dd..d591bd70 100644 --- a/qt5/tests/check_annotations.cpp +++ b/qt5/tests/check_annotations.cpp @@ -26,6 +26,7 @@ void TestAnnotations::checkQColorPrecision() { double normalized = static_cast<uint16_t>(i) / static_cast<double>(std::numeric_limits<uint16_t>::max()); GooString* serialized = GooString::format("{0:.5f}", normalized); double deserialized = gatof( serialized->getCString() ); + delete serialized; uint16_t denormalized = std::round(deserialized * std::numeric_limits<uint16_t>::max()); if (static_cast<uint16_t>(i) != denormalized) { precisionOk = false; @@ -98,6 +99,7 @@ void TestAnnotations::checkFontSizeAndColor() if (annot != annots.constEnd()) ++annot; } + qDeleteAll(annots); } } |