Skip to content

Fix non-persistent search configuration#822

Closed
o3wiz wants to merge 1 commit into
variar:masterfrom
o3wiz:fix_non_persistent_search_colors
Closed

Fix non-persistent search configuration#822
o3wiz wants to merge 1 commit into
variar:masterfrom
o3wiz:fix_non_persistent_search_colors

Conversation

@o3wiz

@o3wiz o3wiz commented Jun 2, 2026

Copy link
Copy Markdown

Fixes a compilation/runtime issue where search colors (for mainBackColor and quickfindBackColor) were not being correctly loaded from storage when building against Qt versions newer than 6.4.0.

In Qt > 6.4.0, the codebase incorrectly attempted to chain .fromString() as if it were a non-static setter mutating an existing object, similar to how .setNamedColor() behaves in older Qt versions. However, QColor::fromString() is a static factory method that returns a new QColor instance.

This PR fixes the logic by properly assigning the return value using the assignment operator (= QColor::fromString(...)), ensuring the retrieved configuration is actually persisted into the configuration object.

Fixes #821

@o3wiz

o3wiz commented Jun 7, 2026

Copy link
Copy Markdown
Author

@variar Hi can you take a look at this P.R?
It's a very small change that will help a lot, thanks :)

@o3wiz o3wiz closed this by deleting the head repository Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search highlight color settings do not persist after restart or in new windows (Qt 6.4+)

1 participant