AutoTest: Use a prefix in autotest.qrc

Since all resources in Qt Creator get merged together at runtime, they
should be prefixed with the library/plugin name.

Change-Id: Ie411388ed72f099647b25787a140feff1828d3f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Alessandro Portale
2018-03-21 22:26:12 +01:00
parent 65329ca22a
commit 0ecd543614
4 changed files with 10 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/autotest">
<file>images/autotest.png</file> <file>images/autotest.png</file>
<file>images/sort.png</file> <file>images/sort.png</file>
<file>images/sort@2x.png</file> <file>images/sort@2x.png</file>

View File

@@ -31,12 +31,12 @@ namespace Autotest {
namespace Icons { namespace Icons {
const Utils::Icon SORT_ALPHABETICALLY({ const Utils::Icon SORT_ALPHABETICALLY({
{":/images/sort.png", Utils::Theme::IconsBaseColor}}); {":/autotest/images/sort.png", Utils::Theme::IconsBaseColor}});
const Utils::Icon SORT_NATURALLY({ const Utils::Icon SORT_NATURALLY({
{":/images/leafsort.png", Utils::Theme::IconsBaseColor}}); {":/autotest/images/leafsort.png", Utils::Theme::IconsBaseColor}});
const Utils::Icon RUN_SELECTED_OVERLAY({ const Utils::Icon RUN_SELECTED_OVERLAY({
{":/images/runselected_boxes.png", Utils::Theme::BackgroundColorDark}, {":/autotest/images/runselected_boxes.png", Utils::Theme::BackgroundColorDark},
{":/images/runselected_tickmarks.png", Utils::Theme::IconsBaseColor}}); {":/autotest/images/runselected_tickmarks.png", Utils::Theme::IconsBaseColor}});
const Utils::Icon RESULT_PASS({ const Utils::Icon RESULT_PASS({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestPassTextColor}}, {":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestPassTextColor}},
@@ -63,7 +63,7 @@ const Utils::Icon RESULT_BLACKLISTEDFAIL({
Utils::Icon::Tint | Utils::Icon::PunchEdges); Utils::Icon::Tint | Utils::Icon::PunchEdges);
const Utils::Icon RESULT_BENCHMARK({ const Utils::Icon RESULT_BENCHMARK({
{":/utils/images/filledcircle.png", Utils::Theme::BackgroundColorNormal}, {":/utils/images/filledcircle.png", Utils::Theme::BackgroundColorNormal},
{":/images/benchmark.png", Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint); {":/autotest/images/benchmark.png", Utils::Theme::PanelTextColorDark}}, Utils::Icon::Tint);
const Utils::Icon RESULT_MESSAGEDEBUG({ const Utils::Icon RESULT_MESSAGEDEBUG({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestDebugTextColor}}, {":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestDebugTextColor}},
Utils::Icon::Tint); Utils::Icon::Tint);
@@ -81,8 +81,8 @@ const Utils::Icon RESULT_MESSAGEFAILWARN({
const Utils::Icon RESULT_MESSAGEFATAL({ const Utils::Icon RESULT_MESSAGEFATAL({
{":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestFatalTextColor}}, {":/utils/images/filledcircle.png", Utils::Theme::OutputPanes_TestFatalTextColor}},
Utils::Icon::Tint); Utils::Icon::Tint);
const Utils::Icon VISUAL_DISPLAY({{":/images/visual.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon VISUAL_DISPLAY({{":/autotest/images/visual.png", Utils::Theme::IconsBaseColor}});
const Utils::Icon TEXT_DISPLAY({{":/images/text.png", Utils::Theme::IconsBaseColor}}); const Utils::Icon TEXT_DISPLAY({{":/autotest/images/text.png", Utils::Theme::IconsBaseColor}});
} // namespace Icons } // namespace Icons
} // namespace Autotest } // namespace Autotest

View File

@@ -279,7 +279,7 @@ TestSettingsPage::TestSettingsPage(const QSharedPointer<TestSettings> &settings)
setDisplayName(tr("General")); setDisplayName(tr("General"));
setCategory(Constants::AUTOTEST_SETTINGS_CATEGORY); setCategory(Constants::AUTOTEST_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("AutoTest", Constants::AUTOTEST_SETTINGS_TR)); setDisplayCategory(QCoreApplication::translate("AutoTest", Constants::AUTOTEST_SETTINGS_TR));
setCategoryIcon(Utils::Icon(":/images/autotest.png")); setCategoryIcon(Utils::Icon(":/autotest/images/autotest.png"));
} }
TestSettingsPage::~TestSettingsPage() TestSettingsPage::~TestSettingsPage()

View File

@@ -64,7 +64,7 @@ static QIcon testTreeIcon(TestTreeItem::Type type)
Utils::Icons::OPENFILE.icon(), Utils::Icons::OPENFILE.icon(),
CPlusPlus::Icons::iconForType(CPlusPlus::Icons::ClassIconType), CPlusPlus::Icons::iconForType(CPlusPlus::Icons::ClassIconType),
CPlusPlus::Icons::iconForType(CPlusPlus::Icons::SlotPrivateIconType), CPlusPlus::Icons::iconForType(CPlusPlus::Icons::SlotPrivateIconType),
QIcon(":/images/data.png") QIcon(":/autotest/images/data.png")
}; };
if (int(type) >= int(sizeof icons / sizeof *icons)) if (int(type) >= int(sizeof icons / sizeof *icons))