AutoTest: Use themed test result icons

Task-number: QTCREATORBUG-16663
Change-Id: I087024bf2882690233032e555a825e397c945d3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Alessandro Portale
2016-11-03 16:35:55 +01:00
parent f967545c5a
commit 6d7bb54e77
13 changed files with 49 additions and 24 deletions

View File

@@ -5,16 +5,6 @@
<file>images/sort@2x.png</file> <file>images/sort@2x.png</file>
<file>images/leafsort.png</file> <file>images/leafsort.png</file>
<file>images/leafsort@2x.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/benchmark.png</file>
<file>images/runselected_boxes.png</file> <file>images/runselected_boxes.png</file>
<file>images/runselected_boxes@2x.png</file> <file>images/runselected_boxes@2x.png</file>

View File

@@ -38,5 +38,39 @@ const Utils::Icon RUN_SELECTED_OVERLAY({
{QLatin1String(":/images/runselected_boxes.png"), Utils::Theme::BackgroundColorDark}, {QLatin1String(":/images/runselected_boxes.png"), Utils::Theme::BackgroundColorDark},
{QLatin1String(":/images/runselected_tickmarks.png"), Utils::Theme::IconsBaseColor}}); {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 Icons
} // namespace Autotest } // namespace Autotest

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

View File

@@ -23,6 +23,7 @@
** **
****************************************************************************/ ****************************************************************************/
#include "autotesticons.h"
#include "testresultdelegate.h" #include "testresultdelegate.h"
#include "testresultmodel.h" #include "testresultmodel.h"
@@ -46,20 +47,20 @@ TestResultItem::~TestResultItem()
} }
static QIcon testResultIcon(Result::Type result) { static QIcon testResultIcon(Result::Type result) {
static QIcon icons[] = { const static QIcon icons[] = {
QIcon(QLatin1String(":/images/pass.png")), Icons::RESULT_PASS.icon(),
QIcon(QLatin1String(":/images/fail.png")), Icons::RESULT_FAIL.icon(),
QIcon(QLatin1String(":/images/xfail.png")), Icons::RESULT_XFAIL.icon(),
QIcon(QLatin1String(":/images/xpass.png")), Icons::RESULT_XPASS.icon(),
QIcon(QLatin1String(":/images/skip.png")), Icons::RESULT_SKIP.icon(),
QIcon(QLatin1String(":/images/blacklisted_pass.png")), Icons::RESULT_BLACKLISTEDPASS.icon(),
QIcon(QLatin1String(":/images/blacklisted_fail.png")), Icons::RESULT_BLACKLISTEDFAIL.icon(),
QIcon(QLatin1String(":/images/benchmark.png")), Icons::RESULT_BENCHMARK.icon(),
QIcon(QLatin1String(":/images/debug.png")), Icons::RESULT_MESSAGEDEBUG.icon(),
QIcon(QLatin1String(":/images/debug.png")), // Info get's the same handling as Debug for now Icons::RESULT_MESSAGEDEBUG.icon(), // Info gets the same handling as Debug for now
QIcon(QLatin1String(":/images/warn.png")), Icons::RESULT_MESSAGEWARN.icon(),
QIcon(QLatin1String(":/images/fatal.png")), Icons::RESULT_MESSAGEFATAL.icon(),
QIcon(QLatin1String(":/images/fatal.png")), // System get's same handling as Fatal for now Icons::RESULT_MESSAGEFATAL.icon(), // System gets same handling as Fatal for now
}; // provide an icon for unknown?? }; // provide an icon for unknown??
if (result < 0 || result >= Result::MessageInternal) { if (result < 0 || result >= Result::MessageInternal) {