refactor: extract ExitNodeManager, DiagnosticsBuilder, QrCodeHelper from TailscaleController #2
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/split-controller-pr2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Breaks up the
TailscaleControllergod class (1346 lines) by extracting three focused helper classes. All Q_PROPERTY and Q_INVOKABLE signatures remain identical — zero QML changes needed.New files
ExitNodeManager(277 + 59 lines):m_exitNodeCandidates,m_exitNodeCountries,m_directExitNodes,m_countryNodes,m_favoriteCountries,m_quickProbe*members moved heresetBusyRequested/probeNextQuickCandidatesignals back to the controllerDiagnosticsBuilder(105 + 51 lines):m_logLines,appendLogLine,m_tailscaleLogs,m_netcheckTextDiagnosticsSnapshotstruct the controller fills in"---- log ----"now lives in one place (fixes the magic-string coupling)QrCodeHelper(41 + 19 lines):qrcodegenlibrarygenerateQrCode()method moved here verbatimqrcodegen.{c,h}stay in place (vendored, untouched)Modified files
tailscalecontroller.{h,cpp}— 1346 → 1091 lines; keeps DBus layer,parseStatusJson, status/login/ping polling, and all QML-facing properties/methods; delegates to the three helpersapp/app.pro— added 3 SOURCES + 3 HEADERSVerification
.tsfile is essentially empty, sotr()context change is safemb2 buildon the release host is recommended before taggingStats
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.