Fix build with latest MSVC

Amend 813bbc515b. Unclear why this
passed CI, but we can't use implicit conversion of string or character
literals.

Pick-to: 6.6
Change-Id: I1b3515e42b09a5caae1e632320b8251c27177f52
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
Volker Hilsheimer 2023-07-12 11:16:39 +02:00
parent bcf14392df
commit 8f3f765dad

View File

@ -1240,7 +1240,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
const QString pixmapName = QStyleHelper::uniqueName("headersection-"_L1
% HexString(header->position)
% HexString(header->orientation)
% (isSectionDragTarget ? '1' : '0'),
% QLatin1Char(isSectionDragTarget ? '1' : '0'),
option, option->rect.size());
QPixmap cache;
if (!QPixmapCache::find(pixmapName, &cache)) {
@ -1955,7 +1955,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
case CC_SpinBox:
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
QPixmap cache;
const QString pixmapName = QStyleHelper::uniqueName("spinbox"_L1, spinBox, spinBox->rect.size());
QString pixmapName = QStyleHelper::uniqueName("spinbox"_L1, spinBox, spinBox->rect.size());
if (!QPixmapCache::find(pixmapName, &cache)) {
cache = styleCachePixmap(spinBox->rect.size());
@ -2666,10 +2666,10 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
bool isEnabled = (comboBox->state & State_Enabled);
QPixmap cache;
const QString pixmapName = QStyleHelper::uniqueName("combobox"_L1
% (sunken ? "-sunken" : "")
% (comboBox->editable ? "-editable" : "")
% (isEnabled ? "-enabled" : "")
% (!comboBox->frame ? "-frameless" : ""),
% QLatin1StringView(sunken ? "-sunken" : "")
% QLatin1StringView(comboBox->editable ? "-editable" : "")
% QLatin1StringView(isEnabled ? "-enabled" : "")
% QLatin1StringView(!comboBox->frame ? "-frameless" : ""),
option, comboBox->rect.size());
if (!QPixmapCache::find(pixmapName, &cache)) {
cache = styleCachePixmap(comboBox->rect.size());
@ -2921,7 +2921,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
}
// draw handle
if ((option->subControls & SC_SliderHandle) ) {
const QString handlePixmapName = QStyleHelper::uniqueName("slider_handle"_L1, option, handle.size());
QString handlePixmapName = QStyleHelper::uniqueName("slider_handle"_L1, option, handle.size());
if (!QPixmapCache::find(handlePixmapName, &cache)) {
cache = styleCachePixmap(handle.size());
cache.fill(Qt::transparent);