Skip to content

Fix missing includes - #275

Open
astrojuanlu wants to merge 3 commits into
musescore:mainfrom
astrojuanlu:fix/missing-includes-qt-transitive
Open

Fix missing includes#275
astrojuanlu wants to merge 3 commits into
musescore:mainfrom
astrojuanlu:fix/missing-includes-qt-transitive

Conversation

@astrojuanlu

@astrojuanlu astrojuanlu commented Sep 6, 2026

Copy link
Copy Markdown

Resolves: #272
Resolves: #273
Resolves: #274

Full context in the issue reports and commit messages.

  • I signed the CLA as username:
  • The title of the PR describes the problem it addresses.
  • Each commit's message describes its purpose and effects, and references the issue it resolves. If changes are extensive, there is a sequence of easily reviewable commits.
  • The code in the PR follows the coding rules.
  • I understand all aspects of the code I'm contributing and I'm able to explain it if requested.
  • The code compiles and runs on my machine, preferably after each commit individually. I have manually tested and verified that my changes fulfil their intended purpose.
  • No prior attempts to resolve this problem exist, or if they do, I listed them in my PR description and described how I avoided repeating past mistakes.
  • There are no unnecessary changes.
  • I created a unit test or vtest to verify the changes I made (if applicable).

Build configuration

audacity: audacity/audacity/master
audacity platforms: linux_x64
musescore: musescore/MuseScore/main
musescore platforms: linux_x64

extensionsession.h uses 'const Manifest&' as a parameter type but
only includes iextensionsession.h and scriptengine.h, neither of
which provides the Manifest definition (declared in
extensionstypes.h). This compiles only when extensionstypes.h
is transitively included through other headers, which varies
between Qt distributions.

Closes musescore#272

Assisted-by: OpenRouter:z-ai/glm-5.2 opencode
extapiv1.cpp and uimodule.cpp call qmlRegisterType() and
qmlRegisterSingletonType() without including <QQmlEngine>, which
declares these functions in Qt 6. The calls compile only when
<QQmlEngine> is transitively included through other headers,
which varies between Qt distributions.

Closes musescore#273

Assisted-by: OpenRouter:z-ai/glm-5.2 opencode
…getBase.cpp

DockWidgetBase.cpp calls methods on QAction objects (e.g.
setEnabled(), triggered signal) but does not include <QAction>.
The code compiles only when <QAction> is transitively included
through other QtGui headers, which varies between Qt
distributions. This is already fixed in upstream KDDockWidgets
2.x, but the vendored snapshot is 1.4.95.

Closes musescore#274

Assisted-by: OpenRouter:z-ai/glm-5.2 opencode
@astrojuanlu
astrojuanlu marked this pull request as ready for review September 6, 2026 09:17
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 856268e5-67c6-4a25-84fc-b82d1d6b0154

📥 Commits

Reviewing files that changed from the base of the PR and between a3d1363 and c8acff7.

📒 Files selected for processing (4)
  • framework/dockwindow/thirdparty/KDDockWidgets/src/DockWidgetBase.cpp
  • framework/extensions/api/v1/extapiv1.cpp
  • framework/extensions/internal/extensionsession.h
  • framework/ui/uimodule.cpp

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Added missing header includes to framework source files. The changes add QAction to DockWidgetBase.cpp, QQmlEngine to the extensions API and UI module sources, and extensionstypes.h to extensionsession.h. No public declarations or runtime logic changed.

Merge Risk: ⚪ Minimal · up to c8acf

This change restores explicit Qt and extension-type header dependencies so the framework no longer relies on transitive includes, without changing runtime behavior. No current merge-readiness risk remains.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The changes address parts of issues [#272], [#273], and [#274], including extensionstypes.h, QQmlEngine, and QAction. However, the linked issues list additional required includes and affected fi… Add all remaining include directives required by issues [#272] and [#273]. Remove the obsolete QFile forward declaration after adding <QFile>. Verify the listed affected files and confirm that the framework builds without relying on tra…
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately identifies the primary change: adding missing include directives.
Description check ✅ Passed The description references all linked issues, explains the motivation, completes the checklist, and provides build configuration. The unchecked test item is acceptable if tests are not applicable.
Out of Scope Changes check ✅ Passed All reported changes are include-only changes that directly support the requirements in issues [#272], [#273], and [#274]. No unrelated code changes are shown.
Full details: Linked Issues check

Explanation

The changes address parts of issues [#272], [#273], and [#274], including extensionstypes.h, QQmlEngine, and QAction. However, the linked issues list additional required includes and affected files that are not present in the provided changes, including &lt;QFile&gt;, &lt;QVariant&gt;, &lt;QTimer&gt;, &lt;QMetaEnum&gt;, &lt;QWindow&gt;, &lt;QJSEngine&gt;, and others.

Resolution

Add all remaining include directives required by issues [#272] and [#273]. Remove the obsolete QFile forward declaration after adding &lt;QFile&gt;. Verify the listed affected files and confirm that the framework builds without relying on transitive Qt includes.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@astrojuanlu

Copy link
Copy Markdown
Author

Most of the include fixes were already addressed by #256, which is newer than the vendored version in Audacity 4 at the time of opening this PR. So the CodeRabbit feedback is not applicable.

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

Labels

None yet

Projects

None yet

1 participant