Commit c149fa63 authored by David Kaspar's avatar David Kaspar

Qnx: Removing BlackBerry Environment Setup wizard

It is replaced by BlackBerry Setup options page.

Change-Id: If0f0b5c10f019fb587f98699e5b4ed4a14984b4f
Reviewed-by: default avatarDavid Kaspar <dkaspar@blackberry.com>
Reviewed-by: Nicolas Arnaud-Cormos's avatarNicolas Arnaud-Cormos <nicolas@kdab.com>
parent 8d5d0b0c
......@@ -33,7 +33,6 @@
#include "ui_blackberryndksettingswidget.h"
#include "qnxutils.h"
#include "blackberrysigningutils.h"
#include "blackberrysetupwizard.h"
#include "blackberryconfigurationmanager.h"
#include "blackberryconfiguration.h"
......@@ -82,7 +81,6 @@ BlackBerryNDKSettingsWidget::BlackBerryNDKSettingsWidget(QWidget *parent) :
m_ui->ndksTreeWidget->expandAll();
connect(m_ui->wizardButton, SIGNAL(clicked()), this, SLOT(launchBlackBerrySetupWizard()));
connect(m_ui->addNdkButton, SIGNAL(clicked()), this, SLOT(addNdkTarget()));
connect(m_ui->removeNdkButton, SIGNAL(clicked()), this, SLOT(removeNdkTarget()));
connect(m_ui->activateNdkTargetButton, SIGNAL(clicked()), this, SLOT(activateNdkTarget()));
......@@ -102,12 +100,6 @@ BlackBerryNDKSettingsWidget::BlackBerryNDKSettingsWidget(QWidget *parent) :
connect(&m_bbConfigManager, SIGNAL(settingsChanged()), &m_timer, SLOT(start()));
}
void BlackBerryNDKSettingsWidget::setWizardMessageVisible(bool visible)
{
m_ui->wizardLabel->setVisible(visible);
m_ui->wizardButton->setVisible(visible);
}
bool BlackBerryNDKSettingsWidget::hasActiveNdk() const
{
return !m_bbConfigManager.configurations().isEmpty();
......@@ -131,22 +123,6 @@ BlackBerryConfiguration *BlackBerryNDKSettingsWidget::defaultConfiguration() con
m_ui->apiLevelCombo->itemData(currentIndex).value<void*>());
}
void BlackBerryNDKSettingsWidget::launchBlackBerrySetupWizard() const
{
BlackBerrySigningUtils &blackBerryUtils = BlackBerrySigningUtils::instance();
const bool alreadyConfigured = blackBerryUtils.hasRegisteredKeys() && blackBerryUtils.hasDefaultCertificate();
if (alreadyConfigured) {
QMessageBox::information(Core::ICore::mainWindow(), tr("Qt Creator"),
tr("It appears that your BlackBerry environment has already been configured."));
return;
}
BlackBerrySetupWizard wizard(Core::ICore::mainWindow());
connect(&wizard, SIGNAL(ndkTargetsUpdated()), this, SLOT(updateNdkList()));
wizard.exec();
}
void BlackBerryNDKSettingsWidget::updateInfoTable(QTreeWidgetItem* currentItem)
{
BlackBerryConfiguration *config = m_bbConfigManager.configurationFromEnvFile(
......
......@@ -55,8 +55,6 @@ class BlackBerryNDKSettingsWidget : public QWidget
public:
explicit BlackBerryNDKSettingsWidget(QWidget *parent = 0);
void setWizardMessageVisible(bool visible);
bool hasActiveNdk() const;
QList<BlackBerryConfiguration *> activatedTargets();
......@@ -68,7 +66,6 @@ signals:
void targetsUpdated();
public slots:
void launchBlackBerrySetupWizard() const;
void updateInfoTable(QTreeWidgetItem* currentItem);
void updateNdkList();
void addNdkTarget();
......
......@@ -14,137 +14,6 @@
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="wizardLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="text">
<string>Get started and configure your environment:</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="wizardButton">
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>13</red>
<green>131</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>13</red>
<green>131</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>13</red>
<green>131</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>13</red>
<green>131</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>144</red>
<green>141</green>
<blue>139</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>150</red>
<green>147</green>
<blue>145</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<italic>false</italic>
<underline>true</underline>
</font>
</property>
<property name="text">
<string>environment setup wizard</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>276</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
......
This diff is collapsed.
/**************************************************************************
**
** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
**
** Contact: BlackBerry (qt@blackberry.com)
** Contact: KDAB (info@kdab.com)
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef BLACKBERRYSETUPWIZARD_H
#define BLACKBERRYSETUPWIZARD_H
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/wizard.h>
#include <QList>
#include <QByteArray>
namespace QSsh { class SshKeyGenerator; }
namespace Qnx {
namespace Internal {
class BlackBerrySetupWizardWelcomePage;
class BlackBerrySetupWizardNdkPage;
class BlackBerrySetupWizardKeysPage;
class BlackBerrySetupWizardCertificatePage;
class BlackBerrySetupWizardDevicePage;
class BlackBerrySetupWizardFinishPage;
class BlackBerryCertificate;
class BlackBerryDeviceInformation;
class BlackBerryDebugTokenRequester;
class BlackBerryDebugTokenUploader;
class BlackBerrySigningUtils;
class BlackBerrySetupWizard : public Utils::Wizard
{
Q_OBJECT
public:
explicit BlackBerrySetupWizard(QWidget *parent = 0);
virtual ~BlackBerrySetupWizard();
public slots:
void accept();
signals:
void stepFinished();
void ndkTargetsUpdated();
private slots:
void processNextStep();
void deviceInfoFinished(int status);
void certificateCreated(int status);
void debugTokenArrived(int status);
void uploaderFinished(int status);
void requestDevicePin();
void generateDeveloperCertificate();
void generateSshKeys();
void requestDebugToken();
void uploadDebugToken();
void writeDeviceInformation();
private:
enum PageId {
WelcomePageId,
NdkPageId,
KeysPageId,
CertificatePageId,
DevicePageId,
FinishPageId
};
struct Step {
QByteArray slot;
QString message;
};
void registerStep(const QByteArray &slot, const QString &message);
void setBusy(bool busy);
void cleanupFiles() const;
void reset();
QString privateKeyPath() const;
QString publicKeyPath() const;
QString deviceName() const;
QString storeLocation() const;
QString certificatePassword() const;
QString certificateAuthor() const;
QString devicePassword() const;
QString hostName() const;
bool isPhysicalDevice() const;
ProjectExplorer::IDevice::Ptr device();
BlackBerrySetupWizardWelcomePage *m_welcomePage;
BlackBerrySetupWizardNdkPage *m_ndkPage;
BlackBerrySetupWizardKeysPage *m_keysPage;
BlackBerrySetupWizardCertificatePage *m_certificatePage;
BlackBerrySetupWizardDevicePage *m_devicePage;
BlackBerrySetupWizardFinishPage *m_finishPage;
BlackBerryCertificate *m_certificate;
BlackBerryDeviceInformation *m_deviceInfo;
BlackBerryDebugTokenRequester *m_requester;
BlackBerryDebugTokenUploader *m_uploader;
BlackBerrySigningUtils &m_utils;
QSsh::SshKeyGenerator *m_keyGenerator;
QString m_devicePin;
QList<Step*> m_stepList;
int m_currentStep;
int m_stepOffset;
};
} // namespace Qnx
} // namespace Internal
#endif // BLACKBERRYSETUPWIZARD_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Qnx::Internal::BlackBerrySetupWizardCertificatePage</class>
<widget class="QWidget" name="Qnx::Internal::BlackBerrySetupWizardCertificatePage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>223</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Author:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="author"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Password:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="password">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Confirm password:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="password2">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="showPassword">
<property name="text">
<string>Show password</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="status">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Status</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>93</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Qnx::Internal::BlackBerrySetupWizardDevicePage</class>
<widget class="QWizardPage" name="Qnx::Internal::BlackBerrySetupWizardDevicePage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>508</width>
<height>159</height>
</rect>
</property>
<property name="windowTitle">
<string>WizardPage</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Device name:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="deviceName">
<property name="placeholderText">
<string>IP or host name of the device</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Device IP address:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="ipAddress"/>
</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_3">
<property name="text">
<string>Device password:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLineEdit" name="password">
<property name="toolTip">
<string>The password you use to unlock your device</string>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="physicalDevice">
<property name="text">
<string>Physical device</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="simulator">
<property name="text">
<string>Simulator</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Qnx::Internal::BlackBerrySetupWizardFinishPage</class>
<widget class="QWizardPage" name="Qnx::Internal::BlackBerrySetupWizardFinishPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>134</height>
</rect>
</property>
<property name="windowTitle">
<string>WizardPage</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>36</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="statusLabel">
<property name="text">
<string>Status</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>36</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>24</number>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
This diff is collapsed.
This diff is collapsed.
/**************************************************************************
**
** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
**
** Contact: BlackBerry (qt@blackberry.com)
** Contact: KDAB (info@kdab.com)
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef QNX_INTERNAL_BLACKBERRYSETUPWIZARDPAGES_H
#define QNX_INTERNAL_BLACKBERRYSETUPWIZARDPAGES_H
#include <QWizardPage>
namespace Utils { class PathChooser; }
namespace Qnx {
namespace Internal {
namespace Ui {