Blackberry: Remove blackberry support

Keep QNX.

A short informal search did not turn up any more blackberry users,
even though there is interest in QNX. So this patch removes the
platform: We had no contact with the maintainers in months, there
are no changes going into the code for about as long.

I am not even aware of anybody testing the platform, so any
remaining users are probably better of with Qt Creator 3.2 or so
where the code was extensively tested.

Change-Id: Ibeda6bfd8565599918cfcc08fd01cb5ed8793dc2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-04-24 10:31:27 +02:00
parent b5090ddde4
commit 5b77a3a8c1
275 changed files with 504 additions and 27665 deletions

View File

@@ -32,14 +32,7 @@
#include "qnxplugin.h"
#include "blackberrydeviceconfigurationfactory.h"
#include "qnxconstants.h"
#include "blackberryqtversionfactory.h"
#include "blackberrydeployconfigurationfactory.h"
#include "blackberrycreatepackagestepfactory.h"
#include "blackberrydeploystepfactory.h"
#include "blackberryrunconfigurationfactory.h"
#include "blackberryruncontrolfactory.h"
#include "qnxattachdebugsupport.h"
#include "qnxdeviceconfigurationfactory.h"
#include "qnxruncontrolfactory.h"
@@ -47,21 +40,10 @@
#include "qnxdeployconfigurationfactory.h"
#include "qnxrunconfigurationfactory.h"
#include "qnxqtversionfactory.h"
#include "blackberrysetuppage.h"
#include "blackberryndksettingspage.h"
#include "qnxsettingspage.h"
#include "bardescriptoreditorfactory.h"
#include "blackberrykeyspage.h"
#include "blackberrycheckdevicestatusstepfactory.h"
#include "blackberrydeviceconnectionmanager.h"
#include "blackberryconfigurationmanager.h"
#include "qnxconfigurationmanager.h"
#include "blackberryapilevelconfiguration.h"
#include "cascadesimport/cascadesimportwizard.h"
#include "qnxtoolchain.h"
#include "qnxattachdebugsupport.h"
#include "blackberrypotentialkit.h"
#include "bardescriptorfilenodemanager.h"
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -73,7 +55,6 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/taskhub.h>
#include <projectexplorer/kitmanager.h>
#include <utils/mimetypes/mimedatabase.h>
#include <QAction>
#include <QtPlugin>
@@ -81,40 +62,14 @@
using namespace ProjectExplorer;
using namespace Qnx::Internal;
QnxPlugin::QnxPlugin()
: m_debugSeparator(0)
, m_attachToQnxApplication(0)
{
}
QnxPlugin::~QnxPlugin()
{
delete BlackBerryDeviceConnectionManager::instance();
}
QnxPlugin::QnxPlugin() : m_debugSeparator(0) , m_attachToQnxApplication(0)
{ }
bool QnxPlugin::initialize(const QStringList &arguments, QString *errorString)
{
Q_UNUSED(arguments)
Q_UNUSED(errorString)
// Handles BlackBerry
addAutoReleasedObject(new BlackBerryConfigurationManager);
addAutoReleasedObject(new BlackBerryQtVersionFactory);
addAutoReleasedObject(new BlackBerryDeployConfigurationFactory);
addAutoReleasedObject(new BlackBerryDeviceConfigurationFactory);
addAutoReleasedObject(new BlackBerryCreatePackageStepFactory);
addAutoReleasedObject(new BlackBerryDeployStepFactory);
addAutoReleasedObject(new BlackBerryRunConfigurationFactory);
addAutoReleasedObject(new BlackBerryRunControlFactory);
addAutoReleasedObject(new BlackBerrySetupPage);
addAutoReleasedObject(new BlackBerryNDKSettingsPage);
addAutoReleasedObject(new BlackBerryKeysPage);
addAutoReleasedObject(new BlackBerryCheckDeviceStatusStepFactory);
addAutoReleasedObject(new CascadesImportWizard);
addAutoReleasedObject(new BlackBerryPotentialKit);
addAutoReleasedObject(new BarDescriptorFileNodeManager);
BlackBerryDeviceConnectionManager::instance()->initialize();
// Handles QNX
addAutoReleasedObject(new QnxConfigurationManager);
addAutoReleasedObject(new QnxQtVersionFactory);
@@ -128,20 +83,11 @@ bool QnxPlugin::initialize(const QStringList &arguments, QString *errorString)
// Handle Qcc Compiler
addAutoReleasedObject(new QnxToolChainFactory);
Utils::MimeDatabase::addMimeTypes(QLatin1String(":qnx/Qnx.mimetypes.xml"));
addAutoReleasedObject(new BarDescriptorEditorFactory);
connect(KitManager::instance(), SIGNAL(kitsLoaded()),
BlackBerryConfigurationManager::instance(), SLOT(loadSettings()));
return true;
}
void QnxPlugin::extensionsInitialized()
{
TaskHub::addCategory(Constants::QNX_TASK_CATEGORY_BARDESCRIPTOR, tr("BAR Descriptor"));
// Debug support
QnxAttachDebugSupport *debugSupport = new QnxAttachDebugSupport(this);
@@ -179,345 +125,3 @@ void QnxPlugin::updateDebuggerActions()
m_attachToQnxApplication->setVisible(hasValidQnxKit);
m_debugSeparator->setVisible(hasValidQnxKit);
}
#ifdef WITH_TESTS
#include <QTest>
#include "bardescriptordocument.h"
void QnxPlugin::testBarDescriptorDocumentSetValue_data()
{
QTest::addColumn<BarDescriptorDocument::Tag>("tag");
QTest::addColumn<QVariant>("value");
QTest::addColumn<QString>("baseXml");
QTest::addColumn<QString>("xml");
QTest::addColumn<bool>("compareResultValue");
QTest::newRow("new-id") << BarDescriptorDocument::id
<< QVariant(QString::fromLatin1("my-application-id"))
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\"/>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <id>my-application-id</id>\n"
"</qnx>\n")
<< true;
QTest::newRow("changed-id") << BarDescriptorDocument::id
<< QVariant(QString::fromLatin1("my-application-id"))
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <id>some-application-id</id>\n"
"</qnx>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <id>my-application-id</id>\n"
"</qnx>\n")
<< true;
QTest::newRow("removed-id") << BarDescriptorDocument::id
<< QVariant(QString::fromLatin1(""))
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <id>some-application-id</id>\n"
"</qnx>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\"/>\n")
<< true;
QStringList splashScreens;
splashScreens << QLatin1String("image1.png")
<< QLatin1String("image2.png");
QTest::newRow("new-splashScreens") << BarDescriptorDocument::splashScreens
<< QVariant(splashScreens)
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\"/>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <splashScreens>\n"
" <image>image1.png</image>\n"
" <image>image2.png</image>\n"
" </splashScreens>\n"
"</qnx>\n")
<< true;
QTest::newRow("changed-splashScreens") << BarDescriptorDocument::splashScreens
<< QVariant(splashScreens)
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <splashScreens>\n"
" <image>image3.png</image>\n"
" <image>image4.png</image>\n"
" </splashScreens>\n"
"</qnx>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <splashScreens>\n"
" <image>image1.png</image>\n"
" <image>image2.png</image>\n"
" </splashScreens>\n"
"</qnx>\n")
<< true;
QTest::newRow("removed-splashScreens") << BarDescriptorDocument::splashScreens
<< QVariant(QStringList())
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <splashScreens>\n"
" <image>image1.png</image>\n"
" <image>image2.png</image>\n"
" </splashScreens>\n"
"</qnx>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\"/>\n")
<< true;
BarDescriptorAsset asset1;
asset1.source = QLatin1String("/path/to/file");
asset1.destination = QLatin1String("file");
asset1.entry = false;
BarDescriptorAsset asset2;
asset2.source = QLatin1String("/path/to/file2");
asset2.destination = QLatin1String("file2");
asset2.entry = false; // Cannot test "true", as "type" and "entry" attributes show up in seemingly arbitrary order
BarDescriptorAssetList assetList1;
assetList1 << asset1 << asset2;
QVariant assets;
assets.setValue(assetList1);
QTest::newRow("new-assets") << BarDescriptorDocument::asset
<< assets
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\"/>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <asset path=\"/path/to/file\">file</asset>\n"
" <asset path=\"/path/to/file2\">file2</asset>\n"
"</qnx>\n")
<< false;
asset2.destination = QLatin1String("file3");
BarDescriptorAssetList assetList2;
assetList2 << asset1 << asset2;
assets.setValue(assetList2);
QTest::newRow("changed-assets") << BarDescriptorDocument::asset
<< assets
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <asset path=\"/path/to/file\">file</asset>\n"
" <asset path=\"/path/to/file2\">file2</asset>\n"
"</qnx>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <asset path=\"/path/to/file\">file</asset>\n"
" <asset path=\"/path/to/file2\">file3</asset>\n"
"</qnx>\n")
<< false;
QTest::newRow("maintain-position") << BarDescriptorDocument::id
<< QVariant(QString::fromLatin1("my-application-id"))
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <asset path=\"/path/to/file\">file</asset>\n"
" <asset path=\"/path/to/file2\">file2</asset>\n"
" <id>some-application-id</id>\n"
" <splashScreens>\n"
" <image>image1.png</image>\n"
" <image>image2.png</image>\n"
" </splashScreens>\n"
"</qnx>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <asset path=\"/path/to/file\">file</asset>\n"
" <asset path=\"/path/to/file2\">file2</asset>\n"
" <id>my-application-id</id>\n"
" <splashScreens>\n"
" <image>image1.png</image>\n"
" <image>image2.png</image>\n"
" </splashScreens>\n"
"</qnx>\n")
<< true;
QTest::newRow("removed-icon") << BarDescriptorDocument::icon
<< QVariant(QString())
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\">\n"
" <icon>\n"
" <image>icon1.png</image>\n"
" </icon>\n"
"</qnx>\n")
<< QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n"
"<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\"/>\n")
<< true;
}
void QnxPlugin::testBarDescriptorDocumentSetValue()
{
QFETCH(BarDescriptorDocument::Tag, tag);
QFETCH(QVariant, value);
QFETCH(QString, baseXml);
QFETCH(QString, xml);
QFETCH(bool, compareResultValue);
BarDescriptorDocument doc;
doc.loadContent(baseXml, false);
QCOMPARE(doc.xmlSource(), baseXml);
doc.setValue(tag, value);
QCOMPARE(doc.xmlSource(), xml);
QCOMPARE(doc.isModified(), true);
if (compareResultValue)
QCOMPARE(doc.value(tag), value);
}
void QnxPlugin::testBarDescriptorDocumentSetBannerComment_data()
{
QTest::addColumn<QString>("comment");
QTest::addColumn<QString>("baseXml");
QTest::addColumn<QString>("xml");
QString procInstr = QString::fromLatin1("<?xml version='1.0' encoding='UTF-8' standalone='no'?>");
QString comment = QString::fromLatin1("This file is autogenerated, any change will be ...");
QString xmlComment = QString::fromLatin1("<!--%1-->").arg(comment);
QString oldXmlComment = QString::fromLatin1("<!-- Some old banner comment -->");
QString docRoot = QString::fromLatin1("<qnx xmlns=\"http://www.qnx.com/schemas/application/1.0\"/>");
QChar lf = QChar::fromLatin1('\n');
QTest::newRow("new-comment")
<< comment
<< QString(procInstr + lf + docRoot + lf)
<< QString(procInstr + lf + xmlComment + lf + docRoot + lf);
QTest::newRow("new-comment-noproc")
<< comment
<< QString(docRoot + lf)
<< QString(xmlComment + lf + docRoot + lf);
QTest::newRow("replace-comment")
<< comment
<< QString(procInstr + lf + oldXmlComment + lf + docRoot + lf)
<< QString(procInstr + lf + xmlComment + lf + docRoot + lf);
QTest::newRow("replace-comment-noproc")
<< comment
<< QString(oldXmlComment + lf + docRoot + lf)
<< QString(xmlComment + lf + docRoot + lf);
QTest::newRow("remove-comment")
<< QString()
<< QString(procInstr + lf + oldXmlComment + lf + docRoot + lf)
<< QString(procInstr + lf + docRoot + lf);
QTest::newRow("remove-comment-noproc")
<< QString()
<< QString(oldXmlComment + lf + docRoot + lf)
<< QString(docRoot + lf);
}
void QnxPlugin::testBarDescriptorDocumentSetBannerComment()
{
QFETCH(QString, comment);
QFETCH(QString, baseXml);
QFETCH(QString, xml);
BarDescriptorDocument doc;
doc.loadContent(baseXml, false);
QCOMPARE(doc.xmlSource(), baseXml);
doc.setBannerComment(comment);
QCOMPARE(doc.xmlSource(), xml);
QCOMPARE(doc.isModified(), true);
QCOMPARE(doc.bannerComment(), comment);
}
void QnxPlugin::testConfigurationManager_data()
{
const QLatin1String NDKEnvFileKey("NDKEnvFile");
const QLatin1String NDKPathKey("NDKPath");
const QLatin1String NDKDisplayNameKey("NDKDisplayName");
const QLatin1String NDKTargetKey("NDKTarget");
const QLatin1String NDKHostKey("NDKHost");
const QLatin1String NDKVersionKey("NDKVersion");
const QLatin1String NDKAutoDetectionSourceKey("NDKAutoDetectionSource");
const QLatin1String NDKAutoDetectedKey("NDKAutoDetectedKey");
QTest::addColumn<QVariantMap>("newerConfiguration");
QTest::addColumn<QVariantMap>("olderConfiguration");
QVariantMap newerConfiguration;
newerConfiguration.insert(NDKEnvFileKey, QLatin1String("bbndk-env.sh"));
newerConfiguration.insert(NDKPathKey, QLatin1String("NDKPath"));
newerConfiguration.insert(NDKDisplayNameKey, QLatin1String("NDKDisplayName"));
newerConfiguration.insert(NDKTargetKey, QLatin1String("NDKTarget"));
newerConfiguration.insert(NDKHostKey, QLatin1String("NDKHost"));
newerConfiguration.insert(NDKVersionKey, QLatin1String("10.1.0.1008"));
newerConfiguration.insert(NDKAutoDetectionSourceKey, QLatin1String("NDKAutoDetectionSource"));
newerConfiguration.insert(NDKAutoDetectedKey, QLatin1String("NDKAutoDetectedKey"));
QVariantMap olderConfiguration;
olderConfiguration.insert(NDKEnvFileKey, QLatin1String("bbndk-env2.sh"));
olderConfiguration.insert(NDKPathKey, QLatin1String("NDKPath"));
olderConfiguration.insert(NDKDisplayNameKey, QLatin1String("NDKDisplayName"));
olderConfiguration.insert(NDKTargetKey, QLatin1String("NDKTarget"));
olderConfiguration.insert(NDKHostKey, QLatin1String("NDKHost"));
newerConfiguration.insert(NDKVersionKey, QLatin1String("10.2.0.1008"));
olderConfiguration.insert(NDKAutoDetectionSourceKey, QLatin1String("NDKAutoDetectionSource"));
olderConfiguration.insert(NDKAutoDetectedKey, QLatin1String("NDKAutoDetectedKey"));
QTest::newRow("configurations") << newerConfiguration << olderConfiguration;;
}
void QnxPlugin::testConfigurationManager()
{
BlackBerryConfigurationManager *manager = BlackBerryConfigurationManager::instance();
manager->initUnitTest();
QCOMPARE(manager->apiLevels().count(), 0);
QCOMPARE(manager->activeApiLevels().count(), 0);
QCOMPARE(manager->defaultApiLevel(), static_cast<BlackBerryApiLevelConfiguration*>(0));
QVERIFY(manager->newestApiLevelEnabled());
QFETCH(QVariantMap, newerConfiguration);
QFETCH(QVariantMap, olderConfiguration);
BlackBerryApiLevelConfiguration::setFakeConfig(true);
BlackBerryApiLevelConfiguration *newerConfig =
new BlackBerryApiLevelConfiguration(newerConfiguration);
BlackBerryApiLevelConfiguration *oldConfig =
new BlackBerryApiLevelConfiguration(olderConfiguration);
QVERIFY(manager->addApiLevel(oldConfig));
QVERIFY(manager->newestApiLevelEnabled());
QCOMPARE(manager->defaultApiLevel(), oldConfig);
manager->setDefaultConfiguration(oldConfig);
QCOMPARE(manager->defaultApiLevel(), oldConfig);
QCOMPARE(manager->apiLevels().first(), oldConfig);
QVERIFY(!manager->newestApiLevelEnabled());
QVERIFY(manager->addApiLevel(newerConfig));
QCOMPARE(manager->apiLevels().first(), newerConfig);
QCOMPARE(manager->defaultApiLevel(), oldConfig);
manager->setDefaultConfiguration(0);
QVERIFY(manager->newestApiLevelEnabled());
QCOMPARE(manager->defaultApiLevel(), newerConfig);
manager->setDefaultConfiguration(oldConfig);
manager->removeApiLevel(oldConfig);
QCOMPARE(manager->defaultApiLevel(), newerConfig);
QVERIFY(manager->newestApiLevelEnabled());
manager->removeApiLevel(newerConfig);
QCOMPARE(manager->defaultApiLevel(), static_cast<BlackBerryApiLevelConfiguration*>(0));
QVERIFY(manager->newestApiLevelEnabled());
}
#endif