Skip to content

Qt6 compatibility patch 3#398

Merged
mrkite merged 1 commit into
mrkite:masterfrom
Kolcha:qt6-compat-patch-3
May 10, 2026
Merged

Qt6 compatibility patch 3#398
mrkite merged 1 commit into
mrkite:masterfrom
Kolcha:qt6-compat-patch-3

Conversation

@Kolcha
Copy link
Copy Markdown
Contributor

@Kolcha Kolcha commented Apr 28, 2026

  • conditionally depend on core5compat module

    core5compat contains QRegExp and QStringRef classes that are not available in Qt 6 by default.

  • replaced QString::midRef() with QString::mid()

    QString::midRef() is not available in Qt 6 due to QStringRef removal. replacing it with QString::mid() is not the best option as this introduces memory allocation, but the easiest one.

    QStringView can't cover all cases as it is limited in Qt 5. but this can be addressed later with full Qt 6 migration.

these changes don't make build with Qt6 possible, but they don't hurt Qt5 build either, and still move Qt6 migration forward.

- conditionally depend on core5compat module

  core5compat contains QRegExp and QStringRef classes
  that are not available in Qt 6 by default.

- replaced QString::midRef() with QString::mid()

  QString::midRef() is not available in Qt 6 due to QStringRef
  removal. replacing it with QString::mid() is not the best option
  as this introduces memory allocation, but the easiest one.

  QStringView can't cover all cases as it is limited in Qt 5. but
  this can be addressed later with full Qt 6 migration.

these changes don't make build with Qt6 possible, but they don't
hurt Qt5 build either, and still move Qt6 migration forward.
@Kolcha
Copy link
Copy Markdown
Contributor Author

Kolcha commented Apr 28, 2026

this is the last PR required to enable Qt 6 builds. it also contains independent changes as the previous ones (#396, #397) and can be merged in any order. this PR even smaller than the previous ones.

after merging all these 3 PRs Qt 6 builds can be enabled.

@EtlamGit
Copy link
Copy Markdown
Collaborator

@mrkite mrkite merged commit 4d7cd2d into mrkite:master May 10, 2026
6 checks passed
@Kolcha Kolcha deleted the qt6-compat-patch-3 branch May 11, 2026 05:53
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