Changeset View
Changeset View
Standalone View
Standalone View
autotests/kcolorschemetest.cpp
Show All 27 Lines | |||||
28 | class KColorSchemeTest : public QObject | 28 | class KColorSchemeTest : public QObject | ||
29 | { | 29 | { | ||
30 | Q_OBJECT | 30 | Q_OBJECT | ||
31 | 31 | | |||
32 | private Q_SLOTS: | 32 | private Q_SLOTS: | ||
33 | void benchConstruction_data() | 33 | void benchConstruction_data() | ||
34 | { | 34 | { | ||
35 | KColorSchemeManager manager; | 35 | KColorSchemeManager manager; | ||
36 | if (!manager.model()->rowCount()) { | 36 | if (manager.model()->rowCount() <= 1) { | ||
37 | QSKIP("no scheme files found, cannot run benchmark"); | 37 | QSKIP("no scheme files found, cannot run benchmark"); | ||
38 | } | 38 | } | ||
39 | 39 | | |||
40 | const auto anyScheme = manager.model()->index(0, 0).data(Qt::UserRole).toString(); | 40 | const auto anyScheme = manager.model()->index(1, 0).data(Qt::UserRole).toString(); | ||
41 | QVERIFY(QFile::exists(anyScheme)); | 41 | QVERIFY(QFile::exists(anyScheme)); | ||
42 | 42 | | |||
43 | QTest::addColumn<QString>("file"); | 43 | QTest::addColumn<QString>("file"); | ||
44 | 44 | | |||
45 | QTest::newRow("default") << QString(); | 45 | QTest::newRow("default") << QString(); | ||
46 | QTest::newRow("explicit") << anyScheme; | 46 | QTest::newRow("explicit") << anyScheme; | ||
47 | } | 47 | } | ||
48 | 48 | | |||
Show All 14 Lines |