refactor: fix some minor clang-tidy warnings

This commit is contained in:
2024-04-19 17:59:10 +03:00
parent 2f4f05b5af
commit ed5ae40624
56 changed files with 225 additions and 265 deletions

View File

@ -26,17 +26,14 @@
void TestAWJsonFormatter::initTestCase()
{
AWTestLibrary::init();
formatter = new AWJsonFormatter(nullptr);
formatter = new AWJsonFormatter(this);
generate();
formatter->setPath(path);
}
void TestAWJsonFormatter::cleanupTestCase()
{
delete formatter;
}
void TestAWJsonFormatter::cleanupTestCase() {}
void TestAWJsonFormatter::test_values()
@ -58,7 +55,7 @@ void TestAWJsonFormatter::test_copy()
QCOMPARE(newFormatter->path(), formatter->path());
QCOMPARE(newFormatter->number(), 1);
delete newFormatter;
newFormatter->deleteLater();
}
@ -79,8 +76,7 @@ void TestAWJsonFormatter::generate()
} else {
auto key = AWTestLibrary::randomString();
auto val = AWTestLibrary::randomString();
QVariantMap dict;
dict[key] = val;
QVariantMap dict{{key, val}};
second.append(dict);
}
}