Use QStringLiteral

This commit is contained in:
lupoDharkael
2017-12-15 18:34:05 +01:00
parent a5df852268
commit 11b101570f
10 changed files with 31 additions and 29 deletions

View File

@@ -47,10 +47,10 @@ void ButtonListView::initButtonList() {
// when the background is lighter than gray, it uses the white icons
QColor bgColor = this->palette().color(QWidget::backgroundRole());
QString color = bgColor.valueF() < 0.6 ? "White" : "Black";
QString iconPath = QString(":/img/buttonIcons%1/%2")
QString iconPath = QStringLiteral(":/img/buttonIcons%1/%2")
.arg(color).arg(tool->iconName());
if (t == CaptureButton::TYPE_SELECTIONINDICATOR) {
iconPath = QString(":/img/buttonIcons%1/size_indicator.png")
iconPath = QStringLiteral(":/img/buttonIcons%1/size_indicator.png")
.arg(color);
}
m_buttonItem->setIcon(QIcon(iconPath));