Reduce use of deprecated functions in filedatedialog.#1785
Merged
ddennedy merged 2 commits intomltframework:masterfrom Feb 9, 2026
Merged
Reduce use of deprecated functions in filedatedialog.#1785ddennedy merged 2 commits intomltframework:masterfrom
ddennedy merged 2 commits intomltframework:masterfrom
Conversation
Use constexpr over const where possible, and constant arrays over constant pointers, where constant semantics are needed. Signed-off-by: Bogdan Sandu <bogdanelsandu2011@gmail.com>
Member
|
LGTM I'm not super excited about the contexpr commit. The change won't make any difference for performance or maintainability. But it adds noise to the change log. So now it will be harder for me to understand the history of a line when I need to do git blame. Not a big deal. And since you already did the work, I think we should take it. |
Contributor
Author
Done. |
ddennedy
approved these changes
Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Reduce use of deprecated functions in filedatedialog.cpp.
Changes
1. Reduce use of deprecated functions [ Primary Focus]
src/dialogs/filedatedialog.cppwas using thesetTimeSpecandtoTimeSpecdeprecated functions. I replaced them in favor ofsetTimeZoneandtoTimeZone.2. Align with modern C++ standards
I replaced
constwithconstexprwhere acceptable, asconstexprexpresses compile-time intent and already implies constant semantics.I replaced top-scope
char*constants withchar[]constants, as constant semantics are better enforced with arrays than pointers.3. Reduce README noise for usersNon-technical users don't usually need to build the project from source. Replacing that with a collapsible block allows technical users to expand the block, if they wish to build the project from source. This is purely a UX change.Removed upon request.Notes
The code builds, and I personally didn't get any formatting errors via clang-format.
The commits are intentionally separated. If maintainers prefer, the README and constexpr cleanups can be omitted without affecting the deprecation fix.