refactor(slint): extract DAC wizard into qbz-dac-wizard crate
First per-feature crate split off the qbz binary. `dac_wizard.rs` (794 LOC) was the cleanest candidate: zero cross-feature module deps — it only used qbz-ui generated types (AppWindow, DacWizardState, …), qbz-audio, qbz-models and qbz-i18n. Moved verbatim into `qbz-dac-wizard/src/lib.rs` (import `crate::` -> `qbz_ui::`); the bin now `use qbz_dac_wizard as dac_wizard;` so its ~20 call sites in main.rs are unchanged. `cargo check -p qbz` green. cc
This commit is contained in:
6 files changed
+34
-2
No files matched your search
Generated
+12
@@ -5531,6 +5531,7 @@ dependencies = [
|
||||
"qbz-cast",
|
||||
"qbz-core",
|
||||
"qbz-credentials",
|
||||
"qbz-dac-wizard",
|
||||
"qbz-i18n",
|
||||
"qbz-integrations",
|
||||
"qbz-library",
|
||||
@@ -5700,6 +5701,17 @@ dependencies = [
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "qbz-dac-wizard"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"qbz-audio",
|
||||
"qbz-i18n",
|
||||
"qbz-models",
|
||||
"qbz-ui",
|
||||
"slint",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "qbz-i18n"
|
||||
version = "0.1.0"
|
||||
|
||||
@@ -23,6 +23,7 @@ members = [
|
||||
"qconnect-transport-ws",
|
||||
"qconnect-app",
|
||||
"qbz-ui",
|
||||
"qbz-dac-wizard",
|
||||
"qbz",
|
||||
"qbz-credentials",
|
||||
"qbz-media-controls",
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
[package]
|
||||
name = "qbz-dac-wizard"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
description = "HiFi/DAC setup wizard controller (Slint) — extracted feature crate."
|
||||
|
||||
[lib]
|
||||
name = "qbz_dac_wizard"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
qbz-ui = { path = "../qbz-ui" }
|
||||
qbz-audio = { path = "../qbz-audio" }
|
||||
qbz-models = { path = "../qbz-models" }
|
||||
qbz-i18n = { path = "../qbz-i18n" }
|
||||
slint = { version = "=1.16.1", default-features = false, features = ["std", "compat-1-2"] }
|
||||
@@ -11,7 +11,7 @@ use std::sync::Mutex;
|
||||
use qbz_audio::{AudioStackHealth, Distro, InitSystem};
|
||||
use slint::{ComponentHandle, Model, ModelRc, VecModel};
|
||||
|
||||
use crate::{AppWindow, DacCandidateRow, DacConfigRow, DacWizardState, RemediationRow};
|
||||
use qbz_ui::{AppWindow, DacCandidateRow, DacConfigRow, DacWizardState, RemediationRow};
|
||||
|
||||
// Last probe result, so a distro override recomputes commands without
|
||||
// re-shelling on every dropdown change.
|
||||
@@ -46,6 +46,7 @@ slint = { version = "=1.16.1", default-features = false, features = [
|
||||
i-slint-backend-winit = "=1.16.1"
|
||||
qbz-music-link = { path = "../qbz-music-link" }
|
||||
qbz-ui = { path = "../qbz-ui" }
|
||||
qbz-dac-wizard = { path = "../qbz-dac-wizard" }
|
||||
log = { workspace = true }
|
||||
env_logger = "0.11"
|
||||
tokio = { workspace = true }
|
||||
|
||||
@@ -40,7 +40,7 @@ mod favorites;
|
||||
mod favorites_prefs;
|
||||
mod foryou;
|
||||
mod genre_filter;
|
||||
mod dac_wizard;
|
||||
use qbz_dac_wizard as dac_wizard;
|
||||
mod home;
|
||||
mod immersive;
|
||||
mod info_modals;
|
||||
|
||||
Reference in new issue
Block a user