forked from qt-creator/qt-creator
Android: Fix lupdate issues
Change-Id: I08bdc81eabb082a091f27d2dea44369573946c49 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
@@ -90,7 +90,8 @@ AndroidDeviceWidget::AndroidDeviceWidget(const IDevice::Ptr &device)
|
|||||||
formLayout->addRow(AndroidDevice::tr("Device type:"), new QLabel(dev->deviceTypeName()));
|
formLayout->addRow(AndroidDevice::tr("Device type:"), new QLabel(dev->deviceTypeName()));
|
||||||
|
|
||||||
const QString serialNumber = dev->serialNumber();
|
const QString serialNumber = dev->serialNumber();
|
||||||
const QString printableSerialNumber = serialNumber.isEmpty() ? tr("Unknown") : serialNumber;
|
const QString printableSerialNumber = serialNumber.isEmpty() ? AndroidDevice::tr("Unknown")
|
||||||
|
: serialNumber;
|
||||||
formLayout->addRow(AndroidDevice::tr("Serial number:"), new QLabel(printableSerialNumber));
|
formLayout->addRow(AndroidDevice::tr("Serial number:"), new QLabel(printableSerialNumber));
|
||||||
|
|
||||||
const QString abis = dev->supportedAbis().join(", ");
|
const QString abis = dev->supportedAbis().join(", ");
|
||||||
@@ -100,8 +101,9 @@ AndroidDeviceWidget::AndroidDeviceWidget(const IDevice::Ptr &device)
|
|||||||
formLayout->addRow(AndroidDevice::tr("OS version:"), new QLabel(osString));
|
formLayout->addRow(AndroidDevice::tr("OS version:"), new QLabel(osString));
|
||||||
|
|
||||||
if (dev->machineType() == IDevice::Hardware) {
|
if (dev->machineType() == IDevice::Hardware) {
|
||||||
const QString authorizedStr = dev->deviceState() == IDevice::DeviceReadyToUse ? tr("Yes")
|
const QString authorizedStr = dev->deviceState() == IDevice::DeviceReadyToUse
|
||||||
: tr("No");
|
? AndroidDevice::tr("Yes")
|
||||||
|
: AndroidDevice::tr("No");
|
||||||
formLayout->addRow(AndroidDevice::tr("Authorized:"), new QLabel(authorizedStr));
|
formLayout->addRow(AndroidDevice::tr("Authorized:"), new QLabel(authorizedStr));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,7 +119,7 @@ AndroidDeviceWidget::AndroidDeviceWidget(const IDevice::Ptr &device)
|
|||||||
|
|
||||||
QString AndroidDeviceWidget::dialogTitle()
|
QString AndroidDeviceWidget::dialogTitle()
|
||||||
{
|
{
|
||||||
return tr("Android Device Manager");
|
return AndroidDevice::tr("Android Device Manager");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AndroidDeviceWidget::criticalDialog(const QString &error, QWidget *parent)
|
bool AndroidDeviceWidget::criticalDialog(const QString &error, QWidget *parent)
|
||||||
@@ -480,7 +482,8 @@ void AndroidDeviceManager::eraseAvd(const IDevice::Ptr &device, QWidget *parent)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const QString name = static_cast<const AndroidDevice *>(device.data())->avdName();
|
const QString name = static_cast<const AndroidDevice *>(device.data())->avdName();
|
||||||
const QString question = tr("Erase the Android AVD \"%1\"?\nThis cannot be undone.").arg(name);
|
const QString question
|
||||||
|
= AndroidDevice::tr("Erase the Android AVD \"%1\"?\nThis cannot be undone.").arg(name);
|
||||||
if (!AndroidDeviceWidget::questionDialog(question, parent))
|
if (!AndroidDeviceWidget::questionDialog(question, parent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -515,9 +518,10 @@ void AndroidDeviceManager::setEmulatorArguments(QWidget *parent)
|
|||||||
"https://developer.android.com/studio/run/emulator-commandline#startup-options";
|
"https://developer.android.com/studio/run/emulator-commandline#startup-options";
|
||||||
|
|
||||||
QInputDialog dialog(parent ? parent : Core::ICore::dialogParent());
|
QInputDialog dialog(parent ? parent : Core::ICore::dialogParent());
|
||||||
dialog.setWindowTitle(tr("Emulator Command-line Startup Options"));
|
dialog.setWindowTitle(AndroidDevice::tr("Emulator Command-line Startup Options"));
|
||||||
dialog.setLabelText(tr("Emulator command-line startup options "
|
dialog.setLabelText(AndroidDevice::tr("Emulator command-line startup options "
|
||||||
"(<a href=\"%1\">Help Web Page</a>):").arg(helpUrl));
|
"(<a href=\"%1\">Help Web Page</a>):")
|
||||||
|
.arg(helpUrl));
|
||||||
dialog.setTextValue(m_androidConfig.emulatorArgs().join(' '));
|
dialog.setTextValue(m_androidConfig.emulatorArgs().join(' '));
|
||||||
|
|
||||||
if (auto label = dialog.findChild<QLabel*>()) {
|
if (auto label = dialog.findChild<QLabel*>()) {
|
||||||
|
Reference in New Issue
Block a user