mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-08-30 04:09:57 +00:00
refactor: fix some minor clang-tidy warnings
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user