Fix for QT 5.12

pull/1414/head
Jon Beniston 2022-09-17 08:54:38 +01:00
rodzic 7b8ad1c6cf
commit 13ec843891
2 zmienionych plików z 24 dodań i 0 usunięć

Wyświetl plik

@ -471,7 +471,11 @@ void RemoteControlDeviceDialog::on_controlUp_clicked()
{
// Swap device info
DeviceDiscoverer::DeviceInfo *info = &m_deviceInfo[ui->device->currentIndex()];
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
info->m_controls.swap(row, row - 1);
#else
info->m_controls.swapItemsAt(row, row - 1);
#endif
}
}
}
@ -499,7 +503,11 @@ void RemoteControlDeviceDialog::on_controlDown_clicked()
{
// Swap device info
DeviceDiscoverer::DeviceInfo *info = &m_deviceInfo[ui->device->currentIndex()];
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
info->m_controls.swap(row, row + 1);
#else
info->m_controls.swapItemsAt(row, row + 1);
#endif
}
}
}
@ -585,7 +593,11 @@ void RemoteControlDeviceDialog::on_sensorUp_clicked()
{
// Swap device info
DeviceDiscoverer::DeviceInfo *info = &m_deviceInfo[ui->device->currentIndex()];
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
info->m_sensors.swap(row, row - 1);
#else
info->m_sensors.swapItemsAt(row, row - 1);
#endif
}
}
}
@ -613,7 +625,11 @@ void RemoteControlDeviceDialog::on_sensorDown_clicked()
{
// Swap device info
DeviceDiscoverer::DeviceInfo *info = &m_deviceInfo[ui->device->currentIndex()];
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
info->m_sensors.swap(row, row + 1);
#else
info->m_sensors.swapItemsAt(row, row + 1);
#endif
}
}
}

Wyświetl plik

@ -204,7 +204,11 @@ void RemoteControlSettingsDialog::on_deviceUp_clicked()
if (i == items.size() - 1)
{
ui->devices->setCurrentItem(items[i]);
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
m_devices.swap(row, row - 1);
#else
m_devices.swapItemsAt(row, row - 1);
#endif
}
}
}
@ -226,7 +230,11 @@ void RemoteControlSettingsDialog::on_deviceDown_clicked()
if (i == items.size() - 1)
{
ui->devices->setCurrentItem(items[i]);
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
m_devices.swap(row, row + 1);
#else
m_devices.swapItemsAt(row, row + 1);
#endif
}
}
}