forked from len0rd/rockbox
Replace toAscii() / fromAscii() with Latin1() functions.
Qt5 deprecates the Ascii conversion functions, and the Latin1 functions pretty much do the same. Change-Id: I5dee6a443fcfee6afd3256ee536698bcf65ff896
This commit is contained in:
parent
abd87ccf15
commit
8f4ab09a8e
4 changed files with 12 additions and 12 deletions
|
@ -268,9 +268,9 @@ QMap<uint32_t, QString> System::listUsbDevices(void)
|
|||
libusb_device_handle *dh;
|
||||
if(libusb_open(dev, &dh) == 0) {
|
||||
libusb_get_string_descriptor_ascii(dh, descriptor.iManufacturer, buf, 256);
|
||||
name += QString::fromAscii((char*)buf) + " ";
|
||||
name += QString::fromLatin1((char*)buf) + " ";
|
||||
libusb_get_string_descriptor_ascii(dh, descriptor.iProduct, buf, 256);
|
||||
name += QString::fromAscii((char*)buf);
|
||||
name += QString::fromLatin1((char*)buf);
|
||||
libusb_close(dh);
|
||||
}
|
||||
if(name.isEmpty())
|
||||
|
@ -309,13 +309,13 @@ QMap<uint32_t, QString> System::listUsbDevices(void)
|
|||
res = usb_get_string_simple(dev, u->descriptor.iManufacturer,
|
||||
string, sizeof(string));
|
||||
if(res > 0)
|
||||
name += QString::fromAscii(string) + " ";
|
||||
name += QString::fromLatin1(string) + " ";
|
||||
}
|
||||
if(u->descriptor.iProduct) {
|
||||
res = usb_get_string_simple(dev, u->descriptor.iProduct,
|
||||
string, sizeof(string));
|
||||
if(res > 0)
|
||||
name += QString::fromAscii(string);
|
||||
name += QString::fromLatin1(string);
|
||||
}
|
||||
usb_close(dev);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue