Changeset View
Changeset View
Standalone View
Standalone View
tests/kcolorcombotest.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 34 | { | |||
---|---|---|---|---|---|
90 | if (mCustom->colors() != standardList) { | 90 | if (mCustom->colors() != standardList) { | ||
91 | qCritical() << "Custom combo: setColors(empty) != standard colors"; | 91 | qCritical() << "Custom combo: setColors(empty) != standard colors"; | ||
92 | } | 92 | } | ||
93 | mCustom->setColors(list); | 93 | mCustom->setColors(list); | ||
94 | if (mCustom->colors() != list) { | 94 | if (mCustom->colors() != list) { | ||
95 | qCritical() << "Custom combo: setColors() != colors()"; | 95 | qCritical() << "Custom combo: setColors() != colors()"; | ||
96 | } | 96 | } | ||
97 | 97 | | |||
98 | mCustom->insertNamedColor(1, {QStringLiteral("information 1"), Qt::red}); | ||||
99 | mCustom->insertNamedColor(4, {QStringLiteral("information 2"), Qt::blue}); | ||||
100 | mCustom->insertNamedColor(7, {QStringLiteral("information 3"), Qt::gray}); | ||||
101 | | ||||
98 | if (mStandard->colors() != standardList) { | 102 | if (mStandard->colors() != standardList) { | ||
99 | qCritical() << "Standard combo: colors()"; | 103 | qCritical() << "Standard combo: colors()"; | ||
100 | } | 104 | } | ||
101 | 105 | | |||
102 | QColor col = QColor(1, 2, 3); | 106 | QColor col = QColor(1, 2, 3); | ||
103 | mStandard->setColor(col); | 107 | mStandard->setColor(col); | ||
104 | if (mStandard->color() != col) { | 108 | if (mStandard->color() != col) { | ||
105 | qCritical() << "Standard combo: set custom color -> " << mStandard->color().red() << "," << mStandard->color().green() << "," << mStandard->color().blue(); | 109 | qCritical() << "Standard combo: set custom color -> " << mStandard->color().red() << "," << mStandard->color().green() << "," << mStandard->color().blue(); | ||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |