refactor: simplify sources processing

Also fix desktop source
This commit is contained in:
2024-03-28 11:14:45 +02:00
parent 0bcceefd47
commit a35b57e5d2
69 changed files with 552 additions and 1087 deletions

View File

@ -15,7 +15,6 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "testlistformatter.h"
#include <QtTest>
@ -50,7 +49,7 @@ void TestAWListFormatter::test_values()
void TestAWListFormatter::test_conversion()
{
QStringList value = AWTestLibrary::randomStringList();
auto value = AWTestLibrary::randomStringList();
QCOMPARE(formatter->convert(value), value.join(separator));
}
@ -58,8 +57,8 @@ void TestAWListFormatter::test_conversion()
void TestAWListFormatter::test_sorted()
{
formatter->setSorted(true);
QStringList value = AWTestLibrary::randomStringList();
QString received = formatter->convert(value);
auto value = AWTestLibrary::randomStringList();
auto received = formatter->convert(value);
value.sort();
QCOMPARE(received, value.join(separator));
@ -68,8 +67,8 @@ void TestAWListFormatter::test_sorted()
void TestAWListFormatter::test_filter()
{
QStringList value = AWTestLibrary::randomStringList();
QStringList filters = AWTestLibrary::randomSelect(value);
auto value = AWTestLibrary::randomStringList();
auto filters = AWTestLibrary::randomSelect(value);
value.sort();
formatter->setFilter(QString("(^%1$)").arg(filters.join("$|^")));
@ -79,7 +78,7 @@ void TestAWListFormatter::test_filter()
void TestAWListFormatter::test_copy()
{
AWListFormatter *newFormatter = formatter->copy("/dev/null", 1);
auto newFormatter = formatter->copy("/dev/null", 1);
QCOMPARE(newFormatter->number(), 1);
QCOMPARE(newFormatter->filter(), formatter->filter());