Skip to content

Reduce use of deprecated functions in filedatedialog.#1785

Merged
ddennedy merged 2 commits intomltframework:masterfrom
cornusandu:master
Feb 9, 2026
Merged

Reduce use of deprecated functions in filedatedialog.#1785
ddennedy merged 2 commits intomltframework:masterfrom
cornusandu:master

Conversation

@cornusandu
Copy link
Contributor

@cornusandu cornusandu commented Feb 8, 2026

Overview

Reduce use of deprecated functions in filedatedialog.cpp.

Changes

1. Reduce use of deprecated functions [ Primary Focus]

src/dialogs/filedatedialog.cpp was using the setTimeSpec and toTimeSpec deprecated functions. I replaced them in favor of setTimeZone and toTimeZone.

2. Align with modern C++ standards

I replaced const with constexpr where acceptable, as constexpr expresses compile-time intent and already implies constant semantics.

I replaced top-scope char* constants with char[] constants, as constant semantics are better enforced with arrays than pointers.

3. Reduce README noise for users

Non-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.

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>
@bmatherly
Copy link
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.

Copy link
Member

@ddennedy ddennedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don’t change the readme

@cornusandu
Copy link
Contributor Author

Don’t change the readme

Done.

@cornusandu cornusandu requested a review from ddennedy February 8, 2026 17:04
@ddennedy ddennedy merged commit 2f8cbad into mltframework:master Feb 9, 2026
@ddennedy ddennedy added this to the v26.3 milestone Feb 11, 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.

3 participants