forked from qt-creator/qt-creator
Improve translated messages in Android device dialog.
Reduce duplication, remove some HTML formatting. Change-Id: Ia419a5c9a5bbeefca2863acd5d893f13acb34866 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -370,6 +370,19 @@ QModelIndex AndroidDeviceModel::indexFor(const QString &serial)
|
||||
/////////////////
|
||||
// AndroidDeviceDialog
|
||||
/////////////////
|
||||
|
||||
static inline QString msgConnect()
|
||||
{
|
||||
return AndroidDeviceDialog::tr("<p>Connect an Android device via USB and activate developer mode on it. "
|
||||
"Some devices require the installation of a USB driver.</p>");
|
||||
|
||||
}
|
||||
|
||||
static inline QString msgAdbListDevices()
|
||||
{
|
||||
return AndroidDeviceDialog::tr("<p>The adb tool in the Android SDK lists all connected devices if run via "adb devices".</p>");
|
||||
}
|
||||
|
||||
AndroidDeviceDialog::AndroidDeviceDialog(int apiLevel, const QString &abi, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_model(new AndroidDeviceModel(apiLevel, abi)),
|
||||
@@ -387,14 +400,10 @@ AndroidDeviceDialog::AndroidDeviceDialog(int apiLevel, const QString &abi, QWidg
|
||||
|
||||
m_ui->defaultDeviceCheckBox->setText(tr("Always use this device for architecture %1").arg(abi));
|
||||
|
||||
m_ui->noDeviceFoundLabel->setText(tr("<p align=\"center\"><span style=\" font-size:16pt;\">"
|
||||
"No Device Found</span></p>"
|
||||
"<br/>"
|
||||
"<p>Connect an Android device via USB and activate developer mode on it. "
|
||||
"Some devices require the installation of a USB driver.</p>"
|
||||
"<br/>"
|
||||
"<p>The adb tool in the Android SDK lists all connected devices if run via "adb devices".</p>"
|
||||
));
|
||||
m_ui->noDeviceFoundLabel->setText(QLatin1String("<p align=\"center\"><span style=\" font-size:16pt;\">")
|
||||
+ tr("No Device Found") + QLatin1String("</span></p><br/>")
|
||||
+ msgConnect() + QLatin1String("<br/>")
|
||||
+ msgAdbListDevices());
|
||||
connect(m_ui->missingLabel, SIGNAL(linkActivated(QString)),
|
||||
this, SLOT(showHelp()));
|
||||
|
||||
@@ -489,8 +498,5 @@ void AndroidDeviceDialog::showHelp()
|
||||
{
|
||||
QPoint pos = m_ui->missingLabel->pos();
|
||||
pos = m_ui->missingLabel->parentWidget()->mapToGlobal(pos);
|
||||
QToolTip::showText(pos, tr("<p>Connect an Android device via USB and activate developer mode on it. "
|
||||
"Some devices require the installation of a USB driver.</p>"
|
||||
"<p>The adb tool in the Android SDK lists all connected devices if run via "adb devices".</p>"),
|
||||
this);
|
||||
QToolTip::showText(pos, msgConnect() + msgAdbListDevices(), this);
|
||||
}
|
||||
|
@@ -79,7 +79,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="noDeviceFoundLabel">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><br/></p></body></html></string>
|
||||
<string notr="true"><html><head/><body><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
|
Reference in New Issue
Block a user