From 2eae708fad1de78c10dce7b99d3166688bc1a60f Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 12 Jul 2023 11:16:39 +0200 Subject: [PATCH] Fix build with latest MSVC Amend 813bbc515bdd8af843ef56115711691e926d0bcb. Unclear why this passed CI, but we can't use implicit conversion of string or character literals. Change-Id: I1b3515e42b09a5caae1e632320b8251c27177f52 Reviewed-by: Axel Spoerl (cherry picked from commit 8f3f765dad8757a9307f8b538c0f3af2b7bb245f) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/styles/qfusionstyle.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index df06205f23a..01c5919593f 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -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(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);