Commit ddd4db6a authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Device config improvements.

parent f61b8fd6
......@@ -71,8 +71,6 @@ namespace {
const int DefaultSshPortSim(6666);
const int DefaultGdbServerPortHW(10000);
const int DefaultGdbServerPortSim(13219);
const QString DefaultHostNameHW(QLatin1String("192.168.2.15"));
const QString DefaultHostNameSim(QLatin1String("localhost"));
const AuthType DefaultAuthType(Utils::SshConnectionParameters::AuthenticationByKey);
const int DefaultTimeout(30);
const MaemoDeviceConfig::DeviceType DefaultDeviceType(MaemoDeviceConfig::Physical);
......@@ -345,9 +343,17 @@ QString MaemoDeviceConfig::defaultPortsSpec(DeviceType type) const
QString MaemoDeviceConfig::defaultHost(DeviceType type, MaemoGlobal::OsVersion osVersion)
{
if (osVersion == MaemoGlobal::GenericLinux)
switch (osVersion) {
case MaemoGlobal::Maemo5:
case MaemoGlobal::Maemo6:
case MaemoGlobal::Meego:
return QLatin1String(type == Physical ? "192.168.2.15" : "localhost");
case MaemoGlobal::GenericLinux:
return QString();
default:
qFatal("%s: Missing case in switch", Q_FUNC_INFO);
return QString();
return type == Physical ? DefaultHostNameHW : DefaultHostNameSim;
}
}
QString MaemoDeviceConfig::defaultPrivateKeyFilePath()
......
......@@ -176,9 +176,10 @@ class MaemoDeviceConfigWizardLoginDataPage : public QWizardPage
Q_OBJECT
public:
MaemoDeviceConfigWizardLoginDataPage(QWidget *parent)
MaemoDeviceConfigWizardLoginDataPage(WizardData &wizardData, QWidget *parent)
: QWizardPage(parent),
m_ui(new Ui::MaemoDeviceConfigWizardLoginDataPage)
m_ui(new Ui::MaemoDeviceConfigWizardLoginDataPage),
m_wizardData(wizardData)
{
m_ui->setupUi(this);
setTitle(tr("Login Data"));
......@@ -201,7 +202,7 @@ public:
virtual void initializePage()
{
m_ui->userNameLineEdit->clear();
m_ui->userNameLineEdit->setText(MaemoDeviceConfig::defaultUser(m_wizardData.osVersion));
m_ui->passwordButton->setChecked(true);
m_ui->passwordLineEdit->clear();
m_ui->privateKeyPathChooser->setPath(MaemoDeviceConfig::defaultPrivateKeyFilePath());
......@@ -228,6 +229,7 @@ private:
}
const QScopedPointer<Ui::MaemoDeviceConfigWizardLoginDataPage> m_ui;
const WizardData &m_wizardData;
};
class MaemoDeviceConfigWizardPreviousKeySetupCheckPage : public QWizardPage
......@@ -592,7 +594,7 @@ struct MaemoDeviceConfigWizardPrivate
QWidget *parent)
: devConfigs(devConfigs),
startPage(parent),
loginDataPage(parent),
loginDataPage(wizardData, parent),
previousKeySetupPage(parent),
reuseKeysCheckPage(parent),
keyCreationPage(parent),
......
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