From 0dabf88bafe7dba3b45f9f45411a3f9cd2e19d55 Mon Sep 17 00:00:00 2001 From: ts-korhonen Date: Fri, 14 Oct 2022 14:44:36 +0300 Subject: [PATCH] Fix Qt 6.4 builds. Cast from char* to QVariant was removed, use const char* instead. --- src/disk/hdd.c | 8 ++++---- src/include/86box/hdd.h | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/disk/hdd.c b/src/disk/hdd.c index 2ba59eb93..ee731b046 100644 --- a/src/disk/hdd.c +++ b/src/disk/hdd.c @@ -442,16 +442,16 @@ hdd_preset_get_num() return sizeof(hdd_speed_presets) / sizeof(hdd_preset_t); } -char * +const char * hdd_preset_getname(int preset) { - return (char *) hdd_speed_presets[preset].name; + return hdd_speed_presets[preset].name; } -char * +const char * hdd_preset_get_internal_name(int preset) { - return (char *) hdd_speed_presets[preset].internal_name; + return hdd_speed_presets[preset].internal_name; } int diff --git a/src/include/86box/hdd.h b/src/include/86box/hdd.h index 905a1c294..d993d5c32 100644 --- a/src/include/86box/hdd.h +++ b/src/include/86box/hdd.h @@ -203,13 +203,13 @@ extern int image_is_hdi(const char *s); extern int image_is_hdx(const char *s, int check_signature); extern int image_is_vhd(const char *s, int check_signature); -extern double hdd_timing_write(hard_disk_t *hdd, uint32_t addr, uint32_t len); -extern double hdd_timing_read(hard_disk_t *hdd, uint32_t addr, uint32_t len); -extern double hdd_seek_get_time(hard_disk_t *hdd, uint32_t dst_addr, uint8_t operation, uint8_t continuous, double max_seek_time); -int hdd_preset_get_num(); -char *hdd_preset_getname(int preset); -extern char *hdd_preset_get_internal_name(int preset); -extern int hdd_preset_get_from_internal_name(char *s); -extern void hdd_preset_apply(int hdd_id); +extern double hdd_timing_write(hard_disk_t *hdd, uint32_t addr, uint32_t len); +extern double hdd_timing_read(hard_disk_t *hdd, uint32_t addr, uint32_t len); +extern double hdd_seek_get_time(hard_disk_t *hdd, uint32_t dst_addr, uint8_t operation, uint8_t continuous, double max_seek_time); +int hdd_preset_get_num(); +const char *hdd_preset_getname(int preset); +extern const char *hdd_preset_get_internal_name(int preset); +extern int hdd_preset_get_from_internal_name(char *s); +extern void hdd_preset_apply(int hdd_id); #endif /*EMU_HDD_H*/