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.") message("Building coverage.")
} }
# Build tests
!disabletesting {
message("Building guh with tests")
SUBDIRS += tests
} else {
message("Building guh without tests")
}
# Bluetooth LE support # Bluetooth LE support
contains(DEFINES, BLUETOOTH_LE) { contains(DEFINES, BLUETOOTH_LE) {
message("Bluetooth LE enabled.") message("Bluetooth LE enabled.")

View File

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

View File

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