Don't use API deprecated in Qt 5.14

master
Michael Zanetti 2020-10-26 19:11:31 +01:00
parent df59d45e83
commit 7113009b28
3 changed files with 6 additions and 6 deletions

View File

@ -415,8 +415,8 @@ void IntegrationPluginDateTime::onDayChanged(const QDateTime &dateTime)
m_todayDevice->setStateValue(todayMonthStateTypeId, dateTime.date().month());
m_todayDevice->setStateValue(todayYearStateTypeId, dateTime.date().year());
m_todayDevice->setStateValue(todayWeekdayStateTypeId, dateTime.date().dayOfWeek());
m_todayDevice->setStateValue(todayWeekdayNameStateTypeId, dateTime.date().longDayName(dateTime.date().dayOfWeek()));
m_todayDevice->setStateValue(todayMonthNameStateTypeId, dateTime.date().longMonthName(dateTime.date().month()));
m_todayDevice->setStateValue(todayWeekdayNameStateTypeId, QLocale().dayName(dateTime.date().dayOfWeek()));
m_todayDevice->setStateValue(todayMonthNameStateTypeId, QLocale().monthName(dateTime.date().month()));
if(dateTime.date().dayOfWeek() == 6 || dateTime.date().dayOfWeek() == 7){
m_todayDevice->setStateValue(todayWeekendStateTypeId, true);
}else{

View File

@ -45,7 +45,7 @@ DeviceMonitor::DeviceMonitor(const QString &name, const QString &macAddress, con
connect(m_arpLookupProcess, SIGNAL(finished(int)), this, SLOT(arpLookupFinished(int)));
m_arpingProcess = new QProcess(this);
m_arpingProcess->setReadChannelMode(QProcess::MergedChannels);
m_arpingProcess->setProcessChannelMode(QProcess::MergedChannels);
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
// Actually we'd need this fix on older platforms too, but it's hard to figure this out without this API...
connect(m_arpingProcess, &QProcess::errorOccurred, this, [this](QProcess::ProcessError error) {
@ -58,7 +58,7 @@ DeviceMonitor::DeviceMonitor(const QString &name, const QString &macAddress, con
connect(m_arpingProcess, SIGNAL(finished(int)), this, SLOT(arpingFinished(int)));
m_pingProcess = new QProcess(this);
m_pingProcess->setReadChannelMode(QProcess::MergedChannels);
m_pingProcess->setProcessChannelMode(QProcess::MergedChannels);
connect(m_pingProcess, SIGNAL(finished(int)), this, SLOT(pingFinished(int)));
}

View File

@ -624,11 +624,11 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info)
QHostAddress address;
pluginStorage()->beginGroup(info->thing()->id().toString());
if (zeroConfEntry.isValid()) {
address = zeroConfEntry.hostAddress().toString();
address = zeroConfEntry.hostAddress();
pluginStorage()->setValue("cachedAddress", address.toString());
} else {
qCWarning(dcShelly()) << "Could not find Shelly thing on zeroconf. Trying cached address.";
address = pluginStorage()->value("cachedAddress").toString();
address = QHostAddress(pluginStorage()->value("cachedAddress").toString());
}
pluginStorage()->endGroup();