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

[nemo-qml-plugin-systemsettings] Simplify DBus argument in call chang… #28

Closed
wants to merge 1 commit into from

Conversation

dcaliste
Copy link

…ing GPS flight mode.

Nothing serious but while searching for why my GPS was in flight mode, I notice this interesting construction. I may miss something, but I think it can be simplified a bit.

@@ -515,7 +515,7 @@ void LocationSettings::setGpsFlightMode(bool flightMode)
if (d->m_gpsTechInterface) {
QDBusReply<void> reply = d->m_gpsTechInterface->blockingCall("SetProperty",
PoweredPropertyName,
QVariant::fromValue<QDBusVariant>(QDBusVariant(QVariant::fromValue<bool>(!flightMode))));
QVariant::fromValue<bool>(!flightMode));
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't test, but wouldn't this now call SetProperty with bool as parameter type instead of dbus variant bool?

Copy link
Author

Choose a reason for hiding this comment

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

Good point, I need to test. Maybe that's the reason of such complex construction to pass a boolean value in the end.

Copy link
Contributor

Choose a reason for hiding this comment

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

Long time. Could just close the pr maybe?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, indeed.

@dcaliste
Copy link
Author

Invalid change, as mentioned by @pvuorela , closing.

@dcaliste dcaliste closed this Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants