From c149fa63c1a69dae8685477812b7c46f5af2bcd1 Mon Sep 17 00:00:00 2001 From: David Kaspar Date: Wed, 12 Feb 2014 17:59:28 +0100 Subject: [PATCH] Qnx: Removing BlackBerry Environment Setup wizard It is replaced by BlackBerry Setup options page. Change-Id: If0f0b5c10f019fb587f98699e5b4ed4a14984b4f Reviewed-by: David Kaspar Reviewed-by: Nicolas Arnaud-Cormos --- .../qnx/blackberryndksettingswidget.cpp | 24 - src/plugins/qnx/blackberryndksettingswidget.h | 3 - .../qnx/blackberryndksettingswidget.ui | 131 ----- src/plugins/qnx/blackberrysetupwizard.cpp | 515 ------------------ src/plugins/qnx/blackberrysetupwizard.h | 144 ----- .../blackberrysetupwizardcertificatepage.ui | 108 ---- .../qnx/blackberrysetupwizarddevicepage.ui | 134 ----- .../qnx/blackberrysetupwizardfinishpage.ui | 64 --- .../qnx/blackberrysetupwizardkeyspage.ui | 429 --------------- .../qnx/blackberrysetupwizardpages.cpp | 345 ------------ src/plugins/qnx/blackberrysetupwizardpages.h | 165 ------ src/plugins/qnx/qnx.pro | 8 - src/plugins/qnx/qnx.qbs | 8 - 13 files changed, 2078 deletions(-) delete mode 100644 src/plugins/qnx/blackberrysetupwizard.cpp delete mode 100644 src/plugins/qnx/blackberrysetupwizard.h delete mode 100644 src/plugins/qnx/blackberrysetupwizardcertificatepage.ui delete mode 100644 src/plugins/qnx/blackberrysetupwizarddevicepage.ui delete mode 100644 src/plugins/qnx/blackberrysetupwizardfinishpage.ui delete mode 100644 src/plugins/qnx/blackberrysetupwizardkeyspage.ui delete mode 100644 src/plugins/qnx/blackberrysetupwizardpages.cpp delete mode 100644 src/plugins/qnx/blackberrysetupwizardpages.h diff --git a/src/plugins/qnx/blackberryndksettingswidget.cpp b/src/plugins/qnx/blackberryndksettingswidget.cpp index d641fc173e3..a1e2b5663a0 100644 --- a/src/plugins/qnx/blackberryndksettingswidget.cpp +++ b/src/plugins/qnx/blackberryndksettingswidget.cpp @@ -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 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( diff --git a/src/plugins/qnx/blackberryndksettingswidget.h b/src/plugins/qnx/blackberryndksettingswidget.h index 0fd527dc1e5..d8a2d80f9cf 100644 --- a/src/plugins/qnx/blackberryndksettingswidget.h +++ b/src/plugins/qnx/blackberryndksettingswidget.h @@ -55,8 +55,6 @@ class BlackBerryNDKSettingsWidget : public QWidget public: explicit BlackBerryNDKSettingsWidget(QWidget *parent = 0); - void setWizardMessageVisible(bool visible); - bool hasActiveNdk() const; QList activatedTargets(); @@ -68,7 +66,6 @@ signals: void targetsUpdated(); public slots: - void launchBlackBerrySetupWizard() const; void updateInfoTable(QTreeWidgetItem* currentItem); void updateNdkList(); void addNdkTarget(); diff --git a/src/plugins/qnx/blackberryndksettingswidget.ui b/src/plugins/qnx/blackberryndksettingswidget.ui index c142b583682..30bd18b27b7 100644 --- a/src/plugins/qnx/blackberryndksettingswidget.ui +++ b/src/plugins/qnx/blackberryndksettingswidget.ui @@ -14,137 +14,6 @@ Form - - - - - - - 75 - true - - - - false - - - QFrame::NoFrame - - - Get started and configure your environment: - - - Qt::PlainText - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - Qt::TextBrowserInteraction - - - - - - - - - - - - 13 - 131 - 220 - - - - - - - 13 - 131 - 220 - - - - - - - - - 13 - 131 - 220 - - - - - - - 13 - 131 - 220 - - - - - - - - - 144 - 141 - 139 - - - - - - - 150 - 147 - 145 - - - - - - - - - false - true - - - - environment setup wizard - - - true - - - - - - - Qt::Horizontal - - - - 276 - 20 - - - - - - diff --git a/src/plugins/qnx/blackberrysetupwizard.cpp b/src/plugins/qnx/blackberrysetupwizard.cpp deleted file mode 100644 index d525c55808f..00000000000 --- a/src/plugins/qnx/blackberrysetupwizard.cpp +++ /dev/null @@ -1,515 +0,0 @@ -/************************************************************************** -** -** 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. -** -****************************************************************************/ - -#include "blackberrysetupwizard.h" -#include "blackberrysetupwizardpages.h" -#include "blackberrydeviceconfiguration.h" -#include "blackberrycertificate.h" -#include "blackberryconfigurationmanager.h" -#include "blackberrydebugtokenrequester.h" -#include "blackberrydebugtokenuploader.h" -#include "blackberrydeviceinformation.h" -#include "blackberrysigningutils.h" -#include "qnxconstants.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -using namespace ProjectExplorer; -using namespace Qnx; -using namespace Qnx::Internal; - -BlackBerrySetupWizard::BlackBerrySetupWizard(QWidget *parent) : - Utils::Wizard(parent), - m_ndkPage(0), - m_keysPage(0), - m_certificatePage(0), - m_devicePage(0), - m_certificate(0), - m_deviceInfo(0), - m_requester(0), - m_uploader(0), - m_utils(BlackBerrySigningUtils::instance()), - m_keyGenerator(0), - m_currentStep(-1), - m_stepOffset(0) -{ - setWindowTitle(tr("BlackBerry Development Environment Setup Wizard")); - setOption(QWizard::IndependentPages, true); - - m_welcomePage = new BlackBerrySetupWizardWelcomePage(this); - m_ndkPage = new BlackBerrySetupWizardNdkPage(this); - m_keysPage = new BlackBerrySetupWizardKeysPage(this); - m_certificatePage = new BlackBerrySetupWizardCertificatePage(this); - m_devicePage = new BlackBerrySetupWizardDevicePage(this); - m_finishPage = new BlackBerrySetupWizardFinishPage(this); - - setPage(WelcomePageId, m_welcomePage); - setPage(NdkPageId, m_ndkPage); - setPage(KeysPageId, m_keysPage); - setPage(CertificatePageId, m_certificatePage); - setPage(DevicePageId, m_devicePage); - setPage(FinishPageId, m_finishPage); - - m_deviceInfo = new BlackBerryDeviceInformation(this); - m_requester = new BlackBerryDebugTokenRequester(this); - m_uploader = new BlackBerryDebugTokenUploader(this); - m_keyGenerator = new QSsh::SshKeyGenerator; - - connect(m_ndkPage, SIGNAL(targetsUpdated()), - this, SIGNAL(ndkTargetsUpdated())); - connect(m_deviceInfo, SIGNAL(finished(int)), - this, SLOT(deviceInfoFinished(int))); - connect(m_requester, SIGNAL(finished(int)), - this, SLOT(debugTokenArrived(int))); - connect(m_uploader, SIGNAL(finished(int)), - this, SLOT(uploaderFinished(int))); - connect(this, SIGNAL(stepFinished()), - this, SLOT(processNextStep())); - - registerStep("requestDevicePin", tr("Reading device PIN...")); - registerStep("generateDeveloperCertificate", tr("Generating developer certificate...")); - registerStep("generateSshKeys", tr("Generating SSH keys...")); - registerStep("requestDebugToken", tr("Requesting a debug token for the device...")); - registerStep("uploadDebugToken", tr("Now uploading the debug token...")); - registerStep("writeDeviceInformation", tr("Writing device information...")); -} - -BlackBerrySetupWizard::~BlackBerrySetupWizard() -{ - delete m_keyGenerator; - - foreach (Step *s, m_stepList) - delete s; - - m_stepList.clear(); -} - -void BlackBerrySetupWizard::accept() -{ - setBusy(true); - processNextStep(); -} - -void BlackBerrySetupWizard::processNextStep() -{ - m_currentStep++; - - if (m_currentStep >= m_stepList.size()) - return; - - const Step *step = m_stepList.at(m_currentStep); - - m_finishPage->setProgress(step->message, m_currentStep * m_stepOffset); - QMetaObject::invokeMethod(this, step->slot); -} - -void BlackBerrySetupWizard::deviceInfoFinished(int status) -{ - const QString errorString = tr("Error reading device PIN. " - "Please make sure that the specified device IP address is correct."); - - if (status != BlackBerryDeviceInformation::Success) { - QMessageBox::critical(this, tr("Error"), errorString); - reset(); - return; - } - - m_devicePin = m_deviceInfo->devicePin(); - - if (m_devicePin.isEmpty()) { - QMessageBox::critical(this, tr("Error"), errorString); - reset(); - return; - } - - emit stepFinished(); -} - -void BlackBerrySetupWizard::certificateCreated(int status) -{ - if (status == BlackBerryCertificate::Error) { - QMessageBox::critical(this, tr("Error"), tr("Error creating developer certificate.")); - m_certificate->deleteLater(); - m_certificate = 0; - reset(); - return; - } - - emit stepFinished(); -} - -void BlackBerrySetupWizard::debugTokenArrived(int status) -{ - QString errorString = tr("Failed to request debug token:") + QLatin1Char(' '); - - switch (status) { - case BlackBerryDebugTokenRequester::Success: - emit stepFinished(); - return; - case BlackBerryDebugTokenRequester::WrongCskPassword: - m_utils.clearCskPassword(); - errorString += tr("Wrong CSK password."); - break; - case BlackBerryDebugTokenRequester::WrongKeystorePassword: - errorString += tr("Wrong keystore password."); - break; - case BlackBerryDebugTokenRequester::NetworkUnreachable: - errorString += tr("Network unreachable."); - break; - case BlackBerryDebugTokenRequester::IllegalPin: - errorString += tr("Illegal device PIN."); - break; - case BlackBerryDebugTokenRequester::FailedToStartInferiorProcess: - errorString += tr("Failed to start inferior process."); - break; - case BlackBerryDebugTokenRequester::InferiorProcessTimedOut: - errorString += tr("Inferior processes timed out."); - break; - case BlackBerryDebugTokenRequester::InferiorProcessCrashed: - errorString += tr("Inferior process has crashed."); - break; - case BlackBerryDebugTokenRequester::InferiorProcessReadError: - case BlackBerryDebugTokenRequester::InferiorProcessWriteError: - errorString += tr("Failed to communicate with the inferior process."); - break; - case BlackBerryDebugTokenRequester::UnknownError: - default: - m_utils.clearCskPassword(); - errorString += tr("An unknwon error has occurred."); - break; - } - - BlackBerryConfigurationManager &configuration = BlackBerryConfigurationManager::instance(); - - QFile dt(configuration.defaultKeystorePath()); - - if (dt.exists()) - dt.remove(); - - QMessageBox::critical(this, tr("Error"), errorString); - - reset(); -} - -void BlackBerrySetupWizard::uploaderFinished(int status) -{ - QString errorString = tr("Failed to upload debug token:") + QLatin1Char(' '); - - switch (status) { - case BlackBerryDebugTokenUploader::Success: - emit stepFinished(); - return; - case BlackBerryDebugTokenUploader::NoRouteToHost: - errorString += tr("No route to host."); - break; - case BlackBerryDebugTokenUploader::AuthenticationFailed: - errorString += tr("Authentication failed."); - break; - case BlackBerryDebugTokenUploader::DevelopmentModeDisabled: - errorString += tr("Development mode is disabled on the device."); - break; - case BlackBerryDebugTokenUploader::FailedToStartInferiorProcess: - errorString += tr("Failed to start inferior process."); - break; - case BlackBerryDebugTokenUploader::InferiorProcessTimedOut: - errorString += tr("Inferior processes timed out."); - break; - case BlackBerryDebugTokenUploader::InferiorProcessCrashed: - errorString += tr("Inferior process has crashed."); - break; - case BlackBerryDebugTokenUploader::InferiorProcessReadError: - case BlackBerryDebugTokenUploader::InferiorProcessWriteError: - errorString += tr("Failed to communicate with the inferior process."); - break; - case BlackBerryDebugTokenUploader::UnknownError: - errorString += tr("An unknwon error has happened."); - break; - } - - QMessageBox::critical(this, tr("Error"), errorString); - - reset(); -} - -void BlackBerrySetupWizard::registerStep(const QByteArray &slot, const QString &message) -{ - Step *s = new Step; - s->slot = slot; - s->message = message; - m_stepList << s; - - m_stepOffset = 100/m_stepList.size(); -} - -void BlackBerrySetupWizard::setBusy(bool busy) -{ - button(QWizard::BackButton)->setEnabled(!busy); - button(QWizard::NextButton)->setEnabled(!busy); - button(QWizard::FinishButton)->setEnabled(!busy); - button(QWizard::CancelButton)->setEnabled(!busy); - - if (!busy) - m_finishPage->setProgress(QString(), -1); -} - -void BlackBerrySetupWizard::cleanupFiles() const -{ - BlackBerryConfigurationManager &configuration = BlackBerryConfigurationManager::instance(); - - QFile f; - - f.setFileName(configuration.defaultKeystorePath()); - f.remove(); - - f.setFileName(configuration.defaultDebugTokenPath()); - f.remove(); - - f.setFileName(privateKeyPath()); - f.remove(); - - f.setFileName(publicKeyPath()); - f.remove(); - - QDir::root().rmpath(storeLocation()); -} - -void BlackBerrySetupWizard::reset() -{ - cleanupFiles(); - setBusy(false); - m_currentStep = -1; - - if (m_certificate) { - m_certificate->deleteLater(); - m_certificate = 0; - } -} - -void BlackBerrySetupWizard::requestDevicePin() -{ - if (!isPhysicalDevice()) { - emit stepFinished(); - return; - } - - m_deviceInfo->setDeviceTarget(hostName(), devicePassword()); -} - -void BlackBerrySetupWizard::generateDeveloperCertificate() -{ - BlackBerryConfigurationManager &configuration = BlackBerryConfigurationManager::instance(); - - m_certificate = new BlackBerryCertificate(configuration.defaultKeystorePath(), - certificateAuthor(), certificatePassword()); - - connect(m_certificate, SIGNAL(finished(int)), this, SLOT(certificateCreated(int))); - - m_certificate->store(); -} - -void BlackBerrySetupWizard::generateSshKeys() -{ - const bool success = m_keyGenerator->generateKeys(QSsh::SshKeyGenerator::Rsa, - QSsh::SshKeyGenerator::Mixed, 4096, - QSsh::SshKeyGenerator::DoNotOfferEncryption); - - if (!success) { - QMessageBox::critical(this, tr("Key Generation Failed"), m_keyGenerator->error()); - reset(); - return; - } - - if (!QDir::root().mkpath(storeLocation())) { - QMessageBox::critical(this, tr("Failure to Save Key File"), - tr("Failed to create directory: '%1'.").arg(storeLocation())); - reset(); - return; - } - - if (QFileInfo(privateKeyPath()).exists()) { - QMessageBox::critical(this, tr("Failure to Save Key File"), - tr("Private key file already exists: '%1'").arg(privateKeyPath())); - reset(); - return; - } - - if (QFileInfo(publicKeyPath()).exists()) { - QMessageBox::critical(this, tr("Failure to Save Key File"), - tr("Public key file already exists: '%1'").arg(publicKeyPath())); - reset(); - return; - } - - Utils::FileSaver privateKeySaver(privateKeyPath()); - privateKeySaver.write(m_keyGenerator->privateKey()); - - if (!privateKeySaver.finalize(this)) { - reset(); - return; // finalize shows an error message if necessary - } - - QFile::setPermissions(privateKeyPath(), QFile::ReadOwner | QFile::WriteOwner); - - Utils::FileSaver publicKeySaver(publicKeyPath()); - - // blackberry-connect requires an @ character to be included in the RSA comment - const QString atHost = QLatin1Char('@') + QHostInfo::localHostName(); - QByteArray publicKeyContent = m_keyGenerator->publicKey(); - publicKeyContent.append(atHost.toLocal8Bit()); - - publicKeySaver.write(publicKeyContent); - - if (!publicKeySaver.finalize(this)) { - reset(); - return; - } - - emit stepFinished(); -} - -void BlackBerrySetupWizard::requestDebugToken() -{ - if (!isPhysicalDevice()) { - emit stepFinished(); - return; - } - - BlackBerryConfigurationManager &configuration = BlackBerryConfigurationManager::instance(); - - bool ok; - const QString cskPassword = m_utils.cskPassword(this, &ok); - if (!ok) - return; - - m_requester->requestDebugToken(configuration.defaultDebugTokenPath(), - cskPassword, configuration.defaultKeystorePath(), certificatePassword(), m_devicePin); -} - -void BlackBerrySetupWizard::uploadDebugToken() -{ - if (!isPhysicalDevice()) { - emit stepFinished(); - return; - } - - BlackBerryConfigurationManager &configuration = BlackBerryConfigurationManager::instance(); - - m_uploader->uploadDebugToken(configuration.defaultDebugTokenPath(), - hostName(), devicePassword()); -} - -void BlackBerrySetupWizard::writeDeviceInformation() -{ - DeviceManager * const deviceManager = DeviceManager::instance(); - deviceManager->addDevice(device()); - - m_utils.setDefaultCertificate(m_certificate); - - QWizard::accept(); -} - -QString BlackBerrySetupWizard::privateKeyPath() const -{ - return storeLocation() + QLatin1String("/id_rsa"); -} - -QString BlackBerrySetupWizard::publicKeyPath() const -{ - return storeLocation() + QLatin1String("/id_rsa.pub"); -} - -QString BlackBerrySetupWizard::deviceName() const -{ - return field(QLatin1String(BlackBerrySetupWizardDevicePage::NameField)).toString(); -} - -QString BlackBerrySetupWizard::storeLocation() const -{ - return Core::ICore::userResourcePath() + QLatin1String("/qnx/") + deviceName(); -} - -QString BlackBerrySetupWizard::certificatePassword() const -{ - return field(QLatin1String(BlackBerrySetupWizardCertificatePage::PasswordField)).toString(); -} - -QString BlackBerrySetupWizard::certificateAuthor() const -{ - return field(QLatin1String(BlackBerrySetupWizardCertificatePage::AuthorField)).toString(); -} - -QString BlackBerrySetupWizard::hostName() const -{ - return field(QLatin1String(BlackBerrySetupWizardDevicePage::IpAddressField)).toString(); -} - -QString BlackBerrySetupWizard::devicePassword() const -{ - return field(QLatin1String(BlackBerrySetupWizardDevicePage::PasswordField)).toString(); -} - -bool BlackBerrySetupWizard::isPhysicalDevice() const -{ - return field(QLatin1String(BlackBerrySetupWizardDevicePage::PhysicalDeviceField)).toBool(); -} - -IDevice::Ptr BlackBerrySetupWizard::device() -{ - QSsh::SshConnectionParameters sshParams; - sshParams.options = QSsh::SshIgnoreDefaultProxy; - sshParams.host = hostName(); - sshParams.password = devicePassword(); - sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationTypePublicKey; - sshParams.privateKeyFile = privateKeyPath(); - sshParams.userName = QLatin1String("devuser"); - sshParams.timeout = 10; - sshParams.port = 22; - - IDevice::MachineType machineType = (isPhysicalDevice()) ? IDevice::Hardware : IDevice::Emulator; - - BlackBerryDeviceConfiguration::Ptr configuration = BlackBerryDeviceConfiguration::create( - deviceName(), Core::Id(Constants::QNX_BB_OS_TYPE), machineType); - - configuration->setSshParameters(sshParams); - configuration->setDebugToken(BlackBerryConfigurationManager::instance().defaultDebugTokenPath()); - - return configuration; -} diff --git a/src/plugins/qnx/blackberrysetupwizard.h b/src/plugins/qnx/blackberrysetupwizard.h deleted file mode 100644 index ff973614881..00000000000 --- a/src/plugins/qnx/blackberrysetupwizard.h +++ /dev/null @@ -1,144 +0,0 @@ -/************************************************************************** -** -** 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 -#include - -#include -#include - -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 m_stepList; - - int m_currentStep; - int m_stepOffset; -}; - -} // namespace Qnx -} // namespace Internal - -#endif // BLACKBERRYSETUPWIZARD_H diff --git a/src/plugins/qnx/blackberrysetupwizardcertificatepage.ui b/src/plugins/qnx/blackberrysetupwizardcertificatepage.ui deleted file mode 100644 index b723cbffaa8..00000000000 --- a/src/plugins/qnx/blackberrysetupwizardcertificatepage.ui +++ /dev/null @@ -1,108 +0,0 @@ - - - Qnx::Internal::BlackBerrySetupWizardCertificatePage - - - - 0 - 0 - 400 - 223 - - - - Form - - - - - - - - Author: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Password: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - QLineEdit::Password - - - - - - - Confirm password: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - QLineEdit::Password - - - - - - - Show password - - - - - - - - 75 - true - - - - Status - - - Qt::AlignCenter - - - - - - - - - Qt::Vertical - - - - 20 - 93 - - - - - - - - - diff --git a/src/plugins/qnx/blackberrysetupwizarddevicepage.ui b/src/plugins/qnx/blackberrysetupwizarddevicepage.ui deleted file mode 100644 index 31ffb5863d9..00000000000 --- a/src/plugins/qnx/blackberrysetupwizarddevicepage.ui +++ /dev/null @@ -1,134 +0,0 @@ - - - Qnx::Internal::BlackBerrySetupWizardDevicePage - - - - 0 - 0 - 508 - 159 - - - - WizardPage - - - - - - - - Device name: - - - - - - - IP or host name of the device - - - - - - - Device IP address: - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Device password: - - - - - - - - - The password you use to unlock your device - - - QLineEdit::Password - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Physical device - - - true - - - - - - - Simulator - - - - - - - - - - - Qt::Vertical - - - - 20 - 5 - - - - - - - - - diff --git a/src/plugins/qnx/blackberrysetupwizardfinishpage.ui b/src/plugins/qnx/blackberrysetupwizardfinishpage.ui deleted file mode 100644 index 52cd4604c35..00000000000 --- a/src/plugins/qnx/blackberrysetupwizardfinishpage.ui +++ /dev/null @@ -1,64 +0,0 @@ - - - Qnx::Internal::BlackBerrySetupWizardFinishPage - - - - 0 - 0 - 400 - 134 - - - - WizardPage - - - - - - Qt::Vertical - - - - 20 - 36 - - - - - - - - Status - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - - 20 - 36 - - - - - - - - 24 - - - - - - - - diff --git a/src/plugins/qnx/blackberrysetupwizardkeyspage.ui b/src/plugins/qnx/blackberrysetupwizardkeyspage.ui deleted file mode 100644 index a71ed39883a..00000000000 --- a/src/plugins/qnx/blackberrysetupwizardkeyspage.ui +++ /dev/null @@ -1,429 +0,0 @@ - - - Qnx::Internal::BlackBerrySetupWizardKeysPage - - - - 0 - 0 - 581 - 222 - - - - WizardPage - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - true - - - QFrame::StyledPanel - - - <html><head/><body><p><span style=" font-weight:600;">Legacy keys detected</span></p><p>It appears you are using legacy key files. Please visit <a href="https://developer.blackberry.com/native/documentation/core/com.qnx.doc.native_sdk.devguide/topic/bbid_to_sa.html"><span style=" text-decoration: underline; color:#004f69;">this page</span></a> to upgrade your keys.</p></body></html> - - - Qt::RichText - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - false - - - Qt::TextBrowserInteraction - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - true - - - QFrame::StyledPanel - - - <html><head/><body><p><span style=" font-weight:600;">Obtaining keys</span></p><p>You will need to order your signing keys from BlackBerry, by <a href="https://www.blackberry.com/SignedKeys/codesigning.html"><span style=" text-decoration: underline; color:#004f69;">visiting this page.</span></a></p></body></html> - - - Qt::RichText - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - false - - - Qt::TextBrowserInteraction - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - true - - - QFrame::StyledPanel - - - <html><head/><body><p><span style=" font-weight:600;">Help</span></p><p>Check <a href="https://developer.blackberry.com/CodeSigningHelp/codesignhelp.html"><span style=" text-decoration: underline; color:#004f69;">this link</span></a> if you need help with code signing.</p></body></html> - - - Qt::RichText - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - false - - - Qt::TextBrowserInteraction - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Your BlackBerry signing keys have already been installed. - - - Qt::AlignCenter - - - false - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - diff --git a/src/plugins/qnx/blackberrysetupwizardpages.cpp b/src/plugins/qnx/blackberrysetupwizardpages.cpp deleted file mode 100644 index 4a92c549c87..00000000000 --- a/src/plugins/qnx/blackberrysetupwizardpages.cpp +++ /dev/null @@ -1,345 +0,0 @@ -/************************************************************************** -** -** 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. -** -****************************************************************************/ - -#include "blackberrysetupwizardpages.h" -#include "blackberryndksettingswidget.h" -#include "blackberryconfiguration.h" -#include "blackberrysigningutils.h" -#include "ui_blackberrysetupwizardkeyspage.h" -#include "ui_blackberrysetupwizardcertificatepage.h" -#include "ui_blackberrysetupwizarddevicepage.h" -#include "ui_blackberrysetupwizardfinishpage.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace Qnx; -using namespace Qnx::Internal; - -BlackBerrySetupWizardWelcomePage::BlackBerrySetupWizardWelcomePage(QWidget *parent) : - QWizardPage(parent) -{ - const QString welcomeMessage = - tr("Welcome to the BlackBerry Development " - "Environment Setup Wizard.\nThis wizard will guide you through " - "the essential steps to deploy a ready-to-go development environment " - "for BlackBerry 10 devices."); - - setTitle(tr("BlackBerry Development Environment Setup")); - - QLabel *label = new QLabel(this); - label->setWordWrap(true); - label->setText(welcomeMessage); - - QVBoxLayout *layout = new QVBoxLayout; - layout->addStretch(); - layout->addWidget(label); - layout->addStretch(); - - setLayout(layout); -} - -//----------------------------------------------------------------------------- - -BlackBerrySetupWizardNdkPage::BlackBerrySetupWizardNdkPage(QWidget *parent) : - QWizardPage(parent), - m_widget(0) -{ - setTitle(tr("Configure the NDK Path")); - - m_widget = new BlackBerryNDKSettingsWidget(this); - m_widget->setWizardMessageVisible(false); - - connect(m_widget, SIGNAL(targetsUpdated()), this, SIGNAL(completeChanged())); - connect(m_widget, SIGNAL(targetsUpdated()), this, SIGNAL(targetsUpdated())); - - QVBoxLayout *layout = new QVBoxLayout; - layout->addWidget(m_widget); - - setLayout(layout); -} - -BlackBerrySetupWizardNdkPage::~BlackBerrySetupWizardNdkPage() -{ -} - -bool BlackBerrySetupWizardNdkPage::isComplete() const -{ - return m_widget->hasActiveNdk(); -} - -//----------------------------------------------------------------------------- - -BlackBerrySetupWizardKeysPage::BlackBerrySetupWizardKeysPage(QWidget *parent) : - QWizardPage(parent), - m_ui(0), - m_complete(false) -{ - setTitle(tr("Setup Signing Keys")); - - initUi(); -} - -BlackBerrySetupWizardKeysPage::~BlackBerrySetupWizardKeysPage() -{ - delete m_ui; - m_ui = 0; -} - -void BlackBerrySetupWizardKeysPage::showKeysMessage(const QString &url) -{ - const QMessageBox::StandardButton button = QMessageBox::question(this, - tr("Qt Creator"), - tr("This wizard will be closed and you will be taken to the BlackBerry " - "key request web page. Do you want to continue?"), - QMessageBox::Yes | QMessageBox::No); - - if (button == QMessageBox::Yes) { - QDesktopServices::openUrl(QUrl(url)); - wizard()->reject(); - } -} - -bool BlackBerrySetupWizardKeysPage::isComplete() const -{ - return m_complete; -} - -void BlackBerrySetupWizardKeysPage::initUi() -{ - BlackBerrySigningUtils &utils = BlackBerrySigningUtils::instance(); - - m_ui = new Ui::BlackBerrySetupWizardKeysPage; - m_ui->setupUi(this); - - if (utils.hasLegacyKeys()) { - m_ui->linkLabel->setVisible(false); - m_ui->legacyLabel->setVisible(true); - m_ui->statusLabel->setVisible(false); - - setComplete(false); - } else if (utils.hasRegisteredKeys()) { - m_ui->linkLabel->setVisible(false); - m_ui->legacyLabel->setVisible(false); - m_ui->statusLabel->setVisible(true); - - setComplete(true); - } else { - m_ui->linkLabel->setVisible(true); - m_ui->legacyLabel->setVisible(false); - m_ui->statusLabel->setVisible(false); - - setComplete(false); - } - - connect(m_ui->linkLabel, SIGNAL(linkActivated(QString)), - this, SLOT(showKeysMessage(QString))); - connect(m_ui->legacyLabel, SIGNAL(linkActivated(QString)), - this, SLOT(showKeysMessage(QString))); - connect(m_ui->helpLabel, SIGNAL(linkActivated(QString)), - this, SLOT(showKeysMessage(QString))); -} - -void BlackBerrySetupWizardKeysPage::setComplete(bool complete) -{ - if (m_complete != complete) { - m_complete = complete; - m_ui->linkLabel->setVisible(!complete); - m_ui->statusLabel->setVisible(complete); - emit completeChanged(); - } -} - -//----------------------------------------------------------------------------- - -const char BlackBerrySetupWizardCertificatePage::AuthorField[] = "CertificatePage::Author"; -const char BlackBerrySetupWizardCertificatePage::PasswordField[] = "CertificatePage::Password"; -const char BlackBerrySetupWizardCertificatePage::PasswordField2[] = "CertificatePage::Password2"; - -BlackBerrySetupWizardCertificatePage::BlackBerrySetupWizardCertificatePage(QWidget *parent) - : QWizardPage(parent), - m_ui(0), - m_complete(false) -{ - setTitle(tr("Create Developer Certificate")); - - initUi(); -} - -bool BlackBerrySetupWizardCertificatePage::isComplete() const -{ - return m_complete; -} - -void BlackBerrySetupWizardCertificatePage::validate() -{ - if (m_ui->author->text().isEmpty() - || m_ui->password->text().isEmpty() - || m_ui->password2->text().isEmpty()) { - m_ui->status->clear(); - setComplete(false); - return; - } - - if (m_ui->password->text() != m_ui->password2->text()) { - m_ui->status->setText(tr("The entered passwords do not match.")); - setComplete(false); - return; - } - - if (m_ui->password->text().size() < 6) { - // TODO: Use tr() once string freeze is over - m_ui->status->setText(QCoreApplication::translate("Qnx::Internal::BlackBerryCreateCertificateDialog", "Password must be at least 6 characters long.")); - setComplete(false); - return; - } - - m_ui->status->clear(); - setComplete(true); -} - -void BlackBerrySetupWizardCertificatePage::checkBoxChanged(int state) -{ - if (state == Qt::Checked) { - m_ui->password->setEchoMode(QLineEdit::Normal); - m_ui->password2->setEchoMode(QLineEdit::Normal); - } else { - m_ui->password->setEchoMode(QLineEdit::Password); - m_ui->password2->setEchoMode(QLineEdit::Password); - } -} - -void BlackBerrySetupWizardCertificatePage::setComplete(bool complete) -{ - if (m_complete != complete) { - m_complete = complete; - emit completeChanged(); - } -} - -void BlackBerrySetupWizardCertificatePage::initUi() -{ - m_ui = new Ui::BlackBerrySetupWizardCertificatePage; - m_ui->setupUi(this); - m_ui->status->clear(); - - connect(m_ui->author, SIGNAL(textChanged(QString)), - this, SLOT(validate())); - connect(m_ui->password, SIGNAL(textChanged(QString)), - this, SLOT(validate())); - connect(m_ui->password2, SIGNAL(textChanged(QString)), - this, SLOT(validate())); - connect(m_ui->showPassword, SIGNAL(stateChanged(int)), - this, SLOT(checkBoxChanged(int))); - - registerField(QLatin1String(AuthorField) + QLatin1Char('*'), m_ui->author); - registerField(QLatin1String(PasswordField) + QLatin1Char('*'), m_ui->password); - registerField(QLatin1String(PasswordField2) + QLatin1Char('*'), m_ui->password2); -} - -//----------------------------------------------------------------------------- - -const char BlackBerrySetupWizardDevicePage::NameField[] = "DevicePage::Name"; -const char BlackBerrySetupWizardDevicePage::IpAddressField[] = "DevicePage::IpAddress"; -const char BlackBerrySetupWizardDevicePage::PasswordField[] = "DevicePage::PasswordField"; -const char BlackBerrySetupWizardDevicePage::PhysicalDeviceField[] = "DevicePage::PhysicalDeviceField"; - - -BlackBerrySetupWizardDevicePage::BlackBerrySetupWizardDevicePage(QWidget *parent) - : QWizardPage(parent), - m_ui(0) -{ - setTitle(tr("Configure BlackBerry Device Connection")); - - m_ui = new Ui::BlackBerrySetupWizardDevicePage; - m_ui->setupUi(this); - - m_ui->deviceName->setText(tr("BlackBerry Device")); - m_ui->ipAddress->setText(QLatin1String("169.254.0.1")); - - connect(m_ui->deviceName, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged())); - connect(m_ui->ipAddress, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged())); - connect(m_ui->password, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged())); - connect(m_ui->physicalDevice, SIGNAL(toggled(bool)), this, SIGNAL(completeChanged())); - - registerField(QLatin1String(NameField) + QLatin1Char('*'), m_ui->deviceName); - registerField(QLatin1String(IpAddressField) + QLatin1Char('*'), m_ui->ipAddress); - registerField(QLatin1String(PasswordField), m_ui->password); - registerField(QLatin1String(PhysicalDeviceField), m_ui->physicalDevice); -} - -bool BlackBerrySetupWizardDevicePage::isComplete() const -{ - if (m_ui->deviceName->text().isEmpty() || m_ui->ipAddress->text().isEmpty()) - return false; - - const bool passwordMandatory = m_ui->physicalDevice->isChecked(); - - if (passwordMandatory && m_ui->password->text().isEmpty()) - return false; - - return true; -} - -//----------------------------------------------------------------------------- - -BlackBerrySetupWizardFinishPage::BlackBerrySetupWizardFinishPage(QWidget *parent) - : QWizardPage(parent), - m_ui(0) -{ - setTitle(tr("Your environment is ready to be configured.")); - - m_ui = new Ui::BlackBerrySetupWizardFinishPage; - m_ui->setupUi(this); - setProgress(QString(), -1); -} - -void BlackBerrySetupWizardFinishPage::setProgress(const QString &status, int progress) -{ - if (progress < 0) { - m_ui->progressBar->hide(); - m_ui->statusLabel->clear(); - return; - } else if (!m_ui->progressBar->isVisible()) { - m_ui->progressBar->show(); - } - - m_ui->statusLabel->setText(status); - m_ui->progressBar->setValue(progress); -} diff --git a/src/plugins/qnx/blackberrysetupwizardpages.h b/src/plugins/qnx/blackberrysetupwizardpages.h deleted file mode 100644 index ae0065f436e..00000000000 --- a/src/plugins/qnx/blackberrysetupwizardpages.h +++ /dev/null @@ -1,165 +0,0 @@ -/************************************************************************** -** -** 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 - -namespace Utils { class PathChooser; } - -namespace Qnx { -namespace Internal { -namespace Ui { - -class BlackBerrySetupWizardKeysPage; -class BlackBerrySetupWizardDevicePage; -class BlackBerrySetupWizardCertificatePage; -class BlackBerrySetupWizardFinishPage; - -} // namespace Ui - -class BlackBerryCertificate; -class BlackBerryNDKSettingsWidget; - -class BlackBerrySetupWizardWelcomePage : public QWizardPage -{ - Q_OBJECT -public: - explicit BlackBerrySetupWizardWelcomePage(QWidget *parent = 0); -}; - -//----------------------------------------------------------------------------- - -class BlackBerrySetupWizardNdkPage : public QWizardPage -{ - Q_OBJECT -public: - explicit BlackBerrySetupWizardNdkPage(QWidget *parent = 0); - virtual ~BlackBerrySetupWizardNdkPage(); - - bool isComplete() const; - -signals: - void targetsUpdated(); - -private: - BlackBerryNDKSettingsWidget *m_widget; -}; - -//----------------------------------------------------------------------------- - -class BlackBerrySetupWizardKeysPage : public QWizardPage -{ - Q_OBJECT -public: - explicit BlackBerrySetupWizardKeysPage(QWidget *parent = 0); - virtual ~BlackBerrySetupWizardKeysPage(); - - bool isComplete() const; - -private slots: - void showKeysMessage(const QString &url); - -private: - void initUi(); - void setComplete(bool complete); - - Ui::BlackBerrySetupWizardKeysPage *m_ui; - bool m_complete; -}; - -//----------------------------------------------------------------------------- - -class BlackBerrySetupWizardCertificatePage : public QWizardPage -{ - Q_OBJECT -public: - static const char AuthorField[]; - static const char PasswordField[]; - static const char PasswordField2[]; - - explicit BlackBerrySetupWizardCertificatePage(QWidget *parent = 0); - - bool isComplete() const; - -private slots: - void validate(); - void checkBoxChanged(int state); - -private: - void setComplete(bool complete); - void initUi(); - - Ui::BlackBerrySetupWizardCertificatePage *m_ui; - - bool m_complete; -}; - -//----------------------------------------------------------------------------- - -class BlackBerrySetupWizardDevicePage : public QWizardPage -{ - Q_OBJECT -public: - static const char NameField[]; - static const char IpAddressField[]; - static const char PasswordField[]; - static const char PhysicalDeviceField[]; - - explicit BlackBerrySetupWizardDevicePage(QWidget *parent = 0); - - bool isComplete() const; - -private: - Ui::BlackBerrySetupWizardDevicePage *m_ui; -}; - -//----------------------------------------------------------------------------- - -class BlackBerrySetupWizardFinishPage : public QWizardPage -{ - Q_OBJECT -public: - explicit BlackBerrySetupWizardFinishPage(QWidget *parent = 0); - - void setProgress(const QString &status, int progress); - -private: - Ui::BlackBerrySetupWizardFinishPage *m_ui; -}; - -//----------------------------------------------------------------------------- - -} // namespace Internal -} // namespace Qnx - -#endif // QNX_INTERNAL_BLACKBERRYSETUPWIZARDPAGES_H diff --git a/src/plugins/qnx/qnx.pro b/src/plugins/qnx/qnx.pro index 877a4e81c11..6bffecb04a6 100644 --- a/src/plugins/qnx/qnx.pro +++ b/src/plugins/qnx/qnx.pro @@ -82,8 +82,6 @@ SOURCES += qnxplugin.cpp \ bardescriptoreditorenvironmentwidget.cpp \ bardescriptoreditorassetswidget.cpp \ bardescriptoreditorabstractpanelwidget.cpp \ - blackberrysetupwizard.cpp \ - blackberrysetupwizardpages.cpp \ blackberrysigningutils.cpp \ qnxdevicetester.cpp \ blackberryconfigurationmanager.cpp \ @@ -186,8 +184,6 @@ HEADERS += qnxplugin.h\ bardescriptoreditorenvironmentwidget.h \ bardescriptoreditorassetswidget.h \ bardescriptoreditorabstractpanelwidget.h \ - blackberrysetupwizard.h \ - blackberrysetupwizardpages.h \ blackberrysigningutils.h \ qnxdevicetester.h \ blackberryconfigurationmanager.h \ @@ -230,10 +226,6 @@ FORMS += \ bardescriptoreditorpermissionswidget.ui \ bardescriptoreditorenvironmentwidget.ui \ bardescriptoreditorassetswidget.ui \ - blackberrysetupwizardkeyspage.ui \ - blackberrysetupwizardcertificatepage.ui \ - blackberrysetupwizarddevicepage.ui \ - blackberrysetupwizardfinishpage.ui \ blackberrydeviceconfigurationwizardconfigpage.ui \ blackberrydeviceconfigurationwizardquerypage.ui \ blackberryinstallwizardtargetpage.ui \ diff --git a/src/plugins/qnx/qnx.qbs b/src/plugins/qnx/qnx.qbs index 58ab679db40..83d2b4fe649 100644 --- a/src/plugins/qnx/qnx.qbs +++ b/src/plugins/qnx/qnx.qbs @@ -188,14 +188,6 @@ QtcPlugin { "blackberryndkprocess.h", "blackberrysshkeysgenerator.cpp", "blackberrysshkeysgenerator.h", - "blackberrysetupwizard.cpp", - "blackberrysetupwizard.h", - "blackberrysetupwizardpages.cpp", - "blackberrysetupwizardpages.h", - "blackberrysetupwizardkeyspage.ui", - "blackberrysetupwizardcertificatepage.ui", - "blackberrysetupwizarddevicepage.ui", - "blackberrysetupwizardfinishpage.ui", "blackberrysigningutils.cpp", "blackberrysigningutils.h", "blackberryversionnumber.cpp",