mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
Handle Qt6.6 Deprecations (#4908)
This commit is contained in:
parent
b9cfc29059
commit
c1b0d50237
4 changed files with 21 additions and 4 deletions
|
|
@ -937,8 +937,12 @@ MessagesSettingsPage::MessagesSettingsPage()
|
|||
|
||||
void MessagesSettingsPage::updateColor(const QString &value)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0))
|
||||
QColor colorToSet = QColor::fromString("#" + value);
|
||||
#else
|
||||
QColor colorToSet;
|
||||
colorToSet.setNamedColor("#" + value);
|
||||
#endif
|
||||
if (colorToSet.isValid()) {
|
||||
SettingsCache::instance().setChatMentionColor(value);
|
||||
updateMentionPreview();
|
||||
|
|
@ -947,8 +951,12 @@ void MessagesSettingsPage::updateColor(const QString &value)
|
|||
|
||||
void MessagesSettingsPage::updateHighlightColor(const QString &value)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0))
|
||||
QColor colorToSet = QColor::fromString("#" + value);
|
||||
#else
|
||||
QColor colorToSet;
|
||||
colorToSet.setNamedColor("#" + value);
|
||||
#endif
|
||||
if (colorToSet.isValid()) {
|
||||
SettingsCache::instance().setChatHighlightColor(value);
|
||||
updateHighlightPreview();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue