Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Connect() and Disconnect() functions in GUI to allow JSON RPC to update UI #3367

Open
ann0see opened this issue Sep 8, 2024 · 1 comment · May be fixed by #3372
Open

Refactor Connect() and Disconnect() functions in GUI to allow JSON RPC to update UI #3367

ann0see opened this issue Sep 8, 2024 · 1 comment · May be fixed by #3372
Labels
feature request Feature request JSON-RPC Related to the JSON-RPC API refactoring Non-behavioural changes, Code cleanup

Comments

@ann0see
Copy link
Member

ann0see commented Sep 8, 2024

What is the current behaviour and why should it be changed?

Besides multiple other coupling issues, we should refactor the Connect() and Disconnect() functions in

https://github.com/jamulussoftware/jamulus/blob/main/src/clientdlg.cpp#L1196-L1296

to be able to call a method on the client to update the GUI state if necessary via JSON-RPC.

#3364 moves them to client.cpp and introduces signals and is probably a good starting point.

Has this feature been discussed and generally agreed?

No. However it’s a known issue that the GUI holds state and cannot be controlled that well in its current state programmatically.

@ann0see ann0see added feature request Feature request refactoring Non-behavioural changes, Code cleanup JSON-RPC Related to the JSON-RPC API labels Sep 8, 2024
@ann0see
Copy link
Member Author

ann0see commented Sep 8, 2024

So e.g. create
CClient::Connect ( const QString& strSelectedAddress ) which starts the client and emits a signal calling CClientDlg::Connect(). Same for Disconnect().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request JSON-RPC Related to the JSON-RPC API refactoring Non-behavioural changes, Code cleanup
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant