forked from qt-creator/qt-creator
Qnx: Add BlackBerry Device wizard queries device to prefill wizard fields
BlackBerry Device wizard is having the following pages: * Setup page - simplified to contains the device listing, device host name and device password fields only * Query page - queries device for information * SshKey page - no changes there * Config page - contains config-name and debug token fields Change-Id: I30e05b984960df2184353209bff1f07c9440e6b1 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: David Kaspar <dkaspar@blackberry.com>
This commit is contained in:
@@ -99,6 +99,11 @@ QString BlackBerryDebugTokenRequestDialog::debugToken() const
|
|||||||
return m_ui->debugTokenPath->path();
|
return m_ui->debugTokenPath->path();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BlackBerryDebugTokenRequestDialog::setDevicePin(const QString &devicePin)
|
||||||
|
{
|
||||||
|
m_ui->devicePin->setText(devicePin);
|
||||||
|
}
|
||||||
|
|
||||||
void BlackBerryDebugTokenRequestDialog::setTargetDetails(const QString &deviceIp, const QString &password)
|
void BlackBerryDebugTokenRequestDialog::setTargetDetails(const QString &deviceIp, const QString &password)
|
||||||
{
|
{
|
||||||
m_ui->devicePin->setPlaceholderText(tr("Requesting Device PIN..."));
|
m_ui->devicePin->setPlaceholderText(tr("Requesting Device PIN..."));
|
||||||
|
@@ -55,6 +55,7 @@ public:
|
|||||||
~BlackBerryDebugTokenRequestDialog();
|
~BlackBerryDebugTokenRequestDialog();
|
||||||
|
|
||||||
QString debugToken() const;
|
QString debugToken() const;
|
||||||
|
void setDevicePin(const QString &devicePin);
|
||||||
void setTargetDetails(const QString &deviceIp, const QString &password);
|
void setTargetDetails(const QString &deviceIp, const QString &password);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
@@ -45,11 +45,15 @@ BlackBerryDeviceConfigurationWizard::BlackBerryDeviceConfigurationWizard(QWidget
|
|||||||
setWindowTitle(tr("New BlackBerry Device Configuration Setup"));
|
setWindowTitle(tr("New BlackBerry Device Configuration Setup"));
|
||||||
|
|
||||||
m_setupPage = new BlackBerryDeviceConfigurationWizardSetupPage(this);
|
m_setupPage = new BlackBerryDeviceConfigurationWizardSetupPage(this);
|
||||||
|
m_queryPage = new BlackBerryDeviceConfigurationWizardQueryPage(m_holder, this);
|
||||||
m_sshKeyPage = new BlackBerryDeviceConfigurationWizardSshKeyPage(this);
|
m_sshKeyPage = new BlackBerryDeviceConfigurationWizardSshKeyPage(this);
|
||||||
|
m_configPage = new BlackBerryDeviceConfigurationWizardConfigPage(m_holder, this);
|
||||||
m_finalPage = new BlackBerryDeviceConfigurationWizardFinalPage(this);
|
m_finalPage = new BlackBerryDeviceConfigurationWizardFinalPage(this);
|
||||||
|
|
||||||
setPage(SetupPageId, m_setupPage);
|
setPage(SetupPageId, m_setupPage);
|
||||||
|
setPage(QueryPageId, m_queryPage);
|
||||||
setPage(SshKeyPageId, m_sshKeyPage);
|
setPage(SshKeyPageId, m_sshKeyPage);
|
||||||
|
setPage(ConfigPageId, m_configPage);
|
||||||
setPage(FinalPageId, m_finalPage);
|
setPage(FinalPageId, m_finalPage);
|
||||||
m_finalPage->setCommitPage(true);
|
m_finalPage->setCommitPage(true);
|
||||||
}
|
}
|
||||||
@@ -66,10 +70,13 @@ ProjectExplorer::IDevice::Ptr BlackBerryDeviceConfigurationWizard::device()
|
|||||||
sshParams.timeout = 10;
|
sshParams.timeout = 10;
|
||||||
sshParams.port = 22;
|
sshParams.port = 22;
|
||||||
|
|
||||||
BlackBerryDeviceConfiguration::Ptr configuration = BlackBerryDeviceConfiguration::create(m_setupPage->deviceName(),
|
BlackBerryDeviceConfiguration::Ptr configuration = BlackBerryDeviceConfiguration::create(
|
||||||
Core::Id(Constants::QNX_BB_OS_TYPE),
|
m_configPage->configurationName(),
|
||||||
m_setupPage->machineType());
|
Core::Id(Constants::QNX_BB_OS_TYPE),
|
||||||
|
m_holder.isSimulator
|
||||||
|
? ProjectExplorer::IDevice::Emulator
|
||||||
|
: ProjectExplorer::IDevice::Hardware);
|
||||||
configuration->setSshParameters(sshParams);
|
configuration->setSshParameters(sshParams);
|
||||||
configuration->setDebugToken(m_setupPage->debugToken());
|
configuration->setDebugToken(m_configPage->debugToken());
|
||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
|
@@ -32,6 +32,8 @@
|
|||||||
#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H
|
#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H
|
||||||
#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H
|
#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H
|
||||||
|
|
||||||
|
#include "blackberrydeviceconfigurationwizardpages.h"
|
||||||
|
|
||||||
#include <QWizard>
|
#include <QWizard>
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
@@ -39,10 +41,6 @@
|
|||||||
namespace Qnx {
|
namespace Qnx {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class BlackBerryDeviceConfigurationWizardSetupPage;
|
|
||||||
class BlackBerryDeviceConfigurationWizardSshKeyPage;
|
|
||||||
class BlackBerryDeviceConfigurationWizardFinalPage;
|
|
||||||
|
|
||||||
class BlackBerryDeviceConfigurationWizard : public QWizard
|
class BlackBerryDeviceConfigurationWizard : public QWizard
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -54,13 +52,19 @@ public:
|
|||||||
private:
|
private:
|
||||||
enum PageId {
|
enum PageId {
|
||||||
SetupPageId,
|
SetupPageId,
|
||||||
|
QueryPageId,
|
||||||
SshKeyPageId,
|
SshKeyPageId,
|
||||||
|
ConfigPageId,
|
||||||
FinalPageId
|
FinalPageId
|
||||||
};
|
};
|
||||||
|
|
||||||
BlackBerryDeviceConfigurationWizardSetupPage *m_setupPage;
|
BlackBerryDeviceConfigurationWizardSetupPage *m_setupPage;
|
||||||
|
BlackBerryDeviceConfigurationWizardQueryPage *m_queryPage;
|
||||||
BlackBerryDeviceConfigurationWizardSshKeyPage *m_sshKeyPage;
|
BlackBerryDeviceConfigurationWizardSshKeyPage *m_sshKeyPage;
|
||||||
|
BlackBerryDeviceConfigurationWizardConfigPage *m_configPage;
|
||||||
BlackBerryDeviceConfigurationWizardFinalPage *m_finalPage;
|
BlackBerryDeviceConfigurationWizardFinalPage *m_finalPage;
|
||||||
|
|
||||||
|
BlackBerryDeviceConfigurationWizardHolder m_holder;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
159
src/plugins/qnx/blackberrydeviceconfigurationwizardconfigpage.ui
Normal file
159
src/plugins/qnx/blackberrydeviceconfigurationwizardconfigpage.ui
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Qnx::Internal::BlackBerryDeviceConfigurationWizardConfigPage</class>
|
||||||
|
<widget class="QWizardPage" name="Qnx::Internal::BlackBerryDeviceConfigurationWizardConfigPage">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>477</width>
|
||||||
|
<height>348</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="3" column="0" colspan="3">
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Debug Token</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Location:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QPushButton" name="generateButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Generate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="Utils::PathChooser" name="debugTokenField" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" colspan="3">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<italic>true</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Debug Token is needed for BlackBerry applications deployment to a device.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="3">
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="deviceTypeField">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Type:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="deviceHostNameField">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Host name/IP:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Configuration name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="configurationNameField"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>Utils::PathChooser</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global">utils/pathchooser.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
<slots>
|
||||||
|
<signal>editingFinished()</signal>
|
||||||
|
<signal>browsingFinished()</signal>
|
||||||
|
</slots>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>generateButton</tabstop>
|
||||||
|
</tabstops>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@@ -33,8 +33,11 @@
|
|||||||
#include "blackberryconfiguration.h"
|
#include "blackberryconfiguration.h"
|
||||||
#include "blackberrydebugtokenrequestdialog.h"
|
#include "blackberrydebugtokenrequestdialog.h"
|
||||||
#include "blackberrysshkeysgenerator.h"
|
#include "blackberrysshkeysgenerator.h"
|
||||||
|
#include "blackberrydeviceinformation.h"
|
||||||
#include "ui_blackberrydeviceconfigurationwizardsetuppage.h"
|
#include "ui_blackberrydeviceconfigurationwizardsetuppage.h"
|
||||||
|
#include "ui_blackberrydeviceconfigurationwizardquerypage.h"
|
||||||
#include "ui_blackberrydeviceconfigurationwizardsshkeypage.h"
|
#include "ui_blackberrydeviceconfigurationwizardsshkeypage.h"
|
||||||
|
#include "ui_blackberrydeviceconfigurationwizardconfigpage.h"
|
||||||
#include "blackberryconfiguration.h"
|
#include "blackberryconfiguration.h"
|
||||||
#include "qnxutils.h"
|
#include "qnxutils.h"
|
||||||
|
|
||||||
@@ -54,7 +57,10 @@ using namespace Qnx;
|
|||||||
using namespace Qnx::Internal;
|
using namespace Qnx::Internal;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const char DEVICENAME_FIELD_ID[] = "DeviceName";
|
const char DEVICEHOSTNAME_FIELD_ID[] = "DeviceHostName";
|
||||||
|
const char DEVICEPASSWORD_FIELD_ID[] = "DevicePassword";
|
||||||
|
const char CONFIGURATIONNAME_FIELD_ID[] = "ConfigurationName";
|
||||||
|
const char DEBUGTOKENPATH_FIELD_ID[] = "DebugTokenPath";
|
||||||
|
|
||||||
enum DeviceListUserRole
|
enum DeviceListUserRole
|
||||||
{
|
{
|
||||||
@@ -71,25 +77,14 @@ BlackBerryDeviceConfigurationWizardSetupPage::BlackBerryDeviceConfigurationWizar
|
|||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
setTitle(tr("Connection Details"));
|
setTitle(tr("Connection Details"));
|
||||||
|
|
||||||
m_ui->debugToken->setExpectedKind(Utils::PathChooser::File);
|
|
||||||
m_ui->debugToken->setPromptDialogFilter(QLatin1String("*.bar"));
|
|
||||||
|
|
||||||
QString debugTokenBrowsePath = QnxUtils::dataDirPath();
|
|
||||||
if (!QFileInfo(debugTokenBrowsePath).exists())
|
|
||||||
debugTokenBrowsePath = QDir::homePath();
|
|
||||||
m_ui->debugToken->setInitialBrowsePathBackup(debugTokenBrowsePath);
|
|
||||||
|
|
||||||
connect(m_ui->deviceListWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onDeviceSelectionChanged()));
|
connect(m_ui->deviceListWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onDeviceSelectionChanged()));
|
||||||
connect(m_deviceListDetector, SIGNAL(deviceDetected(QString,QString,bool)),
|
connect(m_deviceListDetector, SIGNAL(deviceDetected(QString,QString,bool)),
|
||||||
this, SLOT(onDeviceDetected(QString,QString,bool)));
|
this, SLOT(onDeviceDetected(QString,QString,bool)));
|
||||||
connect(m_deviceListDetector, SIGNAL(finished()), this, SLOT(onDeviceListDetectorFinished()));
|
connect(m_deviceListDetector, SIGNAL(finished()), this, SLOT(onDeviceListDetectorFinished()));
|
||||||
connect(m_ui->deviceName, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged()));
|
|
||||||
connect(m_ui->deviceHostIp, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged()));
|
connect(m_ui->deviceHostIp, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged()));
|
||||||
connect(m_ui->physicalDevice, SIGNAL(toggled(bool)), this, SIGNAL(completeChanged()));
|
|
||||||
connect(m_ui->debugToken, SIGNAL(changed(QString)), this, SIGNAL(completeChanged()));
|
|
||||||
connect(m_ui->requestButton, SIGNAL(clicked()), this, SLOT(requestDebugToken()));
|
|
||||||
|
|
||||||
registerField(QLatin1String(DEVICENAME_FIELD_ID), m_ui->deviceName);
|
registerField(QLatin1String(DEVICEHOSTNAME_FIELD_ID), m_ui->deviceHostIp);
|
||||||
|
registerField(QLatin1String(DEVICEPASSWORD_FIELD_ID), m_ui->password);
|
||||||
}
|
}
|
||||||
|
|
||||||
BlackBerryDeviceConfigurationWizardSetupPage::~BlackBerryDeviceConfigurationWizardSetupPage()
|
BlackBerryDeviceConfigurationWizardSetupPage::~BlackBerryDeviceConfigurationWizardSetupPage()
|
||||||
@@ -160,38 +155,23 @@ void BlackBerryDeviceConfigurationWizardSetupPage::onDeviceSelectionChanged()
|
|||||||
? selected->data(DeviceTypeRole).toBool() : false;
|
? selected->data(DeviceTypeRole).toBool() : false;
|
||||||
switch (itemKind) {
|
switch (itemKind) {
|
||||||
case SpecifyManually:
|
case SpecifyManually:
|
||||||
m_ui->deviceName->setEnabled(true);
|
|
||||||
m_ui->deviceName->setText(tr("BlackBerry Device"));
|
|
||||||
m_ui->deviceHostIp->setEnabled(true);
|
m_ui->deviceHostIp->setEnabled(true);
|
||||||
m_ui->deviceHostIp->setText(QLatin1String("169.254.0.1"));
|
m_ui->deviceHostIp->setText(QLatin1String("169.254.0.1"));
|
||||||
m_ui->physicalDevice->setEnabled(true);
|
m_ui->password->setEnabled(true);
|
||||||
m_ui->physicalDevice->setChecked(true);
|
|
||||||
m_ui->simulator->setEnabled(true);
|
|
||||||
m_ui->simulator->setChecked(false);
|
|
||||||
m_ui->deviceHostIp->selectAll();
|
m_ui->deviceHostIp->selectAll();
|
||||||
m_ui->deviceHostIp->setFocus();
|
m_ui->deviceHostIp->setFocus();
|
||||||
break;
|
break;
|
||||||
case Autodetected:
|
case Autodetected:
|
||||||
m_ui->deviceName->setEnabled(true);
|
|
||||||
m_ui->deviceName->setText(selected->data(DeviceNameRole).toString());
|
|
||||||
m_ui->deviceHostIp->setEnabled(false);
|
m_ui->deviceHostIp->setEnabled(false);
|
||||||
m_ui->deviceHostIp->setText(selected->data(DeviceIpRole).toString());
|
m_ui->deviceHostIp->setText(selected->data(DeviceIpRole).toString());
|
||||||
m_ui->physicalDevice->setEnabled(false);
|
m_ui->password->setEnabled(true);
|
||||||
m_ui->physicalDevice->setChecked(!isSimulator);
|
|
||||||
m_ui->simulator->setEnabled(false);
|
|
||||||
m_ui->simulator->setChecked(isSimulator);
|
|
||||||
m_ui->password->setFocus();
|
m_ui->password->setFocus();
|
||||||
break;
|
break;
|
||||||
case PleaseWait:
|
case PleaseWait:
|
||||||
case Note:
|
case Note:
|
||||||
m_ui->deviceName->setEnabled(false);
|
|
||||||
m_ui->deviceName->clear();
|
|
||||||
m_ui->deviceHostIp->setEnabled(false);
|
m_ui->deviceHostIp->setEnabled(false);
|
||||||
m_ui->deviceHostIp->clear();
|
m_ui->deviceHostIp->clear();
|
||||||
m_ui->physicalDevice->setEnabled(false);
|
m_ui->password->setEnabled(false);
|
||||||
m_ui->physicalDevice->setChecked(false);
|
|
||||||
m_ui->simulator->setEnabled(false);
|
|
||||||
m_ui->simulator->setChecked(false);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -224,17 +204,7 @@ QListWidgetItem *BlackBerryDeviceConfigurationWizardSetupPage::findDeviceListIte
|
|||||||
|
|
||||||
bool BlackBerryDeviceConfigurationWizardSetupPage::isComplete() const
|
bool BlackBerryDeviceConfigurationWizardSetupPage::isComplete() const
|
||||||
{
|
{
|
||||||
bool debugTokenComplete = m_ui->simulator->isChecked()
|
return !m_ui->deviceHostIp->text().isEmpty();
|
||||||
|| (m_ui->physicalDevice->isChecked() && !m_ui->debugToken->fileName().isEmpty()
|
|
||||||
&& QFileInfo(m_ui->debugToken->fileName().toString()).exists());
|
|
||||||
|
|
||||||
return !m_ui->deviceHostIp->text().isEmpty() && !m_ui->deviceHostIp->text().isEmpty()
|
|
||||||
&& debugTokenComplete;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString BlackBerryDeviceConfigurationWizardSetupPage::deviceName() const
|
|
||||||
{
|
|
||||||
return m_ui->deviceName->text();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BlackBerryDeviceConfigurationWizardSetupPage::hostName() const
|
QString BlackBerryDeviceConfigurationWizardSetupPage::hostName() const
|
||||||
@@ -247,34 +217,67 @@ QString BlackBerryDeviceConfigurationWizardSetupPage::password() const
|
|||||||
return m_ui->password->text();
|
return m_ui->password->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BlackBerryDeviceConfigurationWizardSetupPage::debugToken() const
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
BlackBerryDeviceConfigurationWizardQueryPage::BlackBerryDeviceConfigurationWizardQueryPage
|
||||||
|
(BlackBerryDeviceConfigurationWizardHolder &holder, QWidget *parent)
|
||||||
|
: QWizardPage(parent)
|
||||||
|
, m_ui(new Ui::BlackBerryDeviceConfigurationWizardQueryPage)
|
||||||
|
, m_holder(holder)
|
||||||
|
, m_deviceInformation(new BlackBerryDeviceInformation(this))
|
||||||
{
|
{
|
||||||
return m_ui->debugToken->fileName().toString();
|
m_ui->setupUi(this);
|
||||||
|
setTitle(tr("Query Device Information"));
|
||||||
|
|
||||||
|
connect(m_deviceInformation,SIGNAL(finished(int)),this,SLOT(processQueryFinished(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
IDevice::MachineType BlackBerryDeviceConfigurationWizardSetupPage::machineType() const
|
BlackBerryDeviceConfigurationWizardQueryPage::~BlackBerryDeviceConfigurationWizardQueryPage()
|
||||||
{
|
{
|
||||||
return m_ui->physicalDevice->isChecked() ? IDevice::Hardware : IDevice::Emulator;
|
delete m_ui;
|
||||||
|
m_ui = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlackBerryDeviceConfigurationWizardSetupPage::requestDebugToken()
|
void BlackBerryDeviceConfigurationWizardQueryPage::initializePage()
|
||||||
{
|
{
|
||||||
BlackBerryDebugTokenRequestDialog dialog;
|
m_ui->statusLabel->setText(tr("Querying device information. Please wait..."));
|
||||||
|
m_ui->progressBar->setVisible(true);
|
||||||
|
|
||||||
if (!m_ui->deviceHostIp->text().isEmpty() && !m_ui->password->text().isEmpty())
|
m_holder.deviceInfoRetrieved = false;
|
||||||
dialog.setTargetDetails(m_ui->deviceHostIp->text(), m_ui->password->text());
|
|
||||||
|
|
||||||
const int result = dialog.exec();
|
m_deviceInformation->setDeviceTarget(
|
||||||
|
field(QLatin1String(DEVICEHOSTNAME_FIELD_ID)).toString(),
|
||||||
|
field(QLatin1String(DEVICEPASSWORD_FIELD_ID)).toString());
|
||||||
|
}
|
||||||
|
|
||||||
if (result != QDialog::Accepted)
|
void BlackBerryDeviceConfigurationWizardQueryPage::processQueryFinished(int status)
|
||||||
return;
|
{
|
||||||
|
m_holder.deviceInfoRetrieved = status == BlackBerryDeviceInformation::Success;
|
||||||
|
m_holder.devicePin = m_deviceInformation->devicePin();
|
||||||
|
m_holder.scmBundle = m_deviceInformation->scmBundle();
|
||||||
|
m_holder.deviceName = m_deviceInformation->hostName();
|
||||||
|
m_holder.debugTokenAuthor = m_deviceInformation->debugTokenAuthor();
|
||||||
|
m_holder.debugTokenValid = m_deviceInformation->debugTokenValid();
|
||||||
|
m_holder.isSimulator = m_deviceInformation->isSimulator();
|
||||||
|
|
||||||
m_ui->debugToken->setPath(dialog.debugToken());
|
if (m_holder.deviceInfoRetrieved)
|
||||||
|
m_ui->statusLabel->setText(tr("Device information retrieved successfully."));
|
||||||
|
else
|
||||||
|
m_ui->statusLabel->setText(tr("Cannot connect to the device. Check if the device is in development mode and has matching host name and password."));
|
||||||
|
m_ui->progressBar->setVisible(false);
|
||||||
|
emit completeChanged();
|
||||||
|
|
||||||
|
if (m_holder.deviceInfoRetrieved)
|
||||||
|
wizard()->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackBerryDeviceConfigurationWizardQueryPage::isComplete() const
|
||||||
|
{
|
||||||
|
return m_holder.deviceInfoRetrieved;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
BlackBerryDeviceConfigurationWizardSshKeyPage::BlackBerryDeviceConfigurationWizardSshKeyPage(QWidget *parent)
|
BlackBerryDeviceConfigurationWizardSshKeyPage::BlackBerryDeviceConfigurationWizardSshKeyPage(QWidget *parent)
|
||||||
: QWizardPage(parent)
|
: QWizardPage(parent)
|
||||||
, m_ui(new Ui::BlackBerryDeviceConfigurationWizardSshKeyPage)
|
, m_ui(new Ui::BlackBerryDeviceConfigurationWizardSshKeyPage)
|
||||||
@@ -401,8 +404,84 @@ void BlackBerryDeviceConfigurationWizardSshKeyPage::setBusy(bool busy)
|
|||||||
wizard()->button(QWizard::FinishButton)->setEnabled(!busy);
|
wizard()->button(QWizard::FinishButton)->setEnabled(!busy);
|
||||||
wizard()->button(QWizard::CancelButton)->setEnabled(!busy);
|
wizard()->button(QWizard::CancelButton)->setEnabled(!busy);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
BlackBerryDeviceConfigurationWizardConfigPage::BlackBerryDeviceConfigurationWizardConfigPage
|
||||||
|
(BlackBerryDeviceConfigurationWizardHolder &holder, QWidget *parent)
|
||||||
|
: QWizardPage(parent)
|
||||||
|
, m_ui(new Ui::BlackBerryDeviceConfigurationWizardConfigPage)
|
||||||
|
, m_holder(holder)
|
||||||
|
{
|
||||||
|
m_ui->setupUi(this);
|
||||||
|
setTitle(tr("Configuration"));
|
||||||
|
|
||||||
|
m_ui->debugTokenField->setExpectedKind(Utils::PathChooser::File);
|
||||||
|
m_ui->debugTokenField->setPromptDialogFilter(QLatin1String("*.bar"));
|
||||||
|
|
||||||
|
QString debugTokenBrowsePath = QnxUtils::dataDirPath();
|
||||||
|
if (!QFileInfo(debugTokenBrowsePath).exists())
|
||||||
|
debugTokenBrowsePath = QDir::homePath();
|
||||||
|
m_ui->debugTokenField->setInitialBrowsePathBackup(debugTokenBrowsePath);
|
||||||
|
|
||||||
|
connect(m_ui->configurationNameField, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged()));
|
||||||
|
connect(m_ui->debugTokenField, SIGNAL(changed(QString)), this, SIGNAL(completeChanged()));
|
||||||
|
connect(m_ui->generateButton, SIGNAL(clicked()), this, SLOT(generateDebugToken()));
|
||||||
|
|
||||||
|
registerField(QLatin1String(CONFIGURATIONNAME_FIELD_ID), m_ui->configurationNameField);
|
||||||
|
registerField(QLatin1String(DEBUGTOKENPATH_FIELD_ID), m_ui->debugTokenField);
|
||||||
|
}
|
||||||
|
|
||||||
|
BlackBerryDeviceConfigurationWizardConfigPage::~BlackBerryDeviceConfigurationWizardConfigPage()
|
||||||
|
{
|
||||||
|
delete m_ui;
|
||||||
|
m_ui = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BlackBerryDeviceConfigurationWizardConfigPage::initializePage()
|
||||||
|
{
|
||||||
|
QString deviceHostName = field(QLatin1String(DEVICEHOSTNAME_FIELD_ID)).toString();
|
||||||
|
m_ui->configurationNameField->setText(m_holder.deviceName);
|
||||||
|
m_ui->deviceHostNameField->setText(deviceHostName);
|
||||||
|
m_ui->deviceTypeField->setText(QLatin1String (m_holder.isSimulator ? "Simulator" : "Device"));
|
||||||
|
m_ui->debugTokenField->setEnabled(!m_holder.isSimulator);
|
||||||
|
m_ui->generateButton->setEnabled(!m_holder.isSimulator);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackBerryDeviceConfigurationWizardConfigPage::isComplete() const
|
||||||
|
{
|
||||||
|
bool configurationNameComplete = !m_ui->configurationNameField->text().isEmpty();
|
||||||
|
Utils::FileName fileName = m_ui->debugTokenField->fileName();
|
||||||
|
bool debugTokenComplete = m_holder.isSimulator
|
||||||
|
|| (!fileName.isEmpty() && QFileInfo(fileName.toString()).exists());
|
||||||
|
|
||||||
|
return configurationNameComplete && debugTokenComplete;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BlackBerryDeviceConfigurationWizardConfigPage::generateDebugToken()
|
||||||
|
{
|
||||||
|
BlackBerryDebugTokenRequestDialog dialog;
|
||||||
|
dialog.setDevicePin(m_holder.devicePin);
|
||||||
|
|
||||||
|
const int result = dialog.exec();
|
||||||
|
|
||||||
|
if (result != QDialog::Accepted)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_ui->debugTokenField->setPath(dialog.debugToken());
|
||||||
|
}
|
||||||
|
|
||||||
|
QString BlackBerryDeviceConfigurationWizardConfigPage::configurationName() const
|
||||||
|
{
|
||||||
|
return m_ui->configurationNameField->text();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString BlackBerryDeviceConfigurationWizardConfigPage::debugToken() const
|
||||||
|
{
|
||||||
|
return m_ui->debugTokenField->fileName().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BlackBerryDeviceConfigurationWizardFinalPage::BlackBerryDeviceConfigurationWizardFinalPage(QWidget *parent)
|
BlackBerryDeviceConfigurationWizardFinalPage::BlackBerryDeviceConfigurationWizardFinalPage(QWidget *parent)
|
||||||
: QWizardPage(parent)
|
: QWizardPage(parent)
|
||||||
@@ -410,9 +489,6 @@ BlackBerryDeviceConfigurationWizardFinalPage::BlackBerryDeviceConfigurationWizar
|
|||||||
setTitle(tr("Setup Finished"));
|
setTitle(tr("Setup Finished"));
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||||
QLabel *label = new QLabel(tr("The new device configuration will now be created."), this);
|
QLabel *label = new QLabel(tr("The new device configuration will be created now."), this);
|
||||||
layout->addWidget(label);
|
layout->addWidget(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -47,9 +47,27 @@ namespace Qnx {
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class BlackBerryDeviceConfigurationWizardSetupPage;
|
class BlackBerryDeviceConfigurationWizardSetupPage;
|
||||||
|
class BlackBerryDeviceConfigurationWizardQueryPage;
|
||||||
class BlackBerryDeviceConfigurationWizardSshKeyPage;
|
class BlackBerryDeviceConfigurationWizardSshKeyPage;
|
||||||
|
class BlackBerryDeviceConfigurationWizardConfigPage;
|
||||||
}
|
}
|
||||||
class BlackBerrySshKeysGenerator;
|
class BlackBerrySshKeysGenerator;
|
||||||
|
class BlackBerryDeviceInformation;
|
||||||
|
|
||||||
|
struct BlackBerryDeviceConfigurationWizardHolder {
|
||||||
|
QString devicePin;
|
||||||
|
QString deviceName;
|
||||||
|
QString scmBundle;
|
||||||
|
QString debugTokenAuthor;
|
||||||
|
bool isSimulator;
|
||||||
|
bool debugTokenValid;
|
||||||
|
bool deviceInfoRetrieved;
|
||||||
|
|
||||||
|
BlackBerryDeviceConfigurationWizardHolder()
|
||||||
|
: isSimulator(false)
|
||||||
|
, debugTokenValid(false)
|
||||||
|
, deviceInfoRetrieved(false) {}
|
||||||
|
};
|
||||||
|
|
||||||
class BlackBerryDeviceConfigurationWizardSetupPage : public QWizardPage
|
class BlackBerryDeviceConfigurationWizardSetupPage : public QWizardPage
|
||||||
{
|
{
|
||||||
@@ -65,13 +83,9 @@ public:
|
|||||||
void initializePage();
|
void initializePage();
|
||||||
bool isComplete() const;
|
bool isComplete() const;
|
||||||
|
|
||||||
QString deviceName() const;
|
|
||||||
QString hostName() const;
|
QString hostName() const;
|
||||||
QString password() const;
|
QString password() const;
|
||||||
QString debugToken() const;
|
|
||||||
ProjectExplorer::IDevice::MachineType machineType() const;
|
|
||||||
private slots:
|
private slots:
|
||||||
void requestDebugToken();
|
|
||||||
void onDeviceSelectionChanged();
|
void onDeviceSelectionChanged();
|
||||||
void onDeviceDetected(const QString &deviceName, const QString &hostName, bool isSimulator);
|
void onDeviceDetected(const QString &deviceName, const QString &hostName, bool isSimulator);
|
||||||
void onDeviceListDetectorFinished();
|
void onDeviceListDetectorFinished();
|
||||||
@@ -85,6 +99,25 @@ private:
|
|||||||
BlackBerryDeviceListDetector *m_deviceListDetector;
|
BlackBerryDeviceListDetector *m_deviceListDetector;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class BlackBerryDeviceConfigurationWizardQueryPage : public QWizardPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit BlackBerryDeviceConfigurationWizardQueryPage(BlackBerryDeviceConfigurationWizardHolder &holder, QWidget *parent = 0);
|
||||||
|
~BlackBerryDeviceConfigurationWizardQueryPage();
|
||||||
|
|
||||||
|
void initializePage();
|
||||||
|
bool isComplete() const;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void processQueryFinished(int status);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::BlackBerryDeviceConfigurationWizardQueryPage *m_ui;
|
||||||
|
BlackBerryDeviceConfigurationWizardHolder &m_holder;
|
||||||
|
BlackBerryDeviceInformation *m_deviceInformation;
|
||||||
|
};
|
||||||
|
|
||||||
class BlackBerryDeviceConfigurationWizardSshKeyPage : public QWizardPage
|
class BlackBerryDeviceConfigurationWizardSshKeyPage : public QWizardPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -112,6 +145,26 @@ private:
|
|||||||
Ui::BlackBerryDeviceConfigurationWizardSshKeyPage *m_ui;
|
Ui::BlackBerryDeviceConfigurationWizardSshKeyPage *m_ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class BlackBerryDeviceConfigurationWizardConfigPage : public QWizardPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit BlackBerryDeviceConfigurationWizardConfigPage(BlackBerryDeviceConfigurationWizardHolder &holder, QWidget *parent = 0);
|
||||||
|
~BlackBerryDeviceConfigurationWizardConfigPage();
|
||||||
|
|
||||||
|
void initializePage();
|
||||||
|
bool isComplete() const;
|
||||||
|
|
||||||
|
QString configurationName() const;
|
||||||
|
QString debugToken() const;
|
||||||
|
private slots:
|
||||||
|
void generateDebugToken();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::BlackBerryDeviceConfigurationWizardConfigPage *m_ui;
|
||||||
|
BlackBerryDeviceConfigurationWizardHolder &m_holder;
|
||||||
|
};
|
||||||
|
|
||||||
class BlackBerryDeviceConfigurationWizardFinalPage : public QWizardPage
|
class BlackBerryDeviceConfigurationWizardFinalPage : public QWizardPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Qnx::Internal::BlackBerryDeviceConfigurationWizardQueryPage</class>
|
||||||
|
<widget class="QWizardPage" name="Qnx::Internal::BlackBerryDeviceConfigurationWizardQueryPage">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>381</width>
|
||||||
|
<height>142</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="statusLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QProgressBar" name="progressBar">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>58</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>612</width>
|
<width>484</width>
|
||||||
<height>303</height>
|
<height>182</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -19,139 +19,34 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Configuration name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="deviceName"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Device type:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="physicalDevice">
|
|
||||||
<property name="text">
|
|
||||||
<string>Physical device</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="simulator">
|
|
||||||
<property name="text">
|
|
||||||
<string>Simulator</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Device host name or IP address:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="deviceHostIp"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Device password:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="password">
|
<widget class="QLineEdit" name="password">
|
||||||
<property name="echoMode">
|
<property name="echoMode">
|
||||||
<enum>QLineEdit::Password</enum>
|
<enum>QLineEdit::Password</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Debug token:</string>
|
<string>Device password:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="0" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<widget class="QLineEdit" name="deviceHostIp"/>
|
||||||
<item>
|
</item>
|
||||||
<widget class="Utils::PathChooser" name="debugToken" native="true">
|
<item row="0" column="0">
|
||||||
<property name="sizePolicy">
|
<widget class="QLabel" name="label_2">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
<property name="text">
|
||||||
<horstretch>0</horstretch>
|
<string>Device host name or IP address:</string>
|
||||||
<verstretch>0</verstretch>
|
</property>
|
||||||
</sizepolicy>
|
</widget>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="requestButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Request</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>Utils::PathChooser</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header location="global">utils/pathchooser.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
<slots>
|
|
||||||
<signal>editingFinished()</signal>
|
|
||||||
<signal>browsingFinished()</signal>
|
|
||||||
</slots>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections/>
|
||||||
<connection>
|
|
||||||
<sender>physicalDevice</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>debugToken</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>271</x>
|
|
||||||
<y>98</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>226</x>
|
|
||||||
<y>124</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
</ui>
|
||||||
|
@@ -6,14 +6,14 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>413</width>
|
<width>409</width>
|
||||||
<height>92</height>
|
<height>185</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>WizardPage</string>
|
<string>WizardPage</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -21,6 +21,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="publicKey">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
@@ -35,6 +42,29 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QProgressBar" name="progressBar">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -42,23 +72,21 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QLineEdit" name="publicKey">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="readOnly">
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<italic>true</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>SSH public key is used for securing a connection to a device.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QProgressBar" name="progressBar">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
@@ -73,6 +101,10 @@
|
|||||||
</slots>
|
</slots>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>generate</tabstop>
|
||||||
|
<tabstop>publicKey</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@@ -62,6 +62,18 @@ void BlackBerryDeviceInformation::setDeviceTarget(const QString &deviceIp, const
|
|||||||
start(arguments);
|
start(arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BlackBerryDeviceInformation::resetResults()
|
||||||
|
{
|
||||||
|
m_devicePin.clear();
|
||||||
|
m_deviceOS.clear();
|
||||||
|
m_hardwareId.clear();
|
||||||
|
m_debugTokenAuthor.clear();
|
||||||
|
m_scmBundle.clear();
|
||||||
|
m_hostName.clear();
|
||||||
|
m_debugTokenValid = false;
|
||||||
|
m_isSimulator = false;
|
||||||
|
}
|
||||||
|
|
||||||
QString BlackBerryDeviceInformation::devicePin() const
|
QString BlackBerryDeviceInformation::devicePin() const
|
||||||
{
|
{
|
||||||
return m_devicePin;
|
return m_devicePin;
|
||||||
@@ -77,14 +89,51 @@ QString BlackBerryDeviceInformation::hardwareId() const
|
|||||||
return m_hardwareId;
|
return m_hardwareId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString BlackBerryDeviceInformation::debugTokenAuthor() const
|
||||||
|
{
|
||||||
|
return m_debugTokenAuthor;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString BlackBerryDeviceInformation::scmBundle() const
|
||||||
|
{
|
||||||
|
return m_scmBundle;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString BlackBerryDeviceInformation::hostName() const
|
||||||
|
{
|
||||||
|
return m_hostName;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackBerryDeviceInformation::debugTokenValid() const
|
||||||
|
{
|
||||||
|
return m_debugTokenValid;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BlackBerryDeviceInformation::isSimulator() const
|
||||||
|
{
|
||||||
|
return m_isSimulator;
|
||||||
|
}
|
||||||
|
|
||||||
void BlackBerryDeviceInformation::processData(const QString &line)
|
void BlackBerryDeviceInformation::processData(const QString &line)
|
||||||
{
|
{
|
||||||
if (line.startsWith(QLatin1String("devicepin::")))
|
if (line.startsWith(QLatin1String("devicepin::0x")))
|
||||||
m_devicePin = line.split(QLatin1String("::0x")).at(1).trimmed();
|
m_devicePin = line.mid(QLatin1String("devicepin::0x").size()).trimmed();
|
||||||
else if (line.startsWith(QLatin1String("device_os::")))
|
else if (line.startsWith(QLatin1String("device_os::")))
|
||||||
m_deviceOS = line.split(QLatin1String("::")).at(1).trimmed();
|
m_deviceOS = line.mid(QLatin1String("device_os::").size()).trimmed();
|
||||||
else if (line.startsWith(QLatin1String("hardwareid::")))
|
else if (line.startsWith(QLatin1String("hardwareid::")))
|
||||||
m_hardwareId = line.split(QLatin1String("::")).at(1).trimmed();
|
m_hardwareId = line.mid(QLatin1String("hardwareid::").size()).trimmed();
|
||||||
|
else if (line.startsWith(QLatin1String("debug_token_author::")))
|
||||||
|
m_debugTokenAuthor = line.mid(QLatin1String("debug_token_author::").size()).trimmed();
|
||||||
|
else if (line.startsWith(QLatin1String("debug_token_valid:b:")))
|
||||||
|
m_debugTokenValid = line.mid(QLatin1String("debug_token_valid:b:").size()).trimmed()
|
||||||
|
== QLatin1String("true");
|
||||||
|
else if (line.startsWith(QLatin1String("simulator:b:")))
|
||||||
|
m_isSimulator = line.mid(QLatin1String("simulator:b:").size()).trimmed()
|
||||||
|
== QLatin1String("true");
|
||||||
|
else if (line.startsWith(QLatin1String("scmbundle::")))
|
||||||
|
m_scmBundle = line.mid(QLatin1String("scmbundle::").size()).trimmed();
|
||||||
|
else if (line.startsWith(QLatin1String("hostname::")))
|
||||||
|
m_hostName = line.mid(QLatin1String("hostname::").size()).trimmed();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -61,13 +61,24 @@ public:
|
|||||||
QString devicePin() const;
|
QString devicePin() const;
|
||||||
QString deviceOS() const;
|
QString deviceOS() const;
|
||||||
QString hardwareId() const;
|
QString hardwareId() const;
|
||||||
|
QString debugTokenAuthor() const;
|
||||||
|
bool debugTokenValid() const;
|
||||||
|
QString scmBundle() const;
|
||||||
|
QString hostName() const;
|
||||||
|
bool isSimulator() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_devicePin;
|
QString m_devicePin;
|
||||||
QString m_deviceOS;
|
QString m_deviceOS;
|
||||||
QString m_hardwareId;
|
QString m_hardwareId;
|
||||||
|
QString m_debugTokenAuthor;
|
||||||
|
QString m_scmBundle;
|
||||||
|
QString m_hostName;
|
||||||
|
bool m_debugTokenValid;
|
||||||
|
bool m_isSimulator;
|
||||||
|
|
||||||
void processData(const QString &line);
|
void processData(const QString &line);
|
||||||
|
void resetResults();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -75,6 +75,7 @@ void BlackBerryDeviceListDetector::processFinished()
|
|||||||
|
|
||||||
const QString BlackBerryDeviceListDetector::readProcessLine()
|
const QString BlackBerryDeviceListDetector::readProcessLine()
|
||||||
{
|
{
|
||||||
|
// we assume that the process output is ASCII only
|
||||||
QByteArray bytes = m_process->readLine();
|
QByteArray bytes = m_process->readLine();
|
||||||
while (bytes.endsWith('\r') || bytes.endsWith('\n'))
|
while (bytes.endsWith('\r') || bytes.endsWith('\n'))
|
||||||
bytes.chop(1);
|
bytes.chop(1);
|
||||||
@@ -83,10 +84,10 @@ const QString BlackBerryDeviceListDetector::readProcessLine()
|
|||||||
|
|
||||||
void BlackBerryDeviceListDetector::processData(const QString &line)
|
void BlackBerryDeviceListDetector::processData(const QString &line)
|
||||||
{
|
{
|
||||||
// line format is: deviceName,deviceHostName,deviceType,deviceDisplayName
|
// line format is: deviceName,deviceHostNameOrIP,deviceType,versionIfSimulator
|
||||||
QStringList list = line.split(QLatin1String(","));
|
QStringList list = line.split(QLatin1String(","));
|
||||||
if (list.count() == 4) {
|
if (list.count() == 4) {
|
||||||
emit deviceDetected (list[3].isEmpty() ? list[0] : list[3], list[1], QLatin1String("Simulator") == list[2]);
|
emit deviceDetected (list[0], list[1], QLatin1String("Simulator") == list[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -78,6 +78,8 @@ void BlackBerryNdkProcess::start(const QStringList &arguments)
|
|||||||
if (m_process->state() != QProcess::NotRunning)
|
if (m_process->state() != QProcess::NotRunning)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
resetResults();
|
||||||
|
|
||||||
m_process->start(command(), arguments);
|
m_process->start(command(), arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,5 +157,9 @@ void BlackBerryNdkProcess::processData(const QString &line)
|
|||||||
Q_UNUSED(line);
|
Q_UNUSED(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BlackBerryNdkProcess::resetResults()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Qnx
|
} // namespace Qnx
|
||||||
|
@@ -81,6 +81,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
int errorLineToReturnStatus(const QString &line) const;
|
int errorLineToReturnStatus(const QString &line) const;
|
||||||
virtual void processData(const QString &line);
|
virtual void processData(const QString &line);
|
||||||
|
virtual void resetResults();
|
||||||
|
|
||||||
QProcess *m_process;
|
QProcess *m_process;
|
||||||
|
|
||||||
|
@@ -216,7 +216,9 @@ FORMS += \
|
|||||||
bardescriptoreditorassetswidget.ui \
|
bardescriptoreditorassetswidget.ui \
|
||||||
blackberrysetupwizardkeyspage.ui \
|
blackberrysetupwizardkeyspage.ui \
|
||||||
blackberrysetupwizarddevicepage.ui \
|
blackberrysetupwizarddevicepage.ui \
|
||||||
blackberrysetupwizardfinishpage.ui
|
blackberrysetupwizardfinishpage.ui \
|
||||||
|
blackberrydeviceconfigurationwizardconfigpage.ui \
|
||||||
|
blackberrydeviceconfigurationwizardquerypage.ui
|
||||||
|
|
||||||
include(../../private_headers.pri)
|
include(../../private_headers.pri)
|
||||||
|
|
||||||
|
@@ -105,8 +105,10 @@ QtcPlugin {
|
|||||||
"blackberrydeviceconfigurationwidget.ui",
|
"blackberrydeviceconfigurationwidget.ui",
|
||||||
"blackberrydeviceconfigurationwizard.cpp",
|
"blackberrydeviceconfigurationwizard.cpp",
|
||||||
"blackberrydeviceconfigurationwizard.h",
|
"blackberrydeviceconfigurationwizard.h",
|
||||||
|
"blackberrydeviceconfigurationwizardconfigpage.ui",
|
||||||
"blackberrydeviceconfigurationwizardpages.cpp",
|
"blackberrydeviceconfigurationwizardpages.cpp",
|
||||||
"blackberrydeviceconfigurationwizardpages.h",
|
"blackberrydeviceconfigurationwizardpages.h",
|
||||||
|
"blackberrydeviceconfigurationwizardquerypage.ui",
|
||||||
"blackberrydeviceconfigurationwizardsetuppage.ui",
|
"blackberrydeviceconfigurationwizardsetuppage.ui",
|
||||||
"blackberrydeviceconfigurationwizardsshkeypage.ui",
|
"blackberrydeviceconfigurationwizardsshkeypage.ui",
|
||||||
"blackberrydeviceconnection.cpp",
|
"blackberrydeviceconnection.cpp",
|
||||||
|
Reference in New Issue
Block a user