replaced QString uses with QStringLiteral
Minor code optimization according to Qt documentation.
This commit is contained in:
@@ -123,7 +123,7 @@ QIcon olive::icon::Create(const QString& theme, const QString &name)
|
||||
QIcon icon;
|
||||
|
||||
for (int i=0;i<ICON_SIZE_COUNT;i++) {
|
||||
icon.addFile(QString("%1/png/%2.%3.png").arg(theme, name, QString::number(ICON_SIZES[i])),
|
||||
icon.addFile(QStringLiteral("%1/png/%2.%3.png").arg(theme, name, QString::number(ICON_SIZES[i])),
|
||||
QSize(ICON_SIZES[i], ICON_SIZES[i]));
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ void StyleManager::SetStyle(const QString &style_path)
|
||||
olive::icon::LoadAll(style_path);
|
||||
|
||||
// Set palette for this
|
||||
QString palette_file = QString("%1/palette.ini").arg(style_path);
|
||||
QString palette_file = QStringLiteral("%1/palette.ini").arg(style_path);
|
||||
if (QFileInfo::exists(palette_file)) {
|
||||
qApp->setPalette(ParsePalette(palette_file));
|
||||
} else {
|
||||
@@ -151,7 +151,7 @@ void StyleManager::SetStyle(const QString &style_path)
|
||||
}
|
||||
|
||||
// Set CSS style for this
|
||||
QFile css_file(QString("%1/style.css").arg(style_path));
|
||||
QFile css_file(QStringLiteral("%1/style.css").arg(style_path));
|
||||
|
||||
if (css_file.exists() && css_file.open(QFile::ReadOnly | QFile::Text)) {
|
||||
// Read in entire CSS from file and set as the application stylesheet
|
||||
|
||||
Reference in New Issue
Block a user