qt: Fix qt6 warning

This commit is contained in:
cold-brewed
2023-06-11 14:27:14 -04:00
parent 898cdb7791
commit 9c1e6939b4

View File

@@ -66,8 +66,8 @@ MediaHistoryManager::getHistoryListForDeviceIndex(int index, ui::MediaType type)
if ((index >= 0) && (index < master_list[type].size())) { if ((index >= 0) && (index < master_list[type].size())) {
return master_list[type][index]; return master_list[type][index];
} else { } else {
qWarning("Media device index %i for device type %s was requested but index %i is out of range (valid range: >= 0 && < %i)", qWarning("Media device index %i for device type %s was requested but index %i is out of range (valid range: >= 0 && < %lli)",
index, mediaTypeToString(type).toUtf8().constData(), index, master_list[type].size()); index, mediaTypeToString(type).toUtf8().constData(), index, static_cast<long long>(master_list[type].size()));
} }
} }
// Failure gets an empty list // Failure gets an empty list
@@ -88,8 +88,8 @@ MediaHistoryManager::getImageForSlot(int index, int slot, ui::MediaType type)
if ((slot >= 0) && (slot < device_history.size())) { if ((slot >= 0) && (slot < device_history.size())) {
image_name = device_history[slot]; image_name = device_history[slot];
} else { } else {
qWarning("Media history slot %i, index %i for device type %s was requested but slot %i is out of range (valid range: >= 0 && < %i, device_history.size() is %i)", qWarning("Media history slot %i, index %i for device type %s was requested but slot %i is out of range (valid range: >= 0 && < %i, device_history.size() is %lli)",
slot, index, mediaTypeToString(type).toUtf8().constData(), slot, maxDevicesSupported(type), device_history.size()); slot, index, mediaTypeToString(type).toUtf8().constData(), slot, maxDevicesSupported(type), static_cast<long long>(device_history.size()));
} }
return image_name; return image_name;
} }