Skip to content

Commit 7a1c96d

Browse files
committed
chore: fix deprecated setNamedColor
1 parent 4c2e9cc commit 7a1c96d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/settings/src/configuration.cpp

+13-2
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,24 @@ void Configuration::retrieveFromStorage( QSettings& settings )
138138
DefaultConfiguration.enableMainSearchHighlightVariance_ )
139139
.toBool();
140140

141-
mainSearchBackColor_.setNamedColor(
141+
142+
mainSearchBackColor_
143+
#if QT_VERSION <= QT_VERSION_CHECK( 6, 4, 0 )
144+
.setNamedColor(
145+
#else
146+
.fromString(
147+
#endif
142148
settings
143149
.value( "regexpType.mainBackColor",
144150
DefaultConfiguration.mainSearchBackColor_.name( QColor::HexArgb ) )
145151
.toString() );
146152

147-
qfBackColor_.setNamedColor(
153+
qfBackColor_
154+
#if QT_VERSION <= QT_VERSION_CHECK( 6, 4, 0 )
155+
.setNamedColor(
156+
#else
157+
.fromString(
158+
#endif
148159
settings
149160
.value( "regexpType.quickfindBackColor",
150161
DefaultConfiguration.qfBackColor_.name( QColor::HexArgb ) )

0 commit comments

Comments
 (0)