forked from qt-creator/qt-creator
Utils: Cache theme icon access
These trigger over 120k file exist check on my machine on startup, just for a handful icons. Change-Id: Ic73f0783142ed329c2f8c8b852f622e69fc306da Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -10,10 +10,11 @@
|
||||
#include <QFrame>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
const char extraExtraExtraHighDpiIconPath[] = "/res/drawable-xxxhdpi/";
|
||||
const char extraExtraHighDpiIconPath[] = "/res/drawable-xxhdpi/";
|
||||
const char extraHighDpiIconPath[] = "/res/drawable-xhdpi/";
|
||||
@@ -27,7 +28,6 @@ const QSize highDpiIconSize{72, 72};
|
||||
const QSize extraHighDpiIconSize{96, 96};
|
||||
const QSize extraExtraHighDpiIconSize{144, 144};
|
||||
const QSize extraExtraExtraHighDpiIconSize{192, 192};
|
||||
}
|
||||
|
||||
AndroidManifestEditorIconContainerWidget::AndroidManifestEditorIconContainerWidget(
|
||||
QWidget *parent,
|
||||
@@ -40,7 +40,7 @@ AndroidManifestEditorIconContainerWidget::AndroidManifestEditorIconContainerWidg
|
||||
lowDpiIconSize,
|
||||
Tr::tr("Master icon"),
|
||||
Tr::tr("Select master icon."));
|
||||
masterIconButton->setIcon(QIcon::fromTheme(QLatin1String("document-open"), Utils::Icons::OPENFILE.icon()));
|
||||
masterIconButton->setIcon(Icon::fromTheme("document-open"));
|
||||
iconLayout->addWidget(masterIconButton);
|
||||
iconLayout->addStretch(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user