Skip to content
This repository was archived by the owner on Jul 26, 2026. It is now read-only.

fix(gui): Port Deskflow Qt 6.9 fix - #2231

Closed
shymega wants to merge 1 commit into
masterfrom
shymega/port-deskflow-keysequence-fix
Closed

fix(gui): Port Deskflow Qt 6.9 fix#2231
shymega wants to merge 1 commit into
masterfrom
shymega/port-deskflow-keysequence-fix

Conversation

@shymega

@shymega shymega commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

As raised in #2221, this fix ports the commit from Deskflow that fixes compilation on machines with Qt versions greater than or equal to 6.9.

See: deskflow/deskflow#8447

Fixes: #2221.

Contributor Checklist:

  • This change affects end users and I have created a file in the doc/newsfragments directory (and made sure to read the README.md in that directory)
  • This change does not affect end users

@shymega

shymega commented Apr 22, 2025

Copy link
Copy Markdown
Contributor Author

@p12tic This PR should make it in for 3.3.0. It is critical.

@shymega
shymega force-pushed the shymega/port-deskflow-keysequence-fix branch from bb6f739 to 08dd837 Compare April 22, 2025 19:26
@shymega
shymega enabled auto-merge April 22, 2025 19:26
@shymega

shymega commented Apr 22, 2025

Copy link
Copy Markdown
Contributor Author

@p12tic I took this fix from Deskflow, but the static inline integer in KeySequence.h seems to require C++ STD 17+.

Have you got any other thoughts on how to approach this w/o bumping C++ std on Windows?

@shymega
shymega force-pushed the shymega/port-deskflow-keysequence-fix branch from 08dd837 to e225613 Compare April 22, 2025 19:52
As raised in #2221, this fix ports the commit from Deskflow that fixes
compilation on machines with Qt versions greater than or equal to 6.9.

See: deskflow/deskflow#8447

Fixes: #2221.
@sid-code

Copy link
Copy Markdown

Why not just cast it to uint as per the release notes?

The relevant section, if I understand it correctly:

563ed822f86 QString: toward UTF-8 arg() support [3½/4]: port unary arg() to QAnyStringView The QString::arg() overloads have been redesigned. Character-like types (char, char16_t, char8_t, wchar_t (still subject to QTBUG-126054 at the time of writing), char32_t) now always output the character, not its numeric value. In particular, char16_t and char arguments now match the string-ish arg() overload (and therefore don't provide a base argument anymore. A backwards-compatible fix is to cast char, char16_t, and wchar_t arguments to uint. This also fixes the ambiguity errors you may have seen when using a char16_t as fillChar.

I applied this patch to the source and it builds with Qt 6.9.0.

@sithlord48

Copy link
Copy Markdown
Contributor

don't use uint use uint16_t so the size is ensured. (uint should be 2bytes but not on all platforms)

@shymega

shymega commented Apr 23, 2025

Copy link
Copy Markdown
Contributor Author

Closing in favor of #2232.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure to build with Qt 6.9

3 participants