Skip to content

fix(gui): UlanziDialWindowsManager incomplete type breaks MinGW build without hidapi #3343

Description

@NF0T

Bug

Introduced by #3239 (Ulanzi Dial Windows backend). MinGW builds on Windows without hidapi fail to compile MainWindow.cpp with:

error: cannot convert 'AetherSDR::UlanziDialBackend*' to 'AetherSDR::UlanziDialWindowsManager*' in assignment
error: invalid use of incomplete type 'class AetherSDR::UlanziDialWindowsManager'
error: no matching function for call to 'QObject::connect(AetherSDR::UlanziDialWindowsManager*&, ...)'

Root cause

MainWindow.h declares m_dialBackend as UlanziDialWindowsManager* under #elif defined(Q_OS_WIN) — no HAVE_HIDAPI check. But UlanziDialBackend.h only aliases UlanziDialWindowsManager under Q_OS_WIN && HAVE_HIDAPI; without hidapi it falls through to a no-op stub class also named UlanziDialBackend. The member type is an incomplete forward-declared class unrelated to the alias, so all three operations (assignment, moveToThread, connect) fail.

CI uses MSVC + hidapi so this was never caught by the build gate.

Fix

Add && defined(HAVE_HIDAPI) to both the forward-declaration and member-declaration guards for UlanziDialWindowsManager in MainWindow.h. Add an #else fallback in both spots that forward-declares / holds UlanziDialBackend* (the no-op stub), keeping the no-hidapi Windows path compilable.

PR: NF0T/AetherSDR (pending)

Environment

  • Windows 11, MinGW GCC 13.1.0, Qt 6.11.0
  • hidapi not installed (USB HID encoder support disabled)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions