mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-14 06:15:49 +00:00
massive changes inside
* use pass by ref instead of by value if possible * use reference in interation over collections * fix no tag inserting
This commit is contained in:
@ -62,7 +62,7 @@ void TestExtQuotes::test_run()
|
||||
for (auto &type : types)
|
||||
cache[type] = arguments.at(0).toHash()[extQuotes->tag(type)];
|
||||
|
||||
for (auto type : types) {
|
||||
for (auto &type : types) {
|
||||
QCOMPARE(firstValue[extQuotes->tag(type)].toDouble(), 0.0);
|
||||
QVERIFY((cache[type].toDouble() > price.first)
|
||||
&& (cache[type].toDouble() < price.second));
|
||||
@ -80,10 +80,10 @@ void TestExtQuotes::test_derivatives()
|
||||
QVERIFY(spy.wait(5000));
|
||||
QList<QVariant> arguments = spy.takeFirst();
|
||||
QVariantHash values;
|
||||
for (auto type : types)
|
||||
for (auto &type : types)
|
||||
values[type] = arguments.at(0).toHash()[extQuotes->tag(type)];
|
||||
|
||||
for (auto type : types) {
|
||||
for (auto &type : types) {
|
||||
QCOMPARE(arguments.at(0)
|
||||
.toHash()[extQuotes->tag(QString("%1chg").arg(type))]
|
||||
.toDouble(),
|
||||
|
Reference in New Issue
Block a user