AutoTest: Use themed test result icons
Task-number: QTCREATORBUG-16663 Change-Id: I087024bf2882690233032e555a825e397c945d3e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
@@ -5,16 +5,6 @@
|
||||
<file>images/sort@2x.png</file>
|
||||
<file>images/leafsort.png</file>
|
||||
<file>images/leafsort@2x.png</file>
|
||||
<file>images/debug.png</file>
|
||||
<file>images/fail.png</file>
|
||||
<file>images/fatal.png</file>
|
||||
<file>images/pass.png</file>
|
||||
<file>images/skip.png</file>
|
||||
<file>images/warn.png</file>
|
||||
<file>images/xfail.png</file>
|
||||
<file>images/xpass.png</file>
|
||||
<file>images/blacklisted_fail.png</file>
|
||||
<file>images/blacklisted_pass.png</file>
|
||||
<file>images/benchmark.png</file>
|
||||
<file>images/runselected_boxes.png</file>
|
||||
<file>images/runselected_boxes@2x.png</file>
|
||||
|
@@ -38,5 +38,39 @@ const Utils::Icon RUN_SELECTED_OVERLAY({
|
||||
{QLatin1String(":/images/runselected_boxes.png"), Utils::Theme::BackgroundColorDark},
|
||||
{QLatin1String(":/images/runselected_tickmarks.png"), Utils::Theme::IconsBaseColor}});
|
||||
|
||||
const Utils::Icon RESULT_PASS({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestPassTextColor}},
|
||||
Utils::Icon::Tint);
|
||||
const Utils::Icon RESULT_FAIL({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestFailTextColor}},
|
||||
Utils::Icon::Tint);
|
||||
const Utils::Icon RESULT_XFAIL({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestXFailTextColor}},
|
||||
Utils::Icon::Tint);
|
||||
const Utils::Icon RESULT_XPASS({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestXPassTextColor}},
|
||||
Utils::Icon::Tint);
|
||||
const Utils::Icon RESULT_SKIP({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestSkipTextColor}},
|
||||
Utils::Icon::Tint);
|
||||
const Utils::Icon RESULT_BLACKLISTEDPASS({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestPassTextColor},
|
||||
{":/projectexplorer/images/buildstepdisable.png", Utils::Theme::PanelTextColorDark}},
|
||||
Utils::Icon::Tint | Utils::Icon::PunchEdges);
|
||||
const Utils::Icon RESULT_BLACKLISTEDFAIL({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestFailTextColor},
|
||||
{":/projectexplorer/images/buildstepdisable.png", Utils::Theme::PanelTextColorDark}},
|
||||
Utils::Icon::Tint | Utils::Icon::PunchEdges);
|
||||
const Utils::Icon RESULT_BENCHMARK(":/images/benchmark.png");
|
||||
const Utils::Icon RESULT_MESSAGEDEBUG({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestDebugTextColor}},
|
||||
Utils::Icon::Tint);
|
||||
const Utils::Icon RESULT_MESSAGEWARN({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestWarnTextColor}},
|
||||
Utils::Icon::Tint);
|
||||
const Utils::Icon RESULT_MESSAGEFATAL({
|
||||
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestFatalTextColor}},
|
||||
Utils::Icon::Tint);
|
||||
|
||||
} // namespace Icons
|
||||
} // namespace Autotest
|
||||
|
Before Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 621 B |
Before Width: | Height: | Size: 600 B |
Before Width: | Height: | Size: 597 B |
Before Width: | Height: | Size: 595 B |
Before Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 621 B |
Before Width: | Height: | Size: 547 B |
Before Width: | Height: | Size: 599 B |
@@ -23,6 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "autotesticons.h"
|
||||
#include "testresultdelegate.h"
|
||||
#include "testresultmodel.h"
|
||||
|
||||
@@ -46,20 +47,20 @@ TestResultItem::~TestResultItem()
|
||||
}
|
||||
|
||||
static QIcon testResultIcon(Result::Type result) {
|
||||
static QIcon icons[] = {
|
||||
QIcon(QLatin1String(":/images/pass.png")),
|
||||
QIcon(QLatin1String(":/images/fail.png")),
|
||||
QIcon(QLatin1String(":/images/xfail.png")),
|
||||
QIcon(QLatin1String(":/images/xpass.png")),
|
||||
QIcon(QLatin1String(":/images/skip.png")),
|
||||
QIcon(QLatin1String(":/images/blacklisted_pass.png")),
|
||||
QIcon(QLatin1String(":/images/blacklisted_fail.png")),
|
||||
QIcon(QLatin1String(":/images/benchmark.png")),
|
||||
QIcon(QLatin1String(":/images/debug.png")),
|
||||
QIcon(QLatin1String(":/images/debug.png")), // Info get's the same handling as Debug for now
|
||||
QIcon(QLatin1String(":/images/warn.png")),
|
||||
QIcon(QLatin1String(":/images/fatal.png")),
|
||||
QIcon(QLatin1String(":/images/fatal.png")), // System get's same handling as Fatal for now
|
||||
const static QIcon icons[] = {
|
||||
Icons::RESULT_PASS.icon(),
|
||||
Icons::RESULT_FAIL.icon(),
|
||||
Icons::RESULT_XFAIL.icon(),
|
||||
Icons::RESULT_XPASS.icon(),
|
||||
Icons::RESULT_SKIP.icon(),
|
||||
Icons::RESULT_BLACKLISTEDPASS.icon(),
|
||||
Icons::RESULT_BLACKLISTEDFAIL.icon(),
|
||||
Icons::RESULT_BENCHMARK.icon(),
|
||||
Icons::RESULT_MESSAGEDEBUG.icon(),
|
||||
Icons::RESULT_MESSAGEDEBUG.icon(), // Info gets the same handling as Debug for now
|
||||
Icons::RESULT_MESSAGEWARN.icon(),
|
||||
Icons::RESULT_MESSAGEFATAL.icon(),
|
||||
Icons::RESULT_MESSAGEFATAL.icon(), // System gets same handling as Fatal for now
|
||||
}; // provide an icon for unknown??
|
||||
|
||||
if (result < 0 || result >= Result::MessageInternal) {
|
||||
|