Skip to content

Conversation

@Chirag8405
Copy link
Contributor

  • Add unpair/forget functionality for paired devices
  • Fix connection issues with already paired devices
  • Improve device state tracking and refresh capability

- Add unpair/forget functionality for paired devices
- Fix connection issues with already paired devices
- Improve device state tracking and refresh capability
Copy link
Member

@LeVraiArdox LeVraiArdox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good overall, just replace the commands with cpp modules like you did with the Wifi.

Also, can you send a screenshot of what this new layout looks like ? Thanks


Process {
id: pairedDevicesFetcher
command: ["bluetoothctl", "devices", "Paired"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be cool to use a module from the bluetooth.cpp/hpp plugins


Quickshell.execDetached([
"bash", "-c",
`bluetoothctl remove ${address}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for here. Let's prevent commands execution

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, working on it. Was busy with college exams

if (pairedDevices.includes(address)) {
Quickshell.execDetached([
"bash", "-c",
`bluetoothctl connect ${address}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you get it

@Chirag8405
Copy link
Contributor Author

nothing extra, just a new refresh button beside discover and a forget button beside the toggle

image

@LeVraiArdox
Copy link
Member

INFO qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.

What is this about ?

Comment on lines +35 to +39
Timer {
id: refreshTimer
interval: 8000
onTriggered: BluetoothService.refreshPairedDevices()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the idea of using a timer plz ?

m_monitorProcess = new QProcess(this);
m_monitorProcess->setProcessChannelMode(QProcess::MergedChannels);
connect(m_monitorProcess, &QProcess::readyReadStandardOutput, this, &BluetoothService::parseMonitorOutput);
m_monitorProcess->start("bluetoothctl");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of using CPP was to use the QT bluetooth module or bluez. It should be a native component and not a command call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants