1
0
Fork 0
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:
Dominik Riebeling 2013-01-27 11:57:46 +01:00
parent abd87ccf15
commit 8f4ab09a8e
4 changed files with 12 additions and 12 deletions

View file

@ -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);
}