mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-15 08:02:34 -05:00
Make System and Utils class based on QObject.
Those classes use Qt objects anyway, and making them based on QObject moved the strings into the appropriate class when translating. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26931 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ae64b59afa
commit
2c6895207d
4 changed files with 15 additions and 11 deletions
|
|
@ -116,16 +116,16 @@ QString System::userPermissionsString(void)
|
|||
int perm = userPermissions();
|
||||
switch(perm) {
|
||||
case GUEST:
|
||||
result = QObject::tr("Guest");
|
||||
result = tr("Guest");
|
||||
break;
|
||||
case ADMIN:
|
||||
result = QObject::tr("Admin");
|
||||
result = tr("Admin");
|
||||
break;
|
||||
case USER:
|
||||
result = QObject::tr("User");
|
||||
result = tr("User");
|
||||
break;
|
||||
default:
|
||||
result = QObject::tr("Error");
|
||||
result = tr("Error");
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
|
|
@ -254,7 +254,7 @@ QMap<uint32_t, QString> System::listUsbDevices(void)
|
|||
libusb_close(dh);
|
||||
}
|
||||
if(name.isEmpty())
|
||||
name = QObject::tr("(no description available)");
|
||||
name = tr("(no description available)");
|
||||
if(id) {
|
||||
usbids.insert(id, name);
|
||||
qDebug("[System] USB: 0x%08x, %s", id, name.toLocal8Bit().data());
|
||||
|
|
@ -299,7 +299,7 @@ QMap<uint32_t, QString> System::listUsbDevices(void)
|
|||
}
|
||||
}
|
||||
usb_close(dev);
|
||||
if(name.isEmpty()) name = QObject::tr("(no description available)");
|
||||
if(name.isEmpty()) name = tr("(no description available)");
|
||||
|
||||
if(id) {
|
||||
usbids.insert(id, name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue