Commit 7caf5212 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Display OS type in device configuration widget.

parent 448f754c
......@@ -195,6 +195,7 @@ void MaemoDeviceConfigurationsSettingsWidget::displayCurrent()
{
const MaemoDeviceConfig::ConstPtr &current = currentConfig();
m_ui->defaultDeviceButton->setEnabled(!current->isDefault());
m_ui->osTypeValueLabel->setText(MaemoGlobal::maemoVersionToString(current->osVersion()));
const SshConnectionParameters &sshParams = current->sshParameters();
if (current->type() == MaemoDeviceConfig::Physical)
m_ui->deviceTypeValueLabel->setText(tr("Physical Device"));
......
......@@ -70,7 +70,7 @@
<item row="0" column="0">
<widget class="QLabel" name="deviceNameLabel">
<property name="text">
<string>&amp;Name</string>
<string>&amp;Name:</string>
</property>
<property name="buddy">
<cstring>nameLineEdit</cstring>
......@@ -80,21 +80,21 @@
<item row="0" column="1">
<widget class="QLineEdit" name="nameLineEdit"/>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="deviceTypeLabel">
<property name="text">
<string>Device type:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="authTypeLabel">
<property name="text">
<string>Authentication type:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QWidget" name="authTypeButtonsWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="margin">
......@@ -117,7 +117,7 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="hostNameLabel">
<property name="text">
<string>&amp;Host name:</string>
......@@ -127,14 +127,14 @@
</property>
</widget>
</item>
<item row="3" column="1">
<item row="4" column="1">
<widget class="QLineEdit" name="hostLineEdit">
<property name="placeholderText">
<string>IP or host name of the device</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="sshPortLabel">
<property name="text">
<string>&amp;SSH port:</string>
......@@ -144,7 +144,7 @@
</property>
</widget>
</item>
<item row="4" column="1">
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QSpinBox" name="sshPortSpinBox">
......@@ -174,7 +174,7 @@
</item>
</layout>
</item>
<item row="5" column="0">
<item row="6" column="0">
<widget class="QLabel" name="freePortsLabel">
<property name="text">
<string>Free ports:</string>
......@@ -184,7 +184,7 @@
</property>
</widget>
</item>
<item row="5" column="1">
<item row="6" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLineEdit" name="portsLineEdit">
......@@ -215,7 +215,7 @@
</item>
</layout>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="QLabel" name="connectionTimeoutLabel">
<property name="text">
<string>Connection time&amp;out:</string>
......@@ -225,7 +225,7 @@
</property>
</widget>
</item>
<item row="6" column="1">
<item row="7" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QSpinBox" name="timeoutSpinBox">
......@@ -258,7 +258,7 @@
</item>
</layout>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QLabel" name="userNameLabel">
<property name="text">
<string>&amp;Username:</string>
......@@ -268,10 +268,10 @@
</property>
</widget>
</item>
<item row="7" column="1">
<item row="8" column="1">
<widget class="QLineEdit" name="userLineEdit"/>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QLabel" name="passwordLabel">
<property name="text">
<string>&amp;Password:</string>
......@@ -281,7 +281,7 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="9" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLineEdit" name="pwdLineEdit">
......@@ -299,14 +299,14 @@
</item>
</layout>
</item>
<item row="9" column="0">
<item row="10" column="0">
<widget class="QLabel" name="keyLabel">
<property name="text">
<string>Private key file:</string>
</property>
</widget>
</item>
<item row="9" column="1">
<item row="10" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="Utils::PathChooser" name="keyFileLineEdit"/>
......@@ -320,13 +320,27 @@
</item>
</layout>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QLabel" name="deviceTypeValueLabel">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="oSTypeLabel">
<property name="text">
<string>OS type:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="osTypeValueLabel">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
......@@ -79,6 +79,9 @@ public:
m_ui->setupUi(this);
setTitle(tr("General Information"));
setSubTitle(QLatin1String(" ")); // For Qt bug (background color)
m_ui->fremantleButton->setText(MaemoGlobal::maemoVersionToString(MaemoGlobal::Maemo5));
m_ui->harmattanButton->setText(MaemoGlobal::maemoVersionToString(MaemoGlobal::Maemo6));
m_ui->meegoButton->setText(MaemoGlobal::maemoVersionToString(MaemoGlobal::Meego));
QButtonGroup * const buttonGroup = new QButtonGroup(this);
buttonGroup->setExclusive(true);
buttonGroup->addButton(m_ui->hwButton);
......
......@@ -289,6 +289,18 @@ QStringList MaemoGlobal::targetArgs(const QtVersion *qtVersion, bool useTarget)
return args;
}
QString MaemoGlobal::maemoVersionToString(MaemoVersion version)
{
switch (version) {
case Maemo5: return QLatin1String("Maemo 5 (Fremantle)");
case Maemo6: return QLatin1String("Maemo 6 (Harmattan)");
case Meego: return QLatin1String("Meego");
}
Q_ASSERT(false);
return QString();
}
MaemoGlobal::FileUpdate::FileUpdate(const QString &fileName)
: m_fileName(fileName)
{
......
......@@ -97,6 +97,8 @@ public:
static bool callMadAdmin(QProcess &proc, const QStringList &args,
const QtVersion *qtVersion, bool useTarget);
static QString maemoVersionToString(MaemoVersion version);
static bool removeRecursively(const QString &filePath, QString &error);
template<class T> static T *buildStep(const ProjectExplorer::DeployConfiguration *dc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment