musescore / musescore/muse_framework
Vendored KDDockWidgets: `DockWidgetBase.cpp` missing `#include <QAction>`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12
- Forks
- 57
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 37
Description
I've been trying to build Audacity 4 against KDE's Qt 6.11 and had to include a series of patches to make it work. What follows is an AI-generated report of one of such issues. I see no contributing or AI guidelines so I hope this is acceptable.
The muse framework vendors KDDockWidgets 1.4.95 (circa 2021). This version's DockWidgetBase.cpp uses QAction methods without including <QAction>, relying on transitive includes that vary between Qt distributions. The code compiles only when <QAction> happens to be transitively included through other QtGui headers — a dependency that is not guaranteed across Qt distributions and is being actively removed.
Environment
- muse framework commit:
3c5512eb8ee1a863a6123e62bd75a6ab55045752 - Vendored KDDockWidgets version: 1.4.95 (in
muse/framework/dockwindow/thirdparty/KDDockWidgets/) - Qt: Built from the KDE Qt fork (the source of the
kde-qt6-core24-sdksnap), version 6.11.1
Error
DockWidgetBase.cpp:611:20: error: invalid use of incomplete type 'class QAction'
DockWidgetBase.cpp:612:20: error: invalid use of incomplete type 'class QAction'
The forward declaration comes from QtGui/qevent.h (which forward-declares QAction), but the full definition in <QAction> is never included.
Root cause
DockWidgetBase.cpp includes <QTimer> but not <QAction>. It calls methods on QAction objects via pointers (e.g. floatAction->setEnabled(true)), which requires the complete type. With upstream Qt, <QAction> is transitively included; with the KDE Qt fork (which has cleaner transitive include paths), it is not.
Suggested fix
Add #include <QAction> to the vendored DockWidgetBase.cpp:
#include <QTimer>
+#include <QAction>
#include <QScopedValueRollback>
Note on upstream
This issue is already fixed in upstream KDDockWidgets 2.x (github.com/KDAB/KDDockWidgets), which completely restructured the codebase and no longer has DockWidgetBase.cpp. However, upgrading the vendored snapshot from 1.4.95 to 2.x could be a disruptive change for the muse framework. The one-line #include patch above is the minimal fix for the vendored 1.4.95 snapshot.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open muse/framework/dockwindow/thirdparty/KDDockWidgets/DockWidgetBase.cpp and inspect the include block around . Add the missing QAction include, then build Audacity 4 or the muse framework against Qt 6.11; done means the incomplete QAction errors at the reported lines no longer occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100