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
|
@ -87,7 +87,7 @@ bool BootloaderInstallHex::install(void)
|
||||||
while(i--) {
|
while(i--) {
|
||||||
if(md5sums[i].orig == 0)
|
if(md5sums[i].orig == 0)
|
||||||
m_model--;
|
m_model--;
|
||||||
if(!qstrcmp(md5sums[i].orig, hash.toAscii()))
|
if(!qstrcmp(md5sums[i].orig, hash.toLatin1()))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(i < 0) {
|
if(i < 0) {
|
||||||
|
@ -110,8 +110,8 @@ bool BootloaderInstallHex::install(void)
|
||||||
emit logItem(tr("Descrambling file"), LOGINFO);
|
emit logItem(tr("Descrambling file"), LOGINFO);
|
||||||
m_descrambled.open();
|
m_descrambled.open();
|
||||||
int result;
|
int result;
|
||||||
result = iriver_decode(m_offile.toAscii().data(),
|
result = iriver_decode(m_offile.toLatin1().data(),
|
||||||
m_descrambled.fileName().toAscii().data(), FALSE, STRIP_NONE);
|
m_descrambled.fileName().toLatin1().data(), FALSE, STRIP_NONE);
|
||||||
qDebug() << "[BootloaderInstallHex] iriver_decode" << result;
|
qDebug() << "[BootloaderInstallHex] iriver_decode" << result;
|
||||||
|
|
||||||
if(result < 0) {
|
if(result < 0) {
|
||||||
|
|
|
@ -268,9 +268,9 @@ QMap<uint32_t, QString> System::listUsbDevices(void)
|
||||||
libusb_device_handle *dh;
|
libusb_device_handle *dh;
|
||||||
if(libusb_open(dev, &dh) == 0) {
|
if(libusb_open(dev, &dh) == 0) {
|
||||||
libusb_get_string_descriptor_ascii(dh, descriptor.iManufacturer, buf, 256);
|
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);
|
libusb_get_string_descriptor_ascii(dh, descriptor.iProduct, buf, 256);
|
||||||
name += QString::fromAscii((char*)buf);
|
name += QString::fromLatin1((char*)buf);
|
||||||
libusb_close(dh);
|
libusb_close(dh);
|
||||||
}
|
}
|
||||||
if(name.isEmpty())
|
if(name.isEmpty())
|
||||||
|
@ -309,13 +309,13 @@ QMap<uint32_t, QString> System::listUsbDevices(void)
|
||||||
res = usb_get_string_simple(dev, u->descriptor.iManufacturer,
|
res = usb_get_string_simple(dev, u->descriptor.iManufacturer,
|
||||||
string, sizeof(string));
|
string, sizeof(string));
|
||||||
if(res > 0)
|
if(res > 0)
|
||||||
name += QString::fromAscii(string) + " ";
|
name += QString::fromLatin1(string) + " ";
|
||||||
}
|
}
|
||||||
if(u->descriptor.iProduct) {
|
if(u->descriptor.iProduct) {
|
||||||
res = usb_get_string_simple(dev, u->descriptor.iProduct,
|
res = usb_get_string_simple(dev, u->descriptor.iProduct,
|
||||||
string, sizeof(string));
|
string, sizeof(string));
|
||||||
if(res > 0)
|
if(res > 0)
|
||||||
name += QString::fromAscii(string);
|
name += QString::fromLatin1(string);
|
||||||
}
|
}
|
||||||
usb_close(dev);
|
usb_close(dev);
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@ bool TTSFestival::start(QString* errStr)
|
||||||
|
|
||||||
if(prologFile.open())
|
if(prologFile.open())
|
||||||
{
|
{
|
||||||
prologFile.write(voiceSelect.toAscii());
|
prologFile.write(voiceSelect.toLatin1());
|
||||||
prologFile.close();
|
prologFile.close();
|
||||||
prologPath = QFileInfo(prologFile).absoluteFilePath();
|
prologPath = QFileInfo(prologFile).absoluteFilePath();
|
||||||
qDebug() << "[Festival] Prolog created at " << prologPath;
|
qDebug() << "[Festival] Prolog created at " << prologPath;
|
||||||
|
@ -192,7 +192,7 @@ TTSStatus TTSFestival::voice(QString text, QString wavfile, QString* errStr)
|
||||||
|
|
||||||
QProcess clientProcess;
|
QProcess clientProcess;
|
||||||
clientProcess.start(cmd);
|
clientProcess.start(cmd);
|
||||||
clientProcess.write(QString("%1.\n").arg(text).toAscii());
|
clientProcess.write(QString("%1.\n").arg(text).toLatin1());
|
||||||
clientProcess.waitForBytesWritten();
|
clientProcess.waitForBytesWritten();
|
||||||
clientProcess.closeWriteChannel();
|
clientProcess.closeWriteChannel();
|
||||||
clientProcess.waitForReadyRead();
|
clientProcess.waitForReadyRead();
|
||||||
|
@ -357,7 +357,7 @@ QString TTSFestival::queryServer(QString query, int timeout)
|
||||||
|
|
||||||
if(socket.state() == QAbstractSocket::ConnectedState)
|
if(socket.state() == QAbstractSocket::ConnectedState)
|
||||||
{
|
{
|
||||||
socket.write(QString("%1\n").arg(query).toAscii());
|
socket.write(QString("%1\n").arg(query).toLatin1());
|
||||||
socket.waitForBytesWritten();
|
socket.waitForBytesWritten();
|
||||||
socket.waitForReadyRead();
|
socket.waitForReadyRead();
|
||||||
|
|
||||||
|
|
|
@ -467,7 +467,7 @@ QString Utils::resolveDevicename(QString path)
|
||||||
UCHAR buffer[0x400];
|
UCHAR buffer[0x400];
|
||||||
PVOLUME_DISK_EXTENTS extents = (PVOLUME_DISK_EXTENTS)buffer;
|
PVOLUME_DISK_EXTENTS extents = (PVOLUME_DISK_EXTENTS)buffer;
|
||||||
|
|
||||||
_stprintf(uncpath, _TEXT("\\\\.\\%c:"), path.toAscii().at(0));
|
_stprintf(uncpath, _TEXT("\\\\.\\%c:"), path.toLatin1().at(0));
|
||||||
h = CreateFile(uncpath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
h = CreateFile(uncpath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||||
NULL, OPEN_EXISTING, 0, NULL);
|
NULL, OPEN_EXISTING, 0, NULL);
|
||||||
if(h == INVALID_HANDLE_VALUE) {
|
if(h == INVALID_HANDLE_VALUE) {
|
||||||
|
@ -711,7 +711,7 @@ bool Utils::ejectDevice(QString device)
|
||||||
TCHAR volume[8];
|
TCHAR volume[8];
|
||||||
|
|
||||||
/* CreateFile */
|
/* CreateFile */
|
||||||
_stprintf(volume, _TEXT("\\\\.\\%c:"), device.toAscii().at(0));
|
_stprintf(volume, _TEXT("\\\\.\\%c:"), device.toLatin1().at(0));
|
||||||
hdl = CreateFile(volume, GENERIC_READ | GENERIC_WRITE,
|
hdl = CreateFile(volume, GENERIC_READ | GENERIC_WRITE,
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
||||||
OPEN_EXISTING, 0, NULL);
|
OPEN_EXISTING, 0, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue