MCPcopy Create free account
hub / github.com/CasparCG/client / updateDeviceChannels

Method updateDeviceChannels

src/Core/DatabaseManager.cpp:757–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755}
756
757void DatabaseManager::updateDeviceChannels(const DeviceModel& model)
758{
759 QMutexLocker locker(&mutex);
760
761 QSqlDatabase::database().transaction();
762
763 QSqlQuery sql;
764 sql.prepare("UPDATE Device SET Channels = :Channels "
765 "WHERE Address = :Address");
766 sql.bindValue(":Channels", model.getChannels());
767 sql.bindValue(":Address", model.getAddress());
768
769 if (!sql.exec())
770 qCritical("Failed to execute sql query: %s, Error: %s", qPrintable(sql.lastQuery()), qPrintable(sql.lastError().text()));
771
772 QSqlDatabase::database().commit();
773}
774
775void DatabaseManager::updateDeviceChannelFormats(const DeviceModel& model)
776{

Callers 1

infoChangedMethod · 0.80

Calls 2

getChannelsMethod · 0.80
getAddressMethod · 0.45

Tested by

no test coverage detected