Commit c1068262 authored by El Mehdi Fekari's avatar El Mehdi Fekari Committed by Mehdi Fekari

Qnx: Skip debug token for internal unsecure devices

Do not require debug token for devices
with internal unsecure development image.

Change-Id: I9c222492c63a7c92c253424ccb3f7c823223c95b
Reviewed-by: default avatarThomas Zander <zander@kde.org>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent bdf89d1c
......@@ -260,6 +260,7 @@ void BlackBerryDeviceConfigurationWizardQueryPage::processQueryFinished(int stat
m_holder.debugTokenAuthor = m_deviceInformation->debugTokenAuthor();
m_holder.debugTokenValid = m_deviceInformation->debugTokenValid();
m_holder.isSimulator = m_deviceInformation->isSimulator();
m_holder.isProductionDevice = m_deviceInformation->isProductionDevice();
if (m_holder.deviceInfoRetrieved)
checkAndGenerateSSHKeys();
......@@ -391,7 +392,7 @@ bool BlackBerryDeviceConfigurationWizardConfigPage::isComplete() const
{
bool configurationNameComplete = !m_ui->configurationNameField->text().isEmpty();
Utils::FileName fileName = m_ui->debugTokenField->fileName();
bool debugTokenComplete = m_holder.isSimulator
bool debugTokenComplete = m_holder.isSimulator || !m_holder.isProductionDevice
|| (!fileName.isEmpty() && QFileInfo(fileName.toString()).exists());
return configurationNameComplete && debugTokenComplete;
......
......@@ -61,11 +61,13 @@ struct BlackBerryDeviceConfigurationWizardHolder {
bool isSimulator;
bool debugTokenValid;
bool deviceInfoRetrieved;
bool isProductionDevice;
BlackBerryDeviceConfigurationWizardHolder()
: isSimulator(false)
, debugTokenValid(false)
, deviceInfoRetrieved(false) {}
, deviceInfoRetrieved(false)
, isProductionDevice(true) {}
};
class BlackBerryDeviceConfigurationWizardSetupPage : public QWizardPage
......
......@@ -72,6 +72,7 @@ void BlackBerryDeviceInformation::resetResults()
m_hostName.clear();
m_debugTokenValid = false;
m_isSimulator = false;
m_isProductionDevice = true;
}
QString BlackBerryDeviceInformation::devicePin() const
......@@ -114,6 +115,11 @@ bool BlackBerryDeviceInformation::isSimulator() const
return m_isSimulator;
}
bool BlackBerryDeviceInformation::isProductionDevice() const
{
return m_isProductionDevice;
}
void BlackBerryDeviceInformation::processData(const QString &line)
{
static const QString devicepin = QLatin1String("devicepin::0x");
......@@ -124,6 +130,8 @@ void BlackBerryDeviceInformation::processData(const QString &line)
static const QString simulator = QLatin1String("simulator:b:");
static const QString scmbundle = QLatin1String("scmbundle::");
static const QString hostname = QLatin1String("hostname::");
static const QString production_device = QLatin1String("production_device:b:");
if (line.startsWith(devicepin))
m_devicePin = line.mid(devicepin.size()).trimmed();
else if (line.startsWith(device_os))
......@@ -140,6 +148,8 @@ void BlackBerryDeviceInformation::processData(const QString &line)
m_scmBundle = line.mid(scmbundle.size()).trimmed();
else if (line.startsWith(hostname))
m_hostName = line.mid(hostname.size()).trimmed();
else if (line.startsWith(production_device))
m_isProductionDevice = line.mid(production_device.size()).trimmed() == QLatin1String("true");
}
} // namespace Internal
......
......@@ -66,6 +66,7 @@ public:
QString scmBundle() const;
QString hostName() const;
bool isSimulator() const;
bool isProductionDevice() const;
private:
QString m_devicePin;
......@@ -76,6 +77,7 @@ private:
QString m_hostName;
bool m_debugTokenValid;
bool m_isSimulator;
bool m_isProductionDevice;
void processData(const QString &line);
void resetResults();
......
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