diff --git a/plugins/feature/remotecontrol/remotecontroldevicedialog.cpp b/plugins/feature/remotecontrol/remotecontroldevicedialog.cpp index 446306df0..ad4e33417 100644 --- a/plugins/feature/remotecontrol/remotecontroldevicedialog.cpp +++ b/plugins/feature/remotecontrol/remotecontroldevicedialog.cpp @@ -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 } } } diff --git a/plugins/feature/remotecontrol/remotecontrolsettingsdialog.cpp b/plugins/feature/remotecontrol/remotecontrolsettingsdialog.cpp index 5d19b6b61..4a7d67653 100644 --- a/plugins/feature/remotecontrol/remotecontrolsettingsdialog.cpp +++ b/plugins/feature/remotecontrol/remotecontrolsettingsdialog.cpp @@ -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 } } }