]>
Commit | Line | Data |
---|---|---|
407f4586 AM |
1 | --- workspace/solid/hal/halpower.cpp 2009/02/22 12:56:23 929945 |
2 | +++ workspace/solid/hal/halpower.cpp 2009/10/15 14:30:24 1035622 | |
3 | @@ -393,7 +393,11 @@ | |
4 | if(m_halManager.call("FindDeviceByCapability", "keyboard_backlight").arguments().at(0).toStringList().contains(device)) | |
5 | { | |
6 | QDBusInterface deviceInterface("org.freedesktop.Hal", device, "org.freedesktop.Hal.Device.KeyboardBacklight", QDBusConnection::systemBus()); //TODO - I do not have a backlight enabled keyboard, so I'm guessing a bit here. Could someone please check this. | |
7 | - brightness = deviceInterface.call("GetBrightness").arguments().at(0).toDouble(); | |
8 | + | |
9 | + QDBusMessage getBrightnessDBusMessage = deviceInterface.call("GetBrightness"); | |
10 | + if(!deviceInterface.lastError().isValid()) | |
11 | + brightness = getBrightnessDBusMessage.arguments().at(0).toDouble(); | |
12 | + | |
13 | if(deviceInterface.lastError().isValid()) | |
14 | { | |
15 | return 0; |