make today deviceclass user, because the auto device disturbes the tests

This commit is contained in:
Simon Stürz 2016-04-06 16:23:46 +02:00 committed by Michael Zanetti
parent 2ef5ae421e
commit 0492306f3b
3 changed files with 17 additions and 9 deletions

View File

@ -45,6 +45,14 @@ coverage {
message("Building coverage.")
}
# Build tests
!disabletesting {
message("Building guh with tests")
SUBDIRS += tests
} else {
message("Building guh without tests")
}
# Bluetooth LE support
contains(DEFINES, BLUETOOTH_LE) {
message("Bluetooth LE enabled.")

View File

@ -225,7 +225,7 @@ void DevicePluginDateTime::deviceRemoved(Device *device)
countdown->deleteLater();
}
startMonitoringAutoDevices();
//startMonitoringAutoDevices();
}
DeviceManager::DeviceError DevicePluginDateTime::executeAction(Device *device, const Action &action)
@ -271,14 +271,14 @@ void DevicePluginDateTime::networkManagerReplyReady(QNetworkReply *reply)
void DevicePluginDateTime::startMonitoringAutoDevices()
{
foreach (Device *device, myDevices()) {
if (device->deviceClassId() == todayDeviceClassId) {
return; // We already have the date device... do nothing.
}
}
// foreach (Device *device, myDevices()) {
// if (device->deviceClassId() == todayDeviceClassId) {
// return; // We already have the date device... do nothing.
// }
// }
DeviceDescriptor dateDescriptor(todayDeviceClassId, "Date", "Time");
emit autoDevicesAppeared(todayDeviceClassId, QList<DeviceDescriptor>() << dateDescriptor);
// DeviceDescriptor dateDescriptor(todayDeviceClassId, "Date", "Time");
// emit autoDevicesAppeared(todayDeviceClassId, QList<DeviceDescriptor>() << dateDescriptor);
}
void DevicePluginDateTime::searchGeoLocation()

View File

@ -17,7 +17,7 @@
"Service",
"Time"
],
"createMethods": ["auto"],
"createMethods": ["user"],
"paramTypes": [ ],
"stateTypes": [
{