mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-14 06:15:49 +00:00
refactor: refresh aw plugin
This commit is contained in:
@ -73,7 +73,7 @@ QString AWTestLibrary::randomString(const int _min, const int _max)
|
||||
QString output;
|
||||
|
||||
auto count = _min + randomInt(_max - _min);
|
||||
for (auto i = 0; i < count; i++)
|
||||
for (auto i = 0; i < count; ++i)
|
||||
output += randomChar();
|
||||
|
||||
return output;
|
||||
@ -85,7 +85,7 @@ QStringList AWTestLibrary::randomStringList(const int _max)
|
||||
QStringList output;
|
||||
|
||||
auto count = 1 + randomInt(_max);
|
||||
for (auto i = 0; i < count; i++)
|
||||
for (auto i = 0; i < count; ++i)
|
||||
output.append(randomString());
|
||||
|
||||
return output;
|
||||
@ -97,7 +97,7 @@ QStringList AWTestLibrary::randomSelect(const QStringList &_available)
|
||||
QSet<QString> output;
|
||||
|
||||
auto count = 1 + randomInt(_available.count());
|
||||
for (auto i = 0; i < count; i++) {
|
||||
for (auto i = 0; i < count; ++i) {
|
||||
auto index = randomInt(_available.count());
|
||||
output << _available.at(index);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ void TestAWPatternFunctions::test_findKeys()
|
||||
{
|
||||
auto count = AWTestLibrary::randomInt(200);
|
||||
QStringList allKeys;
|
||||
for (auto i = 0; i < count; i++) {
|
||||
for (auto i = 0; i < count; ++i) {
|
||||
auto key = AWTestLibrary::randomString(1, 20);
|
||||
while (allKeys.indexOf(QRegularExpression(QString("^%1.*").arg(key))) != -1)
|
||||
key = AWTestLibrary::randomString(1, 20);
|
||||
|
@ -73,7 +73,7 @@ void TestAWJsonFormatter::generate()
|
||||
auto listCount = AWTestLibrary::randomInt(5) + 1;
|
||||
auto validCount = AWTestLibrary::randomInt(listCount);
|
||||
QVariantList second;
|
||||
for (auto i = 0; i < listCount; i++) {
|
||||
for (auto i = 0; i < listCount; ++i) {
|
||||
if (i == validCount) {
|
||||
second.append(first);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user