aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-04-24 10:31:27 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-04-30 11:15:53 +0000
commit5b77a3a8c1be4ab73793f22c50230875f06f3b0c (patch)
tree82650873676ee2058c4310f1ec1276aa4540638a
parentb5090ddde4235118802f6bcfb2588de41c7ed2a3 (diff)
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>
-rw-r--r--doc/images/qtcreator-blackberry-add-device.pngbin6523 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-apilevels.pngbin21128 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-createcertificatedialog.pngbin14462 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-deployQt.pngbin14484 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-device-debugToken.pngbin14891 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-device.pngbin40218 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-keys.pngbin20642 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-obtain-keys.pngbin18657 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-registered-certificate.pngbin15026 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-registered-keys.pngbin13846 -> 0 bytes
-rw-r--r--doc/images/qtcreator-blackberry-setupage.pngbin22986 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qnx-device-configurations-wizard-1.pngbin7843 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qnx-device-configurations-wizard-2.pngbin6411 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qnx-device-configurations.pngbin12384 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qnx-playbook-development-mode.pngbin29284 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qnx-playbook-storage-sharing.pngbin45194 -> 0 bytes
-rw-r--r--doc/src/android/deploying-android.qdoc2
-rw-r--r--doc/src/baremetal/creator-baremetal-dev.qdoc2
-rw-r--r--doc/src/howto/creator-ui.qdoc4
-rw-r--r--doc/src/linux-mobile/creator-deployment-embedded-linux.qdoc2
-rw-r--r--doc/src/linux-mobile/linuxdev.qdoc2
-rw-r--r--doc/src/overview/creator-deployment-overview.qdoc9
-rw-r--r--doc/src/overview/creator-mobile-targets.qdoc12
-rw-r--r--doc/src/overview/creator-target-platforms.qdocinc9
-rw-r--r--doc/src/projects/creator-projects-compilers.qdoc3
-rw-r--r--doc/src/projects/creator-projects-qt-versions.qdoc5
-rw-r--r--doc/src/projects/creator-projects-targets.qdoc2
-rw-r--r--doc/src/qnx/creator-deployment-bb10.qdoc90
-rw-r--r--doc/src/qnx/creator-developing-bb10.qdoc124
-rw-r--r--doc/src/qnx/creator-developing-qnx.qdoc84
-rw-r--r--doc/src/qnx/creator-key-management-qnx.qdocinc47
-rw-r--r--doc/src/qnx/creator-projects-running-qnx.qdocinc15
-rw-r--r--doc/src/qnx/creator-projects-settings-run-qnx.qdocinc9
-rw-r--r--doc/src/qtcreator.qdoc2
-rw-r--r--doc/src/qtquick/qtquick-creating.qdoc4
-rw-r--r--share/qtcreator/templates/wizards/bb-bardescriptor/bar-descriptor.xml23
-rw-r--r--share/qtcreator/templates/wizards/bb-bardescriptor/wizard.xml42
-rw-r--r--share/qtcreator/templates/wizards/bb-cascades-app/assets/main.qml13
-rw-r--r--share/qtcreator/templates/wizards/bb-cascades-app/bar-descriptor.xml25
-rw-r--r--share/qtcreator/templates/wizards/bb-cascades-app/icon.pngbin10801 -> 0 bytes
-rw-r--r--share/qtcreator/templates/wizards/bb-cascades-app/project.pro17
-rw-r--r--share/qtcreator/templates/wizards/bb-cascades-app/src/applicationui.cpp22
-rw-r--r--share/qtcreator/templates/wizards/bb-cascades-app/src/applicationui.h20
-rw-r--r--share/qtcreator/templates/wizards/bb-cascades-app/src/main.cpp19
-rw-r--r--share/qtcreator/templates/wizards/bb-cascades-app/wizard.xml51
-rw-r--r--share/qtcreator/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml21
-rw-r--r--share/qtcreator/templates/wizards/bb-qt5-bardescriptor/wizard.xml42
-rw-r--r--share/qtcreator/welcomescreen/qtcreator_tutorials.xml2
-rw-r--r--src/plugins/cmakeprojectmanager/generatorinfo.cpp3
-rw-r--r--src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp4
-rw-r--r--src/plugins/qnx/Qnx.json.in2
-rw-r--r--src/plugins/qnx/Qnx.mimetypes.xml11
-rw-r--r--src/plugins/qnx/bardescriptordocument.cpp690
-rw-r--r--src/plugins/qnx/bardescriptordocument.h152
-rw-r--r--src/plugins/qnx/bardescriptoreditor.cpp172
-rw-r--r--src/plugins/qnx/bardescriptoreditor.h88
-rw-r--r--src/plugins/qnx/bardescriptoreditorabstractpanelwidget.cpp132
-rw-r--r--src/plugins/qnx/bardescriptoreditorabstractpanelwidget.h85
-rw-r--r--src/plugins/qnx/bardescriptoreditorassetswidget.cpp206
-rw-r--r--src/plugins/qnx/bardescriptoreditorassetswidget.h86
-rw-r--r--src/plugins/qnx/bardescriptoreditorassetswidget.ui59
-rw-r--r--src/plugins/qnx/bardescriptoreditorauthorinformationwidget.cpp108
-rw-r--r--src/plugins/qnx/bardescriptoreditorauthorinformationwidget.h64
-rw-r--r--src/plugins/qnx/bardescriptoreditorauthorinformationwidget.ui48
-rw-r--r--src/plugins/qnx/bardescriptoreditorentrypointwidget.cpp309
-rw-r--r--src/plugins/qnx/bardescriptoreditorentrypointwidget.h106
-rw-r--r--src/plugins/qnx/bardescriptoreditorentrypointwidget.ui212
-rw-r--r--src/plugins/qnx/bardescriptoreditorenvironmentwidget.cpp75
-rw-r--r--src/plugins/qnx/bardescriptoreditorenvironmentwidget.h64
-rw-r--r--src/plugins/qnx/bardescriptoreditorenvironmentwidget.ui32
-rw-r--r--src/plugins/qnx/bardescriptoreditorfactory.cpp74
-rw-r--r--src/plugins/qnx/bardescriptoreditorfactory.h54
-rw-r--r--src/plugins/qnx/bardescriptoreditorgeneralwidget.cpp103
-rw-r--r--src/plugins/qnx/bardescriptoreditorgeneralwidget.h62
-rw-r--r--src/plugins/qnx/bardescriptoreditorgeneralwidget.ui58
-rw-r--r--src/plugins/qnx/bardescriptoreditorpackageinformationwidget.cpp57
-rw-r--r--src/plugins/qnx/bardescriptoreditorpackageinformationwidget.h59
-rw-r--r--src/plugins/qnx/bardescriptoreditorpackageinformationwidget.ui51
-rw-r--r--src/plugins/qnx/bardescriptoreditorpermissionswidget.cpp93
-rw-r--r--src/plugins/qnx/bardescriptoreditorpermissionswidget.h69
-rw-r--r--src/plugins/qnx/bardescriptoreditorpermissionswidget.ui62
-rw-r--r--src/plugins/qnx/bardescriptoreditorwidget.cpp237
-rw-r--r--src/plugins/qnx/bardescriptoreditorwidget.h104
-rw-r--r--src/plugins/qnx/bardescriptorfilenode.cpp49
-rw-r--r--src/plugins/qnx/bardescriptorfilenode.h52
-rw-r--r--src/plugins/qnx/bardescriptorfilenodemanager.cpp357
-rw-r--r--src/plugins/qnx/bardescriptorfilenodemanager.h86
-rw-r--r--src/plugins/qnx/bardescriptorpermissionsmodel.cpp208
-rw-r--r--src/plugins/qnx/bardescriptorpermissionsmodel.h95
-rw-r--r--src/plugins/qnx/blackberryabstractdeploystep.cpp253
-rw-r--r--src/plugins/qnx/blackberryabstractdeploystep.h109
-rw-r--r--src/plugins/qnx/blackberryapilevelconfiguration.cpp417
-rw-r--r--src/plugins/qnx/blackberryapilevelconfiguration.h110
-rw-r--r--src/plugins/qnx/blackberryapplicationrunner.cpp515
-rw-r--r--src/plugins/qnx/blackberryapplicationrunner.h152
-rw-r--r--src/plugins/qnx/blackberrycertificate.cpp194
-rw-r--r--src/plugins/qnx/blackberrycertificate.h95
-rw-r--r--src/plugins/qnx/blackberrycheckdevicestatusstep.cpp281
-rw-r--r--src/plugins/qnx/blackberrycheckdevicestatusstep.h94
-rw-r--r--src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.cpp74
-rw-r--r--src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.h64
-rw-r--r--src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.ui35
-rw-r--r--src/plugins/qnx/blackberrycheckdevicestatusstepfactory.cpp111
-rw-r--r--src/plugins/qnx/blackberrycheckdevicestatusstepfactory.h65
-rw-r--r--src/plugins/qnx/blackberryconfigurationmanager.cpp543
-rw-r--r--src/plugins/qnx/blackberryconfigurationmanager.h136
-rw-r--r--src/plugins/qnx/blackberrycreatecertificatedialog.cpp217
-rw-r--r--src/plugins/qnx/blackberrycreatecertificatedialog.h82
-rw-r--r--src/plugins/qnx/blackberrycreatecertificatedialog.ui112
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestep.cpp576
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestep.h128
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestepconfigwidget.cpp173
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestepconfigwidget.h77
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestepconfigwidget.ui296
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestepfactory.cpp119
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestepfactory.h66
-rw-r--r--src/plugins/qnx/blackberrydebugsupport.cpp104
-rw-r--r--src/plugins/qnx/blackberrydebugsupport.h80
-rw-r--r--src/plugins/qnx/blackberrydebugtokenpinsdialog.cpp174
-rw-r--r--src/plugins/qnx/blackberrydebugtokenpinsdialog.h80
-rw-r--r--src/plugins/qnx/blackberrydebugtokenpinsdialog.ui144
-rw-r--r--src/plugins/qnx/blackberrydebugtokenreader.cpp139
-rw-r--r--src/plugins/qnx/blackberrydebugtokenreader.h70
-rw-r--r--src/plugins/qnx/blackberrydebugtokenrequestdialog.cpp291
-rw-r--r--src/plugins/qnx/blackberrydebugtokenrequestdialog.h88
-rw-r--r--src/plugins/qnx/blackberrydebugtokenrequestdialog.ui99
-rw-r--r--src/plugins/qnx/blackberrydebugtokenrequester.cpp84
-rw-r--r--src/plugins/qnx/blackberrydebugtokenrequester.h65
-rw-r--r--src/plugins/qnx/blackberrydebugtokenuploader.cpp72
-rw-r--r--src/plugins/qnx/blackberrydebugtokenuploader.h68
-rw-r--r--src/plugins/qnx/blackberrydeployconfiguration.cpp97
-rw-r--r--src/plugins/qnx/blackberrydeployconfiguration.h74
-rw-r--r--src/plugins/qnx/blackberrydeployconfigurationfactory.cpp136
-rw-r--r--src/plugins/qnx/blackberrydeployconfigurationfactory.h69
-rw-r--r--src/plugins/qnx/blackberrydeployconfigurationwidget.cpp77
-rw-r--r--src/plugins/qnx/blackberrydeployconfigurationwidget.h62
-rw-r--r--src/plugins/qnx/blackberrydeployconfigurationwidget.ui41
-rw-r--r--src/plugins/qnx/blackberrydeployinformation.cpp322
-rw-r--r--src/plugins/qnx/blackberrydeployinformation.h126
-rw-r--r--src/plugins/qnx/blackberrydeploystep.cpp165
-rw-r--r--src/plugins/qnx/blackberrydeploystep.h69
-rw-r--r--src/plugins/qnx/blackberrydeploystepconfigwidget.cpp56
-rw-r--r--src/plugins/qnx/blackberrydeploystepconfigwidget.h56
-rw-r--r--src/plugins/qnx/blackberrydeploystepfactory.cpp112
-rw-r--r--src/plugins/qnx/blackberrydeploystepfactory.h66
-rw-r--r--src/plugins/qnx/blackberrydeviceconfiguration.cpp185
-rw-r--r--src/plugins/qnx/blackberrydeviceconfiguration.h87
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationfactory.cpp92
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationfactory.h62
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp296
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwidget.h97
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwidget.ui180
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwizard.cpp82
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwizard.h71
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwizardconfigpage.ui157
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp458
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwizardpages.h168
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwizardquerypage.ui47
-rw-r--r--src/plugins/qnx/blackberrydeviceconfigurationwizardsetuppage.ui52
-rw-r--r--src/plugins/qnx/blackberrydeviceconnection.cpp153
-rw-r--r--src/plugins/qnx/blackberrydeviceconnection.h92
-rw-r--r--src/plugins/qnx/blackberrydeviceconnectionmanager.cpp402
-rw-r--r--src/plugins/qnx/blackberrydeviceconnectionmanager.h111
-rw-r--r--src/plugins/qnx/blackberrydeviceinformation.cpp167
-rw-r--r--src/plugins/qnx/blackberrydeviceinformation.h92
-rw-r--r--src/plugins/qnx/blackberrydevicelistdetector.cpp100
-rw-r--r--src/plugins/qnx/blackberrydevicelistdetector.h70
-rw-r--r--src/plugins/qnx/blackberryimportcertificatedialog.cpp148
-rw-r--r--src/plugins/qnx/blackberryimportcertificatedialog.h83
-rw-r--r--src/plugins/qnx/blackberryimportcertificatedialog.ui70
-rw-r--r--src/plugins/qnx/blackberryinstallwizard.cpp94
-rw-r--r--src/plugins/qnx/blackberryinstallwizard.h109
-rw-r--r--src/plugins/qnx/blackberryinstallwizardndkpage.ui31
-rw-r--r--src/plugins/qnx/blackberryinstallwizardoptionpage.ui97
-rw-r--r--src/plugins/qnx/blackberryinstallwizardpages.cpp564
-rw-r--r--src/plugins/qnx/blackberryinstallwizardpages.h191
-rw-r--r--src/plugins/qnx/blackberryinstallwizardprocesspage.ui48
-rw-r--r--src/plugins/qnx/blackberryinstallwizardtargetpage.ui37
-rw-r--r--src/plugins/qnx/blackberrykeyspage.cpp73
-rw-r--r--src/plugins/qnx/blackberrykeyspage.h61
-rw-r--r--src/plugins/qnx/blackberrykeyswidget.cpp370
-rw-r--r--src/plugins/qnx/blackberrykeyswidget.h94
-rw-r--r--src/plugins/qnx/blackberrykeyswidget.ui254
-rw-r--r--src/plugins/qnx/blackberrylogprocessrunner.cpp101
-rw-r--r--src/plugins/qnx/blackberrylogprocessrunner.h79
-rw-r--r--src/plugins/qnx/blackberryndkprocess.cpp173
-rw-r--r--src/plugins/qnx/blackberryndkprocess.h98
-rw-r--r--src/plugins/qnx/blackberryndksettingspage.cpp85
-rw-r--r--src/plugins/qnx/blackberryndksettingspage.h61
-rw-r--r--src/plugins/qnx/blackberryndksettingswidget.cpp464
-rw-r--r--src/plugins/qnx/blackberryndksettingswidget.h107
-rw-r--r--src/plugins/qnx/blackberryndksettingswidget.ui227
-rw-r--r--src/plugins/qnx/blackberrypotentialkit.cpp120
-rw-r--r--src/plugins/qnx/blackberrypotentialkit.h63
-rw-r--r--src/plugins/qnx/blackberryprocessparser.cpp134
-rw-r--r--src/plugins/qnx/blackberryprocessparser.h70
-rw-r--r--src/plugins/qnx/blackberryqtversion.cpp168
-rw-r--r--src/plugins/qnx/blackberryqtversion.h77
-rw-r--r--src/plugins/qnx/blackberryqtversionfactory.cpp91
-rw-r--r--src/plugins/qnx/blackberryqtversionfactory.h61
-rw-r--r--src/plugins/qnx/blackberryrunconfiguration.cpp149
-rw-r--r--src/plugins/qnx/blackberryrunconfiguration.h94
-rw-r--r--src/plugins/qnx/blackberryrunconfigurationfactory.cpp154
-rw-r--r--src/plugins/qnx/blackberryrunconfigurationfactory.h71
-rw-r--r--src/plugins/qnx/blackberryrunconfigurationwidget.cpp61
-rw-r--r--src/plugins/qnx/blackberryrunconfigurationwidget.h65
-rw-r--r--src/plugins/qnx/blackberryrunconfigurationwidget.ui38
-rw-r--r--src/plugins/qnx/blackberryruncontrol.cpp76
-rw-r--r--src/plugins/qnx/blackberryruncontrol.h67
-rw-r--r--src/plugins/qnx/blackberryruncontrolfactory.cpp223
-rw-r--r--src/plugins/qnx/blackberryruncontrolfactory.h67
-rw-r--r--src/plugins/qnx/blackberryruntimeconfiguration.cpp96
-rw-r--r--src/plugins/qnx/blackberryruntimeconfiguration.h63
-rw-r--r--src/plugins/qnx/blackberrysetuppage.cpp68
-rw-r--r--src/plugins/qnx/blackberrysetuppage.h60
-rw-r--r--src/plugins/qnx/blackberrysetupwidget.cpp336
-rw-r--r--src/plugins/qnx/blackberrysetupwidget.h144
-rw-r--r--src/plugins/qnx/blackberrysetupwizardpages.cpp345
-rw-r--r--src/plugins/qnx/blackberrysigningpasswordsdialog.cpp69
-rw-r--r--src/plugins/qnx/blackberrysigningpasswordsdialog.h64
-rw-r--r--src/plugins/qnx/blackberrysigningpasswordsdialog.ui96
-rw-r--r--src/plugins/qnx/blackberrysigningutils.cpp285
-rw-r--r--src/plugins/qnx/blackberrysigningutils.h113
-rw-r--r--src/plugins/qnx/blackberrysshkeysgenerator.cpp72
-rw-r--r--src/plugins/qnx/blackberrysshkeysgenerator.h61
-rw-r--r--src/plugins/qnx/cascadesimport/bardescriptorconverter.cpp248
-rw-r--r--src/plugins/qnx/cascadesimport/bardescriptorconverter.h79
-rw-r--r--src/plugins/qnx/cascadesimport/cascadesimport.pri23
-rw-r--r--src/plugins/qnx/cascadesimport/cascadesimport.qrc5
-rw-r--r--src/plugins/qnx/cascadesimport/cascadesimportwizard.cpp282
-rw-r--r--src/plugins/qnx/cascadesimport/cascadesimportwizard.h89
-rw-r--r--src/plugins/qnx/cascadesimport/fileconverter.cpp100
-rw-r--r--src/plugins/qnx/cascadesimport/fileconverter.h84
-rw-r--r--src/plugins/qnx/cascadesimport/importlog.cpp153
-rw-r--r--src/plugins/qnx/cascadesimport/importlog.h73
-rw-r--r--src/plugins/qnx/cascadesimport/importlogconverter.cpp69
-rw-r--r--src/plugins/qnx/cascadesimport/importlogconverter.h52
-rw-r--r--src/plugins/qnx/cascadesimport/projectfileconverter.cpp195
-rw-r--r--src/plugins/qnx/cascadesimport/projectfileconverter.h59
-rw-r--r--src/plugins/qnx/cascadesimport/resources/templates/project.pro46
-rw-r--r--src/plugins/qnx/cascadesimport/srcprojectwizardpage.cpp120
-rw-r--r--src/plugins/qnx/cascadesimport/srcprojectwizardpage.h65
-rw-r--r--src/plugins/qnx/cascadesimport/srcprojectwizardpage.ui42
-rw-r--r--src/plugins/qnx/images/ok.pngbin220 -> 0 bytes
-rw-r--r--src/plugins/qnx/images/target-small.pngbin655 -> 0 bytes
-rw-r--r--src/plugins/qnx/images/target.pngbin10801 -> 0 bytes
-rw-r--r--src/plugins/qnx/qnx.pro179
-rw-r--r--src/plugins/qnx/qnx.qbs204
-rw-r--r--src/plugins/qnx/qnx.qrc4
-rw-r--r--src/plugins/qnx/qnx_dependencies.pri3
-rw-r--r--src/plugins/qnx/qnxabstractqtversion.cpp181
-rw-r--r--src/plugins/qnx/qnxabstractqtversion.h96
-rw-r--r--src/plugins/qnx/qnxbaseconfiguration.cpp227
-rw-r--r--src/plugins/qnx/qnxbaseconfiguration.h104
-rw-r--r--src/plugins/qnx/qnxbaseqtconfigwidget.cpp40
-rw-r--r--src/plugins/qnx/qnxbaseqtconfigwidget.h14
-rw-r--r--src/plugins/qnx/qnxbaseqtconfigwidget.ui36
-rw-r--r--src/plugins/qnx/qnxconfiguration.cpp203
-rw-r--r--src/plugins/qnx/qnxconfiguration.h55
-rw-r--r--src/plugins/qnx/qnxconstants.h68
-rw-r--r--src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp57
-rw-r--r--src/plugins/qnx/qnxdeployqtlibrariesdialog.h10
-rw-r--r--src/plugins/qnx/qnxdeviceconfiguration.cpp2
-rw-r--r--src/plugins/qnx/qnxdeviceprocesssignaloperation.cpp27
-rw-r--r--src/plugins/qnx/qnxdeviceprocesssignaloperation.h13
-rw-r--r--src/plugins/qnx/qnxplugin.cpp400
-rw-r--r--src/plugins/qnx/qnxplugin.h11
-rw-r--r--src/plugins/qnx/qnxqtversion.cpp161
-rw-r--r--src/plugins/qnx/qnxqtversion.h52
-rw-r--r--src/plugins/qnx/qnxqtversionfactory.cpp2
-rw-r--r--src/plugins/qnx/qnxsettingswidget.cpp9
-rw-r--r--src/plugins/qnx/qnxtoolchain.cpp14
-rw-r--r--src/plugins/qnx/qnxutils.cpp4
-rw-r--r--src/plugins/qnx/qnxutils.h4
-rw-r--r--src/tools/sdktool/README.txt2
275 files changed, 504 insertions, 27665 deletions
diff --git a/doc/images/qtcreator-blackberry-add-device.png b/doc/images/qtcreator-blackberry-add-device.png
deleted file mode 100644
index 8e901d4d53..0000000000
--- a/doc/images/qtcreator-blackberry-add-device.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-apilevels.png b/doc/images/qtcreator-blackberry-apilevels.png
deleted file mode 100644
index d549a3381c..0000000000
--- a/doc/images/qtcreator-blackberry-apilevels.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-createcertificatedialog.png b/doc/images/qtcreator-blackberry-createcertificatedialog.png
deleted file mode 100644
index c46c94e353..0000000000
--- a/doc/images/qtcreator-blackberry-createcertificatedialog.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-deployQt.png b/doc/images/qtcreator-blackberry-deployQt.png
deleted file mode 100644
index 2bbad7e9c5..0000000000
--- a/doc/images/qtcreator-blackberry-deployQt.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-device-debugToken.png b/doc/images/qtcreator-blackberry-device-debugToken.png
deleted file mode 100644
index 2d2b7ca204..0000000000
--- a/doc/images/qtcreator-blackberry-device-debugToken.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-device.png b/doc/images/qtcreator-blackberry-device.png
deleted file mode 100644
index cc5f37668f..0000000000
--- a/doc/images/qtcreator-blackberry-device.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-keys.png b/doc/images/qtcreator-blackberry-keys.png
deleted file mode 100644
index b372670619..0000000000
--- a/doc/images/qtcreator-blackberry-keys.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-obtain-keys.png b/doc/images/qtcreator-blackberry-obtain-keys.png
deleted file mode 100644
index 6341c7d9b0..0000000000
--- a/doc/images/qtcreator-blackberry-obtain-keys.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-registered-certificate.png b/doc/images/qtcreator-blackberry-registered-certificate.png
deleted file mode 100644
index 332c327771..0000000000
--- a/doc/images/qtcreator-blackberry-registered-certificate.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-registered-keys.png b/doc/images/qtcreator-blackberry-registered-keys.png
deleted file mode 100644
index c1657a0843..0000000000
--- a/doc/images/qtcreator-blackberry-registered-keys.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-blackberry-setupage.png b/doc/images/qtcreator-blackberry-setupage.png
deleted file mode 100644
index 8659574fdd..0000000000
--- a/doc/images/qtcreator-blackberry-setupage.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qnx-device-configurations-wizard-1.png b/doc/images/qtcreator-qnx-device-configurations-wizard-1.png
deleted file mode 100644
index 90821bbbe3..0000000000
--- a/doc/images/qtcreator-qnx-device-configurations-wizard-1.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qnx-device-configurations-wizard-2.png b/doc/images/qtcreator-qnx-device-configurations-wizard-2.png
deleted file mode 100644
index 79e9564aae..0000000000
--- a/doc/images/qtcreator-qnx-device-configurations-wizard-2.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qnx-device-configurations.png b/doc/images/qtcreator-qnx-device-configurations.png
deleted file mode 100644
index b3c982a5f0..0000000000
--- a/doc/images/qtcreator-qnx-device-configurations.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qnx-playbook-development-mode.png b/doc/images/qtcreator-qnx-playbook-development-mode.png
deleted file mode 100644
index c1e381fc7f..0000000000
--- a/doc/images/qtcreator-qnx-playbook-development-mode.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qnx-playbook-storage-sharing.png b/doc/images/qtcreator-qnx-playbook-storage-sharing.png
deleted file mode 100644
index 7e7de5b99e..0000000000
--- a/doc/images/qtcreator-qnx-playbook-storage-sharing.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/android/deploying-android.qdoc b/doc/src/android/deploying-android.qdoc
index 7424afb913..eba5418398 100644
--- a/doc/src/android/deploying-android.qdoc
+++ b/doc/src/android/deploying-android.qdoc
@@ -21,7 +21,7 @@
\contentspage {Qt Creator Manual}
\previouspage creator-deployment.html
\page creator-deploying-android.html
- \nextpage creator-deployment-bb10.html
+ \nextpage creator-deployment-embedded-linux.html
\title Deploying Applications to Android Devices
diff --git a/doc/src/baremetal/creator-baremetal-dev.qdoc b/doc/src/baremetal/creator-baremetal-dev.qdoc
index e54ec80375..569c9c28a4 100644
--- a/doc/src/baremetal/creator-baremetal-dev.qdoc
+++ b/doc/src/baremetal/creator-baremetal-dev.qdoc
@@ -21,7 +21,7 @@
\contentspage {Qt Creator Manual}
\previouspage creator-developing-android.html
\page creator-developing-baremetal.html
- \nextpage creator-developing-bb10.html
+ \nextpage creator-developing-generic-linux.html
\title Connecting Bare Metal Devices
diff --git a/doc/src/howto/creator-ui.qdoc b/doc/src/howto/creator-ui.qdoc
index 284c1892ee..f9abf918a0 100644
--- a/doc/src/howto/creator-ui.qdoc
+++ b/doc/src/howto/creator-ui.qdoc
@@ -371,10 +371,6 @@
\li \uicontrol Analyzer - Errors encountered while running the
\l{Analyzing Code}{Valgrind code analysis tools}.
- \li \uicontrol {BAR Descriptor} - Errors and warnings encountered when using
- the BlackBerry 10 BAR descriptor editor to customize the appearance
- and behavior of an application.
-
\li \uicontrol {Build System} - Errors and warnings encountered during a
build.
diff --git a/doc/src/linux-mobile/creator-deployment-embedded-linux.qdoc b/doc/src/linux-mobile/creator-deployment-embedded-linux.qdoc
index d1fe7959ba..3c917ce051 100644
--- a/doc/src/linux-mobile/creator-deployment-embedded-linux.qdoc
+++ b/doc/src/linux-mobile/creator-deployment-embedded-linux.qdoc
@@ -24,7 +24,7 @@
/*!
\contentspage {Qt Creator Manual}
- \previouspage creator-deployment-bb10.html
+ \previouspage creator-deploying-android.html
\page creator-deployment-embedded-linux.html
\nextpage creator-deployment-qnx.html
diff --git a/doc/src/linux-mobile/linuxdev.qdoc b/doc/src/linux-mobile/linuxdev.qdoc
index 2a8c88a379..b6853f43eb 100644
--- a/doc/src/linux-mobile/linuxdev.qdoc
+++ b/doc/src/linux-mobile/linuxdev.qdoc
@@ -19,7 +19,7 @@
/*!
\contentspage {Qt Creator Manual}
- \previouspage creator-developing-bb10.html
+ \previouspage creator-developing-baremetal.html
\page creator-developing-generic-linux.html
\nextpage creator-developing-ios.html
diff --git a/doc/src/overview/creator-deployment-overview.qdoc b/doc/src/overview/creator-deployment-overview.qdoc
index a9a2bb117f..39c230ebe3 100644
--- a/doc/src/overview/creator-deployment-overview.qdoc
+++ b/doc/src/overview/creator-deployment-overview.qdoc
@@ -42,11 +42,6 @@
When you deploy the application to an Android device, \QC copies
the application files to the device. In addition, you can determine
the Qt libraries to use.
- \li \l{Deploying Applications to BlackBerry 10 Devices}
-
- When you deploy the application to a BlackBerry 10 device, \QC generates a
- BAR package in the build directory and deploys it to the connected
- device.
\li \l{Deploying Applications to Embedded Linux Devices}
When you deploy the application to a generic Linux-based device, \QC
@@ -54,9 +49,7 @@
can test and debug the application on the device.
\li \l{Deploying Applications to QNX Neutrino Devices}
- When you deploy the application to a BlackBerry, \QC generates a
- BAR package in the build directory and deploys it to the connected
- device. When you deploy it to a QNX Neutrino device, \QC copies
+ When you deploy the application to a QNX Neutrino device, \QC copies
the application files to the connected device. You can test and
debug the application on the device.
\endlist
diff --git a/doc/src/overview/creator-mobile-targets.qdoc b/doc/src/overview/creator-mobile-targets.qdoc
index b4d1864a85..b5ee7402e0 100644
--- a/doc/src/overview/creator-mobile-targets.qdoc
+++ b/doc/src/overview/creator-mobile-targets.qdoc
@@ -56,13 +56,6 @@
You can connect bare metal devices to the development PC and use \QC
to debug applications on them with GDB or a hardware debugger.
- \li \l{Connecting BlackBerry 10 Devices}
-
- \QC enables you to develop, deploy and debug your Qt applications
- to BlackBerry 10.
- You need to install the BlackBerry 10 NDK which contains a pre-built Qt.
- You also need either a BlackBerry 10 device or the simulator.
-
\li \l{Connecting Embedded Linux Devices}
If you have a tool chain for building applications for embedded
@@ -79,9 +72,8 @@
You can connect QNX devices to the development PC to deploy, run and
debug applications on them from within \QC. This is currently only
- supported for BlackBerry Playbook and QNX Neutrino devices, and
- requires the BlackBerry NDK or the QNX SDK to be installed on the
- development PC.
+ supported for QNX Neutrino devices, and requires the QNX SDK to be
+ installed on the development PC.
\li \l{Connecting Windows Runtime Devices}
diff --git a/doc/src/overview/creator-target-platforms.qdocinc b/doc/src/overview/creator-target-platforms.qdocinc
index c843403f71..777493761d 100644
--- a/doc/src/overview/creator-target-platforms.qdocinc
+++ b/doc/src/overview/creator-target-platforms.qdocinc
@@ -8,8 +8,6 @@
\li Android
- \li BlackBerry 10
-
\li Generic remote Linux
\li iOS
@@ -37,11 +35,6 @@
\li \image ok
\li \image ok
\li \image ok
- \row
- \li BlackBerry 10
- \li \image ok
- \li \image ok
- \li \image ok
\row
\li Generic Remote Linux
\li \image ok
@@ -70,3 +63,5 @@
\note Madde support has been removed from \QC 3.0. To develop for Maemo or Harmattan,
use \QC 2.8.
+ \note BlackBerry 10 support has been removed from \QC 3.5. Use \QC 3.4 instead.
+
diff --git a/doc/src/projects/creator-projects-compilers.qdoc b/doc/src/projects/creator-projects-compilers.qdoc
index 6b6acc280c..13d894d7ea 100644
--- a/doc/src/projects/creator-projects-compilers.qdoc
+++ b/doc/src/projects/creator-projects-compilers.qdoc
@@ -65,8 +65,7 @@
to the directory where the compiler is located and select
the application binary interface (ABI) version from the list of available
versions. You can also create a custom ABI definition.
- For QCC, also specify the path to the BlackBerry NDK or the QNX Software
- Development Platform (SDP).
+ For QCC, also specify the path to the QNX Software Development Platform (SDP).
You specify the compiler to use for each kit in \uicontrol Tools >
\uicontrol Options > \uicontrol {Build & Run} > \uicontrol Kits.
diff --git a/doc/src/projects/creator-projects-qt-versions.qdoc b/doc/src/projects/creator-projects-qt-versions.qdoc
index 7aa21822ac..97ba9ed5b9 100644
--- a/doc/src/projects/creator-projects-qt-versions.qdoc
+++ b/doc/src/projects/creator-projects-qt-versions.qdoc
@@ -72,9 +72,8 @@
\image qt-creator-debugging-helpers.png
- \li If the Qt version is for Blackberry or QNX, enter the path
- to your installed Blackberry NDK or QNX SDK in the
- \uicontrol {Blackberry Native SDK} or \uicontrol{QNX SDK} field respectively.
+ \li If the Qt version is for QNX, enter the path to your installed QNX SDK in the
+ \uicontrol{QNX SDK} field.
\endlist
diff --git a/doc/src/projects/creator-projects-targets.qdoc b/doc/src/projects/creator-projects-targets.qdoc
index 5fbd98326c..4d0aec00c5 100644
--- a/doc/src/projects/creator-projects-targets.qdoc
+++ b/doc/src/projects/creator-projects-targets.qdoc
@@ -46,8 +46,6 @@
\li Bare Metal Device
- \li BlackBerry 10 Device
-
\li Generic Linux Device
\li iOS Device
diff --git a/doc/src/qnx/creator-deployment-bb10.qdoc b/doc/src/qnx/creator-deployment-bb10.qdoc
deleted file mode 100644
index 224aa40ec4..0000000000
--- a/doc/src/qnx/creator-deployment-bb10.qdoc
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (C) 2011 - 2014 Research In Motion
-**
-** Contact: Research In Motion (blackberry-qt@qnx.com)
-** Contact: KDAB (info@kdab.com)
-**
-**
-** GNU Free Documentation License
-**
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of this
-** file.
-**
-**
-****************************************************************************/
-
-// **********************************************************************
-// NOTE: the sections are not ordered by their logical order to avoid
-// reshuffling the file each time the index order changes (i.e., often).
-// Run the fixnavi.pl script to adjust the links to the index order.
-// **********************************************************************
-
-/*!
- \contentspage {Qt Creator Manual}
- \previouspage creator-deploying-android.html
- \page creator-deployment-bb10.html
- \nextpage creator-deployment-embedded-linux.html
-
- \title Deploying Applications to BlackBerry 10 Devices
-
- To deploy Qt applications to BlackBerry 10 devices:
-
- \list 1
- \li Select \uicontrol File > \uicontrol {New File or Project}
- > \uicontrol {Application} to create a
- \uicontrol {Qt Quick Application}, \uicontrol {Qt Widgets
- Application}, or \uicontrol {BlackBerry Cascades Application}.
- \li Select a BlackBerry 10 \l{glossary-buildandrun-kit}{kit} for either device or simulator. For more information about adding kits, see \l{Connecting BlackBerry 10 Devices}.
- \li When \QC prompts you to generate a BAR descriptor file, answer
- \uicontrol Yes to generate the file and enable the packaging
- process.
- \li You can use the BAR descriptor editor to customize the appearance and behavior of the application.
- \li You can specify which Qt libraries your application should link to
- in the \uicontrol {Create Packages} deployment step,
- \uicontrol {Package in development mode} option, if you create a
- package in development mode:
- \list
- \li Select \uicontrol {Use Pre-installed Qt} to use Qt libraries
- shipped with the device.
- \li Select \uicontrol{Bundle Qt in Package} to package and use the
- Qt version from the active BlackBerry kit.
- This will significantly increase the size of your package.
- \li To use a deployed Qt version in the device, select
- \uicontrol{Use Deployed Qt} and set the path under
- /accounts/devuser/ where Qt is deployed. To deploy a Qt version
- select \uicontrol {Deploy Now}.
- \image qtcreator-blackberry-deployQt.png "Use deployed Qt."
- \endlist
- \endlist
-
- The BAR application descriptor file in your project will serve as a template to generate the actual BAR application descriptor file in the build directory
- that is used for packaging. The final BAR application descriptor file
- depends on the options you specify in the \uicontrol {Create Packages}
- deployment step.
-
- If you have an existing Cascades project created by QNX Momentics IDE, you can import it to \QC:
-
- \list 1
- \li Select \uicontrol File > \uicontrol {New File or Project} >
- \uicontrol {Import Project} > \uicontrol {Momentics Cascades
- Project} > \uicontrol Choose.
- \li Specify an existing Cascades project created by QNX Momentics IDE.
- \li Specify a location for the newly created \QC project.
- \endlist
-
- A project import report is generated into import.log file located in your project.
-
- \note \uicontrol {BlackBerry Cascades Application} and \uicontrol {Momentics
- Cascades Project} projects are available in the \uicontrol {All Templates}
- filter, so you need to set this filter in the top-right corner of the
- \uicontrol {New} dialog to enable those templates.
-
- \note Currently, the BlackBerry 10 devices and Simulator have Qt 4.8 libraries preinstalled. To use Qt 5 features, you must compile the Qt libraries for BlackBerry 10 yourself. For more information, see \l {http://wiki.qt.io/Building_Qt5_for_Blackberry}{Building Qt5 for BlackBerry}.
-
- For more details please refer to the Qt-Project wiki page: \l {http://wiki.qt.io/BlackBerry}{Qt for BlackBerry}.
-*/
diff --git a/doc/src/qnx/creator-developing-bb10.qdoc b/doc/src/qnx/creator-developing-bb10.qdoc
deleted file mode 100644
index d7b347d247..0000000000
--- a/doc/src/qnx/creator-developing-bb10.qdoc
+++ /dev/null
@@ -1,124 +0,0 @@
-/****************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (C) 2011 - 2014 Research In Motion
-**
-** Contact: Research In Motion (blackberry-qt@qnx.com)
-** Contact: KDAB (info@kdab.com)
-**
-**
-** GNU Free Documentation License
-**
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of this
-** file.
-**
-**
-****************************************************************************/
-
-/*!
- \contentspage {Qt Creator Manual}
- \previouspage creator-developing-baremetal.html
- \page creator-developing-bb10.html
- \nextpage creator-developing-generic-linux.html
-
- \title Connecting BlackBerry 10 Devices
-
- \QC provides a plugin that enables you to develop for QNX and BlackBerry 10 platforms.
- This page explains the basic steps to develop for BlackBerry 10 using \QC.
-
- The native BlackBerry 10 NDK includes Qt 4 (4.8.4 or newer) for both simulator (x86) and device (arm) targets available for development. Compared with the development for the PlayBook, Qt libraries are integrated in the BlackBerry 10 device firmware and can be used by Qt applications as shared libraries.
-
- Before starting to develop for BlackBerry 10 you need to download the following tools:
-
- \list
- \li \l {http://developer.blackberry.com/native/download/} {QNX Momentics IDE} - it is recommend to download the latest version to enable all \QC features
- \li \l {http://developer.blackberry.com/native/download/} {BlackBerry 10 Simulator} if you do not have a BlackBerry 10 device
- \li BlackBerry code signing keys (https://www.blackberry.com/SignedKeys/)
- \endlist
-
-
- \section1 Setting Up BlackBerry 10 Environment in Qt Creator
-
- To check your BlackBerry 10 configuration, including the API level, the
- Signing Keys and the Device registration, select \uicontrol Tools >
- \uicontrol Options > \uicontrol BlackBerry > \uicontrol Setup.
-
- \image qtcreator-blackberry-setupage.png "BlackBerry setup page"
-
- \list 1
-
- \li Set up API Levels:
-
- \list 1
- \li Select \uicontrol Tools > \uicontrol Options > \uicontrol BlackBerry >
- \uicontrol {API Levels and Runtimes} to list all registered API Levels automatically
- detected by \QC.
- \image qtcreator-blackberry-apilevels.png "BlackBerry API leves and Runtimes page"
- \li The API Levels printed with a bold font are active. Use
- \uicontrol Activate and \uicontrol Deactivate to change it. When
- an API Level is active, \QC registers kits, Qt versions, tool
- chains, and debuggers to enable BlackBerry 10 development
- against the API Level.
- \li Use \uicontrol Add to install a new API Level or to register an
- existing one.
- \li It is recommended to keep the newest version as the default API level. \QC will use the available BlackBerry tools from the default API level to implement several of the plugin functions including device management, deployment process and the BlackBerry Signing Keys support. Some of those functions require 10.2 version or newer.
- \endlist
-
- \li Set up your Signing Keys:
-
- \list 1
- \li Select \uicontrol Tools > \uicontrol Options >
- \uicontrol BlackBerry > \uicontrol Keys.
- \li Register a BlackBerry Signing Authority - if you do not have any, the page will guide you to an online web form to request one.
- \li Select \uicontrol {Create Certificate} to create a Developer
- Certificate.
- \li To package your application in development mode, select
- \uicontrol Request to request a debug token or
- \uicontrol Import to import a valid token.
- \image qtcreator-blackberry-keys.png "BlackBerry Keys page"
- You can also access the debug token list in \uicontrol Tools >
- \uicontrol Options > \uicontrol Devices when you register a
- BlackBerry device. To use the same debug token for different
- devices, select \uicontrol{Edit} to add, remove or update the debug
- token's device PINs.
- \endlist
-
-
- \li Register your device:
-
- \list 1
- \li On the device, select \uicontrol Settings >
- \uicontrol {Security and Privacy} > \uicontrol {Development Mode}
- to switch the BlackBerry 10 device to development mode.
- \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Devices
- > \uicontrol Add > \uicontrol {Blackberry Device} to add a
- BlackBerry Device. \QC should auto detect your BlackBerry device
- if the default API level is set to 10.2 or newer.
- \li In the \uicontrol {Device password} field, enter the device
- password. \QC will query information from the device.
- \image qtcreator-blackberry-add-device.png "BlackBerry Device Wizard"
- \li Select \uicontrol Import to import a valid debug token for the
- device or \uicontrol Request to request a new token.
- \image qtcreator-blackberry-device-debugToken.png "BlackBerry Device debug token"
- \li If your device is successfully added, it should be listed in
- \uicontrol Tools > \uicontrol Options > \uicontrol {Devices}.
- \image qtcreator-blackberry-device.png "BlackBerry Device Configuration page"
- \li Select \uicontrol Upload to upload your debug token to the
- device.
- \li Select \uicontrol {Connect to device} to connect to the device.
- You should close any other pending connections from a shell or
- other IDE to successfully connect your device in \QC.
- \li Select \uicontrol Tools > \uicontrol Options >
- \uicontrol {Build & Run} > \uicontrol Kits to add your device to
- compatible BlackBerry 10 kits.
- \endlist
-
- \endlist
-
- \include qnx/creator-key-management-qnx.qdocinc
-
- For more details please refer to the Qt-Project wiki page: \l {http://wiki.qt.io/BlackBerry}{Qt for BlackBerry}.
-*/
diff --git a/doc/src/qnx/creator-developing-qnx.qdoc b/doc/src/qnx/creator-developing-qnx.qdoc
index c249dfa5e5..e20d5ca20d 100644
--- a/doc/src/qnx/creator-developing-qnx.qdoc
+++ b/doc/src/qnx/creator-developing-qnx.qdoc
@@ -29,90 +29,6 @@
You can connect QNX devices to the development PC to deploy, run and debug
applications on them from within \QC.
- \section1 Setting Up Connectivity on Playbook
-
- In order to deploy applications to the Playbook, you will need to enable
- Development Mode on the device and upload a debug token to it.
-
- Enabling Development Mode is done by sliding top-down on the Playbook,
- thereby opening the \uicontrol{Preferences}. Now go to \uicontrol{Security >
- Development Mode} and set \uicontrol{Use Development Mode} to \uicontrol{ON}. Enter the
- device password when asked to do so.
-
- \image qtcreator-qnx-playbook-development-mode.png
-
- \section2 USB Access
-
- The \uicontrol{Development Address} shown in the \uicontrol{Development Mode} settings
- is the IP address to use when you are connecting the device with a USB
- cable to the development PC. If you are deploying over a Wi-Fi network, you
- should use the IP address shown in \uicontrol{Preferences > About > Network}.
-
- To enable access over USB, change \uicontrol{Preferences > Storage & Sharing >
- USB Connections} to \uicontrol{Connect to Windows} if you are deploying from
- Windows, or \uicontrol{Connect to Mac} if you are deploying from Linux or OS X.
-
- \image qtcreator-qnx-playbook-storage-sharing.png
-
- \section2 Debug Token
-
- If you are using a physical device, you will have to upload a debug token to
- the device. The simulator does not require any debug token.
-
- \section3 Create a Debug Token
-
- You can create the debug token either in QNX Momentics or from the command
- line. There is currently no support for creating the debug token from
- within \QC.
-
- From the command line:
- \c{blackberry-debugtokenrequest -storepass <pass> -devicepin <your PB pin> debugtoken.bar}
-
- \section3 Install Debug Token on Playbook
-
- You can install the debug token on the Playbook either in QNX Momentics or
- from the command line. There is currently no support for installing the
- debug token from within \QC.
-
- From the command line:
- \c{blackberry-nativepackage -installDebugToken ~/.rim/debugtoken.bar -device <device_ip> [-password <device_pass>]}
-
- \section1 Adding a BlackBerry Device in \QC
-
- Adding a BlackBerry device is done using a wizard in the \uicontrol{Device
- Configurations} options. To launch it, go to \uicontrol Tools > \uicontrol Options >
- \uicontrol Devices > \uicontrol Add > \uicontrol {BlackBerry Device} > \uicontrol {Start Wizard}.
-
- \image qtcreator-qnx-device-configurations-wizard-1.png "Connection details"
-
- \list
- \li In the \uicontrol{The name to identify this configuration} field, enter a
- name for the device.
- \li In the \uicontrol{The device's host name or IP address} field, enter the
- host name or IP address of the device.
- \li In the \uicontrol{Device password} field, enter the password for the device.
- \li In the \uicontrol{Device type} field, select whether it is a \uicontrol{Physical
- device} or a \uicontrol{Simulator} you are connecting to.
- \li In the \uicontrol{Debug token} field, enter the path to the debug token
- that is also installed on the device. This is only necessary if you are
- connecting to a \uicontrol{Physical device}.
- \li Click \uicontrol{Next} to continue.
- \endlist
-
- \image qtcreator-qnx-device-configurations-wizard-2.png "SSH Key Setup"
-
- For the \uicontrol{SSH Key Setup}, you can either select an existing \b{4096}-bit
- key, or click \uicontrol{Generate} to create a new key. The generated key will be
- stored next to the \QC settings, in a \b{qnx} sub-directory.
-
- Click \uicontrol{Next} and then \uicontrol{Finish} to complete setting up the device
- connection.
-
- Once the device is added, you can edit the settings directly in \uicontrol Tools >
- \uicontrol Options > \uicontrol Devices.
-
- \image qtcreator-qnx-device-configurations.png "Devices"
-
\section1 Adding a QNX Neutrino Device in \QC
Adding a QNX Neutrino device is very similar to \l{Connecting Embedded
diff --git a/doc/src/qnx/creator-key-management-qnx.qdocinc b/doc/src/qnx/creator-key-management-qnx.qdocinc
deleted file mode 100644
index 7aeec07ea6..0000000000
--- a/doc/src/qnx/creator-key-management-qnx.qdocinc
+++ /dev/null
@@ -1,47 +0,0 @@
- \section2 Obtaining New Keys
-
- To request keys from the BlackBerry Signing Authority, select
- \uicontrol Tools > \uicontrol Options > \uicontrol BlackBerry >
- \uicontrol Keys > \uicontrol Register.
- Then select the \uicontrol {BlackBerry website} link, and follow the
- instructions.
-
- \image qtcreator-blackberry-obtain-keys.png "Requesting new keys"
-
- \section2 Registering Newly Obtained Keys
-
- After you register in the BlackBerry website, you should get a bbidtoken.csk
- file. Once you store it at the proper location as described in the email,
- you can check that signing keys are registered in \QC by selecting
- \uicontrol Tools > \uicontrol Options > \uicontrol BlackBerry >
- \uicontrol Keys.
-
- \image qtcreator-blackberry-registered-keys.png "Registered keys"
-
- \section2 Creating a New Certificate
-
- To create a new developer certificate, click the
- \uicontrol {Create Certificate} button to open the
- \uicontrol {Create Certificate} dialog.
-
- \image qtcreator-blackberry-createcertificatedialog.png "Create Certificate dialog"
-
- The fields you will need to fill in are:
-
- \list
-
- \li Author
-
- The author, or owner of the certificate.
-
- \li Password
-
- The password which will be used to unlock the certificate from
- they keystore.
-
- \endlist
-
- After filling in these fields, click \uicontrol OK and the certificate
- will be created and registered in \QC.
-
- \image qtcreator-blackberry-registered-certificate.png "Registered certificate"
diff --git a/doc/src/qnx/creator-projects-running-qnx.qdocinc b/doc/src/qnx/creator-projects-running-qnx.qdocinc
index 6b7f122e38..5b99ac9497 100644
--- a/doc/src/qnx/creator-projects-running-qnx.qdocinc
+++ b/doc/src/qnx/creator-projects-running-qnx.qdocinc
@@ -7,10 +7,7 @@
\li Configure the device and specify a connection to it. For more
information, see \l{Connecting QNX Devices}.
- \li If you are running on a BlackBerry 10 device, create an Application
- Descriptor File if it does not already exist. For more information, see \l{Deploying Applications to BlackBerry 10 Devices}.
-
- \li Make sure that your kit has your QNX or BlackBerry 10 device set.
+ \li Make sure that your kit has your QNX device set.
\li Click the \uicontrol Run button.
@@ -19,19 +16,13 @@
\QC uses the compiler specified in the QNX tool chain to build the
application.
- If you are running on a BlackBerry device, \QC generates a BAR package,
- installs it on the device, and executes the selected application. The
- application views are displayed on the device. Standard output is
- visible in the \QC \uicontrol {Application Output} view.
-
\note Debugging is currently only fully supported on Linux and OS X.
It is not possible to insert breakpoints during runtime on Windows.
\section2 Troubleshooting Errors
- For the command-line output to show up in the \uicontrol{Application Output}
- view when running on a BlackBerry device, \QC needs to be able to establish
- an SSH connection to the device.
+ For the command-line output to show up in the \uicontrol{Application Output},
+ \QC needs to be able to establish an SSH connection to the device.
This is only possible if QNX Momentics is not running, and the SSH key
configured for the device is a 4096-bit key.
diff --git a/doc/src/qnx/creator-projects-settings-run-qnx.qdocinc b/doc/src/qnx/creator-projects-settings-run-qnx.qdocinc
index d5628b3c81..cc486a2a58 100644
--- a/doc/src/qnx/creator-projects-settings-run-qnx.qdocinc
+++ b/doc/src/qnx/creator-projects-settings-run-qnx.qdocinc
@@ -1,6 +1,6 @@
\section2 Specifying Run Settings for QNX Devices
- To run and debug an application on a QNX or BlackBerry device, you must
+ To run and debug an application on a QNX device, you must
create connections from the development PC to the device. Click
\uicontrol {Manage device configurations} to create a connection. For more
information, see \l{Connecting QNX Devices}.
@@ -9,10 +9,3 @@
Specifying run settings for QNX Neutrino devices is very similar to
\l{Specifying Run Settings for Linux-Based Devices}.
-
- \section2 Specifying Run Settings for Blackberry 10 Devices
-
- When you run the application on the BlackBerry 10 device, \QC first creates a BAR package
- using the settings in the Application Descriptor File. The default is to create the
- BAR package in the build directory. The BAR package is then deployed to the
- selected device. For more information, see \l{Deploying Applications to BlackBerry 10 Devices}.
diff --git a/doc/src/qtcreator.qdoc b/doc/src/qtcreator.qdoc
index fc253e7ab0..9b2c51c174 100644
--- a/doc/src/qtcreator.qdoc
+++ b/doc/src/qtcreator.qdoc
@@ -230,7 +230,6 @@
\li \l{Deploying to Mobile Devices}
\list
\li \l{Deploying Applications to Android Devices}
- \li \l{Deploying Applications to BlackBerry 10 Devices}
\li \l{Deploying Applications to Embedded Linux Devices}
\li \l{Deploying Applications to QNX Neutrino Devices}
\endlist
@@ -238,7 +237,6 @@
\list
\li \l{Connecting Android Devices}
\li \l{Connecting Bare Metal Devices}
- \li \l{Connecting BlackBerry 10 Devices}
\li \l{Connecting Embedded Linux Devices}
\li \l{Connecting iOS Devices}
\li \l{Connecting QNX Devices}
diff --git a/doc/src/qtquick/qtquick-creating.qdoc b/doc/src/qtquick/qtquick-creating.qdoc
index 997e084ff7..3b433ecaa5 100644
--- a/doc/src/qtquick/qtquick-creating.qdoc
+++ b/doc/src/qtquick/qtquick-creating.qdoc
@@ -143,8 +143,8 @@
\endlist
\note The SDK for a particular target platform might install additional
- templates for that platform. For example, the BlackBerry 10 and QNX templates are installed
- as part of the BlackBerry 10 NDK, BlackBerry NDK, or QNX SDK.
+ templates for that platform. For example, the QNX templates are installed
+ as part of the QNX SDK.
\QC creates the necessary boilerplate files. Some of the files are
specific to a particular target platform.
diff --git a/share/qtcreator/templates/wizards/bb-bardescriptor/bar-descriptor.xml b/share/qtcreator/templates/wizards/bb-bardescriptor/bar-descriptor.xml
deleted file mode 100644
index 92bb8afcba..0000000000
--- a/share/qtcreator/templates/wizards/bb-bardescriptor/bar-descriptor.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version='1.0' encoding='utf-8' standalone='no'?>
-<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
- <id>ID</id>
- <name>PROJECTNAME</name>
- <versionNumber>1.0.0</versionNumber>
- <description>DESCRIPTION</description>
- <initialWindow>
- <systemChrome>none</systemChrome>
- <transparent>false</transparent>
- <autoOrients>true</autoOrients>
- <aspectRatio>landscape</aspectRatio>
- </initialWindow>
- <author>PUBLISHER</author>
- <copyright>COPYRIGHT</copyright>
- <arg>-style</arg>
- <!-- available styles are bb10dark and bb10bright -->
- <arg>bb10dark</arg>
- <env var="LD_LIBRARY_PATH" value="/usr/lib/qt4/lib:$LD_LIBRARY_PATH"/>
- <env var="QT_PLUGIN_PATH" value="/usr/lib/qt4/plugins:$QT_PLUGIN_PATH"/>
- <env var="QML_IMPORT_PATH" value="/usr/lib/qt4/imports:$QML_IMPORT_PATH"/>
- <action system="true">run_native</action>
- <asset type="Qnx/Elf" path="${BUILD_DIR}/TARGETNAME" entry="true">PROJECTNAME</asset>
-</qnx>
diff --git a/share/qtcreator/templates/wizards/bb-bardescriptor/wizard.xml b/share/qtcreator/templates/wizards/bb-bardescriptor/wizard.xml
deleted file mode 100644
index 4e37af147d..0000000000
--- a/share/qtcreator/templates/wizards/bb-bardescriptor/wizard.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
--->
-
-<wizard version="1" kind="file" id="Q.QnxBlackBerryBarDescriptor" category="Q.BlackBerry"
- featuresRequired="QtSupport.Wizards.FeatureBlackBerry">
- <description>Creates an application descriptor file.</description>
- <displayname>Application descriptor</displayname>;
- <displaycategory>BlackBerry</displaycategory>
- <files>
- <file source="bar-descriptor.xml" openeditor="true"/>
- </files>
-</wizard>
diff --git a/share/qtcreator/templates/wizards/bb-cascades-app/assets/main.qml b/share/qtcreator/templates/wizards/bb-cascades-app/assets/main.qml
deleted file mode 100644
index d57ad95f39..0000000000
--- a/share/qtcreator/templates/wizards/bb-cascades-app/assets/main.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import bb.cascades 1.0
-
-Page {
- Container {
- layout: DockLayout { }
- Label {
- text: qsTr("Hello World")
- textStyle.base: SystemDefaults.TextStyles.BigText
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- }
- }
-}
diff --git a/share/qtcreator/templates/wizards/bb-cascades-app/bar-descriptor.xml b/share/qtcreator/templates/wizards/bb-cascades-app/bar-descriptor.xml
deleted file mode 100644
index 4d1f9025d2..0000000000
--- a/share/qtcreator/templates/wizards/bb-cascades-app/bar-descriptor.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version='1.0' encoding='utf-8' standalone='no'?>
-<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
- <id>com.example.%ProjectName%</id>
- <name>%ProjectName%</name>
- <versionNumber>1.0.0</versionNumber>
- <description>DESCRIPTION</description>
- <initialWindow>
- <systemChrome>none</systemChrome>
- <transparent>false</transparent>
- <autoOrients>true</autoOrients>
- <aspectRatio>landscape</aspectRatio>
- </initialWindow>
- <!-- The icon for the application, which should be 114x114. -->
- <icon>
- <image>icon.png</image>
- </icon>
- <action system="true">run_native</action>
- <!-- Application assets -->
- <env var="LD_LIBRARY_PATH" value="/usr/lib/qt4/lib:$LD_LIBRARY_PATH"/>
- <env var="QT_PLUGIN_PATH" value="/usr/lib/qt4/plugins:$QT_PLUGIN_PATH"/>
- <env var="QML_IMPORT_PATH" value="/usr/lib/qt4/imports:$QML_IMPORT_PATH"/>
- <asset path="icon.png">icon.png</asset>
- <asset path="assets">assets</asset>
- <asset type="Qnx/Elf" path="${BUILD_DIR}/TARGETNAME" entry="true">%ProjectName%</asset>
-</qnx>
diff --git a/share/qtcreator/templates/wizards/bb-cascades-app/icon.png b/share/qtcreator/templates/wizards/bb-cascades-app/icon.png
deleted file mode 100644
index 5260eb64d9..0000000000
--- a/share/qtcreator/templates/wizards/bb-cascades-app/icon.png
+++ /dev/null
Binary files differ
diff --git a/share/qtcreator/templates/wizards/bb-cascades-app/project.pro b/share/qtcreator/templates/wizards/bb-cascades-app/project.pro
deleted file mode 100644
index 5272614694..0000000000
--- a/share/qtcreator/templates/wizards/bb-cascades-app/project.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-
-LIBS += -lbbdata -lbb -lbbcascades
-QT += declarative xml
-
-SOURCES += \
- src/main.%CppSourceSuffix% \
- src/applicationui.%CppSourceSuffix% \
-
-HEADERS += \
- src/applicationui.%CppHeaderSuffix% \
-
-DISTFILES += \
- bar-descriptor.xml \
- assets/main.qml \
-
-
diff --git a/share/qtcreator/templates/wizards/bb-cascades-app/src/applicationui.cpp b/share/qtcreator/templates/wizards/bb-cascades-app/src/applicationui.cpp
deleted file mode 100644
index 4c2aba3b66..0000000000
--- a/share/qtcreator/templates/wizards/bb-cascades-app/src/applicationui.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "applicationui.h"
-
-#include <bb/cascades/Application>
-#include <bb/cascades/QmlDocument>
-#include <bb/cascades/AbstractPane>
-
-using namespace bb::cascades;
-
-ApplicationUI::ApplicationUI(Application *app) :
- QObject(app)
-{
- // By default the QmlDocument object is owned by the Application instance
- // and will have the lifespan of the application
- QmlDocument *qml = QmlDocument::create("asset:///main.qml");
-
- // Create root object for the UI
- AbstractPane *root = qml->createRootObject<AbstractPane>();
-
- // Set created root object as the application scene
- app->setScene(root);
-}
-
diff --git a/share/qtcreator/templates/wizards/bb-cascades-app/src/applicationui.h b/share/qtcreator/templates/wizards/bb-cascades-app/src/applicationui.h
deleted file mode 100644
index 16f28af444..0000000000
--- a/share/qtcreator/templates/wizards/bb-cascades-app/src/applicationui.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef APPLICATIONUI_H
-#define APPLICATIONUI_H
-
-#include <QObject>
-
-namespace bb {
- namespace cascades {
- class Application;
- }
-}
-
-class ApplicationUI : public QObject
-{
- Q_OBJECT
-public:
- ApplicationUI(bb::cascades::Application *app);
- virtual ~ApplicationUI() {}
-};
-
-#endif /* APPLICATIONUI_H */
diff --git a/share/qtcreator/templates/wizards/bb-cascades-app/src/main.cpp b/share/qtcreator/templates/wizards/bb-cascades-app/src/main.cpp
deleted file mode 100644
index 2f3212f90b..0000000000
--- a/share/qtcreator/templates/wizards/bb-cascades-app/src/main.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "applicationui.h"
-
-#include <bb/cascades/Application>
-
-#include <Qt/qdeclarativedebug.h>
-
-using namespace bb::cascades;
-
-Q_DECL_EXPORT int main(int argc, char **argv)
-{
- Application app(argc, argv);
-
- // Create the Application UI object, this is where the main.qml file
- // is loaded and the application scene is set.
- new ApplicationUI(&app);
-
- // Enter the application main event loop.
- return Application::exec();
-}
diff --git a/share/qtcreator/templates/wizards/bb-cascades-app/wizard.xml b/share/qtcreator/templates/wizards/bb-cascades-app/wizard.xml
deleted file mode 100644
index e354a06c5c..0000000000
--- a/share/qtcreator/templates/wizards/bb-cascades-app/wizard.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**************************************************************************
-**
-** Copyright (C) 2011 - 2014 Research In Motion
-**
-** Contact: Research In Motion (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-**************************************************************************/
--->
-<wizard version="1" kind="project"
- class="qmakeproject" firstpage="10"
- id="Q.QnxBlackBerryCascadesApp" category="F.Application"
- featuresRequired="QtSupport.Wizards.FeatureBlackBerry">
- <icon>icon.png</icon>
- <displayname>BlackBerry Cascades Application</displayname>;
- <description>Creates a Cascades application for BlackBerry 10.</description>
- <files>
- <file source="assets/main.qml" openeditor="true"/>
- <file source="bar-descriptor.xml" openeditor="true"/>
- <file source="project.pro" target="%ProjectName%.pro" openproject="true"/>
- <file source="src/main.cpp" target="main.%CppSourceSuffix%" openeditor="true"/>
- <file source="src/applicationui.h" target="applicationui.%CppHeaderSuffix%" openproject="true"/>
- <file source="src/applicationui.cpp" target="applicationui.%CppSourceSuffix%" openproject="true"/>
- <file source="icon.png"/>
- </files>
-</wizard>
diff --git a/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml b/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml
deleted file mode 100644
index 5c7acf2fde..0000000000
--- a/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version='1.0' encoding='utf-8' standalone='no'?>
-<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
- <id>ID</id>
- <name>PROJECTNAME</name>
- <versionNumber>1.0.0</versionNumber>
- <description>DESCRIPTION</description>
- <copyright>COPYRIGHT</copyright>
- <initialWindow>
- <systemChrome>none</systemChrome>
- <transparent>false</transparent>
- <autoOrients>true</autoOrients>
- <aspectRatio>landscape</aspectRatio>
- </initialWindow>
- <env value="/usr/lib/qt5/lib:$LD_LIBRARY_PATH" var="LD_LIBRARY_PATH"/>
- <env value="/usr/lib/qt5/plugins:$QT_PLUGIN_PATH" var="QT_PLUGIN_PATH"/>
- <env value="/usr/lib/qt5/imports:$QML_IMPORT_PATH" var="QML_IMPORT_PATH"/>
- <env value="/usr/lib/qt5/qml:$QML2_IMPORT_PATH" var="QML2_IMPORT_PATH"/>
- <action system="true">run_native</action>
- <asset path="${BUILD_DIR}/TARGETNAME" entry="true" type="Qnx/Elf">PROJECTNAME</asset>
- <author>PUBLISHER</author>
-</qnx>
diff --git a/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/wizard.xml b/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/wizard.xml
deleted file mode 100644
index 5112214c1f..0000000000
--- a/share/qtcreator/templates/wizards/bb-qt5-bardescriptor/wizard.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing
-**
-** 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
--->
-
-<wizard version="1" kind="file" id="Q.QnxBlackBerryBarDescriptor" category="Q.BlackBerry"
- featuresRequired="QtSupport.Wizards.FeatureBlackBerry">
- <description>Creates an Qt5 application descriptor file.</description>
- <displayname>Qt5 Application descriptor</displayname>;
- <displaycategory>BlackBerry</displaycategory>
- <files>
- <file source="bar-descriptor.xml" openeditor="true"/>
- </files>
-</wizard>
diff --git a/share/qtcreator/welcomescreen/qtcreator_tutorials.xml b/share/qtcreator/welcomescreen/qtcreator_tutorials.xml
index cc4ad211a9..88beade07b 100644
--- a/share/qtcreator/welcomescreen/qtcreator_tutorials.xml
+++ b/share/qtcreator/welcomescreen/qtcreator_tutorials.xml
@@ -39,7 +39,7 @@
</tutorial>
<tutorial imageUrl="images/icons/ddays13.png" difficulty="" projectPath="" name="Targeting Multiple Mobile Platforms with Qt Creator" isVideo="true" videoUrl="http://www.youtube.com/watch?v=jDRup5z2qz0" videoLength="52:38">
<description><![CDATA[Using Qt Creator to develop a cross-platform application for mobile devices and other small devices.]]></description>
- <tags>qt creator,qt quick,qml,c++,android,blackberry,sailfishos</tags>
+ <tags>qt creator,qt quick,qml,c++,android,sailfishos</tags>
</tutorial>
<tutorial imageUrl="images/icons/ddays13.png" difficulty="" projectPath="" name="Step by Step Qt on Android Tutorial" isVideo="true" videoUrl="http://www.youtube.com/watch?v=yhdi6JONtQo" videoLength="1:02:30">
<description><![CDATA[Using Qt Creator to develop a Qt Quick application for Android devices.]]></description>
diff --git a/src/plugins/cmakeprojectmanager/generatorinfo.cpp b/src/plugins/cmakeprojectmanager/generatorinfo.cpp
index 2dfc57e358..e3c5a38327 100644
--- a/src/plugins/cmakeprojectmanager/generatorinfo.cpp
+++ b/src/plugins/cmakeprojectmanager/generatorinfo.cpp
@@ -130,8 +130,7 @@ QList<GeneratorInfo> GeneratorInfo::generatorInfosFor(ProjectExplorer::Kit *k, N
if (deviceType != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE
&& deviceType != BareMetal::Constants::BareMetalOsType
&& deviceType != RemoteLinux::Constants::GenericLinuxOsType
- && deviceType != Qnx::Constants::QNX_QNX_OS_TYPE
- && deviceType != Qnx::Constants::QNX_BB_OS_TYPE)
+ && deviceType != Qnx::Constants::QNX_QNX_OS_TYPE)
return results;
ProjectExplorer::Abi targetAbi = tc->targetAbi();
if (n != ForceNinja) {
diff --git a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
index 9fb3877e21..f4f369e392 100644
--- a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
+++ b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
@@ -118,9 +118,7 @@ static QStringList targetOSList(const ProjectExplorer::Abi &abi, const ProjectEx
os << QLatin1String("bsd") << QLatin1String("unix");
break;
case ProjectExplorer::Abi::UnixOS:
- if (device == QNX_BB_OS_TYPE)
- os << QLatin1String("blackberry") << QLatin1String("qnx");
- else if (device == QNX_QNX_OS_TYPE)
+ if (device == QNX_QNX_OS_TYPE)
os << QLatin1String("qnx");
else if (abi.osFlavor() == ProjectExplorer::Abi::SolarisUnixFlavor)
os << QLatin1String("solaris");
diff --git a/src/plugins/qnx/Qnx.json.in b/src/plugins/qnx/Qnx.json.in
index 96048b7eef..b9863b105a 100644
--- a/src/plugins/qnx/Qnx.json.in
+++ b/src/plugins/qnx/Qnx.json.in
@@ -13,7 +13,7 @@
\"Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 or version 3 as published by the Free Software Foundation. Please review the following information to ensure the GNU Lesser General Public License requirements will be met: https://www.gnu.org/licenses/lgpl.html and http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\"
],
\"Category\" : \"Device Support\",
- \"Description\" : \"Adds support for QNX and BlackBerry 10 to Qt Creator.\",
+ \"Description\" : \"Adds support for QNX to Qt Creator.\",
\"Url\" : \"http://www.blackberry.com\",
$$dependencyList
}
diff --git a/src/plugins/qnx/Qnx.mimetypes.xml b/src/plugins/qnx/Qnx.mimetypes.xml
deleted file mode 100644
index e9ac133fc7..0000000000
--- a/src/plugins/qnx/Qnx.mimetypes.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
- <mime-type type="application/z-vnd.rim.qnx.bar_descriptor">
- <comment>BAR descriptor file (BlackBerry)</comment>
- <sub-class-of type="application/xml"/>
- <glob pattern="*.xml"/>
- <magic>
- <match value="&lt;qnx&gt;" type="string" offset="0:1000"/>
- </magic>
- </mime-type>
-</mime-info>
diff --git a/src/plugins/qnx/bardescriptordocument.cpp b/src/plugins/qnx/bardescriptordocument.cpp
deleted file mode 100644
index 7545adfad6..0000000000
--- a/src/plugins/qnx/bardescriptordocument.cpp
+++ /dev/null
@@ -1,690 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptordocument.h"
-
-#include "qnxconstants.h"
-
-#include <coreplugin/editormanager/editormanager.h>
-#include <utils/qtcassert.h>
-
-#include <QDir>
-#include <QFileInfo>
-#include <QMetaEnum>
-#include <QTextCodec>
-#include <QSet>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorDocument::BarDescriptorDocument(QObject *parent)
- : Core::BaseTextDocument(parent)
-{
- setId(Constants::QNX_BAR_DESCRIPTOR_EDITOR_ID);
- setMimeType(QLatin1String(Constants::QNX_BAR_DESCRIPTOR_MIME_TYPE));
- // blackberry-nativepackager requires the XML file to be in UTF-8 encoding,
- // force if possible
- if (QTextCodec *defaultUTF8 = QTextCodec::codecForName("UTF-8"))
- setCodec(defaultUTF8);
- else
- setCodec(Core::EditorManager::defaultTextCodec());
-}
-
-BarDescriptorDocument::~BarDescriptorDocument()
-{
-}
-
-bool BarDescriptorDocument::open(QString *errorString, const QString &fileName) {
- QString contents;
- if (read(fileName, &contents, errorString) != Utils::TextFileFormat::ReadSuccess)
- return false;
-
- setFilePath(Utils::FileName::fromString(fileName));
-
- const bool result = loadContent(contents, false);
-
- if (!result)
- *errorString = tr("%1 does not appear to be a valid application descriptor file").arg(QDir::toNativeSeparators(fileName));
-
- return result;
-}
-
-bool BarDescriptorDocument::save(QString *errorString, const QString &fn, bool autoSave)
-{
- QTC_ASSERT(!autoSave, return false);
- QTC_ASSERT(fn.isEmpty(), return false);
-
- const bool result = write(filePath().toString(), xmlSource(), errorString);
- if (!result)
- return false;
-
- m_dirty = false;
- emit Core::IDocument::changed();
- return true;
-}
-
-QString BarDescriptorDocument::defaultPath() const
-{
- return filePath().toFileInfo().absolutePath();
-}
-
-QString BarDescriptorDocument::suggestedFileName() const
-{
- return filePath().fileName();
-}
-
-bool BarDescriptorDocument::shouldAutoSave() const
-{
- return false;
-}
-
-bool BarDescriptorDocument::isModified() const
-{
- return m_dirty;
-}
-
-bool BarDescriptorDocument::isSaveAsAllowed() const
-{
- return false;
-}
-
-Core::IDocument::ReloadBehavior BarDescriptorDocument::reloadBehavior(Core::IDocument::ChangeTrigger state, Core::IDocument::ChangeType type) const
-{
- if (type == TypeRemoved || type == TypePermissions)
- return BehaviorSilent;
- if (type == TypeContents && state == TriggerInternal && !isModified())
- return BehaviorSilent;
- return BehaviorAsk;
-}
-
-bool BarDescriptorDocument::reload(QString *errorString, Core::IDocument::ReloadFlag flag, Core::IDocument::ChangeType type)
-{
- Q_UNUSED(type);
-
- if (flag == Core::IDocument::FlagIgnore)
- return true;
-
- return open(errorString, filePath().toString());
-}
-
-QString BarDescriptorDocument::xmlSource() const
-{
- const int indent = 4;
- return m_barDocument.toString(indent);
-}
-
-bool BarDescriptorDocument::loadContent(const QString &xmlCode, bool setDirty, QString *errorMessage, int *errorLine)
-{
- if (xmlCode == xmlSource())
- return true;
-
- bool result = m_barDocument.setContent(xmlCode, errorMessage, errorLine);
-
- m_dirty = setDirty;
-
- emitAllChanged();
- emit Core::IDocument::changed();
- return result;
-}
-
-QVariant BarDescriptorDocument::value(BarDescriptorDocument::Tag tag) const
-{
- const QString tagName = QString::fromLatin1(metaObject()->enumerator(metaObject()->enumeratorOffset()).valueToKey(tag));
-
- switch (tag) {
- case id:
- case versionNumber:
- case buildId:
- case name:
- case description:
- case author:
- case publisher:
- case authorId:
- return stringValue(tagName);
- case icon:
- return childStringListValue(tagName, QLatin1String("image")).value(0);
- case splashScreens:
- return childStringListValue(tagName, QLatin1String("image"));
- case asset: {
- QVariant var;
- var.setValue(assets());
- return var;
- }
- case aspectRatio:
- case autoOrients:
- case systemChrome:
- return childStringListValue(QLatin1String("initialWindow"), tagName).value(0);
- case transparent:
- return childStringListValue(QLatin1String("initialWindow"), tagName).value(0) == QLatin1String("true");
- case arg:
- case action:
- return stringListValue(tagName);
- case env:
- QVariant var;
- var.setValue(environment());
- return var;
- }
-
- return QVariant();
-}
-
-void BarDescriptorDocument::setValue(BarDescriptorDocument::Tag tag, const QVariant &value)
-{
- const QMetaEnum tagEnum = metaObject()->enumerator(metaObject()->enumeratorOffset());
- const QString tagName = QString::fromLatin1(tagEnum.valueToKey(tag));
-
- switch (tag) {
- case id:
- case versionNumber:
- case buildId:
- case name:
- case description:
- case authorId:
- setStringValue(tagName, value.toString());
- break;
- case icon:
- case splashScreens:
- setChildStringListValue(tagName, QLatin1String("image"), value.toStringList());
- break;
- case asset:
- setAssets(value.value<BarDescriptorAssetList>());
- break;
- case aspectRatio:
- case autoOrients:
- case systemChrome:
- setChildStringListValue(QLatin1String("initialWindow"), tagName, value.toStringList());
- break;
- case transparent:
- setChildStringListValue(QLatin1String("initialWindow"), tagName, QStringList() << (value.toBool() ? QLatin1String("true") : QLatin1String("false")));
- break;
- case arg:
- case action:
- setStringListValue(tagName, value.toStringList());
- break;
- case env:
- setEnvironment(value.value<QList<Utils::EnvironmentItem> >());
- break;
- case author:
- case publisher:
- // Unset <publisher> when setting <author> as only one should be used
- setStringValue(QString::fromLatin1(tagEnum.valueToKey(author)), value.toString());
- setStringValue(QString::fromLatin1(tagEnum.valueToKey(publisher)), QLatin1String(""));
- break;
- }
-
- m_dirty = true;
- emit changed(tag, value);
- emit Core::IDocument::changed();
-}
-
-QString BarDescriptorDocument::stringValue(const QString &tagName) const
-{
- QDomNodeList nodes = m_barDocument.elementsByTagName(tagName);
- if (nodes.isEmpty() || nodes.size() > 1)
- return QString();
-
- QDomNode node = nodes.item(0);
- QDomText textNode = node.firstChild().toText();
- if (textNode.isNull())
- return QString();
-
- return textNode.data();
-}
-
-void BarDescriptorDocument::setStringValue(const QString &tagName, const QString &value)
-{
- QDomNodeList nodes = m_barDocument.elementsByTagName(tagName);
-
- if (nodes.size() > 1)
- return;
-
- QDomNode existingNode = nodes.item(0);
- if (existingNode.isNull() && value.isEmpty())
- return;
-
- if (!existingNode.isNull() && value.isEmpty()) {
- m_barDocument.documentElement().removeChild(existingNode);
- } else if (existingNode.isNull()) {
- QDomElement newNode = m_barDocument.createElement(tagName);
- newNode.appendChild(m_barDocument.createTextNode(value));
- m_barDocument.documentElement().appendChild(newNode);
- } else {
- QDomText textNode = existingNode.firstChild().toText();
- if (textNode.isNull())
- return;
- textNode.setData(value);
- }
-}
-
-QStringList BarDescriptorDocument::childStringListValue(const QString &tagName, const QString &childTagName) const
-{
- QDomNodeList nodes = m_barDocument.elementsByTagName(tagName);
- if (nodes.isEmpty() || nodes.size() > 1)
- return QStringList();
-
- QDomNode parentNode = nodes.item(0);
- QDomElement childElm = parentNode.firstChildElement(childTagName);
- if (childElm.isNull())
- return QStringList();
-
- QStringList result;
- while (!childElm.isNull()) {
- QDomText textNode = childElm.firstChild().toText();
- if (textNode.isNull())
- return QStringList();
-
- result.append(textNode.data());
-
- childElm = childElm.nextSiblingElement(childTagName);
- }
-
- return result;
-}
-
-void BarDescriptorDocument::setChildStringListValue(const QString &tagName, const QString &childTagName, const QStringList &stringList)
-{
- QDomNodeList nodes = m_barDocument.elementsByTagName(tagName);
-
- if (nodes.size() > 1)
- return;
-
- QDomNode existingNode = nodes.item(0);
-
- if (existingNode.isNull()) {
- QDomElement newParentNode = m_barDocument.createElement(tagName);
-
- foreach (const QString &value, stringList) {
- QDomElement newChildNode = m_barDocument.createElement(childTagName);
- QDomText newTextNode = m_barDocument.createTextNode(value);
- newChildNode.appendChild(newTextNode);
- newParentNode.appendChild(newChildNode);
- }
- m_barDocument.documentElement().appendChild(newParentNode);
- } else {
- QStringList values = stringList;
- QDomElement childElm = existingNode.firstChildElement(childTagName);
- if (!childElm.isNull()) {
- // Loop through existing elements, remove the existing nodes
- // that no longer are in "values", and remove from "values"
- // the existing nodes that don't need re-creation
- while (!childElm.isNull()) {
- QDomText textNode = childElm.firstChild().toText();
- if (textNode.isNull())
- continue;
-
- QDomElement toRemove;
- if (!values.contains(textNode.data()))
- toRemove = childElm;
- else
- values.removeAll(textNode.data());
-
- childElm = childElm.nextSiblingElement(childTagName);
-
- if (!toRemove.isNull())
- existingNode.removeChild(toRemove);
- }
- }
-
- // Add the new elements
- int newElementCount = 0;
- foreach (const QString &value, values) {
- if (value.isEmpty())
- continue;
- QDomElement newChildNode = m_barDocument.createElement(childTagName);
- newChildNode.appendChild(m_barDocument.createTextNode(value));
- existingNode.appendChild(newChildNode);
- ++newElementCount;
- }
-
- if (newElementCount == 0)
- m_barDocument.documentElement().removeChild(existingNode);
- }
-}
-
-QStringList BarDescriptorDocument::stringListValue(const QString &tagName) const
-{
- QStringList result;
-
- QDomElement childElm = m_barDocument.documentElement().firstChildElement(tagName);
- while (!childElm.isNull()) {
- QDomText textNode = childElm.firstChild().toText();
- if (textNode.isNull())
- continue;
-
- result.append(textNode.data());
-
- childElm = childElm.nextSiblingElement(tagName);
- }
-
- return result;
-}
-
-void BarDescriptorDocument::setStringListValue(const QString &tagName, const QStringList &stringList)
-{
- QStringList values = stringList;
- QDomElement childElm = m_barDocument.documentElement().firstChildElement(tagName);
- if (!childElm.isNull()) {
- // Loop through existing elements, remove the existing nodes
- // that no longer are in "values", and remove from "values"
- // the existing nodes that don't need re-creation
- while (!childElm.isNull()) {
- QDomText textNode = childElm.firstChild().toText();
- if (textNode.isNull())
- continue;
-
- QDomElement toRemove;
- if (!values.contains(textNode.data()))
- toRemove = childElm;
- else
- values.removeAll(textNode.data());
-
- childElm = childElm.nextSiblingElement(tagName);
-
- if (!toRemove.isNull())
- m_barDocument.documentElement().removeChild(toRemove);
- }
- }
-
- // Add the new elements
- foreach (const QString &value, values) {
- if (value.isEmpty())
- continue;
- QDomElement newChildNode = m_barDocument.createElement(tagName);
- newChildNode.appendChild(m_barDocument.createTextNode(value));
- m_barDocument.documentElement().appendChild(newChildNode);
- }
-}
-
-BarDescriptorAssetList BarDescriptorDocument::assets() const
-{
- BarDescriptorAssetList result;
- QDomNodeList nodes = m_barDocument.elementsByTagName(QLatin1String("asset"));
- if (nodes.isEmpty())
- return result;
-
- for (int i = 0; i < nodes.size(); ++i) {
- QDomElement assetElm = nodes.item(i).toElement();
- if (assetElm.isNull())
- continue;
-
- QDomText textNode = assetElm.firstChild().toText();
- if (textNode.isNull())
- continue;
-
- QString path = assetElm.attribute(QLatin1String("path"));
- QString entry = assetElm.attribute(QLatin1String("entry"));
- QString dest = textNode.data();
-
- BarDescriptorAsset asset;
- asset.source = path;
- asset.destination = dest;
- asset.entry = entry == QLatin1String("true");
- result.append(asset);
- }
-
- return result;
-}
-
-void BarDescriptorDocument::setAssets(const BarDescriptorAssetList &assets)
-{
- QDomNodeList nodes = m_barDocument.elementsByTagName(QLatin1String("asset"));
-
- BarDescriptorAssetList newAssets = assets;
- QList<QDomNode> toRemove;
-
- for (int i = 0; i < nodes.size(); ++i) {
- QDomElement assetElm = nodes.at(i).toElement();
- if (assetElm.isNull())
- continue;
-
- QDomText textNode = assetElm.firstChild().toText();
- if (textNode.isNull())
- continue;
-
- QString source = assetElm.attribute(QLatin1String("path"));
- bool found = false;
- foreach (const BarDescriptorAsset &asset, newAssets) {
- if (asset.source == source) {
- found = true;
- if (asset.entry) {
- assetElm.setAttribute(QLatin1String("type"), QLatin1String("Qnx/Elf"));
- assetElm.setAttribute(QLatin1String("entry"), QLatin1String("true"));
- } else {
- assetElm.removeAttribute(QLatin1String("type"));
- assetElm.removeAttribute(QLatin1String("entry"));
- }
- textNode.setData(asset.destination);
-
- newAssets.removeAll(asset);
- break;
- }
- }
-
- if (!found)
- toRemove.append(assetElm);
- }
-
- foreach (const QDomNode &node, toRemove)
- m_barDocument.documentElement().removeChild(node);
-
- foreach (const BarDescriptorAsset &asset, newAssets) {
- QDomElement assetElm = m_barDocument.createElement(QLatin1String("asset"));
- assetElm.setAttribute(QLatin1String("path"), asset.source);
- if (asset.entry) {
- assetElm.setAttribute(QLatin1String("type"), QLatin1String("Qnx/Elf"));
- assetElm.setAttribute(QLatin1String("entry"), QLatin1String("true"));
- }
- assetElm.appendChild(m_barDocument.createTextNode(asset.destination));
- m_barDocument.documentElement().appendChild(assetElm);
- }
-}
-
-QList<Utils::EnvironmentItem> BarDescriptorDocument::environment() const
-{
- QList<Utils::EnvironmentItem> result;
-
- QDomElement envElm = m_barDocument.documentElement().firstChildElement(QLatin1String("env"));
- while (!envElm.isNull()) {
- QString var = envElm.attribute(QLatin1String("var"));
- QString value = envElm.attribute(QLatin1String("value"));
-
- Utils::EnvironmentItem item(var, value);
- result.append(item);
-
- envElm = envElm.nextSiblingElement(QLatin1String("env"));
- }
- return result;
-}
-
-void BarDescriptorDocument::setEnvironment(const QList<Utils::EnvironmentItem> &environment)
-{
- QDomNodeList envNodes = m_barDocument.elementsByTagName(QLatin1String("env"));
-
- QList<Utils::EnvironmentItem> newEnvironment = environment;
- QList<QDomElement> toRemove;
- for (int i = 0; i < envNodes.size(); ++i) {
- QDomElement elm = envNodes.at(i).toElement();
- if (elm.isNull())
- continue;
-
- QString var = elm.attribute(QLatin1String("var"));
- bool found = false;
- foreach (const Utils::EnvironmentItem item, newEnvironment) {
- if (item.name == var) {
- found = true;
- elm.setAttribute(QLatin1String("value"), item.value);
- newEnvironment.removeAll(item);
- break;
- }
- }
-
- if (!found)
- toRemove.append(elm);
- }
-
- foreach (const QDomNode &node, toRemove)
- m_barDocument.documentElement().removeChild(node);
-
- foreach (const Utils::EnvironmentItem item, newEnvironment) {
- QDomElement elm = m_barDocument.createElement(QLatin1String("env"));
- elm.setAttribute(QLatin1String("var"), item.name);
- elm.setAttribute(QLatin1String("value"), item.value);
- m_barDocument.documentElement().appendChild(elm);
- }
-}
-
-void BarDescriptorDocument::emitAllChanged()
-{
- QMetaEnum tags = metaObject()->enumerator(metaObject()->enumeratorOffset());
- for (int i = 0; i < tags.keyCount(); ++i) {
- Tag tag = static_cast<Tag>(tags.value(i));
- emit changed(tag, value(tag));
- }
-}
-
-QString BarDescriptorDocument::bannerComment() const
-{
- QDomNode nd = m_barDocument.firstChild();
- QDomProcessingInstruction pi = nd.toProcessingInstruction();
- if (!pi.isNull())
- nd = pi.nextSibling();
-
- return nd.toComment().data();
-}
-
-void BarDescriptorDocument::setBannerComment(const QString &commentText)
-{
- QDomNode nd = m_barDocument.firstChild();
- QDomProcessingInstruction pi = nd.toProcessingInstruction();
- if (!pi.isNull())
- nd = pi.nextSibling();
-
- bool oldDirty = m_dirty;
- QDomComment cnd = nd.toComment();
- if (cnd.isNull()) {
- if (!commentText.isEmpty()) {
- cnd = m_barDocument.createComment(commentText);
- m_barDocument.insertBefore(cnd, nd);
- m_dirty = true;
- }
- } else {
- if (commentText.isEmpty()) {
- m_barDocument.removeChild(cnd);
- m_dirty = true;
- } else {
- if (cnd.data() != commentText) {
- cnd.setData(commentText);
- m_dirty = true;
- }
- }
- }
- if (m_dirty != oldDirty)
- emit Core::IDocument::changed();
-}
-
-int BarDescriptorDocument::tagForElement(const QDomElement &element)
-{
- QMetaEnum tags = metaObject()->enumerator(metaObject()->enumeratorOffset());
- QDomElement el = element;
- while (!el.isNull()) {
- const int n = tags.keyToValue(el.tagName().toLatin1().constData());
- if (n > -1)
- return n;
- el = el.parentNode().toElement();
- }
- return -1;
-}
-
-bool BarDescriptorDocument::expandPlaceHolder_helper(const QDomElement &el,
- const QString &placeholderKey,
- const QString &placeholderText,
- QSet<BarDescriptorDocument::Tag> &changedTags)
-{
- // replace attributes
- bool elementChanged = false;
- QDomNamedNodeMap attrs = el.attributes();
- for (int i = 0; i < attrs.count(); ++i) {
- QDomAttr attr = attrs.item(i).toAttr();
- if (!attr.isNull()) {
- QString s = attr.value();
- s.replace(placeholderKey, placeholderText);
- if (s != attr.value()) {
- attr.setValue(s);
- elementChanged = true;
- }
- }
- }
-
- bool documentChanged = false;
- // replace text
- for (QDomNode nd = el.firstChild(); !nd.isNull(); nd = nd.nextSibling()) {
- QDomText txtnd = nd.toText();
- if (!txtnd.isNull()) {
- QString s = txtnd.data();
- s.replace(placeholderKey, placeholderText);
- if (s != txtnd.data()) {
- txtnd.setData(s);
- elementChanged = true;
- }
- }
- QDomElement child = nd.toElement();
- if (!child.isNull()) {
- bool hit = expandPlaceHolder_helper(child, placeholderKey, placeholderText, changedTags);
- documentChanged = documentChanged || hit;
- }
- }
- if (elementChanged) {
- int n = tagForElement(el);
- if (n >= 0)
- changedTags << static_cast<Tag>(n);
- }
- documentChanged = documentChanged || elementChanged;
- return documentChanged;
-}
-
-void BarDescriptorDocument::expandPlaceHolders(const QHash<QString, QString> &placeholdersKeyVals)
-{
- QSet<Tag> changedTags;
- QHashIterator<QString, QString> it(placeholdersKeyVals);
- bool docChanged = false;
- while (it.hasNext()) {
- it.next();
- bool expanded = expandPlaceHolder_helper(m_barDocument.documentElement(),
- it.key(), it.value(), changedTags);
- docChanged = docChanged || expanded;
- }
- m_dirty = m_dirty || docChanged;
- foreach (Tag tag, changedTags)
- emit changed(tag, value(tag));
- if (docChanged)
- emit Core::IDocument::changed();
-}
diff --git a/src/plugins/qnx/bardescriptordocument.h b/src/plugins/qnx/bardescriptordocument.h
deleted file mode 100644
index d68c904880..0000000000
--- a/src/plugins/qnx/bardescriptordocument.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTORDOCUMENT_H
-#define QNX_INTERNAL_BARDESCRIPTORDOCUMENT_H
-
-#include <coreplugin/textdocument.h>
-#include <utils/environment.h>
-
-#include <QDomDocument>
-#include <QMetaType>
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorAsset {
-public:
- QString source;
- QString destination;
- bool entry;
-
- bool operator==(const BarDescriptorAsset &asset) const
- {
- return source == asset.source && destination == asset.destination;
- }
-};
-
-typedef QList<BarDescriptorAsset> BarDescriptorAssetList;
-
-class BarDescriptorDocument : public Core::BaseTextDocument
-{
- Q_OBJECT
-
- Q_ENUMS(Tag)
-
-public:
- enum Tag {
- id = 0,
- versionNumber,
- buildId,
- name,
- description,
- icon,
- splashScreens,
- asset,
- aspectRatio,
- autoOrients,
- systemChrome,
- transparent,
- arg,
- action,
- env,
- author,
- publisher,
- authorId
- };
-
- explicit BarDescriptorDocument(QObject *parent = 0);
- ~BarDescriptorDocument();
-
- bool open(QString *errorString, const QString &fileName);
- bool save(QString *errorString, const QString &fileName = QString(), bool autoSave = false);
-
- QString defaultPath() const;
- QString suggestedFileName() const;
-
- bool shouldAutoSave() const;
- bool isModified() const;
- bool isSaveAsAllowed() const;
-
- ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const;
- bool reload(QString *errorString, ReloadFlag flag, ChangeType type);
-
- QString xmlSource() const;
- bool loadContent(const QString &xmlCode, bool setDirty, QString *errorMessage = 0, int *errorLine = 0);
-
- QVariant value(Tag tag) const;
-
- void expandPlaceHolders(const QHash<QString, QString> &placeholdersKeyVals);
-
- QString bannerComment() const;
- void setBannerComment(const QString &commentText);
-
-signals:
- void changed(BarDescriptorDocument::Tag tag, const QVariant &value);
-
-public slots:
- void setValue(BarDescriptorDocument::Tag tag, const QVariant &value);
-private:
- QString stringValue(const QString &tagName) const;
- void setStringValue(const QString &tagName, const QString &value);
-
- QStringList childStringListValue(const QString &tagName, const QString &childTagName) const;
- void setChildStringListValue(const QString &tagName, const QString &childTagName, const QStringList &stringList);
-
- QStringList stringListValue(const QString &tagName) const;
- void setStringListValue(const QString &tagName, const QStringList &stringList);
-
- BarDescriptorAssetList assets() const;
- void setAssets(const BarDescriptorAssetList &assets);
-
- QList<Utils::EnvironmentItem> environment() const;
- void setEnvironment(const QList<Utils::EnvironmentItem> &environment);
-
- int tagForElement(const QDomElement &element);
- bool expandPlaceHolder_helper(const QDomElement &el, const QString &placeholderKey,
- const QString &placeholderText,
- QSet<BarDescriptorDocument::Tag> &changedTags);
-
- void emitAllChanged();
-
- bool m_dirty;
- QDomDocument m_barDocument;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-Q_DECLARE_METATYPE(Qnx::Internal::BarDescriptorAssetList)
-Q_DECLARE_METATYPE(QList<Utils::EnvironmentItem>)
-Q_DECLARE_METATYPE(Qnx::Internal::BarDescriptorDocument::Tag)
-
-#endif // QNX_INTERNAL_BARDESCRIPTORDOCUMENT_H
diff --git a/src/plugins/qnx/bardescriptoreditor.cpp b/src/plugins/qnx/bardescriptoreditor.cpp
deleted file mode 100644
index 5274774d30..0000000000
--- a/src/plugins/qnx/bardescriptoreditor.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditor.h"
-
-#include "qnxconstants.h"
-#include "bardescriptoreditorwidget.h"
-#include "bardescriptordocument.h"
-
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/task.h>
-#include <projectexplorer/taskhub.h>
-#include <texteditor/texteditorconstants.h>
-#include <texteditor/texteditor.h>
-#include <texteditor/textdocument.h>
-#include <texteditor/tabsettings.h>
-#include <utils/linecolumnlabel.h>
-#include <utils/qtcassert.h>
-
-#include <QAction>
-#include <QStyle>
-#include <QTextBlock>
-#include <QToolBar>
-
-using namespace ProjectExplorer;
-
-namespace Qnx {
-namespace Internal {
-
-BarDescriptorEditor::BarDescriptorEditor()
-{
- m_file = new BarDescriptorDocument(this);
-
- BarDescriptorEditorWidget *editorWidget = new BarDescriptorEditorWidget(this);
- setWidget(editorWidget);
-
- m_toolBar = new QToolBar(editorWidget);
-
- m_actionGroup = new QActionGroup(this);
- connect(m_actionGroup, SIGNAL(triggered(QAction*)), this, SLOT(changeEditorPage(QAction*)));
-
- QAction *generalAction = m_toolBar->addAction(tr("General"));
- generalAction->setData(General);
- generalAction->setCheckable(true);
- m_actionGroup->addAction(generalAction);
-
- QAction *applicationAction = m_toolBar->addAction(tr("Application"));
- applicationAction->setData(Application);
- applicationAction->setCheckable(true);
- m_actionGroup->addAction(applicationAction);
-
- QAction *assetsAction = m_toolBar->addAction(tr("Assets"));
- assetsAction->setData(Assets);
- assetsAction->setCheckable(true);
- m_actionGroup->addAction(assetsAction);
-
- QAction *sourceAction = m_toolBar->addAction(tr("XML Source"));
- sourceAction->setData(Source);
- sourceAction->setCheckable(true);
- m_actionGroup->addAction(sourceAction);
-
- generalAction->setChecked(true);
-
- m_cursorPositionLabel = new Utils::LineColumnLabel;
- const int spacing = editorWidget->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2;
- m_cursorPositionLabel->setContentsMargins(spacing, 0, spacing, 0);
-
- QWidget *spacer = new QWidget;
- spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
- m_toolBar->addWidget(spacer);
-
- m_cursorPositionAction = m_toolBar->addWidget(m_cursorPositionLabel);
- connect(editorWidget->sourceWidget(), SIGNAL(cursorPositionChanged()), this, SLOT(updateCursorPosition()));
-
- setContext(Core::Context(Constants::QNX_BAR_DESCRIPTOR_EDITOR_CONTEXT,
- TextEditor::Constants::C_TEXTEDITOR));
-}
-
-bool BarDescriptorEditor::open(QString *errorString, const QString &fileName, const QString &realFileName)
-{
- QTC_ASSERT(fileName == realFileName, return false);
-
- bool result = m_file->open(errorString, fileName);
- if (result) {
- BarDescriptorEditorWidget *editorWidget = qobject_cast<BarDescriptorEditorWidget *>(widget());
- QTC_ASSERT(editorWidget, return false);
- editorWidget->setFilePath(Utils::FileName::fromString(fileName));
- }
-
- return result;
-}
-
-Core::IDocument *BarDescriptorEditor::document()
-{
- return m_file;
-}
-
-QWidget *BarDescriptorEditor::toolBar()
-{
- return m_toolBar;
-}
-
-BarDescriptorEditor::EditorPage BarDescriptorEditor::activePage() const
-{
- BarDescriptorEditorWidget *editorWidget = qobject_cast<BarDescriptorEditorWidget *>(widget());
- QTC_ASSERT(editorWidget, return static_cast<EditorPage>(-1));
-
- return static_cast<EditorPage>(editorWidget->currentIndex());
-}
-
-void BarDescriptorEditor::changeEditorPage(QAction *action)
-{
- setActivePage(static_cast<EditorPage>(action->data().toInt()));
-}
-
-void BarDescriptorEditor::setActivePage(BarDescriptorEditor::EditorPage page)
-{
- BarDescriptorEditorWidget *editorWidget = qobject_cast<BarDescriptorEditorWidget *>(widget());
- QTC_ASSERT(editorWidget, return);
-
- m_cursorPositionAction->setVisible(page == Source);
- editorWidget->setCurrentIndex(page);
-}
-
-void BarDescriptorEditor::updateCursorPosition()
-{
- BarDescriptorEditorWidget *editorWidget = qobject_cast<BarDescriptorEditorWidget *>(widget());
- QTC_ASSERT(editorWidget, return);
-
- const QTextCursor cursor = editorWidget->sourceWidget()->textCursor();
- const QTextBlock block = cursor.block();
- const int line = block.blockNumber() + 1;
- const int column = cursor.position() - block.position();
- m_cursorPositionLabel->setText(tr("Line: %1, Col: %2").arg(line)
- .arg(editorWidget->sourceWidget()->textDocument()
- ->tabSettings().columnAt(block.text(), column)+1),
- tr("Line: 9999, Col: 999"));
- if (!block.isVisible())
- editorWidget->sourceWidget()->ensureCursorVisible();
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/bardescriptoreditor.h b/src/plugins/qnx/bardescriptoreditor.h
deleted file mode 100644
index e70ac54742..0000000000
--- a/src/plugins/qnx/bardescriptoreditor.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITOR_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITOR_H
-
-#include <coreplugin/editormanager/ieditor.h>
-
-QT_BEGIN_NAMESPACE
-class QActionGroup;
-class QToolBar;
-QT_END_NAMESPACE
-
-namespace Utils { class LineColumnLabel; }
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorDocument;
-class BarDescriptorEditorWidget;
-
-class BarDescriptorEditor : public Core::IEditor
-{
- Q_OBJECT
-public:
- enum EditorPage {
- General = 0,
- Application,
- Assets,
- Source
- };
-
- BarDescriptorEditor();
-
- bool open(QString *errorString, const QString &fileName, const QString &realFileName);
- Core::IDocument *document();
- QWidget *toolBar();
-
- EditorPage activePage() const;
-
-private slots:
- void changeEditorPage(QAction *action);
- void updateCursorPosition();
-
-private:
- void setActivePage(EditorPage page);
-
- BarDescriptorDocument *m_file;
-
- QToolBar *m_toolBar;
- QActionGroup *m_actionGroup;
- Utils::LineColumnLabel *m_cursorPositionLabel;
- QAction *m_cursorPositionAction;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITOR_H
diff --git a/src/plugins/qnx/bardescriptoreditorabstractpanelwidget.cpp b/src/plugins/qnx/bardescriptoreditorabstractpanelwidget.cpp
deleted file mode 100644
index eae6e5bacb..0000000000
--- a/src/plugins/qnx/bardescriptoreditorabstractpanelwidget.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorabstractpanelwidget.h"
-
-#include <utils/pathchooser.h>
-#include <utils/qtcassert.h>
-
-#include <QCheckBox>
-#include <QComboBox>
-#include <QLineEdit>
-#include <QSignalMapper>
-#include <QTextEdit>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorEditorAbstractPanelWidget::BarDescriptorEditorAbstractPanelWidget(QWidget *parent) :
- QWidget(parent)
-{
- m_signalMapper = new QSignalMapper(this);
- connect(m_signalMapper, SIGNAL(mapped(int)), this, SLOT(handleSignalMapped(int)));
-}
-
-void BarDescriptorEditorAbstractPanelWidget::setValue(BarDescriptorDocument::Tag tag, const QVariant &value)
-{
- if (m_blockedSignals.contains(tag))
- return;
-
- blockSignalMapping(tag);
- updateWidgetValue(tag, value);
- unblockSignalMapping(tag);
-}
-
-void BarDescriptorEditorAbstractPanelWidget::addSignalMapping(BarDescriptorDocument::Tag tag, QObject *object, const char *signal)
-{
- m_signalMapper->setMapping(object, tag);
- connect(object, signal, m_signalMapper, SLOT(map()));
-}
-
-void BarDescriptorEditorAbstractPanelWidget::blockSignalMapping(BarDescriptorDocument::Tag tag)
-{
- m_blockedSignals.prepend(tag);
-}
-
-void BarDescriptorEditorAbstractPanelWidget::unblockSignalMapping(BarDescriptorDocument::Tag tag)
-{
- BarDescriptorDocument::Tag removedTag = m_blockedSignals.takeFirst();
- QTC_CHECK(removedTag == tag);
-}
-
-void BarDescriptorEditorAbstractPanelWidget::updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value)
-{
- QObject *object = m_signalMapper->mapping(static_cast<int>(tag));
- if (!object)
- return;
-
- if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(object))
- lineEdit->setText(value.toString());
- else if (QTextEdit *textEdit = qobject_cast<QTextEdit *>(object))
- textEdit->setPlainText(value.toString());
- else if (Utils::PathChooser *pathChooser = qobject_cast<Utils::PathChooser *>(object))
- pathChooser->setPath(value.toString());
- else if (QComboBox *comboBox = qobject_cast<QComboBox *>(object))
- comboBox->setCurrentIndex(comboBox->findData(value.toString()));
- else if (QCheckBox *checkBox = qobject_cast<QCheckBox *>(object))
- checkBox->setChecked(value.toBool());
- else
- QTC_CHECK(false);
-}
-
-void BarDescriptorEditorAbstractPanelWidget::emitChanged(BarDescriptorDocument::Tag tag)
-{
- QObject *sender = m_signalMapper->mapping(tag);
-
- if (!sender)
- return;
-
- if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(sender))
- emit changed(tag, lineEdit->text());
- else if (QTextEdit *textEdit = qobject_cast<QTextEdit *>(sender))
- emit changed(tag, textEdit->toPlainText());
- else if (Utils::PathChooser *pathChooser = qobject_cast<Utils::PathChooser *>(sender))
- emit changed(tag, pathChooser->path());
- else if (QComboBox *comboBox = qobject_cast<QComboBox *>(sender))
- emit changed(tag, comboBox->itemData(comboBox->currentIndex()));
- else if (QCheckBox *checkBox = qobject_cast<QCheckBox *>(sender))
- emit changed(tag, checkBox->isChecked());
- else
- QTC_CHECK(false);
-}
-
-void BarDescriptorEditorAbstractPanelWidget::handleSignalMapped(int id)
-{
- BarDescriptorDocument::Tag tag = static_cast<BarDescriptorDocument::Tag>(id);
-
- if (m_blockedSignals.contains(tag))
- return;
-
- blockSignalMapping(tag);
- emitChanged(tag);
- unblockSignalMapping(tag);
-}
diff --git a/src/plugins/qnx/bardescriptoreditorabstractpanelwidget.h b/src/plugins/qnx/bardescriptoreditorabstractpanelwidget.h
deleted file mode 100644
index 23408667dc..0000000000
--- a/src/plugins/qnx/bardescriptoreditorabstractpanelwidget.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORABSTRACTPANELWIDGET_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORABSTRACTPANELWIDGET_H
-
-#include <QWidget>
-
-#include "bardescriptordocument.h"
-
-namespace Utils { class PathChooser; }
-
-QT_BEGIN_NAMESPACE
-class QCheckBox;
-class QComboBox;
-class QLineEdit;
-class QSignalMapper;
-class QStringListModel;
-class QTextEdit;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorEditorAbstractPanelWidget : public QWidget
-{
- Q_OBJECT
-public:
- explicit BarDescriptorEditorAbstractPanelWidget(QWidget *parent = 0);
-
-public slots:
- void setValue(BarDescriptorDocument::Tag tag, const QVariant &value);
-
-signals:
- void changed(BarDescriptorDocument::Tag tag, const QVariant &value);
-
-protected:
- virtual void updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value);
- virtual void emitChanged(BarDescriptorDocument::Tag tag);
-
- void addSignalMapping(BarDescriptorDocument::Tag tag, QObject *object, const char *signal);
- void blockSignalMapping(BarDescriptorDocument::Tag tag);
- void unblockSignalMapping(BarDescriptorDocument::Tag tag);
-
-private slots:
- void handleSignalMapped(int id);
-
-private:
- QSignalMapper *m_signalMapper;
- QList<BarDescriptorDocument::Tag> m_blockedSignals;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORABSTRACTPANELWIDGET_H
diff --git a/src/plugins/qnx/bardescriptoreditorassetswidget.cpp b/src/plugins/qnx/bardescriptoreditorassetswidget.cpp
deleted file mode 100644
index c973c347ee..0000000000
--- a/src/plugins/qnx/bardescriptoreditorassetswidget.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorassetswidget.h"
-#include "ui_bardescriptoreditorassetswidget.h"
-
-#include "bardescriptordocument.h"
-
-#include <utils/qtcassert.h>
-
-#include <QFileDialog>
-#include <QStandardItemModel>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorEditorAssetsWidget::BarDescriptorEditorAssetsWidget(QWidget *parent) :
- BarDescriptorEditorAbstractPanelWidget(parent),
- m_ui(new Ui::BarDescriptorEditorAssetsWidget)
-{
- m_ui->setupUi(this);
-
- QStringList headerLabels;
- headerLabels << tr("Path") << tr("Destination") << tr("Entry-Point");
- m_assetsModel = new QStandardItemModel(this);
- m_assetsModel->setHorizontalHeaderLabels(headerLabels);
- m_ui->assets->setModel(m_assetsModel);
-
- connect(m_ui->addAsset, SIGNAL(clicked()), this, SLOT(addNewAsset()));
- connect(m_ui->removeAsset, SIGNAL(clicked()), this, SLOT(removeSelectedAsset()));
- connect(m_assetsModel, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(updateEntryCheckState(QStandardItem*)));
-
- addSignalMapping(BarDescriptorDocument::asset, m_assetsModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
- addSignalMapping(BarDescriptorDocument::asset, m_assetsModel, SIGNAL(rowsInserted(QModelIndex,int,int)));
- addSignalMapping(BarDescriptorDocument::asset, m_assetsModel, SIGNAL(rowsRemoved(QModelIndex,int,int)));
-}
-
-BarDescriptorEditorAssetsWidget::~BarDescriptorEditorAssetsWidget()
-{
- delete m_ui;
-}
-
-void BarDescriptorEditorAssetsWidget::clear()
-{
- blockSignalMapping(BarDescriptorDocument::asset);
- m_assetsModel->removeRows(0, m_assetsModel->rowCount());
- unblockSignalMapping(BarDescriptorDocument::asset);
-}
-
-QStandardItemModel *BarDescriptorEditorAssetsWidget::assetsModel() const
-{
- return m_assetsModel;
-}
-
-void BarDescriptorEditorAssetsWidget::updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value)
-{
- if (tag != BarDescriptorDocument::asset) {
- BarDescriptorEditorAbstractPanelWidget::updateWidgetValue(tag, value);
- return;
- }
-
- clear();
- BarDescriptorAssetList assets = value.value<BarDescriptorAssetList>();
- foreach (const BarDescriptorAsset asset, assets)
- addAsset(asset);
-}
-
-void BarDescriptorEditorAssetsWidget::addAsset(const QString &fullPath)
-{
- if (fullPath.isEmpty())
- return;
-
- BarDescriptorAsset asset;
- asset.source = fullPath;
- asset.destination = Utils::FileName::fromString(fullPath).fileName();
- asset.entry = false;
- addAsset(asset);
-}
-
-void BarDescriptorEditorAssetsWidget::removeAsset(const QString &fullPath)
-{
- QList<QStandardItem*> assetItems = m_assetsModel->findItems(fullPath);
- foreach (QStandardItem *assetItem, assetItems) {
- QList<QStandardItem*> assetRow = m_assetsModel->takeRow(assetItem->row());
- while (!assetRow.isEmpty())
- delete assetRow.takeLast();
- }
-}
-
-void BarDescriptorEditorAssetsWidget::addNewAsset()
-{
- const QString fileName = QFileDialog::getOpenFileName(this, tr("Select File to Add"));
- if (fileName.isEmpty())
- return;
- addAsset(fileName);
-}
-
-void BarDescriptorEditorAssetsWidget::removeSelectedAsset()
-{
- QModelIndexList selectedIndexes = m_ui->assets->selectionModel()->selectedRows();
- if (selectedIndexes.isEmpty())
- return;
-
- foreach (const QModelIndex &index, selectedIndexes)
- m_assetsModel->removeRow(index.row());
-}
-
-void BarDescriptorEditorAssetsWidget::updateEntryCheckState(QStandardItem *item)
-{
- if (item->column() != 2 || item->checkState() == Qt::Unchecked)
- return;
-
- disconnect(m_assetsModel, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(updateEntryCheckState(QStandardItem*)));
- for (int i = 0; i < m_assetsModel->rowCount(); ++i) {
- QStandardItem *other = m_assetsModel->item(i, 2);
- if (other == item)
- continue;
-
- // Only one asset can be the entry point
- other->setCheckState(Qt::Unchecked);
- }
- connect(m_assetsModel, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(updateEntryCheckState(QStandardItem*)));
-}
-
-void BarDescriptorEditorAssetsWidget::emitChanged(BarDescriptorDocument::Tag tag)
-{
- if (tag != BarDescriptorDocument::asset) {
- BarDescriptorEditorAbstractPanelWidget::emitChanged(tag);
- return;
- }
-
- BarDescriptorAssetList result;
- for (int i = 0; i < m_assetsModel->rowCount(); ++i) {
- BarDescriptorAsset asset;
- asset.source = m_assetsModel->item(i, 0)->text();
- asset.destination = m_assetsModel->item(i, 1)->text();
- asset.entry = m_assetsModel->item(i, 2)->checkState() == Qt::Checked;
- result.append(asset);
- }
-
- QVariant var;
- var.setValue(result);
- emit changed(tag, var);
-}
-
-void BarDescriptorEditorAssetsWidget::addAsset(const BarDescriptorAsset &asset)
-{
- const QString path = asset.source;
- const QString dest = asset.destination;
- QTC_ASSERT(!path.isEmpty(), return);
- QTC_ASSERT(!dest.isEmpty(), return);
-
- if (hasAsset(asset))
- return;
-
- QList<QStandardItem *> items;
- items << new QStandardItem(path);
- items << new QStandardItem(dest);
-
- QStandardItem *entryItem = new QStandardItem();
- entryItem->setCheckable(true);
- entryItem->setCheckState(asset.entry ? Qt::Checked : Qt::Unchecked);
- items << entryItem;
- m_assetsModel->appendRow(items);
-}
-
-bool BarDescriptorEditorAssetsWidget::hasAsset(const BarDescriptorAsset &asset)
-{
- for (int i = 0; i < m_assetsModel->rowCount(); ++i) {
- QStandardItem *sourceItem = m_assetsModel->item(i, 0);
- QStandardItem *destItem = m_assetsModel->item(i, 1);
- if (sourceItem->text() == asset.source && destItem->text() == asset.destination)
- return true;
- }
-
- return false;
-}
diff --git a/src/plugins/qnx/bardescriptoreditorassetswidget.h b/src/plugins/qnx/bardescriptoreditorassetswidget.h
deleted file mode 100644
index 41b3710135..0000000000
--- a/src/plugins/qnx/bardescriptoreditorassetswidget.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORASSETSWIDGET_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORASSETSWIDGET_H
-
-#include "bardescriptoreditorabstractpanelwidget.h"
-
-QT_BEGIN_NAMESPACE
-class QStandardItem;
-class QStandardItemModel;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BarDescriptorEditorAssetsWidget; }
-
-class BarDescriptorAsset;
-
-class BarDescriptorEditorAssetsWidget : public BarDescriptorEditorAbstractPanelWidget
-{
- Q_OBJECT
-
-public:
- explicit BarDescriptorEditorAssetsWidget(QWidget *parent = 0);
- ~BarDescriptorEditorAssetsWidget();
-
- QStandardItemModel *assetsModel() const;
-
-public slots:
- void addAsset(const QString &fullPath);
- void removeAsset(const QString &fullPath);
-
-protected:
- void updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value);
- void emitChanged(BarDescriptorDocument::Tag tag);
-
-private slots:
- void addNewAsset();
- void removeSelectedAsset();
- void updateEntryCheckState(QStandardItem *item);
-
-private:
- void clear();
- void addAsset(const BarDescriptorAsset &asset);
- bool hasAsset(const BarDescriptorAsset &asset);
-
- Ui::BarDescriptorEditorAssetsWidget *m_ui;
-
- QStandardItemModel *m_assetsModel;
-};
-
-
-} // namespace Internal
-} // namespace Qnx
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORASSETSWIDGET_H
diff --git a/src/plugins/qnx/bardescriptoreditorassetswidget.ui b/src/plugins/qnx/bardescriptoreditorassetswidget.ui
deleted file mode 100644
index 42242b9273..0000000000
--- a/src/plugins/qnx/bardescriptoreditorassetswidget.ui
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BarDescriptorEditorAssetsWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BarDescriptorEditorAssetsWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>380</width>
- <height>245</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QTreeView" name="assets">
- <property name="rootIsDecorated">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
- <widget class="QPushButton" name="addAsset">
- <property name="text">
- <string>Add...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="removeAsset">
- <property name="text">
- <string>Remove</string>
- </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>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/bardescriptoreditorauthorinformationwidget.cpp b/src/plugins/qnx/bardescriptoreditorauthorinformationwidget.cpp
deleted file mode 100644
index 0c5090997a..0000000000
--- a/src/plugins/qnx/bardescriptoreditorauthorinformationwidget.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorauthorinformationwidget.h"
-#include "ui_bardescriptoreditorauthorinformationwidget.h"
-
-#include "blackberrydebugtokenreader.h"
-#include "blackberrydeviceconfiguration.h"
-#include "blackberrysigningutils.h"
-#include "qnxconstants.h"
-
-#include <projectexplorer/devicesupport/devicemanager.h>
-#include <utils/qtcassert.h>
-
-#include <QInputDialog>
-#include <QMessageBox>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorEditorAuthorInformationWidget::BarDescriptorEditorAuthorInformationWidget(QWidget *parent) :
- BarDescriptorEditorAbstractPanelWidget(parent),
- m_ui(new Ui::BarDescriptorEditorAuthorInformationWidget)
-{
- m_ui->setupUi(this);
-
- m_ui->setFromDebugToken->setVisible(BlackBerryDebugTokenReader::isSupported());
-
- addSignalMapping(BarDescriptorDocument::author, m_ui->author, SIGNAL(textChanged(QString)));
- addSignalMapping(BarDescriptorDocument::authorId, m_ui->authorId, SIGNAL(textChanged(QString)));
- connect(m_ui->setFromDebugToken, SIGNAL(clicked()), this, SLOT(setAuthorFromDebugToken()));
-}
-
-BarDescriptorEditorAuthorInformationWidget::~BarDescriptorEditorAuthorInformationWidget()
-{
- delete m_ui;
-}
-
-void BarDescriptorEditorAuthorInformationWidget::updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value)
-{
- if (tag == BarDescriptorDocument::publisher && !value.toString().isEmpty())
- // <publisher> is deprecated and hence not connected to the author field as we only want to read it from the XML
- m_ui->author->setText(value.toString());
- else
- BarDescriptorEditorAbstractPanelWidget::updateWidgetValue(tag, value);
-}
-
-void BarDescriptorEditorAuthorInformationWidget::setAuthorFromDebugToken()
-{
- // To select debug token, make it fancier once the debug token management is done in
- // Qt Creator
- QStringList debugTokens;
- ProjectExplorer::DeviceManager *deviceManager = ProjectExplorer::DeviceManager::instance();
- for (int i = 0; i < deviceManager->deviceCount(); ++i) {
- ProjectExplorer::IDevice::ConstPtr device = deviceManager->deviceAt(i);
- if (device->type() == Core::Id(Constants::QNX_BB_OS_TYPE)) {
- BlackBerryDeviceConfiguration::ConstPtr bbDevice = device.dynamicCast<const BlackBerryDeviceConfiguration>();
- QTC_ASSERT(bbDevice, continue);
-
- debugTokens << bbDevice->debugToken();
- }
- }
- debugTokens << BlackBerrySigningUtils::instance().debugTokens();
- debugTokens.removeDuplicates();
-
- bool ok;
- QString debugToken = QInputDialog::getItem(this, tr("Select Debug Token"), tr("Debug token:"), debugTokens, 0, false, &ok);
- if (!ok || debugToken.isEmpty())
- return;
-
- BlackBerryDebugTokenReader debugTokenReader(debugToken);
- if (!debugTokenReader.isValid()) {
- QMessageBox::warning(this, tr("Error Reading Debug Token"), tr("There was a problem reading debug token."));
- return;
- }
-
- m_ui->author->setText(debugTokenReader.author());
- m_ui->authorId->setText(debugTokenReader.authorId());
-}
diff --git a/src/plugins/qnx/bardescriptoreditorauthorinformationwidget.h b/src/plugins/qnx/bardescriptoreditorauthorinformationwidget.h
deleted file mode 100644
index 893760cad7..0000000000
--- a/src/plugins/qnx/bardescriptoreditorauthorinformationwidget.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORAUTHORINFORMATIONWIDGET_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORAUTHORINFORMATIONWIDGET_H
-
-#include "bardescriptoreditorabstractpanelwidget.h"
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BarDescriptorEditorAuthorInformationWidget; }
-
-class BarDescriptorEditorAuthorInformationWidget : public BarDescriptorEditorAbstractPanelWidget
-{
- Q_OBJECT
-
-public:
- explicit BarDescriptorEditorAuthorInformationWidget(QWidget *parent = 0);
- ~BarDescriptorEditorAuthorInformationWidget();
-
-protected:
- void updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value);
-
-private slots:
- void setAuthorFromDebugToken();
-
-private:
- Ui::BarDescriptorEditorAuthorInformationWidget *m_ui;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORAUTHORINFORMATIONWIDGET_H
diff --git a/src/plugins/qnx/bardescriptoreditorauthorinformationwidget.ui b/src/plugins/qnx/bardescriptoreditorauthorinformationwidget.ui
deleted file mode 100644
index cd2de19308..0000000000
--- a/src/plugins/qnx/bardescriptoreditorauthorinformationwidget.ui
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BarDescriptorEditorAuthorInformationWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BarDescriptorEditorAuthorInformationWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>371</width>
- <height>90</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Author:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="author"/>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Author ID:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="authorId"/>
- </item>
- <item row="3" column="1">
- <widget class="QPushButton" name="setFromDebugToken">
- <property name="text">
- <string>Set from debug token...</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/bardescriptoreditorentrypointwidget.cpp b/src/plugins/qnx/bardescriptoreditorentrypointwidget.cpp
deleted file mode 100644
index 6ed3e6be20..0000000000
--- a/src/plugins/qnx/bardescriptoreditorentrypointwidget.cpp
+++ /dev/null
@@ -1,309 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorentrypointwidget.h"
-#include "ui_bardescriptoreditorentrypointwidget.h"
-
-#include <QFileDialog>
-#include <QStringListModel>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-// Recommended maximum size for icons according to
-// http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/r_barfile_dtd_ref_image.html
-static int AppIconMaxWidth = 114;
-static int AppIconMaxHeight = 114;
-
-// Recommended maximum size for splashscreens according to
-// http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/r_barfile_dtd_ref_splashscreens.html
-static int SplashScreenMaxWidth = 1280;
-static int SplashScreenMaxHeight = 1280;
-}
-
-BarDescriptorEditorEntryPointWidget::BarDescriptorEditorEntryPointWidget(QWidget *parent) :
- BarDescriptorEditorAbstractPanelWidget(parent),
- m_ui(new Ui::BarDescriptorEditorEntryPointWidget)
-{
- m_ui->setupUi(this);
-
- m_ui->iconFilePath->setExpectedKind(Utils::PathChooser::File);
- m_ui->iconFilePath->setHistoryCompleter(QLatin1String("Qmake.Icon.History"));
- m_ui->iconFilePath->setPromptDialogFilter(tr("Images (*.jpg *.png)"));
-
- m_ui->iconWarningLabel->setVisible(false);
- m_ui->iconWarningPixmap->setVisible(false);
-
- m_ui->splashScreenWarningLabel->setVisible(false);
- m_ui->splashScreenWarningPixmap->setVisible(false);
-
- connect(m_ui->iconFilePath, SIGNAL(changed(QString)), this, SLOT(handleIconChanged(QString)));
- connect(m_ui->iconClearButton, SIGNAL(clicked()), this, SLOT(clearIcon()));
-
- m_splashScreenModel = new QStringListModel(this);
- m_ui->splashScreensView->setModel(m_splashScreenModel);
- connect(m_ui->addSplashScreen, SIGNAL(clicked()), this, SLOT(browseForSplashScreen()));
- connect(m_ui->removeSplashScreen, SIGNAL(clicked()), this, SLOT(removeSelectedSplashScreen()));
- connect(m_ui->splashScreensView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(handleSplashScreenSelectionChanged(QItemSelection,QItemSelection)));
-
- addSignalMapping(BarDescriptorDocument::name, m_ui->applicationName, SIGNAL(textChanged(QString)));
- addSignalMapping(BarDescriptorDocument::description, m_ui->applicationDescription, SIGNAL(textChanged()));
- addSignalMapping(BarDescriptorDocument::icon, m_ui->iconFilePath, SIGNAL(changed(QString)));
- addSignalMapping(BarDescriptorDocument::splashScreens, m_splashScreenModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
- addSignalMapping(BarDescriptorDocument::splashScreens, m_splashScreenModel, SIGNAL(rowsRemoved(QModelIndex,int,int)));
- addSignalMapping(BarDescriptorDocument::splashScreens, m_splashScreenModel, SIGNAL(rowsInserted(QModelIndex,int,int)));
-}
-
-BarDescriptorEditorEntryPointWidget::~BarDescriptorEditorEntryPointWidget()
-{
- delete m_ui;
-}
-
-void BarDescriptorEditorEntryPointWidget::setAssetsModel(QStandardItemModel *assetsModel)
-{
- m_assetsModel = assetsModel;
-}
-
-void BarDescriptorEditorEntryPointWidget::updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value)
-{
- // During file loading, the assets might not have been read yet
- if (tag == BarDescriptorDocument::icon) {
- QMetaObject::invokeMethod(this, "setApplicationIconDelayed", Qt::QueuedConnection, Q_ARG(QString, value.toString()));
- } else if (tag == BarDescriptorDocument::splashScreens) {
- QStringList splashScreens = value.toStringList();
- foreach (const QString &splashScreen, splashScreens)
- QMetaObject::invokeMethod(this, "appendSplashScreenDelayed", Qt::QueuedConnection, Q_ARG(QString, splashScreen));
- } else {
- BarDescriptorEditorAbstractPanelWidget::updateWidgetValue(tag, value);
- }
-}
-
-void BarDescriptorEditorEntryPointWidget::emitChanged(BarDescriptorDocument::Tag tag)
-{
- if (tag == BarDescriptorDocument::icon) {
- emit changed(tag, Utils::FileName::fromString(m_ui->iconFilePath->path()).fileName());
- } else if (tag == BarDescriptorDocument::splashScreens) {
- QStringList list;
- foreach (const QString &splashScreen, m_splashScreenModel->stringList())
- list << Utils::FileName::fromString(splashScreen).fileName();
-
- emit changed(tag, list);
- } else {
- BarDescriptorEditorAbstractPanelWidget::emitChanged(tag);
- }
-}
-
-void BarDescriptorEditorEntryPointWidget::setApplicationIconPreview(const QString &path)
-{
- setImagePreview(m_ui->iconPreviewLabel, path);
-}
-
-void BarDescriptorEditorEntryPointWidget::validateIconSize(const QString &path)
-{
- validateImage(path, m_ui->iconWarningLabel, m_ui->iconWarningPixmap, QSize(AppIconMaxWidth, AppIconMaxHeight));
-}
-
-void BarDescriptorEditorEntryPointWidget::handleIconChanged(const QString &path)
-{
- if (path == m_prevIconPath)
- return;
-
- setApplicationIconPreview(path);
- validateIconSize(path);
-
- if (!m_splashScreenModel->stringList().contains(m_prevIconPath))
- emit imageRemoved(m_prevIconPath);
-
- m_prevIconPath = path;
- if (QFileInfo::exists(path))
- emit imageAdded(path);
-}
-
-void BarDescriptorEditorEntryPointWidget::clearIcon()
-{
- m_ui->iconFilePath->setPath(QString());
-}
-
-void BarDescriptorEditorEntryPointWidget::browseForSplashScreen()
-{
- const QString fileName = QFileDialog::getOpenFileName(this, tr("Select Splash Screen"), QString(), tr("Images (*.jpg *.png)"));
- if (fileName.isEmpty())
- return;
-
- if (m_splashScreenModel->stringList().contains(fileName))
- return;
-
- int rowCount = m_splashScreenModel->rowCount();
- m_splashScreenModel->insertRow(rowCount);
- m_splashScreenModel->setData(m_splashScreenModel->index(rowCount), fileName);
- emit imageAdded(fileName);
-}
-
-void BarDescriptorEditorEntryPointWidget::removeSelectedSplashScreen()
-{
- QModelIndexList selectedIndexes = m_ui->splashScreensView->selectionModel()->selectedRows();
- if (selectedIndexes.isEmpty())
- return;
-
- foreach (const QModelIndex &index, selectedIndexes) {
- QString path = m_splashScreenModel->data(index, Qt::DisplayRole).toString();
- if (path != m_ui->iconFilePath->path())
- emit imageRemoved(path);
-
- m_splashScreenModel->removeRow(index.row());
- }
-}
-
-void BarDescriptorEditorEntryPointWidget::handleSplashScreenSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
-{
- Q_UNUSED(deselected);
-
- const bool emptySelection = selected.indexes().isEmpty();
- m_ui->removeSplashScreen->setEnabled(!emptySelection);
-
- if (!emptySelection) {
- QString path = m_splashScreenModel->data(selected.indexes().at(0), Qt::DisplayRole).toString();
- setImagePreview(m_ui->splashScreenPreviewLabel, path);
- validateSplashScreenSize(path);
- } else {
- setImagePreview(m_ui->splashScreenPreviewLabel, QString());
- m_ui->splashScreenWarningLabel->setVisible(false);
- m_ui->splashScreenWarningPixmap->setVisible(false);
- }
-}
-
-void BarDescriptorEditorEntryPointWidget::appendSplashScreenDelayed(const QString &splashScreenPath)
-{
- const QString fullSplashScreenPath = localAssetPathFromDestination(splashScreenPath);
- if (fullSplashScreenPath.isEmpty())
- return;
-
- blockSignalMapping(BarDescriptorDocument::splashScreens);
- int rowCount = m_splashScreenModel->rowCount();
- m_splashScreenModel->insertRow(rowCount);
- m_splashScreenModel->setData(m_splashScreenModel->index(rowCount), fullSplashScreenPath);
- unblockSignalMapping(BarDescriptorDocument::splashScreens);
-}
-
-void BarDescriptorEditorEntryPointWidget::setImagePreview(QLabel *previewLabel, const QString &path)
-{
- if (path.isEmpty()) {
- previewLabel->clear();
- return;
- }
-
- QPixmap originalPixmap(path);
- if (originalPixmap.isNull()) {
- previewLabel->clear();
- return;
- }
-
- QSize size = previewLabel->minimumSize();
- QPixmap scaledPixmap = originalPixmap.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
- if (scaledPixmap.isNull()) {
- previewLabel->clear();
- return;
- }
-
- previewLabel->setPixmap(scaledPixmap);
-}
-
-void BarDescriptorEditorEntryPointWidget::validateSplashScreenSize(const QString &path)
-{
- validateImage(path, m_ui->splashScreenWarningLabel, m_ui->splashScreenWarningPixmap, QSize(SplashScreenMaxWidth, SplashScreenMaxHeight));
-}
-
-void BarDescriptorEditorEntryPointWidget::validateImage(const QString &path, QLabel *warningMessage, QLabel *warningPixmap, const QSize &maximumSize)
-{
- ImageValidationResult result = Valid;
-
- QSize actualSize;
- if (!path.isEmpty()) {
- QImage img(path);
- if (img.isNull()) {
- result = CouldNotLoad;
- } else {
- actualSize = img.size();
- if (actualSize.width() > maximumSize.width() || actualSize.height() > maximumSize.height())
- result = IncorrectSize;
- }
- }
-
- switch (result) {
- case CouldNotLoad:
- warningMessage->setText(tr("<font color=\"red\">Could not open \"%1\" for reading.</font>").arg(path));
- warningMessage->setVisible(true);
- warningPixmap->setVisible(true);
- break;
- case IncorrectSize: {
- warningMessage->setText(tr("<font color=\"red\">The selected image is too big (%1x%2). The maximum size is %3x%4 pixels.</font>")
- .arg(actualSize.width()).arg(actualSize.height())
- .arg(maximumSize.width()).arg(maximumSize.height()));
- warningMessage->setVisible(true);
- warningPixmap->setVisible(true);
- break;
- }
- case Valid:
- default:
- warningMessage->setVisible(false);
- warningPixmap->setVisible(false);
- break;
- }
-}
-
-void BarDescriptorEditorEntryPointWidget::setApplicationIconDelayed(const QString &iconPath)
-{
- const QString fullIconPath = localAssetPathFromDestination(iconPath);
- if (fullIconPath.isEmpty())
- return;
-
- blockSignalMapping(BarDescriptorDocument::icon);
- m_ui->iconFilePath->setPath(fullIconPath);
- setApplicationIconPreview(fullIconPath);
- validateIconSize(fullIconPath);
- unblockSignalMapping(BarDescriptorDocument::icon);
-}
-
-QString BarDescriptorEditorEntryPointWidget::localAssetPathFromDestination(const QString &destination)
-{
- if (!m_assetsModel)
- return QString();
-
- for (int i = 0; i < m_assetsModel.data()->rowCount(); ++i) {
- QStandardItem *destItem = m_assetsModel.data()->item(i, 1);
- if (destItem->text() == destination)
- return m_assetsModel.data()->item(i, 0)->text();
- }
-
- return QString();
-}
diff --git a/src/plugins/qnx/bardescriptoreditorentrypointwidget.h b/src/plugins/qnx/bardescriptoreditorentrypointwidget.h
deleted file mode 100644
index 880cdfd9a9..0000000000
--- a/src/plugins/qnx/bardescriptoreditorentrypointwidget.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORENTRYPOINTWIDGET_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORENTRYPOINTWIDGET_H
-
-#include "bardescriptoreditorabstractpanelwidget.h"
-
-#include <QPointer>
-#include <QStandardItemModel>
-
-QT_BEGIN_NAMESPACE
-class QItemSelection;
-class QLabel;
-class QStringListModel;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BarDescriptorEditorEntryPointWidget; }
-
-class BarDescriptorEditorEntryPointWidget : public BarDescriptorEditorAbstractPanelWidget
-{
- Q_OBJECT
-
-public:
- explicit BarDescriptorEditorEntryPointWidget(QWidget *parent = 0);
- ~BarDescriptorEditorEntryPointWidget();
-
- void setAssetsModel(QStandardItemModel *assetsModel);
-
-signals:
- void imageAdded(const QString &path);
- void imageRemoved(const QString &path);
-
-protected:
- void updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value);
- void emitChanged(BarDescriptorDocument::Tag tag);
-
-private slots:
- void setApplicationIconDelayed(const QString &iconPath);
- void setApplicationIconPreview(const QString &path);
- void validateIconSize(const QString &path);
- void handleIconChanged(const QString &path);
- void clearIcon();
-
- void browseForSplashScreen();
- void removeSelectedSplashScreen();
- void handleSplashScreenSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
- void appendSplashScreenDelayed(const QString &splashScreenPath);
-
-private:
- enum ImageValidationResult {
- Valid,
- CouldNotLoad,
- IncorrectSize
- };
-
- void setImagePreview(QLabel *previewLabel, const QString &path);
- void validateSplashScreenSize(const QString &path);
- void validateImage(const QString &path, QLabel *warningMessage, QLabel *warningPixmap, const QSize &maximumSize);
-
- QString localAssetPathFromDestination(const QString &path);
-
- QStringListModel *m_splashScreenModel;
- QPointer<QStandardItemModel> m_assetsModel;
-
- QString m_prevIconPath;
-
- Ui::BarDescriptorEditorEntryPointWidget *m_ui;
-};
-
-
-} // namespace Internal
-} // namespace Qnx
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORENTRYPOINTWIDGET_H
diff --git a/src/plugins/qnx/bardescriptoreditorentrypointwidget.ui b/src/plugins/qnx/bardescriptoreditorentrypointwidget.ui
deleted file mode 100644
index f83b6bc72b..0000000000
--- a/src/plugins/qnx/bardescriptoreditorentrypointwidget.ui
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BarDescriptorEditorEntryPointWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BarDescriptorEditorEntryPointWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>611</width>
- <height>455</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>Name:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="applicationName"/>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Description:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QTextEdit" name="applicationDescription">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>Icon:</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <layout class="QVBoxLayout" name="verticalLayout_8">
- <item>
- <widget class="QLabel" name="iconPreviewLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>90</width>
- <height>90</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Sunken</enum>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="Utils::PathChooser" name="iconFilePath" native="true"/>
- </item>
- <item>
- <widget class="QPushButton" name="iconClearButton">
- <property name="text">
- <string>Clear</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="iconWarningPixmap">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../coreplugin/core.qrc">:/core/images/warning.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QLabel" name="iconWarningLabel">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Splash screens:</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <widget class="QListView" name="splashScreensView"/>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_9">
- <item>
- <widget class="QPushButton" name="addSplashScreen">
- <property name="text">
- <string>Add...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="removeSplashScreen">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Remove</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="splashScreenPreviewLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>90</width>
- <height>90</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Sunken</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_3">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item row="9" column="0">
- <widget class="QLabel" name="splashScreenWarningPixmap">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../coreplugin/core.qrc">:/core/images/warning.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="9" column="1">
- <widget class="QLabel" name="splashScreenWarningLabel">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>Utils::PathChooser</class>
- <extends>QWidget</extends>
- <header location="global">utils/pathchooser.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources>
- <include location="../projectexplorer/projectexplorer.qrc"/>
- </resources>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/bardescriptoreditorenvironmentwidget.cpp b/src/plugins/qnx/bardescriptoreditorenvironmentwidget.cpp
deleted file mode 100644
index 4612748a34..0000000000
--- a/src/plugins/qnx/bardescriptoreditorenvironmentwidget.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorenvironmentwidget.h"
-#include "ui_bardescriptoreditorenvironmentwidget.h"
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorEditorEnvironmentWidget::BarDescriptorEditorEnvironmentWidget(QWidget *parent) :
- BarDescriptorEditorAbstractPanelWidget(parent),
- m_ui(new Ui::BarDescriptorEditorEnvironmentWidget)
-{
- m_ui->setupUi(this);
-
- m_ui->environmentWidget->setBaseEnvironmentText(tr("Device Environment"));
-
- addSignalMapping(BarDescriptorDocument::env, m_ui->environmentWidget, SIGNAL(userChangesChanged()));
-}
-
-BarDescriptorEditorEnvironmentWidget::~BarDescriptorEditorEnvironmentWidget()
-{
- delete m_ui;
-}
-
-void BarDescriptorEditorEnvironmentWidget::updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value)
-{
- if (tag != BarDescriptorDocument::env) {
- BarDescriptorEditorAbstractPanelWidget::updateWidgetValue(tag, value);
- return;
- }
-
- m_ui->environmentWidget->setUserChanges(value.value<QList<Utils::EnvironmentItem> >());
-}
-
-void BarDescriptorEditorEnvironmentWidget::emitChanged(BarDescriptorDocument::Tag tag)
-{
- if (tag != BarDescriptorDocument::env) {
- BarDescriptorEditorAbstractPanelWidget::emitChanged(tag);
- return;
- }
-
- QVariant var;
- var.setValue(m_ui->environmentWidget->userChanges());
- emit changed(tag, var);
-}
diff --git a/src/plugins/qnx/bardescriptoreditorenvironmentwidget.h b/src/plugins/qnx/bardescriptoreditorenvironmentwidget.h
deleted file mode 100644
index 515b59221c..0000000000
--- a/src/plugins/qnx/bardescriptoreditorenvironmentwidget.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORENVIRONMENTWIDGET_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORENVIRONMENTWIDGET_H
-
-#include "bardescriptoreditorabstractpanelwidget.h"
-
-#include <utils/environment.h>
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BarDescriptorEditorEnvironmentWidget; }
-
-class BarDescriptorEditorEnvironmentWidget : public BarDescriptorEditorAbstractPanelWidget
-{
- Q_OBJECT
-
-public:
- explicit BarDescriptorEditorEnvironmentWidget(QWidget *parent = 0);
- ~BarDescriptorEditorEnvironmentWidget();
-
-protected:
- void updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value);
- void emitChanged(BarDescriptorDocument::Tag tag);
-
-private:
- Ui::BarDescriptorEditorEnvironmentWidget *m_ui;
-};
-
-
-} // namespace Internal
-} // namespace Qnx
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORENVIRONMENTWIDGET_H
diff --git a/src/plugins/qnx/bardescriptoreditorenvironmentwidget.ui b/src/plugins/qnx/bardescriptoreditorenvironmentwidget.ui
deleted file mode 100644
index 07cfedf493..0000000000
--- a/src/plugins/qnx/bardescriptoreditorenvironmentwidget.ui
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BarDescriptorEditorEnvironmentWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BarDescriptorEditorEnvironmentWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="ProjectExplorer::EnvironmentWidget" name="environmentWidget" native="true"/>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>ProjectExplorer::EnvironmentWidget</class>
- <extends>QWidget</extends>
- <header location="global">projectexplorer/environmentwidget.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/bardescriptoreditorfactory.cpp b/src/plugins/qnx/bardescriptoreditorfactory.cpp
deleted file mode 100644
index dc8c2774bd..0000000000
--- a/src/plugins/qnx/bardescriptoreditorfactory.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorfactory.h"
-
-#include "qnxconstants.h"
-#include "bardescriptoreditor.h"
-#include "bardescriptoreditorwidget.h"
-
-#include <coreplugin/editormanager/editormanager.h>
-#include <coreplugin/editormanager/ieditor.h>
-#include <texteditor/texteditoractionhandler.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-class BarDescriptorActionHandler : public TextEditor::TextEditorActionHandler
-{
-public:
- BarDescriptorActionHandler(QObject *parent)
- : TextEditor::TextEditorActionHandler(parent, Constants::QNX_BAR_DESCRIPTOR_EDITOR_CONTEXT)
- {
- }
-protected:
- TextEditor::TextEditorWidget *resolveTextEditorWidget(Core::IEditor *editor) const
- {
- BarDescriptorEditorWidget *w = qobject_cast<BarDescriptorEditorWidget *>(editor->widget());
- return w ? w->sourceWidget() : 0;
- }
-};
-
-BarDescriptorEditorFactory::BarDescriptorEditorFactory(QObject *parent)
- : Core::IEditorFactory(parent)
-{
- setId(Constants::QNX_BAR_DESCRIPTOR_EDITOR_ID);
- setDisplayName(tr("Bar descriptor editor"));
- addMimeType(Constants::QNX_BAR_DESCRIPTOR_MIME_TYPE);
- new BarDescriptorActionHandler(this);
-}
-
-Core::IEditor *BarDescriptorEditorFactory::createEditor()
-{
- BarDescriptorEditor *editor = new BarDescriptorEditor();
- return editor;
-}
diff --git a/src/plugins/qnx/bardescriptoreditorfactory.h b/src/plugins/qnx/bardescriptoreditorfactory.h
deleted file mode 100644
index 72d7d2ce23..0000000000
--- a/src/plugins/qnx/bardescriptoreditorfactory.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORFACTORY_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORFACTORY_H
-
-#include <coreplugin/editormanager/ieditorfactory.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorEditorFactory : public Core::IEditorFactory
-{
- Q_OBJECT
-
-public:
- explicit BarDescriptorEditorFactory(QObject *parent = 0);
-
- Core::IEditor *createEditor();
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORFACTORY_H
diff --git a/src/plugins/qnx/bardescriptoreditorgeneralwidget.cpp b/src/plugins/qnx/bardescriptoreditorgeneralwidget.cpp
deleted file mode 100644
index 887370ea80..0000000000
--- a/src/plugins/qnx/bardescriptoreditorgeneralwidget.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorgeneralwidget.h"
-#include "ui_bardescriptoreditorgeneralwidget.h"
-
-#include <utils/qtcassert.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorEditorGeneralWidget::BarDescriptorEditorGeneralWidget(QWidget *parent) :
- BarDescriptorEditorAbstractPanelWidget(parent),
- m_ui(new Ui::BarDescriptorEditorGeneralWidget)
-{
- m_ui->setupUi(this);
-
- m_ui->orientation->addItem(tr("Default"), QLatin1String(""));
- m_ui->orientation->addItem(tr("Auto-orient"), QLatin1String("auto-orient"));
- m_ui->orientation->addItem(tr("Landscape"), QLatin1String("landscape"));
- m_ui->orientation->addItem(tr("Portrait"), QLatin1String("portrait"));
-
- m_ui->chrome->addItem(tr("Standard"), QLatin1String("standard"));
- m_ui->chrome->addItem(tr("None"), QLatin1String("none"));
-
- addSignalMapping(BarDescriptorDocument::aspectRatio, m_ui->orientation, SIGNAL(currentIndexChanged(int)));
- addSignalMapping(BarDescriptorDocument::systemChrome, m_ui->chrome, SIGNAL(currentIndexChanged(int)));
- addSignalMapping(BarDescriptorDocument::transparent, m_ui->transparentMainWindow, SIGNAL(toggled(bool)));
- addSignalMapping(BarDescriptorDocument::arg, m_ui->applicationArguments, SIGNAL(textChanged(QString)));
-}
-
-BarDescriptorEditorGeneralWidget::~BarDescriptorEditorGeneralWidget()
-{
- delete m_ui;
-}
-
-void BarDescriptorEditorGeneralWidget::updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value)
-{
- if (tag == BarDescriptorDocument::aspectRatio) {
- m_ui->orientation->setCurrentIndex(m_ui->orientation->findData(value));
- } else if (tag == BarDescriptorDocument::autoOrients) {
- if (value.toString() == QLatin1String("true")) {
- blockSignalMapping(BarDescriptorDocument::aspectRatio);
- m_ui->orientation->setCurrentIndex(m_ui->orientation->findData(QLatin1String("auto-orient")));
- unblockSignalMapping(BarDescriptorDocument::aspectRatio);
- }
- } else if (tag == BarDescriptorDocument::arg) {
- m_ui->applicationArguments->setText(value.toStringList().join(QLatin1Char(' ')));
- } else {
- BarDescriptorEditorAbstractPanelWidget::updateWidgetValue(tag, value);
- }
-}
-
-void BarDescriptorEditorGeneralWidget::emitChanged(BarDescriptorDocument::Tag tag)
-{
- if (tag == BarDescriptorDocument::aspectRatio) {
- QString value = m_ui->orientation->itemData(m_ui->orientation->currentIndex()).toString();
- if (value == QLatin1String("auto-orient")) {
- emit changed(BarDescriptorDocument::aspectRatio, QLatin1String(""));
- emit changed(BarDescriptorDocument::autoOrients, QLatin1String("true"));
- return;
- } else if (!value.isEmpty()) {
- emit changed(BarDescriptorDocument::aspectRatio, value);
- emit changed(BarDescriptorDocument::autoOrients, QLatin1String("false"));
- } else {
- emit changed(BarDescriptorDocument::aspectRatio, value);
- emit changed(BarDescriptorDocument::autoOrients, QLatin1String(""));
- }
- } else if (tag == BarDescriptorDocument::arg) {
- emit changed(tag, m_ui->applicationArguments->text().split(QLatin1Char(' ')));
- } else {
- BarDescriptorEditorAbstractPanelWidget::emitChanged(tag);
- }
-}
diff --git a/src/plugins/qnx/bardescriptoreditorgeneralwidget.h b/src/plugins/qnx/bardescriptoreditorgeneralwidget.h
deleted file mode 100644
index 1895110018..0000000000
--- a/src/plugins/qnx/bardescriptoreditorgeneralwidget.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORGENERALWIDGET_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORGENERALWIDGET_H
-
-#include "bardescriptoreditorabstractpanelwidget.h"
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BarDescriptorEditorGeneralWidget; }
-
-class BarDescriptorEditorGeneralWidget : public BarDescriptorEditorAbstractPanelWidget
-{
- Q_OBJECT
-
-public:
- explicit BarDescriptorEditorGeneralWidget(QWidget *parent = 0);
- ~BarDescriptorEditorGeneralWidget();
-
-protected:
- void updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value);
- void emitChanged(BarDescriptorDocument::Tag tag);
-
-private:
- Ui::BarDescriptorEditorGeneralWidget *m_ui;
-};
-
-
-} // namespace Internal
-} // namespace Qnx
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORGENERALWIDGET_H
diff --git a/src/plugins/qnx/bardescriptoreditorgeneralwidget.ui b/src/plugins/qnx/bardescriptoreditorgeneralwidget.ui
deleted file mode 100644
index 8a4c3d8787..0000000000
--- a/src/plugins/qnx/bardescriptoreditorgeneralwidget.ui
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BarDescriptorEditorGeneralWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BarDescriptorEditorGeneralWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>373</width>
- <height>112</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label_12">
- <property name="text">
- <string>Orientation:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="orientation"/>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_13">
- <property name="text">
- <string>Chrome:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="chrome"/>
- </item>
- <item row="2" column="0" colspan="2">
- <widget class="QCheckBox" name="transparentMainWindow">
- <property name="text">
- <string>Transparent main window</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_14">
- <property name="text">
- <string>Application Arguments:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLineEdit" name="applicationArguments"/>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/bardescriptoreditorpackageinformationwidget.cpp b/src/plugins/qnx/bardescriptoreditorpackageinformationwidget.cpp
deleted file mode 100644
index c4bd78a98b..0000000000
--- a/src/plugins/qnx/bardescriptoreditorpackageinformationwidget.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorpackageinformationwidget.h"
-#include "ui_bardescriptoreditorpackageinformationwidget.h"
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorEditorPackageInformationWidget::BarDescriptorEditorPackageInformationWidget(QWidget *parent) :
- BarDescriptorEditorAbstractPanelWidget(parent),
- m_ui(new Ui::BarDescriptorEditorPackageInformationWidget)
-{
- m_ui->setupUi(this);
-
- QRegExp versionNumberRegExp(QLatin1String("(\\d{1,3}\\.)?(\\d{1,3}\\.)?(\\d{1,3})"));
- QRegExpValidator *versionNumberValidator = new QRegExpValidator(versionNumberRegExp, this);
- m_ui->packageVersion->setValidator(versionNumberValidator);
-
- addSignalMapping(BarDescriptorDocument::id, m_ui->packageId, SIGNAL(textChanged(QString)));
- addSignalMapping(BarDescriptorDocument::versionNumber, m_ui->packageVersion, SIGNAL(textChanged(QString)));
- addSignalMapping(BarDescriptorDocument::buildId, m_ui->packageBuildId, SIGNAL(textChanged(QString)));
-}
-
-BarDescriptorEditorPackageInformationWidget::~BarDescriptorEditorPackageInformationWidget()
-{
- delete m_ui;
-}
diff --git a/src/plugins/qnx/bardescriptoreditorpackageinformationwidget.h b/src/plugins/qnx/bardescriptoreditorpackageinformationwidget.h
deleted file mode 100644
index 373bfef349..0000000000
--- a/src/plugins/qnx/bardescriptoreditorpackageinformationwidget.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORPACKAGEINFORMATIONWIDGET_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORPACKAGEINFORMATIONWIDGET_H
-
-#include "bardescriptoreditorabstractpanelwidget.h"
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BarDescriptorEditorPackageInformationWidget; }
-
-class BarDescriptorEditorPackageInformationWidget : public BarDescriptorEditorAbstractPanelWidget
-{
- Q_OBJECT
-
-public:
- explicit BarDescriptorEditorPackageInformationWidget(QWidget *parent = 0);
- ~BarDescriptorEditorPackageInformationWidget();
-
-private:
- Ui::BarDescriptorEditorPackageInformationWidget *m_ui;
-};
-
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORPACKAGEINFORMATIONWIDGET_H
diff --git a/src/plugins/qnx/bardescriptoreditorpackageinformationwidget.ui b/src/plugins/qnx/bardescriptoreditorpackageinformationwidget.ui
deleted file mode 100644
index dbfe6e85a9..0000000000
--- a/src/plugins/qnx/bardescriptoreditorpackageinformationwidget.ui
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BarDescriptorEditorPackageInformationWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BarDescriptorEditorPackageInformationWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>372</width>
- <height>85</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Package ID:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="packageId"/>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Package version:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="packageVersion"/>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Package build ID:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="packageBuildId"/>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/bardescriptoreditorpermissionswidget.cpp b/src/plugins/qnx/bardescriptoreditorpermissionswidget.cpp
deleted file mode 100644
index cd29247b40..0000000000
--- a/src/plugins/qnx/bardescriptoreditorpermissionswidget.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorpermissionswidget.h"
-#include "ui_bardescriptoreditorpermissionswidget.h"
-
-#include "bardescriptorpermissionsmodel.h"
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorEditorPermissionsWidget::BarDescriptorEditorPermissionsWidget(QWidget *parent) :
- BarDescriptorEditorAbstractPanelWidget(parent),
- m_ui(new Ui::BarDescriptorEditorPermissionsWidget)
-{
- m_ui->setupUi(this);
-
- m_permissionsModel = new BarDescriptorPermissionsModel(this);
- m_ui->permissionsView->setModel(m_permissionsModel);
-
- connect(m_ui->selectAllPermissions, SIGNAL(clicked()), m_permissionsModel, SLOT(checkAll()));
- connect(m_ui->deselectAllPermissions, SIGNAL(clicked()), m_permissionsModel, SLOT(uncheckAll()));
-
- addSignalMapping(BarDescriptorDocument::action, m_permissionsModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
-}
-
-BarDescriptorEditorPermissionsWidget::~BarDescriptorEditorPermissionsWidget()
-{
- delete m_ui;
-}
-
-QStringList BarDescriptorEditorPermissionsWidget::checkedPermissions() const
-{
- return m_permissionsModel->checkedIdentifiers();
-}
-
-void BarDescriptorEditorPermissionsWidget::checkPermission(const QString &identifier)
-{
- blockSignalMapping(BarDescriptorDocument::action);
- m_permissionsModel->checkPermission(identifier);
- unblockSignalMapping(BarDescriptorDocument::action);
-}
-
-void BarDescriptorEditorPermissionsWidget::updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value)
-{
- if (tag != BarDescriptorDocument::action) {
- BarDescriptorEditorAbstractPanelWidget::updateWidgetValue(tag, value);
- return;
- }
-
- QStringList permissions = value.toStringList();
- Q_FOREACH (const QString &permission, permissions)
- checkPermission(permission);
-}
-
-void BarDescriptorEditorPermissionsWidget::emitChanged(BarDescriptorDocument::Tag tag)
-{
- if (tag != BarDescriptorDocument::action) {
- BarDescriptorEditorAbstractPanelWidget::emitChanged(tag);
- return;
- }
-
- emit changed(tag, checkedPermissions());
-}
diff --git a/src/plugins/qnx/bardescriptoreditorpermissionswidget.h b/src/plugins/qnx/bardescriptoreditorpermissionswidget.h
deleted file mode 100644
index 0ac9d2ce99..0000000000
--- a/src/plugins/qnx/bardescriptoreditorpermissionswidget.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORPERMISSIONSWIDGET_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORPERMISSIONSWIDGET_H
-
-#include "bardescriptoreditorabstractpanelwidget.h"
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorPermissionsModel;
-
-namespace Ui { class BarDescriptorEditorPermissionsWidget; }
-
-class BarDescriptorEditorPermissionsWidget : public BarDescriptorEditorAbstractPanelWidget
-{
- Q_OBJECT
-
-public:
- explicit BarDescriptorEditorPermissionsWidget(QWidget *parent = 0);
- ~BarDescriptorEditorPermissionsWidget();
-
-protected:
- void updateWidgetValue(BarDescriptorDocument::Tag tag, const QVariant &value);
- void emitChanged(BarDescriptorDocument::Tag tag);
-
-private:
- QStringList checkedPermissions() const;
- void checkPermission(const QString &identifier);
-
- Ui::BarDescriptorEditorPermissionsWidget *m_ui;
-
- BarDescriptorPermissionsModel *m_permissionsModel;
-};
-
-
-} // namespace Internal
-} // namespace Qnx
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORPERMISSIONSWIDGET_H
diff --git a/src/plugins/qnx/bardescriptoreditorpermissionswidget.ui b/src/plugins/qnx/bardescriptoreditorpermissionswidget.ui
deleted file mode 100644
index 0d90505cc0..0000000000
--- a/src/plugins/qnx/bardescriptoreditorpermissionswidget.ui
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BarDescriptorEditorPermissionsWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BarDescriptorEditorPermissionsWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>314</width>
- <height>171</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QTreeView" name="permissionsView">
- <property name="rootIsDecorated">
- <bool>false</bool>
- </property>
- <property name="itemsExpandable">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <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>
- <item>
- <widget class="QPushButton" name="selectAllPermissions">
- <property name="text">
- <string>Select All</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="deselectAllPermissions">
- <property name="text">
- <string>Deselect All</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/bardescriptoreditorwidget.cpp b/src/plugins/qnx/bardescriptoreditorwidget.cpp
deleted file mode 100644
index bf8fa3a176..0000000000
--- a/src/plugins/qnx/bardescriptoreditorwidget.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptoreditorwidget.h"
-
-#include "qnxconstants.h"
-#include "bardescriptoreditor.h"
-#include "bardescriptoreditorassetswidget.h"
-#include "bardescriptoreditorauthorinformationwidget.h"
-#include "bardescriptoreditorentrypointwidget.h"
-#include "bardescriptoreditorenvironmentwidget.h"
-#include "bardescriptoreditorgeneralwidget.h"
-#include "bardescriptoreditorpackageinformationwidget.h"
-#include "bardescriptoreditorpermissionswidget.h"
-
-#include <coreplugin/coreconstants.h>
-#include <coreplugin/icore.h>
-#include <projectexplorer/panelswidget.h>
-#include <projectexplorer/propertiespanel.h>
-#include <projectexplorer/task.h>
-#include <projectexplorer/taskhub.h>
-#include <texteditor/textdocument.h>
-#include <texteditor/texteditor.h>
-#include <texteditor/texteditorconstants.h>
-#include <texteditor/normalindenter.h>
-#include <utils/qtcassert.h>
-
-using namespace TextEditor;
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorEditorWidget::BarDescriptorEditorWidget(BarDescriptorEditor *editor, QWidget *parent)
- : QStackedWidget(parent)
- , m_editor(editor)
-{
- Core::IContext *myContext = new Core::IContext(this);
- myContext->setWidget(this);
- myContext->setContext(Core::Context(Constants::QNX_BAR_DESCRIPTOR_EDITOR_CONTEXT, TextEditor::Constants::C_TEXTEDITOR));
- Core::ICore::addContextObject(myContext);
-
- initGeneralPage();
- initApplicationPage();
- initAssetsPage();
- initSourcePage();
-
- setCurrentIndex(0);
-
- connect(m_entryPointWidget, SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), barDescriptorDocument(), SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(m_packageInformationWidget, SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), barDescriptorDocument(), SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(m_authorInformationWidget, SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), barDescriptorDocument(), SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(m_generalWidget, SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), barDescriptorDocument(), SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(m_permissionsWidget, SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), barDescriptorDocument(), SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(m_environmentWidget, SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), barDescriptorDocument(), SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(m_assetsWidget, SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), barDescriptorDocument(), SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
-
- connect(barDescriptorDocument(), SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), m_entryPointWidget, SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(barDescriptorDocument(), SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), m_packageInformationWidget, SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(barDescriptorDocument(), SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), m_authorInformationWidget, SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(barDescriptorDocument(), SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), m_generalWidget, SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(barDescriptorDocument(), SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), m_permissionsWidget, SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(barDescriptorDocument(), SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), m_environmentWidget, SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
- connect(barDescriptorDocument(), SIGNAL(changed(BarDescriptorDocument::Tag,QVariant)), m_assetsWidget, SLOT(setValue(BarDescriptorDocument::Tag,QVariant)));
-
- connect(m_xmlSourceWidget, SIGNAL(textChanged()), this, SLOT(updateDocumentContent()));
- connect(barDescriptorDocument(), SIGNAL(changed()), this, SLOT(updateSourceView()));
-}
-
-void BarDescriptorEditorWidget::initGeneralPage()
-{
- ProjectExplorer::PanelsWidget *generalPanel = new ProjectExplorer::PanelsWidget(this);
- initPanelSize(generalPanel);
- addWidget(generalPanel);
-
- // Entry-Point Text and Images
- ProjectExplorer::PropertiesPanel *entryPointPanel = new ProjectExplorer::PropertiesPanel;
- m_entryPointWidget = new BarDescriptorEditorEntryPointWidget;
- entryPointPanel->setDisplayName(tr("Entry-Point Text and Images"));
- entryPointPanel->setWidget(m_entryPointWidget);
- generalPanel->addPropertiesPanel(entryPointPanel);
-
- // Package Information
- ProjectExplorer::PropertiesPanel *packageInformationPanel = new ProjectExplorer::PropertiesPanel;
- m_packageInformationWidget = new BarDescriptorEditorPackageInformationWidget;
- packageInformationPanel->setDisplayName(tr("Package Information"));
- packageInformationPanel->setWidget(m_packageInformationWidget);
- generalPanel->addPropertiesPanel(packageInformationPanel);
-
- // Author information
- ProjectExplorer::PropertiesPanel *authorInformationPanel = new ProjectExplorer::PropertiesPanel;
- m_authorInformationWidget = new BarDescriptorEditorAuthorInformationWidget;
- authorInformationPanel->setDisplayName(tr("Author Information"));
- authorInformationPanel->setWidget(m_authorInformationWidget);
- generalPanel->addPropertiesPanel(authorInformationPanel);
-}
-
-void BarDescriptorEditorWidget::initApplicationPage()
-{
- ProjectExplorer::PanelsWidget *applicationPanel = new ProjectExplorer::PanelsWidget(this);
- initPanelSize(applicationPanel);
- addWidget(applicationPanel);
-
- // General
- ProjectExplorer::PropertiesPanel *generalPanel = new ProjectExplorer::PropertiesPanel;
- m_generalWidget = new BarDescriptorEditorGeneralWidget;
- generalPanel->setDisplayName(tr("General"));
- generalPanel->setWidget(m_generalWidget);
- applicationPanel->addPropertiesPanel(generalPanel);
-
- //Permissions
- ProjectExplorer::PropertiesPanel *permissionsPanel = new ProjectExplorer::PropertiesPanel;
- m_permissionsWidget = new BarDescriptorEditorPermissionsWidget;
- permissionsPanel->setDisplayName(tr("Permissions"));
- permissionsPanel->setWidget(m_permissionsWidget);
- applicationPanel->addPropertiesPanel(permissionsPanel);
-
- // Environment
- ProjectExplorer::PropertiesPanel *environmentPanel = new ProjectExplorer::PropertiesPanel;
- m_environmentWidget = new BarDescriptorEditorEnvironmentWidget;
- environmentPanel->setDisplayName(tr("Environment"));
- environmentPanel->setWidget(m_environmentWidget);
- applicationPanel->addPropertiesPanel(environmentPanel);
-}
-
-void BarDescriptorEditorWidget::initAssetsPage()
-{
- ProjectExplorer::PanelsWidget *assetsPanel = new ProjectExplorer::PanelsWidget(this);
- initPanelSize(assetsPanel);
- addWidget(assetsPanel);
-
- ProjectExplorer::PropertiesPanel *assetsPropertiesPanel = new ProjectExplorer::PropertiesPanel;
- m_assetsWidget = new BarDescriptorEditorAssetsWidget;
- assetsPropertiesPanel->setDisplayName(tr("Assets"));
- assetsPropertiesPanel->setWidget(m_assetsWidget);
- assetsPanel->addPropertiesPanel(assetsPropertiesPanel);
-
- m_entryPointWidget->setAssetsModel(m_assetsWidget->assetsModel());
- connect(m_entryPointWidget, SIGNAL(imageAdded(QString)), m_assetsWidget, SLOT(addAsset(QString)));
- connect(m_entryPointWidget, SIGNAL(imageRemoved(QString)), m_assetsWidget, SLOT(removeAsset(QString)));
-}
-
-void BarDescriptorEditorWidget::initSourcePage()
-{
- TextDocumentPtr doc(new TextDocument);
- doc->setId(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID); // FIXME: This looks odd.
- doc->setIndenter(new NormalIndenter);
- doc->setMimeType(QLatin1String(Constants::QNX_BAR_DESCRIPTOR_MIME_TYPE));
-
- m_xmlSourceWidget = new TextEditorWidget(this);
- m_xmlSourceWidget->setTextDocument(doc);
- m_xmlSourceWidget->setupGenericHighlighter();
- addWidget(m_xmlSourceWidget);
-}
-
-void BarDescriptorEditorWidget::initPanelSize(ProjectExplorer::PanelsWidget *panelsWidget)
-{
- panelsWidget->widget()->setMaximumWidth(900);
- panelsWidget->widget()->setMinimumWidth(0);
-}
-
-TextEditorWidget *BarDescriptorEditorWidget::sourceWidget() const
-{
- return m_xmlSourceWidget;
-}
-
-void BarDescriptorEditorWidget::setFilePath(const Utils::FileName &filePath)
-{
- Core::IDocument *doc = m_xmlSourceWidget->textDocument();
- if (doc)
- doc->setFilePath(filePath);
-}
-
-void BarDescriptorEditorWidget::updateDocumentContent()
-{
- ProjectExplorer::TaskHub::clearTasks(Constants::QNX_TASK_CATEGORY_BARDESCRIPTOR);
- QString errorMsg;
- int errorLine;
-
- disconnect(barDescriptorDocument(), SIGNAL(changed()), this, SLOT(updateSourceView()));
- bool result = barDescriptorDocument()->loadContent(m_xmlSourceWidget->toPlainText(), true, &errorMsg, &errorLine);
- connect(barDescriptorDocument(), SIGNAL(changed()), this, SLOT(updateSourceView()));
-
- if (!result) {
- ProjectExplorer::TaskHub::addTask(ProjectExplorer::Task::Error, errorMsg, Constants::QNX_TASK_CATEGORY_BARDESCRIPTOR,
- Utils::FileName::fromString(barDescriptorDocument()->filePath().toString()), errorLine);
- ProjectExplorer::TaskHub::requestPopup();
- }
-}
-
-void BarDescriptorEditorWidget::updateSourceView()
-{
- bool blocked = m_xmlSourceWidget->blockSignals(true);
-
- int line;
- int column;
- int position = m_xmlSourceWidget->position();
- m_xmlSourceWidget->convertPosition(position, &line, &column);
-
- m_xmlSourceWidget->setPlainText(barDescriptorDocument()->xmlSource());
-
- m_xmlSourceWidget->gotoLine(line, column);
-
- m_xmlSourceWidget->blockSignals(blocked);
-}
-
-BarDescriptorDocument *BarDescriptorEditorWidget::barDescriptorDocument() const
-{
- return qobject_cast<BarDescriptorDocument*>(m_editor->document());
-}
diff --git a/src/plugins/qnx/bardescriptoreditorwidget.h b/src/plugins/qnx/bardescriptoreditorwidget.h
deleted file mode 100644
index 82784a0137..0000000000
--- a/src/plugins/qnx/bardescriptoreditorwidget.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTOREDITORWIDGET_H
-#define QNX_INTERNAL_BARDESCRIPTOREDITORWIDGET_H
-
-#include "bardescriptordocument.h"
-
-#include <QStackedWidget>
-
-namespace Core { class IEditor; }
-
-namespace ProjectExplorer { class PanelsWidget; }
-
-namespace TextEditor { class TextEditorWidget; }
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorEditor;
-class BarDescriptorEditorEntryPointWidget;
-class BarDescriptorEditorPackageInformationWidget;
-class BarDescriptorEditorAuthorInformationWidget;
-class BarDescriptorEditorGeneralWidget;
-class BarDescriptorEditorPermissionsWidget;
-class BarDescriptorEditorEnvironmentWidget;
-class BarDescriptorEditorAssetsWidget;
-
-class BarDescriptorEditorWidget : public QStackedWidget
-{
- Q_OBJECT
-
-public:
- explicit BarDescriptorEditorWidget(BarDescriptorEditor *editor, QWidget *parent = 0);
-
- TextEditor::TextEditorWidget *sourceWidget() const;
-
- void setFilePath(const Utils::FileName &filePath);
-
-signals:
- void changed(BarDescriptorDocument::Tag tag, const QVariant &value);
-
-private slots:
- void updateDocumentContent();
- void updateSourceView();
-
-private:
- BarDescriptorDocument *barDescriptorDocument() const;
-
- void initGeneralPage();
- void initApplicationPage();
- void initAssetsPage();
- void initSourcePage();
- void initPanelSize(ProjectExplorer::PanelsWidget *panelsWidget);
-
- Core::IEditor *m_editor;
-
- // New UI
- BarDescriptorEditorEntryPointWidget *m_entryPointWidget;
- BarDescriptorEditorPackageInformationWidget *m_packageInformationWidget;
- BarDescriptorEditorAuthorInformationWidget *m_authorInformationWidget;
-
- BarDescriptorEditorGeneralWidget *m_generalWidget;
- BarDescriptorEditorPermissionsWidget *m_permissionsWidget;
- BarDescriptorEditorEnvironmentWidget *m_environmentWidget;
-
- BarDescriptorEditorAssetsWidget *m_assetsWidget;
-
- TextEditor::TextEditorWidget *m_xmlSourceWidget;
-};
-
-
-} // namespace Internal
-} // namespace Qnx
-#endif // QNX_INTERNAL_BARDESCRIPTOREDITORWIDGET_H
diff --git a/src/plugins/qnx/bardescriptorfilenode.cpp b/src/plugins/qnx/bardescriptorfilenode.cpp
deleted file mode 100644
index 65a48425fd..0000000000
--- a/src/plugins/qnx/bardescriptorfilenode.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptorfilenode.h"
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorFileNode::BarDescriptorFileNode(const Utils::FileName &filePath)
- : ProjectExplorer::FileNode(filePath, ProjectExplorer::ProjectFileType, false)
-{
-}
-
-QList<ProjectExplorer::ProjectAction> BarDescriptorFileNode::supportedActions(ProjectExplorer::Node *node) const
-{
- Q_UNUSED(node)
-
- // To disable "Remove File..." and "Rename..." context menu actions
- return QList<ProjectExplorer::ProjectAction>();
-}
diff --git a/src/plugins/qnx/bardescriptorfilenode.h b/src/plugins/qnx/bardescriptorfilenode.h
deleted file mode 100644
index 07f5e9b0fd..0000000000
--- a/src/plugins/qnx/bardescriptorfilenode.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTORFILENODE_H
-#define QNX_INTERNAL_BARDESCRIPTORFILENODE_H
-
-#include <projectexplorer/projectnodes.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorFileNode : public ProjectExplorer::FileNode
-{
-public:
- explicit BarDescriptorFileNode(const Utils::FileName &filePath);
-
- QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BARDESCRIPTORFILENODE_H
diff --git a/src/plugins/qnx/bardescriptorfilenodemanager.cpp b/src/plugins/qnx/bardescriptorfilenodemanager.cpp
deleted file mode 100644
index 0c777c6c45..0000000000
--- a/src/plugins/qnx/bardescriptorfilenodemanager.cpp
+++ /dev/null
@@ -1,357 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptorfilenodemanager.h"
-
-#include "bardescriptorfilenode.h"
-#include "blackberrydeployconfiguration.h"
-#include "blackberrydeployinformation.h"
-#include "blackberrycreatepackagestep.h"
-#include "blackberryqtversion.h"
-#include "bardescriptordocument.h"
-#include "qnxconstants.h"
-
-#include <coreplugin/editormanager/editormanager.h>
-#include <coreplugin/icore.h>
-#include <coreplugin/messagemanager.h>
-#include <projectexplorer/buildstep.h>
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/project.h>
-#include <projectexplorer/projecttree.h>
-#include <projectexplorer/session.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/buildconfiguration.h>
-#include <qmakeprojectmanager/qmakenodes.h>
-#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtkitinformation.h>
-#include <utils/checkablemessagebox.h>
-#include <utils/qtcassert.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-const char SKIP_BAR_DESCRIPTOR_CREATION_KEY[] = "Qnx.BlackBerry.BarDescriptorFileNodeManager.SkipCreation";
-}
-
-BarDescriptorFileNodeManager::BarDescriptorFileNodeManager(QObject *parent)
- : QObject(parent)
-{
- connect(ProjectExplorer::ProjectTree::instance(), &ProjectExplorer::ProjectTree::currentProjectChanged,
- this, &BarDescriptorFileNodeManager::setCurrentProject);
- connect(ProjectExplorer::SessionManager::instance(), &ProjectExplorer::SessionManager::startupProjectChanged,
- this, &BarDescriptorFileNodeManager::setCurrentProject);
-}
-
-void BarDescriptorFileNodeManager::setCurrentProject(ProjectExplorer::Project *project)
-{
- if (!project)
- return;
-
- connect(project, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
- this, SLOT(updateBarDescriptorNodes(ProjectExplorer::Target*)), Qt::UniqueConnection);
-
- updateBarDescriptorNodes(project->activeTarget());
-}
-
-void BarDescriptorFileNodeManager::updateBarDescriptorNodes(ProjectExplorer::Target *target)
-{
- if (!target)
- return;
-
- // We are not consistently getting a signal when the current project changes,
- // so instead use target->project() to get access to the current project
-
- if (ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(target->kit()) != Constants::QNX_BB_OS_TYPE) {
- removeBarDescriptorNodes(target->project());
- return;
- }
-
- updateBarDescriptorNodes(target->project(), true);
-
- QList<ProjectExplorer::DeployConfiguration*> deployConfigurations = target->deployConfigurations();
- foreach (ProjectExplorer::DeployConfiguration *deployConfiguration, deployConfigurations) {
- BlackBerryDeployConfiguration *bbdc = qobject_cast<BlackBerryDeployConfiguration*>(deployConfiguration);
- if (!bbdc)
- continue;
-
- connect(bbdc->deploymentInfo(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
- this, SLOT(handleDeploymentDataChanged()), Qt::UniqueConnection);
- connect(bbdc->deploymentInfo(), SIGNAL(modelReset()),
- this, SLOT(handleDeploymentModelReset()), Qt::UniqueConnection);
- }
-}
-
-void BarDescriptorFileNodeManager::handleDeploymentDataChanged()
-{
- handleDeploymentInfoChanged(false);
-}
-
-void BarDescriptorFileNodeManager::handleDeploymentModelReset()
-{
- handleDeploymentInfoChanged(true);
-}
-
-void BarDescriptorFileNodeManager::handleDeploymentInfoChanged(bool modelReset)
-{
- BlackBerryDeployInformation *deployInfo = qobject_cast<BlackBerryDeployInformation*>(sender());
- QTC_ASSERT(deployInfo, return);
-
- updateBarDescriptorNodes(deployInfo->target()->project(), modelReset);
-}
-
-void BarDescriptorFileNodeManager::updateBarDescriptorNodes(ProjectExplorer::Project *project, bool attemptCreate)
-{
- if (!project)
- return;
-
- ProjectExplorer::ProjectNode *rootProject = project->rootProjectNode();
- if (!rootProject)
- return;
-
- BlackBerryDeployConfiguration *dc =
- qobject_cast<BlackBerryDeployConfiguration*>(project->activeTarget()->activeDeployConfiguration());
- if (!dc)
- return;
-
- QList<BarPackageDeployInformation> packages = dc->deploymentInfo()->allPackages();
- foreach (const BarPackageDeployInformation &package, packages) {
- ProjectExplorer::ProjectNode *projectNode = rootProject->path() == package.proFilePath ?
- rootProject : findProjectNode(rootProject, package.proFilePath);
- if (!projectNode)
- continue;
-
- if (!package.appDescriptorPath().exists()) {
- if (!attemptCreate)
- continue;
-
- if (!createBarDescriptor(project, package.appDescriptorPath(), projectNode))
- continue;
- } else {
- // Update the Qt environment if not matching the one in the deployment settings
- updateBarDescriptor(package.appDescriptorPath(), project->activeTarget());
- }
-
- BarDescriptorFileNode *existingNode = findBarDescriptorFileNode(projectNode);
- if (existingNode) {
- if (existingNode->path() != package.appDescriptorPath()) {
- // Reload the new bar-descriptor document in the existing editor (if there is one)
- Core::IDocument *oldDocument = Core::DocumentModel::documentForFilePath(
- existingNode->path().toString());
- if (oldDocument) {
- QString errorMessage;
-
- if (!oldDocument->save(&errorMessage)) {
- Core::MessageManager::write(tr("Cannot save bar descriptor file: %1").arg(errorMessage));
- continue;
- } else {
- oldDocument->setFilePath(package.appDescriptorPath());
-
- if (!oldDocument->reload(&errorMessage, Core::IDocument::FlagReload, Core::IDocument::TypeContents))
- Core::MessageManager::write(tr("Cannot reload bar descriptor file: %1").arg(errorMessage));
- }
- }
-
- existingNode->setPath(package.appDescriptorPath());
- }
- } else {
- BarDescriptorFileNode *fileNode = new BarDescriptorFileNode(package.appDescriptorPath());
- projectNode->addFileNodes(QList<ProjectExplorer::FileNode*>() << fileNode);
- }
- }
-}
-
-bool BarDescriptorFileNodeManager::createBarDescriptor(ProjectExplorer::Project *project,
- const Utils::FileName &barDescriptorPath,
- ProjectExplorer::ProjectNode *projectNode)
-{
- const QString projectName = projectNode->path().toFileInfo().completeBaseName();
-
- QmakeProjectManager::QmakeProFileNode *proFileNode =
- dynamic_cast<QmakeProjectManager::QmakeProFileNode*>(projectNode);
- QTC_ASSERT(proFileNode, return false);
- const QString targetName = proFileNode->targetInformation().target;
-
- const QFile barDescriptorFile(barDescriptorPath.toString());
- if (barDescriptorFile.exists())
- return false;
-
- bool skipFileCreation = project->namedSettings(QLatin1String(SKIP_BAR_DESCRIPTOR_CREATION_KEY)).toBool();
-
- if (skipFileCreation)
- return false;
-
- QDialogButtonBox::StandardButton button = Utils::CheckableMessageBox::question(Core::ICore::mainWindow(),
- tr("Setup Application Descriptor File"),
- tr("You need to set up a bar descriptor file to enable "
- "packaging.\nDo you want Qt Creator to generate it for your project (%1)?")
- .arg(project->projectFilePath().toUserOutput()),
- tr("Don't ask again for this project"), &skipFileCreation);
-
- if (button != QDialogButtonBox::Yes) {
- project->setNamedSettings(QLatin1String(SKIP_BAR_DESCRIPTOR_CREATION_KEY), skipFileCreation);
- return false;
- }
-
- QString barDescriptorTemplate;
- QtSupport::QtVersionNumber qtVersion =
- QtSupport::QtKitInformation::qtVersion(project->activeTarget()->kit())->qtVersion();
- if (qtVersion >= QtSupport::QtVersionNumber(5, 0, 0))
- barDescriptorTemplate = Core::ICore::resourcePath()
- + QLatin1String("/templates/wizards/bb-qt5-bardescriptor/bar-descriptor.xml");
- else
- barDescriptorTemplate = Core::ICore::resourcePath()
- + QLatin1String("/templates/wizards/bb-bardescriptor/bar-descriptor.xml");
-
- Utils::FileReader reader;
- if (!reader.fetch(barDescriptorTemplate)) {
- Core::MessageManager::write(tr("Cannot set up application descriptor file: "
- "Reading the bar descriptor template failed."));
- return false;
- }
-
- QString content = QString::fromUtf8(reader.data());
- content.replace(QLatin1String("PROJECTNAME"), projectName);
- content.replace(QLatin1String("TARGETNAME"), targetName);
- content.replace(QLatin1String("ID"), QLatin1String("com.example.") + projectName);
-
- if (project->projectDirectory().appendPath(QLatin1String("qml")).exists())
- content.replace(QLatin1String("</qnx>"),
- QLatin1String(" <asset path=\"qml\">qml</asset>\n</qnx>"));
-
- Utils::FileSaver writer(barDescriptorFile.fileName(), QIODevice::WriteOnly);
- writer.write(content.toUtf8());
- if (!writer.finalize()) {
- Core::MessageManager::write(tr("Cannot set up application descriptor file: "
- "Writing the bar descriptor file failed."));
- return false;
- }
-
- // Check if the Qt environment matches the Qt bundle mode in the deployment step
- updateBarDescriptor(barDescriptorPath, project->activeTarget(), true);
-
- return true;
-}
-
-void BarDescriptorFileNodeManager::updateBarDescriptor(const Utils::FileName &barDescriptorPath,
- ProjectExplorer::Target *target,
- bool skipConfirmation)
-{
- BarDescriptorDocument doc;
- QString errorString;
- if (!doc.open(&errorString, barDescriptorPath.toString())) {
- QMessageBox::warning(Core::ICore::mainWindow(), tr("Error"),
- tr("Cannot open BAR application descriptor file"));
- return;
- }
-
- QList<Utils::EnvironmentItem> envItems =
- doc.value(BarDescriptorDocument::env).value<QList<Utils::EnvironmentItem> >();
-
- BlackBerryQtVersion *qtVersion =
- dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtKitInformation::qtVersion(target->kit()));
- if (!qtVersion)
- return;
-
- ProjectExplorer::BuildStepList *stepList = target->activeDeployConfiguration()->stepList();
- foreach (ProjectExplorer::BuildStep *step, stepList->steps()) {
- BlackBerryCreatePackageStep *createPackageStep = dynamic_cast<BlackBerryCreatePackageStep *>(step);
- if (createPackageStep) {
- createPackageStep->doUpdateAppDescriptorFile(barDescriptorPath,
- BlackBerryCreatePackageStep::QtEnvironment,
- skipConfirmation);
- }
- }
-}
-
-void BarDescriptorFileNodeManager::removeBarDescriptorNodes(ProjectExplorer::Project *project)
-{
- if (!project)
- return;
-
- ProjectExplorer::ProjectNode *rootProject = project->rootProjectNode();
- if (!rootProject)
- return;
-
- BarDescriptorFileNode *existingNode = findBarDescriptorFileNode(rootProject);
- if (existingNode)
- rootProject->removeFileNodes(QList<ProjectExplorer::FileNode*>() << existingNode);
-
- // Also remove the bar descriptor nodes for sub-projects
- removeBarDescriptorNodes(rootProject);
-}
-
-void BarDescriptorFileNodeManager::removeBarDescriptorNodes(ProjectExplorer::ProjectNode *parent)
-{
- QList<ProjectExplorer::ProjectNode*> projectNodes = parent->subProjectNodes();
- foreach (ProjectExplorer::ProjectNode *projectNode, projectNodes) {
- BarDescriptorFileNode *existingNode = findBarDescriptorFileNode(projectNode);
- if (existingNode)
- projectNode->removeFileNodes(QList<ProjectExplorer::FileNode*>() << existingNode);
-
- removeBarDescriptorNodes(projectNode);
- }
-}
-
-BarDescriptorFileNode *BarDescriptorFileNodeManager::findBarDescriptorFileNode(ProjectExplorer::ProjectNode *parent) const
-{
- QTC_ASSERT(parent, return 0);
-
- QList<ProjectExplorer::FileNode*> fileNodes = parent->fileNodes();
- foreach (ProjectExplorer::FileNode *fileNode, fileNodes) {
- BarDescriptorFileNode *barDescriptorNode = dynamic_cast<BarDescriptorFileNode*>(fileNode);
- if (barDescriptorNode)
- return barDescriptorNode;
- }
-
- return 0;
-}
-
-ProjectExplorer::ProjectNode *BarDescriptorFileNodeManager::findProjectNode(
- ProjectExplorer::ProjectNode *parent,
- const Utils::FileName &projectFilePath) const
-{
- QTC_ASSERT(parent, return 0);
-
- QList<ProjectExplorer::ProjectNode*> projectNodes = parent->subProjectNodes();
- foreach (ProjectExplorer::ProjectNode *projectNode, projectNodes) {
- if (projectNode->path() == projectFilePath) {
- return projectNode;
- } else if (!projectNode->subProjectNodes().isEmpty()) {
- ProjectExplorer::ProjectNode *hit = findProjectNode(projectNode, projectFilePath);
- if (hit)
- return hit;
- }
- }
-
- return 0;
-}
diff --git a/src/plugins/qnx/bardescriptorfilenodemanager.h b/src/plugins/qnx/bardescriptorfilenodemanager.h
deleted file mode 100644
index b47fa3f8a5..0000000000
--- a/src/plugins/qnx/bardescriptorfilenodemanager.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTORFILENODEMANAGER_H
-#define QNX_INTERNAL_BARDESCRIPTORFILENODEMANAGER_H
-
-#include <QObject>
-
-namespace Utils {
-class FileName;
-}
-
-namespace ProjectExplorer {
-class DeployConfiguration;
-class Project;
-class ProjectNode;
-class Target;
-}
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorFileNode;
-
-class BarDescriptorFileNodeManager : public QObject
-{
- Q_OBJECT
-public:
- explicit BarDescriptorFileNodeManager(QObject *parent = 0);
-
-private slots:
- void setCurrentProject(ProjectExplorer::Project *project);
- void updateBarDescriptorNodes(ProjectExplorer::Target *target);
- void handleDeploymentInfoChanged(bool modelReset);
-
- void handleDeploymentDataChanged();
- void handleDeploymentModelReset();
-
-private:
- BarDescriptorFileNode *findBarDescriptorFileNode(ProjectExplorer::ProjectNode *parent) const;
- ProjectExplorer::ProjectNode *findProjectNode(ProjectExplorer::ProjectNode *parent,
- const Utils::FileName &projectFilePath) const;
-
- void updateBarDescriptorNodes(ProjectExplorer::Project *project, bool attemptCreate);
- bool createBarDescriptor(ProjectExplorer::Project *project, const Utils::FileName &barDescriptorPath,
- ProjectExplorer::ProjectNode *projectNode);
- void updateBarDescriptor(const Utils::FileName &barDescriptorPath, ProjectExplorer::Target *target,
- bool skipConfirmation = false);
-
- void removeBarDescriptorNodes(ProjectExplorer::Project *project);
- void removeBarDescriptorNodes(ProjectExplorer::ProjectNode *parent);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BARDESCRIPTORFILENODEMANAGER_H
diff --git a/src/plugins/qnx/bardescriptorpermissionsmodel.cpp b/src/plugins/qnx/bardescriptorpermissionsmodel.cpp
deleted file mode 100644
index a7d8656f6f..0000000000
--- a/src/plugins/qnx/bardescriptorpermissionsmodel.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptorpermissionsmodel.h"
-
-#include <QStringList>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BarDescriptorPermissionsModel::BarDescriptorPermissionsModel(QObject *parent) :
- QAbstractTableModel(parent)
-{
- initModel();
-}
-
-Qt::ItemFlags BarDescriptorPermissionsModel::flags(const QModelIndex &index) const
-{
- Qt::ItemFlags flags = QAbstractTableModel::flags(index);
- flags |= Qt::ItemIsUserCheckable;
- return flags;
-}
-
-int BarDescriptorPermissionsModel::rowCount(const QModelIndex &parent) const
-{
- Q_UNUSED(parent);
- return m_permissions.size();
-}
-
-int BarDescriptorPermissionsModel::columnCount(const QModelIndex &parent) const
-{
- Q_UNUSED(parent);
- return 1;
-}
-
-QVariant BarDescriptorPermissionsModel::data(const QModelIndex &index, int role) const
-{
- if (!index.isValid() || index.row() >= m_permissions.size() || index.column() >= 1)
- return QVariant();
-
- BarDescriptorPermission perm = m_permissions[index.row()];
- switch (role) {
- case Qt::DisplayRole:
- case Qt::EditRole:
- return perm.permission;
- case Qt::CheckStateRole:
- return perm.checked ? Qt::Checked : Qt::Unchecked;
- case Qt::ToolTipRole:
- return perm.description;
- case IdentifierRole:
- return perm.identifier;
- }
-
- return QVariant();
-}
-
-bool BarDescriptorPermissionsModel::setData(const QModelIndex &index, const QVariant &value, int role)
-{
- if (!index.isValid() || index.row() >= m_permissions.size() || index.column() >= 1)
- return false;
-
- if (role == Qt::CheckStateRole) {
- BarDescriptorPermission &perm = m_permissions[index.row()];
- perm.checked = static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked;
- emit dataChanged(index, index);
-
- return true;
- }
-
- return false;
-}
-
-QVariant BarDescriptorPermissionsModel::headerData(int section, Qt::Orientation orientation, int role) const
-{
- if (role != Qt::DisplayRole || orientation == Qt::Vertical)
- return QVariant();
-
- if (section == 0)
- return tr("Permission");
-
- return QVariant();
-}
-
-void BarDescriptorPermissionsModel::uncheckAll()
-{
- setCheckStateAll(Qt::Unchecked);
-}
-
-void BarDescriptorPermissionsModel::checkAll()
-{
- setCheckStateAll(Qt::Checked);
-}
-
-void BarDescriptorPermissionsModel::checkPermission(const QString &identifier)
-{
- for (int i = 0; i < rowCount(); ++i) {
- QModelIndex idx = index(i, 0);
- if (data(idx, IdentifierRole).toString() == identifier)
- setData(idx, Qt::Checked, Qt::CheckStateRole);
- }
-}
-
-QStringList BarDescriptorPermissionsModel::checkedIdentifiers() const
-{
- QStringList result;
- foreach (const BarDescriptorPermission &perm, m_permissions) {
- if (perm.checked)
- result << perm.identifier;
- }
- return result;
-}
-
-void BarDescriptorPermissionsModel::initModel()
-{
- beginResetModel();
- m_permissions << BarDescriptorPermission(tr("BlackBerry Messenger"), QLatin1String("bbm_connect"),
- tr("<html><head/><body><p>Allows this app to connect to the BBM Social Platform to access BBM "
- "contact lists and user profiles, invite BBM contacts to download your "
- "app, initiate BBM chats and share content from within your app, or "
- "stream data between apps in real time.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Calendar"), QLatin1String("access_pimdomain_calendars"),
- tr("<html><head/><body><p>Allows this app to access the calendar on the device. This access "
- "includes viewing, adding, and deleting calendar appointments.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Camera"), QLatin1String("use_camera"),
- tr("<html><head/><body><p>Allows this app to take pictures, record video, and use the flash.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Contacts"), QLatin1String("access_pimdomain_contacts"),
- tr("<html><head/><body><p>Allows this app to access the contacts stored on the device. This "
- "access includes viewing, creating, and deleting the contacts.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Device Identifying Information"), QLatin1String("read_device_identifying_information"),
- tr("<html><head/><body><p>Allows this app to access device identifiers such as serial number and PIN.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Email and PIN Messages"), QLatin1String("access_pimdomain_messages"),
- tr("<html><head/><body><p>Allows this app to access the email and PIN messages stored on the "
- "device. This access includes viewing, creating, sending, and deleting the messages.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("GPS Location"), QLatin1String("read_geolocation"),
- tr("<html><head/><body><p>Allows this app to access the current GPS location of the device.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Internet"), QLatin1String("access_internet"),
- tr("<html><head/><body><p>Allows this app to use Wi-fi, wired, or other connections to a "
- "destination that is not local on the user's device.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Location"), QLatin1String("access_location_services"),
- tr("<html><head/><body><p>Allows this app to access the device's current or saved locations.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Microphone"), QLatin1String("record_audio"),
- tr("<html><head/><body><p>Allows this app to record sound using the microphone.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Notebooks"), QLatin1String("access_pimdomain_notebooks"),
- tr("<html><head/><body><p>Allows this app to access the content stored in the notebooks on the "
- "device. This access includes adding and deleting entries and content.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Post Notifications"), QLatin1String("post_notification"),
- tr("<html><head/><body><p>Post a notification to the notifications area of the screen.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Push"), QLatin1String("_sys_use_consumer_push"),
- tr("<html><head/><body><p>Allows this app to use the Push Service with the BlackBerry Internet "
- "Service. This access allows the app to receive and request push "
- "messages. To use the Push Service with the BlackBerry Internet Service, "
- "you must register with BlackBerry. When you register, you "
- "receive a confirmation email message that contains information that "
- "your application needs to receive and request push messages. For more "
- "information about registering, visit "
- "https://developer.blackberry.com/services/push/. If you're using the "
- "Push Service with the BlackBerry Enterprise Server or the BlackBerry "
- "Device Service, you don't need to register with BlackBerry.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Run When Backgrounded"), QLatin1String("run_when_backgrounded"),
- tr("<html><head/><body><p>Allows background processing. Without this permission, the app is "
- "stopped when the user switches focus to another app. Apps that use this "
- "permission are rigorously reviewed for acceptance to BlackBerry App "
- "World storefront for their use of power.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Shared Files"), QLatin1String("access_shared"),
- tr("<html><head/><body><p>Allows this app to access pictures, music, documents, and other files "
- "stored on the user's device, at a remote storage provider, on a media "
- "card, or in the cloud.</p></body></html>"));
- m_permissions << BarDescriptorPermission(tr("Text Messages"), QLatin1String("access_sms_mms"),
- tr("<html><head/><body><p>Allows this app to access the text messages stored on the device. The "
- "access includes viewing, creating, sending, and deleting text messages.</p></body></html>"));
- endResetModel();
-}
-
-
-void BarDescriptorPermissionsModel::setCheckStateAll(Qt::CheckState checkState)
-{
- for (int i = 0; i < rowCount(); ++i)
- setData(index(i, 0), checkState, Qt::CheckStateRole);
-}
diff --git a/src/plugins/qnx/bardescriptorpermissionsmodel.h b/src/plugins/qnx/bardescriptorpermissionsmodel.h
deleted file mode 100644
index fba201ef7f..0000000000
--- a/src/plugins/qnx/bardescriptorpermissionsmodel.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BARDESCRIPTORPERMISSIONSMODEL_H
-#define QNX_INTERNAL_BARDESCRIPTORPERMISSIONSMODEL_H
-
-#include <QAbstractTableModel>
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorPermission {
-public:
- BarDescriptorPermission(const QString &perm, const QString &ident, const QString &desc)
- : checked(false)
- , permission(perm)
- , identifier(ident)
- , description(desc)
- {
- }
-
- bool checked;
- QString permission;
- QString identifier;
- QString description;
-};
-
-class BarDescriptorPermissionsModel : public QAbstractTableModel
-{
- Q_OBJECT
-public:
- explicit BarDescriptorPermissionsModel(QObject *parent = 0);
-
- Qt::ItemFlags flags(const QModelIndex &index) const;
-
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- int columnCount(const QModelIndex &parent = QModelIndex()) const;
-
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
-
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
-
- void checkPermission(const QString &identifier);
- QStringList checkedIdentifiers() const;
-
-public slots:
- void uncheckAll();
- void checkAll();
-
-private:
- enum DataRole {
- IdentifierRole = Qt::UserRole
- };
-
- void setCheckStateAll(Qt::CheckState checkState);
-
- void initModel();
-
- QList<BarDescriptorPermission> m_permissions;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BARDESCRIPTORPERMISSIONSMODEL_H
diff --git a/src/plugins/qnx/blackberryabstractdeploystep.cpp b/src/plugins/qnx/blackberryabstractdeploystep.cpp
deleted file mode 100644
index 05d41eeb6d..0000000000
--- a/src/plugins/qnx/blackberryabstractdeploystep.cpp
+++ /dev/null
@@ -1,253 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryabstractdeploystep.h"
-
-#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/task.h>
-#include <utils/qtcassert.h>
-#include <utils/qtcprocess.h>
-
-#include <QDir>
-#include <QTimer>
-#include <QEventLoop>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryAbstractDeployStep::BlackBerryAbstractDeployStep(ProjectExplorer::BuildStepList *bsl, Core::Id id)
- : ProjectExplorer::BuildStep(bsl, id)
- , m_processCounter(-1)
- , m_process(0)
- , m_timer(0)
- , m_futureInterface(0)
- , m_eventLoop(0)
-{
- connect(&m_outputParser, SIGNAL(addTask(ProjectExplorer::Task)), this, SIGNAL(addTask(ProjectExplorer::Task)));
- connect(&m_outputParser, SIGNAL(progressParsed(int)), this, SLOT(reportProgress(int)));
-}
-
-BlackBerryAbstractDeployStep::BlackBerryAbstractDeployStep(ProjectExplorer::BuildStepList *bsl, BlackBerryAbstractDeployStep *bs)
- : ProjectExplorer::BuildStep(bsl, bs)
- , m_processCounter(-1)
- , m_process(0)
- , m_timer(0)
- , m_futureInterface(0)
- , m_eventLoop(0)
-{
- connect(&m_outputParser, SIGNAL(addTask(ProjectExplorer::Task)), this, SIGNAL(addTask(ProjectExplorer::Task)));
- connect(&m_outputParser, SIGNAL(progressParsed(int)), this, SLOT(reportProgress(int)));
-}
-
-BlackBerryAbstractDeployStep::~BlackBerryAbstractDeployStep()
-{
- delete m_process;
- m_process = 0;
-}
-
-bool BlackBerryAbstractDeployStep::init()
-{
- m_params.clear();
- m_processCounter = -1;
-
- m_environment = target()->activeBuildConfiguration()->environment();
- m_buildDirectory = target()->activeBuildConfiguration()->buildDirectory().toString();
- // The bar descriptor is using BUILD_DIR variable to set the target path
- m_environment.appendOrSet(QLatin1String("BUILD_DIR"), m_buildDirectory);
-
- return true;
-}
-
-void BlackBerryAbstractDeployStep::run(QFutureInterface<bool> &fi)
-{
- m_timer = new QTimer();
- connect(m_timer, SIGNAL(timeout()), this, SLOT(checkForCancel()), Qt::DirectConnection);
- m_timer->start(500);
- m_eventLoop = new QEventLoop;
-
- fi.setProgressRange(0, 100 * m_params.size());
-
- Q_ASSERT(!m_futureInterface);
- m_futureInterface = &fi;
-
- runCommands();
-
- bool returnValue = m_eventLoop->exec();
-
- // Finished
- m_params.clear();
- m_processCounter = -1;
-
- m_timer->stop();
- delete m_timer;
- m_timer = 0;
-
- delete m_process;
- m_process = 0;
- delete m_eventLoop;
- m_eventLoop = 0;
-
- m_futureInterface = 0;
-
- fi.reportResult(returnValue);
-}
-
-void BlackBerryAbstractDeployStep::addCommand(const QString &command, const QStringList &arguments)
-{
- ProjectExplorer::ProcessParameters param;
- param.setCommand(command);
- param.setArguments(arguments.join(QLatin1Char(' ')));
- m_params << param;
-}
-
-void BlackBerryAbstractDeployStep::reportProgress(int progress)
-{
- QTC_ASSERT(progress >= 0 && progress <= 100, return);
-
- if (m_futureInterface)
- m_futureInterface->setProgressValue(100 * m_processCounter + progress);
-}
-
-void BlackBerryAbstractDeployStep::runCommands()
-{
- if (!m_process) {
- m_process = new Utils::QtcProcess();
- connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(processReadyReadStdOutput()), Qt::DirectConnection);
- connect(m_process, SIGNAL(readyReadStandardError()), this, SLOT(processReadyReadStdError()), Qt::DirectConnection);
- }
-
- m_process->setEnvironment(m_environment);
- m_process->setWorkingDirectory(m_buildDirectory);
-
- connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(handleProcessFinished(int,QProcess::ExitStatus)), Qt::DirectConnection);
-
- runNextCommand();
-}
-
-void BlackBerryAbstractDeployStep::runNextCommand()
-{
- ++m_processCounter;
- m_futureInterface->setProgressValue(100 * m_processCounter);
-
- ProjectExplorer::ProcessParameters param = m_params.takeFirst();
-
- QTC_ASSERT(m_process->state() == QProcess::NotRunning, return);
-
- m_process->setCommand(param.effectiveCommand(), param.effectiveArguments());
- m_process->start();
- if (!m_process->waitForStarted()) {
- m_eventLoop->exit(false);
- return;
- }
- processStarted(param);
-}
-
-void BlackBerryAbstractDeployStep::processStarted(const ProjectExplorer::ProcessParameters &params)
-{
- emitOutputInfo(params, params.prettyArguments());
-}
-
-void BlackBerryAbstractDeployStep::emitOutputInfo(const ProjectExplorer::ProcessParameters &params, const QString &arguments)
-{
- emit addOutput(tr("Starting: \"%1\" %2")
- .arg(QDir::toNativeSeparators(params.effectiveCommand()),
- arguments),
- BuildStep::MessageOutput);
-}
-
-void BlackBerryAbstractDeployStep::raiseError(const QString &errorMessage)
-{
- ProjectExplorer::Task task = ProjectExplorer::Task(ProjectExplorer::Task::Error, errorMessage, Utils::FileName(), -1,
- ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
- emit addTask(task, 1);
- emit addOutput(errorMessage, BuildStep::ErrorMessageOutput);
-}
-
-void BlackBerryAbstractDeployStep::processReadyReadStdOutput()
-{
- m_process->setReadChannel(QProcess::StandardOutput);
- while (m_process->canReadLine()) {
- const QString line = QString::fromLocal8Bit(m_process->readLine());
- stdOutput(line);
- }
-}
-
-void BlackBerryAbstractDeployStep::stdOutput(const QString &line)
-{
- m_outputParser.stdOutput(line);
- emit addOutput(line, BuildStep::NormalOutput, BuildStep::DontAppendNewline);
-}
-
-void BlackBerryAbstractDeployStep::processReadyReadStdError()
-{
- m_process->setReadChannel(QProcess::StandardError);
- while (m_process->canReadLine()) {
- const QString line = QString::fromLocal8Bit(m_process->readLine());
- stdError(line);
- }
-}
-
-void BlackBerryAbstractDeployStep::checkForCancel()
-{
- if (m_futureInterface->isCanceled()
- && m_timer && m_timer->isActive()) {
- m_timer->stop();
- if (m_process) {
- m_process->terminate();
- m_process->waitForFinished(5000); //while waiting, the process can be killed
- if (m_process)
- m_process->kill();
- }
- if (m_eventLoop)
- m_eventLoop->exit(false);
- }
-}
-
-void BlackBerryAbstractDeployStep::handleProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
-{
- if (exitCode == 0 && exitStatus == QProcess::NormalExit) {
- if (!m_params.isEmpty())
- runNextCommand();
- else
- m_eventLoop->exit(true);
- } else {
- m_eventLoop->exit(false);
- }
-}
-
-void BlackBerryAbstractDeployStep::stdError(const QString &line)
-{
- m_outputParser.stdError(line);
- emit addOutput(line, BuildStep::ErrorOutput, BuildStep::DontAppendNewline);
-}
diff --git a/src/plugins/qnx/blackberryabstractdeploystep.h b/src/plugins/qnx/blackberryabstractdeploystep.h
deleted file mode 100644
index 60cdd08de8..0000000000
--- a/src/plugins/qnx/blackberryabstractdeploystep.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYABSTRACTDEPLOYSTEP_H
-#define QNX_INTERNAL_BLACKBERRYABSTRACTDEPLOYSTEP_H
-
-#include "blackberryprocessparser.h"
-
-#include <projectexplorer/buildstep.h>
-#include <projectexplorer/processparameters.h>
-
-#include <QProcess>
-
-QT_BEGIN_NAMESPACE
-class QEventLoop;
-QT_END_NAMESPACE
-
-namespace Utils { class QtcProcess; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryAbstractDeployStep : public ProjectExplorer::BuildStep
-{
- Q_OBJECT
-public:
- explicit BlackBerryAbstractDeployStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
- ~BlackBerryAbstractDeployStep();
-
- bool init();
- void run(QFutureInterface<bool> &fi);
-
-protected:
- BlackBerryAbstractDeployStep(ProjectExplorer::BuildStepList *bsl, BlackBerryAbstractDeployStep *bs);
-
- void addCommand(const QString &command, const QStringList &arguments);
-
- virtual void stdOutput(const QString &line);
- virtual void stdError(const QString &line);
-
- virtual void processStarted(const ProjectExplorer::ProcessParameters &param);
-
- void emitOutputInfo(const ProjectExplorer::ProcessParameters &params, const QString& arguments);
-
- void raiseError(const QString &errorMessage);
-
-private slots:
- void reportProgress(int progress);
-
- void processReadyReadStdOutput();
- void processReadyReadStdError();
-
- void checkForCancel();
-
- void handleProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
-
-private:
- void ctor();
-
- void runCommands();
- void runNextCommand();
-
- QList<ProjectExplorer::ProcessParameters> m_params;
- int m_processCounter;
- Utils::QtcProcess *m_process;
-
- Utils::Environment m_environment;
- QString m_buildDirectory;
-
- QTimer *m_timer;
- QFutureInterface<bool> *m_futureInterface;
- QEventLoop *m_eventLoop;
-
- BlackBerryProcessParser m_outputParser;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYABSTRACTDEPLOYSTEP_H
diff --git a/src/plugins/qnx/blackberryapilevelconfiguration.cpp b/src/plugins/qnx/blackberryapilevelconfiguration.cpp
deleted file mode 100644
index d96a66dd6a..0000000000
--- a/src/plugins/qnx/blackberryapilevelconfiguration.cpp
+++ /dev/null
@@ -1,417 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryapilevelconfiguration.h"
-#include "blackberryconfigurationmanager.h"
-#include "blackberryqtversion.h"
-
-#include "qnxtoolchain.h"
-#include "qnxconstants.h"
-
-#include <utils/qtcassert.h>
-
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/kitmanager.h>
-#include <projectexplorer/kitinformation.h>
-#include <projectexplorer/toolchainmanager.h>
-#include <projectexplorer/gcctoolchain.h>
-
-#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtversionmanager.h>
-#include <qtsupport/qtkitinformation.h>
-
-#include <qmakeprojectmanager/qmakekitinformation.h>
-
-#include <debugger/debuggeritemmanager.h>
-#include <debugger/debuggeritem.h>
-#include <debugger/debuggerkitinformation.h>
-
-#include <coreplugin/icore.h>
-
-#include <QFileInfo>
-#include <QDir>
-#include <QMessageBox>
-
-using namespace ProjectExplorer;
-using namespace QtSupport;
-using namespace Utils;
-using namespace Debugger;
-
-namespace Qnx {
-namespace Internal {
-
-const QLatin1String NDKPathKey("NDKPath");
-const QLatin1String NDKDisplayNameKey("NDKDisplayName");
-const QLatin1String NDKTargetKey("NDKTarget");
-const QLatin1String NDKHostKey("NDKHost");
-const QLatin1String NDKAutoDetectionSourceKey("NDKAutoDetectionSource");
-const QLatin1String NDKAutoDetectedKey("NDKAutoDetectedKey");
-
-#ifdef WITH_TESTS
-bool BlackBerryApiLevelConfiguration::m_fakeConfig = false;
-#endif
-
-BlackBerryApiLevelConfiguration::BlackBerryApiLevelConfiguration(const ConfigInstallInformation &ndkInstallInfo)
- : QnxBaseConfiguration(FileName::fromString(
- QnxUtils::envFilePath(ndkInstallInfo.path, ndkInstallInfo.version)))
-{
- m_displayName = ndkInstallInfo.name;
- QString sep = QString::fromLatin1("/qnx6");
- // The QNX_TARGET value is using Unix-like separator on all platforms.
- m_targetName = ndkInstallInfo.target.split(sep).first().split(QLatin1Char('/')).last();
- m_sysRoot = FileName::fromString(ndkInstallInfo.target);
- m_autoDetectionSource = FileName::fromString(ndkInstallInfo.installationXmlFilePath);
- setVersion(QnxVersionNumber(ndkInstallInfo.version));
- ctor();
-}
-
-BlackBerryApiLevelConfiguration::BlackBerryApiLevelConfiguration(const FileName &ndkEnvFile)
- : QnxBaseConfiguration(ndkEnvFile)
-{
- m_displayName = ndkPath().split(QDir::separator()).last();
- QString ndkTarget = qnxTarget().toString();
- // The QNX_TARGET value is using Unix-like separator on all platforms.
- QString sep = QString::fromLatin1("/qnx6");
- m_targetName = ndkTarget.split(sep).first().split(QLatin1Char('/')).last();
- if (QDir(ndkTarget).exists())
- m_sysRoot = FileName::fromString(ndkTarget);
-
- setVersion(QnxVersionNumber::fromNdkEnvFileName(QFileInfo(envFile().toString()).baseName()));
- if (version().isEmpty())
- setVersion(QnxVersionNumber::fromTargetName(m_targetName));
-
- ctor();
-}
-
-BlackBerryApiLevelConfiguration::BlackBerryApiLevelConfiguration(const QVariantMap &data)
- : QnxBaseConfiguration(data)
-{
- m_displayName = data.value(NDKDisplayNameKey).toString();
- QString sep = QString::fromLatin1("/qnx6");
- // The QNX_TARGET value is using Unix-like separator on all platforms.
- m_targetName = data.value(NDKTargetKey).toString().split(sep).first().split(QLatin1Char('/')).last();
- m_sysRoot = FileName::fromString(data.value(NDKTargetKey).toString());
- if (data.value(QLatin1String(NDKAutoDetectedKey)).toBool())
- m_autoDetectionSource = FileName::fromString(data.value(NDKAutoDetectionSourceKey).toString());
-
- ctor();
-}
-
-void BlackBerryApiLevelConfiguration::ctor()
-{
- QString host = qnxHost().toString();
- FileName qmake4Path = FileName::fromString(HostOsInfo::withExecutableSuffix(host + QLatin1String("/usr/bin/qmake")));
- FileName qmake5Path = FileName::fromString(HostOsInfo::withExecutableSuffix(host + QLatin1String("/usr/bin/qt5/qmake")));
- if (qmake4Path.exists())
- m_qmake4BinaryFile = qmake4Path;
-
- if (qmake5Path.exists())
- m_qmake5BinaryFile = qmake5Path;
-}
-
-QString BlackBerryApiLevelConfiguration::ndkPath() const
-{
- return envFile().parentDir().toString();
-}
-
-QString BlackBerryApiLevelConfiguration::displayName() const
-{
- return m_displayName;
-}
-
-QString BlackBerryApiLevelConfiguration::targetName() const
-{
- return m_targetName;
-}
-
-bool BlackBerryApiLevelConfiguration::isAutoDetected() const
-{
- return !m_autoDetectionSource.isEmpty();
-}
-
-FileName BlackBerryApiLevelConfiguration::autoDetectionSource() const
-{
- return m_autoDetectionSource;
-}
-
-bool BlackBerryApiLevelConfiguration::isActive() const
-{
- foreach (Kit *kit, KitManager::kits()) {
- if (kit->isAutoDetected() &&
- kit->autoDetectionSource() == envFile().toString())
- return true;
- }
-
- return false;
-}
-
-bool BlackBerryApiLevelConfiguration::isValid() const
-{
-#ifdef WITH_TESTS
- if (BlackBerryApiLevelConfiguration::fakeConfig())
- return true;
-#endif
-
- return QnxBaseConfiguration::isValid() &&
- ((!m_qmake4BinaryFile.isEmpty() || !m_qmake5BinaryFile.isEmpty())
- && (m_autoDetectionSource.isEmpty() ||
- m_autoDetectionSource.exists())
- && (!m_sysRoot.isEmpty() && m_sysRoot.exists()));
-}
-
-
-FileName BlackBerryApiLevelConfiguration::qmake4BinaryFile() const
-{
- return m_qmake4BinaryFile;
-}
-
-FileName BlackBerryApiLevelConfiguration::qmake5BinaryFile() const
-{
- return m_qmake5BinaryFile;
-}
-
-FileName BlackBerryApiLevelConfiguration::sysRoot() const
-{
- return m_sysRoot;
-}
-
-QVariantMap BlackBerryApiLevelConfiguration::toMap() const
-{
- QVariantMap data = QnxBaseConfiguration::toMap();
- data.insert(QLatin1String(Qnx::Constants::QNX_BB_KEY_CONFIGURATION_TYPE),
- QLatin1String(Qnx::Constants::QNX_BB_APILEVEL_TYPE));
- data.insert(QLatin1String(NDKDisplayNameKey), m_displayName);
- data.insert(QLatin1String(NDKPathKey), ndkPath());
- data.insert(QLatin1String(NDKTargetKey), m_sysRoot.toString());
- data.insert(QLatin1String(NDKAutoDetectionSourceKey), m_autoDetectionSource.toString());
- data.insert(QLatin1String(NDKAutoDetectedKey), isAutoDetected());
- return data;
-}
-
-QnxAbstractQtVersion *BlackBerryApiLevelConfiguration::createQtVersion(
- const FileName &qmakePath, Qnx::QnxArchitecture arch, const QString &versionName)
-{
- QnxAbstractQtVersion *version = new BlackBerryQtVersion(
- arch, qmakePath, true, QString(), envFile().toString());
- version->setUnexpandedDisplayName(tr("Qt %{Qt:Version} for %2")
- .arg(version->qtVersionString(), versionName));
- QtVersionManager::addVersion(version);
- return version;
-}
-
-Kit *BlackBerryApiLevelConfiguration::createKit(
- QnxAbstractQtVersion *version, QnxToolChain *toolChain, const QVariant &debuggerItemId)
-{
- Kit *kit = new Kit;
- bool isSimulator = version->architecture() == X86;
-
- QtKitInformation::setQtVersion(kit, version);
- ToolChainKitInformation::setToolChain(kit, toolChain);
-
- if (debuggerItemId.isValid())
- DebuggerKitInformation::setDebugger(kit, debuggerItemId);
-
- if (version->qtVersion().majorVersion == 4) {
- if (isSimulator) {
- QmakeProjectManager::QmakeKitInformation::setMkspec(
- kit, FileName::fromLatin1("blackberry-x86-qcc"));
- } else {
- QmakeProjectManager::QmakeKitInformation::setMkspec(
- kit, FileName::fromLatin1("blackberry-armv7le-qcc"));
- }
- }
-
- DeviceTypeKitInformation::setDeviceTypeId(kit, Constants::QNX_BB_OS_TYPE);
- SysRootKitInformation::setSysRoot(kit, m_sysRoot);
-
- kit->setUnexpandedDisplayName(version->displayName());
- kit->setIconPath(FileName::fromString(QLatin1String(Constants::QNX_BB_CATEGORY_ICON)));
-
- kit->setAutoDetected(true);
- kit->setAutoDetectionSource(envFile().toString());
- kit->setMutable(DeviceKitInformation::id(), true);
-
- kit->setSticky(QtKitInformation::id(), true);
- kit->setSticky(ToolChainKitInformation::id(), true);
- kit->setSticky(DeviceTypeKitInformation::id(), true);
- kit->setSticky(SysRootKitInformation::id(), true);
- kit->setSticky(DebuggerKitInformation::id(), true);
- kit->setSticky(QmakeProjectManager::QmakeKitInformation::id(), true);
-
- KitManager::registerKit(kit);
- return kit;
-}
-
-QStringList BlackBerryApiLevelConfiguration::validationErrors() const
-{
- QStringList errorStrings = QnxBaseConfiguration::validationErrors();
- if (m_qmake4BinaryFile.isEmpty() && m_qmake5BinaryFile.isEmpty())
- errorStrings << tr("- No Qt version found.");
-
- if (!m_autoDetectionSource.isEmpty() && !m_autoDetectionSource.exists())
- errorStrings << tr("- No auto detection source found.");
-
- if (m_sysRoot.isEmpty() && m_sysRoot.exists())
- errorStrings << tr("- No sysroot found.");
-
-
- return errorStrings;
-}
-
-bool BlackBerryApiLevelConfiguration::activate()
-{
- if (!isValid()) {
- if (!m_autoDetectionSource.isEmpty())
- return false;
-
- QString errorMessage = tr("The following errors occurred while activating target \"%1\":\n").arg(m_targetName);
- errorMessage.append(validationErrors().join(QLatin1Char('\n')));
- QMessageBox::warning(Core::ICore::mainWindow(), tr("Cannot Set up BB10 Configuration"),
- errorMessage, QMessageBox::Ok);
- return false;
- }
-
- if (isActive())
- return true;
-
- deactivate(); // cleaning-up artifacts autodetected by old QtCreator versions
-
- QString armVersionName = tr("BlackBerry %1 Device").arg(version().toString());
- QString x86VersionName = tr("BlackBerry %1 Simulator").arg(version().toString());
-
- // create versions
- QnxAbstractQtVersion *qt4ArmVersion = 0;
- QnxAbstractQtVersion *qt4X86Version = 0;
- QnxAbstractQtVersion *qt5ArmVersion = 0;
- QnxAbstractQtVersion *qt5X86Version = 0;
- QList<Abi> armAbis;
- QList<Abi> x86Abis;
-
- if (!m_qmake4BinaryFile.isEmpty()) {
- qt4ArmVersion = createQtVersion(m_qmake4BinaryFile, Qnx::ArmLeV7, armVersionName);
- armAbis << qt4ArmVersion->qtAbis();
- qt4X86Version = createQtVersion(m_qmake4BinaryFile, Qnx::X86, x86VersionName);
- x86Abis << qt4X86Version->qtAbis();
- }
- if (!m_qmake5BinaryFile.isEmpty()) {
- qt5ArmVersion = createQtVersion(m_qmake5BinaryFile, Qnx::ArmLeV7, armVersionName);
- foreach (Abi abi, qt5ArmVersion->qtAbis())
- if (!armAbis.contains(abi))
- armAbis << abi;
- qt5X86Version = createQtVersion(m_qmake5BinaryFile, Qnx::X86, x86VersionName);
- foreach (Abi abi, qt5X86Version->qtAbis())
- if (!x86Abis.contains(abi))
- x86Abis << abi;
- }
-
- // Create tool chains
- QnxToolChain *armvle7ToolChain = createToolChain(ArmLeV7,
- tr("QCC for %1").arg(armVersionName),
- ndkPath());
- QnxToolChain *x86ToolChain = createToolChain(X86,
- tr("QCC for %1").arg(x86VersionName),
- ndkPath());
- // Create debuggers
- QVariant armDebuggerId = createDebuggerItem(ArmLeV7,
- tr("Debugger for %1").arg(armVersionName));
-
- QVariant x86DebuggerId = createDebuggerItem(X86,
- tr("Debugger for %1").arg(x86VersionName));
-
- // create kits
- if (qt4ArmVersion)
- createKit(qt4ArmVersion, armvle7ToolChain, armDebuggerId);
- if (qt4X86Version)
- createKit(qt4X86Version, x86ToolChain, x86DebuggerId);
- if (qt5ArmVersion)
- createKit(qt5ArmVersion, armvle7ToolChain, armDebuggerId);
- if (qt5X86Version)
- createKit(qt5X86Version, x86ToolChain, x86DebuggerId);
-
- BlackBerryConfigurationManager::instance()->emitSettingsChanged();
-
- return true;
-}
-
-void BlackBerryApiLevelConfiguration::deactivate()
-{
- QList<BaseQtVersion *> qtvToRemove;
- QList<ToolChain *> tcToRemove;
- QList<const DebuggerItem *> dbgToRemove;
-
- foreach (Kit *kit, KitManager::kits()) {
- if (kit->isAutoDetected() &&
- kit->autoDetectionSource() == envFile().toString()) {
- BaseQtVersion *version = QtKitInformation::qtVersion(kit);
- ToolChain *toolChain = ToolChainKitInformation::toolChain(kit);
- const DebuggerItem *debugger = DebuggerKitInformation::debugger(kit);
- // Kit's Qt version, tool chain or debugger might be used by other BB kits
- // generated for the same API level that are not yet unregistered. This triggers warning outputs.
- // Let's unregistered/removed them later once all API level kits are unregistered.
- if (version && !qtvToRemove.contains(version))
- qtvToRemove << version;
- if (toolChain && !tcToRemove.contains(toolChain))
- tcToRemove << toolChain;
- if (debugger && !dbgToRemove.contains(debugger))
- dbgToRemove << debugger;
-
- KitManager::deregisterKit(kit);
- }
- }
-
- foreach (BaseQtVersion *qtv, qtvToRemove)
- QtVersionManager::removeVersion(qtv);
-
- foreach (ToolChain *tc, tcToRemove)
- ToolChainManager::deregisterToolChain(tc);
-
- foreach (const DebuggerItem *debugger, dbgToRemove)
- DebuggerItemManager::deregisterDebugger(debugger->id());
-
- BlackBerryConfigurationManager::instance()->emitSettingsChanged();
-}
-
-#ifdef WITH_TESTS
-void BlackBerryApiLevelConfiguration::setFakeConfig(bool fakeConfig)
-{
- m_fakeConfig = fakeConfig;
-}
-
-bool BlackBerryApiLevelConfiguration::fakeConfig()
-{
- return m_fakeConfig;
-}
-
-#endif
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberryapilevelconfiguration.h b/src/plugins/qnx/blackberryapilevelconfiguration.h
deleted file mode 100644
index e61cabfe04..0000000000
--- a/src/plugins/qnx/blackberryapilevelconfiguration.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYCONFIGURATIONS_H
-#define BLACKBERRYCONFIGURATIONS_H
-
-#include "qnxutils.h"
-#include "qnxversionnumber.h"
-#include "qnxbaseconfiguration.h"
-#include "qnxconstants.h"
-
-#include <utils/environment.h>
-#include <utils/fileutils.h>
-
-#include <projectexplorer/abi.h>
-#include <projectexplorer/kit.h>
-
-#include <QObject>
-#include <QCoreApplication>
-
-namespace QtSupport { class BaseQtVersion; }
-namespace Debugger { class DebuggerItem; }
-
-namespace Qnx {
-namespace Internal {
-
-class QnxAbstractQtVersion;
-class QnxToolChain;
-
-class BlackBerryApiLevelConfiguration : public QnxBaseConfiguration
-{
- Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryApiLevelConfiguration)
-public:
- BlackBerryApiLevelConfiguration(const ConfigInstallInformation &ndkInstallInfo);
- BlackBerryApiLevelConfiguration(const Utils::FileName &ndkEnvFile);
- BlackBerryApiLevelConfiguration(const QVariantMap &data);
- bool activate();
- void deactivate();
- QString ndkPath() const;
- QString displayName() const;
- QString targetName() const;
- bool isAutoDetected() const;
- Utils::FileName autoDetectionSource() const;
- bool isActive() const;
- bool isValid() const;
- Utils::FileName qmake4BinaryFile() const;
- Utils::FileName qmake5BinaryFile() const;
- Utils::FileName sysRoot() const;
- QVariantMap toMap() const;
-
-#ifdef WITH_TESTS
- static void setFakeConfig(bool fakeConfig);
- static bool fakeConfig();
-#endif
-
-protected:
- QnxAbstractQtVersion *createQtVersion(
- const Utils::FileName &qmakePath, Qnx::QnxArchitecture arch, const QString &versionName);
- ProjectExplorer::Kit *createKit(
- QnxAbstractQtVersion *version, QnxToolChain *armToolChain, const QVariant &debuggerItemId);
- QStringList validationErrors() const;
-
-private:
- QString m_displayName;
- QString m_targetName;
- Utils::FileName m_autoDetectionSource;
- Utils::FileName m_qmake4BinaryFile;
- Utils::FileName m_qmake5BinaryFile;
- Utils::FileName m_sysRoot;
-
- void ctor();
-
-#ifdef WITH_TESTS
- static bool m_fakeConfig;
-#endif
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // BLACKBERRYCONFIGURATIONS_H
diff --git a/src/plugins/qnx/blackberryapplicationrunner.cpp b/src/plugins/qnx/blackberryapplicationrunner.cpp
deleted file mode 100644
index 7d7b3f63db..0000000000
--- a/src/plugins/qnx/blackberryapplicationrunner.cpp
+++ /dev/null
@@ -1,515 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryapplicationrunner.h"
-
-#include "blackberrydeployconfiguration.h"
-#include "blackberrydeviceconnectionmanager.h"
-#include "blackberryrunconfiguration.h"
-#include "blackberrylogprocessrunner.h"
-#include "blackberrydeviceinformation.h"
-#include "qnxconstants.h"
-
-#include <coreplugin/icore.h>
-#include <projectexplorer/kit.h>
-#include <projectexplorer/target.h>
-#include <qmakeprojectmanager/qmakebuildconfiguration.h>
-#include <debugger/debuggerrunconfigurationaspect.h>
-#include <ssh/sshremoteprocessrunner.h>
-#include <utils/qtcassert.h>
-
-#include <QMessageBox>
-#include <QTimer>
-#include <QDir>
-#include <QTemporaryFile>
-
-namespace {
-enum { debugCheckQmlJSArgs = 0 };
-
-bool parseRunningState(const QString &line)
-{
- QTC_ASSERT(line.startsWith(QLatin1String("result::")), return false);
- return line.trimmed().mid(8) == QLatin1String("true");
-}
-}
-
-using namespace ProjectExplorer;
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryApplicationRunner::BlackBerryApplicationRunner(const BlackBerryApplicationRunner::LaunchFlags &launchFlags, BlackBerryRunConfiguration *runConfiguration, QObject *parent)
- : QObject(parent)
- , m_launchFlags(launchFlags)
- , m_pid(-1)
- , m_appId(QString())
- , m_running(false)
- , m_stopping(false)
- , m_launchProcess(0)
- , m_stopProcess(0)
- , m_deviceInfo(0)
- , m_logProcessRunner(0)
- , m_runningStateTimer(new QTimer(this))
- , m_runningStateProcess(0)
- , m_qmlDebugServerPort(0)
- , m_checkQmlJsDebugArgumentsProcess(0)
-{
- QTC_ASSERT(runConfiguration, return);
-
- Target *target = runConfiguration->target();
- BuildConfiguration *buildConfig = target->activeBuildConfiguration();
- m_environment = buildConfig->environment();
- m_deployCmd = m_environment.searchInPath(QLatin1String(Constants::QNX_BLACKBERRY_DEPLOY_CMD)).toString();
-
- QFileInfo fi(target->kit()->autoDetectionSource());
- m_bbApiLevelVersion = QnxVersionNumber::fromNdkEnvFileName(fi.baseName());
-
- m_device = BlackBerryDeviceConfiguration::device(target->kit());
- m_barPackage = runConfiguration->barPackage();
-
- // The BlackBerry device always uses key authentication
- m_sshParams = m_device->sshParameters();
- m_sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationTypePublicKey;
-
- Debugger::DebuggerRunConfigurationAspect *aspect =
- runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
- if (aspect)
- m_qmlDebugServerPort = aspect->qmlDebugServerPort();
-
- m_runningStateTimer->setInterval(3000);
- m_runningStateTimer->setSingleShot(true);
- connect(m_runningStateTimer, SIGNAL(timeout()), this, SLOT(determineRunningState()));
- connect(this, SIGNAL(started()), this, SLOT(startLogProcessRunner()));
-
- connect(&m_launchStopProcessParser, SIGNAL(pidParsed(qint64)), this, SLOT(setPid(qint64)));
- connect(&m_launchStopProcessParser, SIGNAL(applicationIdParsed(QString)), this, SLOT(setApplicationId(QString)));
-}
-
-void BlackBerryApplicationRunner::start()
-{
- if (!BlackBerryDeviceConnectionManager::instance()->isConnected(m_device->id())) {
- connect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(deviceConnected()),
- this, SLOT(checkDeployMode()));
- connect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(deviceDisconnected(Core::Id)),
- this, SLOT(disconnectFromDeviceSignals(Core::Id)));
- connect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(connectionOutput(Core::Id,QString)),
- this, SLOT(displayConnectionOutput(Core::Id,QString)));
- BlackBerryDeviceConnectionManager::instance()->connectDevice(m_device->id());
- } else {
- checkDeployMode();
- }
-}
-
-void BlackBerryApplicationRunner::startLogProcessRunner()
-{
- if (!m_logProcessRunner) {
- m_logProcessRunner = new BlackBerryLogProcessRunner(this, m_appId, m_device);
- connect(m_logProcessRunner, SIGNAL(output(QString,Utils::OutputFormat)),
- this, SIGNAL(output(QString,Utils::OutputFormat)));
- connect(m_logProcessRunner, SIGNAL(finished()), this, SIGNAL(finished()));
- }
-
- m_logProcessRunner->start();
-}
-
-void BlackBerryApplicationRunner::displayConnectionOutput(Core::Id deviceId, const QString &msg)
-{
- if (deviceId != m_device->id())
- return;
-
- if (msg.contains(QLatin1String("Info:")))
- emit output(msg, Utils::StdOutFormat);
- else if (msg.contains(QLatin1String("Error:")))
- emit output(msg, Utils::StdErrFormat);
-}
-
-void BlackBerryApplicationRunner::checkDeviceRuntimeVersion(int status)
-{
- if (status != BlackBerryNdkProcess::Success) {
- emit output(tr("Cannot determine device runtime version."), Utils::StdErrFormat);
- return;
- }
-
- if (m_bbApiLevelVersion.isEmpty()) {
- emit output(tr("Cannot determine API level version."), Utils::StdErrFormat);
- checkQmlJsDebugArguments();
- return;
- }
-
- const QString runtimeVersion = m_deviceInfo->scmBundle();
- if (m_bbApiLevelVersion.toString() != runtimeVersion) {
- const QMessageBox::StandardButton answer =
- QMessageBox::question(Core::ICore::mainWindow(),
- tr("Confirmation"),
- tr("The device runtime version (%1) does not match "
- "the API level version (%2).\n"
- "This may cause unexpected behavior when debugging.\n"
- "Do you want to continue anyway?")
- .arg(runtimeVersion, m_bbApiLevelVersion.toString()),
- QMessageBox::Yes | QMessageBox::No);
-
- if (answer == QMessageBox::No) {
- emit startFailed(tr("API level version does not match Runtime version."));
- return;
- }
- }
-
- checkQmlJsDebugArguments();
-}
-
-void BlackBerryApplicationRunner::queryDeviceInformation()
-{
- if (!m_deviceInfo) {
- m_deviceInfo = new BlackBerryDeviceInformation(this);
- connect(m_deviceInfo, SIGNAL(finished(int)),
- this, SLOT(checkDeviceRuntimeVersion(int)));
- }
-
- m_deviceInfo->setDeviceTarget(m_sshParams.host, m_sshParams.password);
- emit output(tr("Querying device runtime version..."), Utils::StdOutFormat);
-}
-
-void BlackBerryApplicationRunner::startFinished(int exitCode, QProcess::ExitStatus exitStatus)
-{
- if (exitCode == 0 && exitStatus == QProcess::NormalExit && m_pid > -1) {
- emit started();
- } else {
- m_running = false;
- m_runningStateTimer->stop();
-
- QTC_ASSERT(m_launchProcess, return);
- const QString errorString = (m_launchProcess->error() != QProcess::UnknownError)
- ? m_launchProcess->errorString() : tr("Launching application failed");
- emit startFailed(errorString);
- reset();
- }
-}
-
-RunControl::StopResult BlackBerryApplicationRunner::stop()
-{
- if (m_stopping)
- return RunControl::AsynchronousStop;
-
- m_stopping = true;
-
- QStringList args;
- args << QLatin1String("-terminateApp");
- args << QLatin1String("-device") << m_sshParams.host;
- if (!m_sshParams.password.isEmpty())
- args << QLatin1String("-password") << m_sshParams.password;
- args << m_barPackage.toUserOutput();
-
- if (!m_stopProcess) {
- m_stopProcess = new QProcess(this);
- connect(m_stopProcess, SIGNAL(readyReadStandardError()), this, SLOT(readStandardError()));
- connect(m_stopProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput()));
- connect(m_stopProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(stopFinished(int,QProcess::ExitStatus)));
-
- m_stopProcess->setEnvironment(m_environment.toStringList());
- }
-
- m_stopProcess->start(m_deployCmd, args);
- return RunControl::AsynchronousStop;
-}
-
-bool BlackBerryApplicationRunner::isRunning() const
-{
- return m_running;
-}
-
-qint64 BlackBerryApplicationRunner::pid() const
-{
- return m_pid;
-}
-
-void BlackBerryApplicationRunner::stopFinished(int exitCode, QProcess::ExitStatus exitStatus)
-{
- Q_UNUSED(exitCode);
- Q_UNUSED(exitStatus);
-
- reset();
-}
-
-void BlackBerryApplicationRunner::readStandardOutput()
-{
- QProcess *process = qobject_cast<QProcess *>(sender());
- process->setReadChannel(QProcess::StandardOutput);
- while (process->canReadLine()) {
- QString line = QString::fromLocal8Bit(process->readLine());
- m_launchStopProcessParser.stdOutput(line);
- emit output(line, Utils::StdOutFormat);
- }
-}
-
-void BlackBerryApplicationRunner::readStandardError()
-{
- QProcess *process = qobject_cast<QProcess *>(sender());
- process->setReadChannel(QProcess::StandardError);
- while (process->canReadLine()) {
- const QString line = QString::fromLocal8Bit(process->readLine());
- m_launchStopProcessParser.stdError(line);
- emit output(line, Utils::StdErrFormat);
- }
-}
-
-void BlackBerryApplicationRunner::disconnectFromDeviceSignals(Core::Id deviceId)
-{
- if (m_device->id() == deviceId) {
- disconnect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(deviceConnected()),
- this, SLOT(checkDeployMode()));
- disconnect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(deviceDisconnected(Core::Id)),
- this, SLOT(disconnectFromDeviceSignals(Core::Id)));
- disconnect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(connectionOutput(Core::Id,QString)),
- this, SLOT(displayConnectionOutput(Core::Id,QString)));
- }
-}
-
-void BlackBerryApplicationRunner::setPid(qint64 pid)
-{
- m_pid = pid;
-}
-
-void BlackBerryApplicationRunner::setApplicationId(const QString &applicationId)
-{
- m_appId = applicationId;
-}
-
-void BlackBerryApplicationRunner::checkQmlJsDebugArguments()
-{
- if (!m_launchFlags.testFlag(QmlDebugLaunch)) {
- // no need to change anytning in app manifest for this kind of run
- launchApplication();
- }
-
- emit output(tr("Checking qmljsdebugger command line argument."), Utils::StdOutFormat);
- QString nativePackagerCmd = m_environment.searchInPath(QLatin1String("blackberry-nativepackager")).toString();
- if (nativePackagerCmd.isEmpty()) {
- emit output(tr("Cannot find Native Packager executable."), Utils::StdErrFormat);
- return;
- }
-
- m_checkQmlJsDebugArgumentsProcess = new QProcess(this);
- connect(m_checkQmlJsDebugArgumentsProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(checkQmlJsDebugArgumentsManifestLoaded()));
- connect(m_checkQmlJsDebugArgumentsProcess, SIGNAL(finished(int)), this, SLOT(checkQmlJsDebugArgumentsManifestLoaded()));
-
- QStringList args;
- args << QLatin1String("-listManifest") << m_barPackage.toUserOutput();
- if (debugCheckQmlJSArgs)
- qDebug() << "get manifest:" << nativePackagerCmd << args.join(QLatin1Char(' '));
- m_checkQmlJsDebugArgumentsProcess->start(nativePackagerCmd, args);
-}
-
-void BlackBerryApplicationRunner::checkQmlJsDebugArgumentsManifestLoaded()
-{
- m_checkQmlJsDebugArgumentsProcess->deleteLater();
-
- if (m_checkQmlJsDebugArgumentsProcess->exitStatus() != QProcess::NormalExit) {
- emit output(tr("Cannot read bar package manifest."), Utils::StdErrFormat);
- qWarning() << "Cannot read bar package manifest:" << m_checkQmlJsDebugArgumentsProcess->errorString();
- qWarning() << m_checkQmlJsDebugArgumentsProcess->readAllStandardError();
- return;
- }
-
- QString manifestContent = QString::fromUtf8(m_checkQmlJsDebugArgumentsProcess->readAllStandardOutput());
-
- QRegExp rxEoln(QLatin1String("(\\r\\n|\\n|\\r)"));
- QStringList manifestLines = manifestContent.split(rxEoln);
-
- QMutableListIterator<QString> it(manifestLines);
- QLatin1String entryPoint("Entry-Point: ");
- while (it.hasNext()) {
- it.next();
- if (it.value().startsWith(entryPoint)) {
- while (it.hasNext() && it.peekNext().startsWith(QLatin1Char(' ')))
- it.next();
- QString qmljsdbgArg = QString::fromLatin1("-qmljsdebugger=port:%1%2")
- .arg(m_qmlDebugServerPort)
- .arg(m_launchFlags.testFlag(QmlDebugLaunchBlocking)? QLatin1String(",block"): QLatin1String(""));
- it.insert(QLatin1String(" ") + qmljsdbgArg);
- manifestContent = manifestLines.join(QLatin1Char('\n'));
- break;
- }
- }
-
- m_checkQmlJsDebugArgumentsProcess = new QProcess(this);
- connect(m_checkQmlJsDebugArgumentsProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(checkQmlJsDebugArgumentsManifestSaved()));
- connect(m_checkQmlJsDebugArgumentsProcess, SIGNAL(finished(int)), this, SLOT(checkQmlJsDebugArgumentsManifestSaved()));
-
- QTemporaryFile *manifestFile = new QTemporaryFile(m_checkQmlJsDebugArgumentsProcess);
- if (!manifestFile->open()) {
- emit output(tr("Internal error: Cannot create temporary manifest file \"%1\"")
- .arg(manifestFile->fileName()), Utils::StdErrFormat);
- delete manifestFile;
- return;
- }
-
- manifestFile->write(manifestContent.toUtf8());
- manifestFile->flush();
-
- QStringList args;
- args << QLatin1String("-device") << m_sshParams.host;
- if (!m_sshParams.password.isEmpty())
- args << QLatin1String("-password") << m_sshParams.password;
- args << QLatin1String("-package") << m_barPackage.toUserOutput();
- args << QLatin1String("-putFile");
- args << manifestFile->fileName();
- args << QLatin1String("app/META-INF/MANIFEST.MF");
- if (debugCheckQmlJSArgs)
- qDebug() << "set manifest:" << m_deployCmd << args.join(QLatin1Char(' '));
- m_checkQmlJsDebugArgumentsProcess->start(m_deployCmd, args);
-}
-
-void BlackBerryApplicationRunner::checkQmlJsDebugArgumentsManifestSaved()
-{
- m_checkQmlJsDebugArgumentsProcess->deleteLater();
-
- if (m_checkQmlJsDebugArgumentsProcess->exitStatus() != QProcess::NormalExit) {
- emit output(tr("Cannot set command line arguments."), Utils::StdErrFormat);
- qWarning() << "Cannot set command line arguments:" << m_checkQmlJsDebugArgumentsProcess->errorString();
- qWarning() << m_checkQmlJsDebugArgumentsProcess->readAllStandardError();
- return;
- }
-
- launchApplication();
-}
-
-void BlackBerryApplicationRunner::launchApplication()
-{
- // If original device connection fails before launching, this method maybe triggered
- // if any other device is connected(?)
- if (!BlackBerryDeviceConnectionManager::instance()->isConnected(m_device->id()))
- return;
-
- QStringList args;
- args << QLatin1String("-launchApp");
- if (m_launchFlags.testFlag(CppDebugLaunch))
- args << QLatin1String("-debugNative");
- args << QLatin1String("-device") << m_sshParams.host;
- if (!m_sshParams.password.isEmpty())
- args << QLatin1String("-password") << m_sshParams.password;
- args << QLatin1String("-package") << m_barPackage.toUserOutput();
-
- if (!m_launchProcess) {
- m_launchProcess = new QProcess(this);
- connect(m_launchProcess, SIGNAL(readyReadStandardError()), this, SLOT(readStandardError()));
- connect(m_launchProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput()));
- connect(m_launchProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(startFinished(int,QProcess::ExitStatus)));
-
- m_launchProcess->setEnvironment(m_environment.toStringList());
- }
- if (debugCheckQmlJSArgs)
- qDebug() << "launch:" << m_deployCmd << args.join(QLatin1Char(' '));
- m_launchProcess->start(m_deployCmd, args);
- m_runningStateTimer->start();
- m_running = true;
-}
-
-void BlackBerryApplicationRunner::checkDeployMode()
-{
- // If original device connection fails before launching, this method maybe triggered
- // if any other device is connected
- if (!BlackBerryDeviceConnectionManager::instance()->isConnected(m_device->id()))
- return;
-
- if (m_launchFlags.testFlag(CppDebugLaunch))
- queryDeviceInformation(); // check API version vs Runtime version
- else
- checkQmlJsDebugArguments();
-}
-
-void BlackBerryApplicationRunner::startRunningStateTimer()
-{
- if (m_running)
- m_runningStateTimer->start();
-}
-
-void BlackBerryApplicationRunner::determineRunningState()
-{
- QStringList args;
- args << QLatin1String("-isAppRunning");
- args << QLatin1String("-device") << m_sshParams.host;
- if (!m_sshParams.password.isEmpty())
- args << QLatin1String("-password") << m_sshParams.password;
- args << m_barPackage.toUserOutput();
-
- if (!m_runningStateProcess) {
- m_runningStateProcess = new QProcess(this);
-
- connect(m_runningStateProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readRunningStateStandardOutput()));
- connect(m_runningStateProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(startRunningStateTimer()));
- }
-
- m_runningStateProcess->setEnvironment(m_environment.toStringList());
-
- m_runningStateProcess->start(m_deployCmd, args);
-}
-
-void BlackBerryApplicationRunner::readRunningStateStandardOutput()
-{
- QProcess *process = qobject_cast<QProcess *>(sender());
- process->setReadChannel(QProcess::StandardOutput);
- while (process->canReadLine()) {
- const QString line = QString::fromLocal8Bit(process->readLine());
- if (line.startsWith(QLatin1String("result"))) {
- m_running = parseRunningState(line);
- break;
- }
- }
-
- if (!m_running)
- reset();
-}
-
-void BlackBerryApplicationRunner::reset()
-{
- m_pid = -1;
- m_appId.clear();
- m_running = false;
- m_stopping = false;
-
- m_runningStateTimer->stop();
- if (m_runningStateProcess) {
- m_runningStateProcess->terminate();
- if (!m_runningStateProcess->waitForFinished(1000))
- m_runningStateProcess->kill();
- }
-
- if (m_logProcessRunner) {
- m_logProcessRunner->stop();
-
- delete m_logProcessRunner;
- m_logProcessRunner = 0;
- } else {
- emit finished();
- }
-}
diff --git a/src/plugins/qnx/blackberryapplicationrunner.h b/src/plugins/qnx/blackberryapplicationrunner.h
deleted file mode 100644
index 792c587428..0000000000
--- a/src/plugins/qnx/blackberryapplicationrunner.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYAPPLICATIONRUNNER_H
-#define QNX_INTERNAL_BLACKBERRYAPPLICATIONRUNNER_H
-
-#include "blackberrydeviceconfiguration.h"
-#include "blackberryprocessparser.h"
-#include "qnxversionnumber.h"
-
-#include <projectexplorer/runconfiguration.h>
-
-#include <ssh/sshconnection.h>
-#include <utils/environment.h>
-#include <utils/fileutils.h>
-
-#include <QObject>
-#include <QProcess>
-#include <QDateTime>
-
-namespace QSsh { class SshRemoteProcessRunner; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryRunConfiguration;
-class BlackBerryLogProcessRunner;
-class BlackBerryDeviceInformation;
-
-class BlackBerryApplicationRunner : public QObject
-{
- Q_OBJECT
-public:
- enum LaunchFlag
- {
- CppDebugLaunch = 0x1,
- QmlDebugLaunch = 0x2,
- QmlDebugLaunchBlocking = 0x4,
- QmlProfilerLaunch = 0x8
- };
- Q_DECLARE_FLAGS(LaunchFlags, LaunchFlag)
-
-public:
- explicit BlackBerryApplicationRunner(const LaunchFlags &launchFlags, BlackBerryRunConfiguration *runConfiguration, QObject *parent = 0);
-
- bool isRunning() const;
- qint64 pid() const;
-
-public slots:
- void start();
- ProjectExplorer::RunControl::StopResult stop();
-
-signals:
- void output(const QString &msg, Utils::OutputFormat format);
- void started();
- void finished();
-
- void startFailed(const QString &msg);
-
-private slots:
- void startFinished(int exitCode, QProcess::ExitStatus exitStatus);
- void stopFinished(int exitCode, QProcess::ExitStatus exitStatus);
-
- void readStandardOutput();
- void readStandardError();
-
- void disconnectFromDeviceSignals(Core::Id deviceId);
- void startRunningStateTimer();
- void determineRunningState();
- void readRunningStateStandardOutput();
-
- void setPid(qint64 pid);
- void setApplicationId(const QString &applicationId);
-
- void launchApplication();
- void checkDeployMode();
- void startLogProcessRunner();
-
- void displayConnectionOutput(Core::Id deviceId, const QString &output);
- void checkDeviceRuntimeVersion(int status);
-
- void checkQmlJsDebugArguments();
- void checkQmlJsDebugArgumentsManifestLoaded();
- void checkQmlJsDebugArgumentsManifestSaved();
-
-private:
- void reset();
- void queryDeviceInformation();
-
- LaunchFlags m_launchFlags;
-
- qint64 m_pid;
- QString m_appId;
-
- bool m_running;
- bool m_stopping;
-
- Utils::Environment m_environment;
- QString m_deployCmd;
- BlackBerryDeviceConfiguration::ConstPtr m_device;
- Utils::FileName m_barPackage;
- QSsh::SshConnectionParameters m_sshParams;
-
- QProcess *m_launchProcess;
- QProcess *m_stopProcess;
- BlackBerryProcessParser m_launchStopProcessParser;
- BlackBerryDeviceInformation *m_deviceInfo;
-
- BlackBerryLogProcessRunner *m_logProcessRunner;
-
- QTimer *m_runningStateTimer;
- QProcess *m_runningStateProcess;
-
- QnxVersionNumber m_bbApiLevelVersion;
-
- int m_qmlDebugServerPort;
- QProcess *m_checkQmlJsDebugArgumentsProcess;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYAPPLICATIONRUNNER_H
diff --git a/src/plugins/qnx/blackberrycertificate.cpp b/src/plugins/qnx/blackberrycertificate.cpp
deleted file mode 100644
index 3accfd432d..0000000000
--- a/src/plugins/qnx/blackberrycertificate.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrycertificate.h"
-#include "blackberryapilevelconfiguration.h"
-#include "blackberryconfigurationmanager.h"
-#include "blackberryndkprocess.h"
-
-#include <utils/environment.h>
-#include <utils/hostosinfo.h>
-
-#include <QProcess>
-#include <QFile>
-#include <QTextStream>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryCertificate::BlackBerryCertificate(const QString &fileName,
- const QString &author, const QString &storePass, QObject *parent) :
- QObject(parent),
- m_fileName(fileName),
- m_author(author),
- m_storePass(storePass),
- m_process(new QProcess(this))
-{
- m_process->setProcessChannelMode(QProcess::MergedChannels);
- m_process->setEnvironment(Utils::EnvironmentItem::toStringList(
- BlackBerryConfigurationManager::instance()->defaultConfigurationEnv()));
-}
-
-void BlackBerryCertificate::load()
-{
- if (m_process->state() != QProcess::NotRunning) {
- emit finished(BlackBerryCertificate::Busy);
- return;
- }
- QStringList arguments;
-
- arguments << QLatin1String("-keystore")
- << m_fileName
- << QLatin1String("-list")
- << QLatin1String("-verbose")
- << QLatin1String("-storepass")
- << m_storePass;
-
- connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(loadFinished()));
- connect(m_process, SIGNAL(error(QProcess::ProcessError)),
- this, SLOT(processError()));
-
- m_process->start(command(), arguments);
-}
-
-void BlackBerryCertificate::store()
-{
- if (m_process->state() != QProcess::NotRunning) {
- emit finished(BlackBerryCertificate::Busy);
- return;
- }
-
- QFile file(m_fileName);
-
- if (file.exists())
- file.remove();
-
- QStringList arguments;
-
- arguments << QLatin1String("-genkeypair")
- << QLatin1String("-storepass")
- << m_storePass
- << QLatin1String("-author")
- << m_author
- << QLatin1String("-keystore")
- << m_fileName;
-
- connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(storeFinished(int)));
- connect(m_process, SIGNAL(error(QProcess::ProcessError)),
- this, SLOT(processError()));
-
- m_process->start(command(), arguments);
-}
-
-QString BlackBerryCertificate::fileName() const
-{
- return m_fileName;
-}
-
-QString BlackBerryCertificate::author() const
-{
- return m_author;
-}
-
-QString BlackBerryCertificate::id() const
-{
- QString tmpId = fileName();
- return tmpId.replace(QLatin1Char('/'), QLatin1Char('-'));
-}
-
-void BlackBerryCertificate::storeFinished(int status)
-{
- m_process->disconnect();
-
- if (status == 0)
- emit finished(BlackBerryCertificate::Success);
- else
- emit finished(BlackBerryCertificate::Error);
-}
-
-void BlackBerryCertificate::loadFinished()
-{
- m_process->disconnect();
-
- ResultCode status = Error;
-
- QTextStream processOutput(m_process);
-
- while (!processOutput.atEnd()) {
- QString chunk = processOutput.readLine();
-
- if (chunk.contains(QLatin1String("invalid password"))) {
- status = WrongPassword;
- break;
- } else if (chunk.contains(QLatin1String("must be at least 6 characters"))) {
- status = PasswordTooSmall;
- break;
- } else if (chunk.startsWith(QLatin1String("Owner:"))) {
- chunk.remove(QLatin1String("Owner:"));
- m_author = chunk.remove(QLatin1String("CN=")).trimmed();
- status = Success;
- break;
- } else if (chunk.contains(QLatin1String("Subject Name:"))) {
- // this format is used by newer NDKs, the interesting data
- // comes on the next line
- chunk = processOutput.readLine();
- const QString token = QLatin1String("CommonName=");
- if (chunk.contains(token)) {
- m_author = chunk.remove(token).trimmed();
- status = Success;
- } else {
- status = InvalidOutputFormat;
- }
-
- break;
- }
- }
-
- emit finished(status);
-}
-
-void BlackBerryCertificate::processError()
-{
- m_process->disconnect();
-
- emit finished(Error);
-}
-
-QString BlackBerryCertificate::command() const
-{
- return BlackBerryNdkProcess::resolveNdkToolPath(QLatin1String("blackberry-keytool"));
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrycertificate.h b/src/plugins/qnx/blackberrycertificate.h
deleted file mode 100644
index e39cb36da5..0000000000
--- a/src/plugins/qnx/blackberrycertificate.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYCERTIFICATE_H
-#define QNX_INTERNAL_BLACKBERRYCERTIFICATE_H
-
-#include <QObject>
-#include <QString>
-
-QT_BEGIN_NAMESPACE
-class QProcess;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryCertificate : public QObject
-{
-Q_OBJECT
-
-public:
- enum ResultCode {
- Success,
- Busy,
- WrongPassword,
- PasswordTooSmall,
- InvalidOutputFormat,
- Error
- };
-
- BlackBerryCertificate(const QString &fileName,
- const QString &author = QString(),
- const QString &storePass = QString(),
- QObject *parent = 0);
-
- void load();
- void store();
-
- QString fileName() const;
- QString author() const;
- QString id() const;
-
-signals:
- void loaded();
- void stored();
- void finished(int status);
-
-private slots:
- void storeFinished(int status);
- void loadFinished();
- void processError();
-
-private:
- QString command() const;
-
- QString m_fileName;
- QString m_author;
- QString m_storePass;
-
- QProcess *m_process;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYCERTIFICATE_H
diff --git a/src/plugins/qnx/blackberrycheckdevicestatusstep.cpp b/src/plugins/qnx/blackberrycheckdevicestatusstep.cpp
deleted file mode 100644
index 4b15dfb4f8..0000000000
--- a/src/plugins/qnx/blackberrycheckdevicestatusstep.cpp
+++ /dev/null
@@ -1,281 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrycheckdevicestatusstep.h"
-
-#include "blackberrycheckdevicestatusstepconfigwidget.h"
-#include "blackberrydeviceinformation.h"
-#include "qnxversionnumber.h"
-#include "qnxconstants.h"
-
-#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/kit.h>
-#include <projectexplorer/task.h>
-#include <ssh/sshconnection.h>
-
-#include <coreplugin/icore.h>
-
-#include <qfileinfo.h>
-
-#include <qmessagebox.h>
-
-#include <qeventloop.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-const char RUNTIME_CHECK_ENABLED[] =
- "Qnx.Internal.BlackBerryCheckDeviceStatusStep.RuntimeCheckEnabled";
-const char DEBUG_TOKEN_CHECK_ENABLED[] =
- "Qnx.Internal.BlackBerryCheckDeviceStatusStep.DebugTokenCheckEnabled";
-}
-
-BlackBerryCheckDeviceStatusStep::BlackBerryCheckDeviceStatusStep(ProjectExplorer::BuildStepList *bsl) :
- ProjectExplorer::BuildStep(bsl, Core::Id(Constants::QNX_CHECK_DEVICE_STATUS_BS_ID))
- , m_deviceInfo(0)
- , m_eventLoop(0)
- , m_runtimeCheckEnabled(true)
- , m_debugTokenCheckEnabled(true)
-{
- setDisplayName(tr("Check Device Status"));
-}
-
-BlackBerryCheckDeviceStatusStep::BlackBerryCheckDeviceStatusStep(ProjectExplorer::BuildStepList *bsl,
- BlackBerryCheckDeviceStatusStep *bs) :
- ProjectExplorer::BuildStep(bsl, bs)
- , m_deviceInfo(0)
- , m_eventLoop(0)
- , m_runtimeCheckEnabled(true)
- , m_debugTokenCheckEnabled(true)
-{
- setDisplayName(tr("Check Device Status"));
-}
-
-void BlackBerryCheckDeviceStatusStep::checkDeviceInfo(int status)
-{
- if (!m_runtimeCheckEnabled && m_debugTokenCheckEnabled) {
- // Skip debug token check for internal non secure devices and simulators
- if (!m_deviceInfo->isProductionDevice() || m_deviceInfo->isSimulator()) {
- m_eventLoop->exit(true);
- return;
- }
- }
-
- if (status != BlackBerryDeviceInformation::Success) {
- switch (status) {
- case BlackBerryDeviceInformation::AuthenticationFailed:
- raiseError(tr("Authentication failed."));
- break;
- case BlackBerryDeviceInformation::NoRouteToHost:
- raiseError(tr("Cannot connect to device."));
- break;
- case BlackBerryDeviceInformation::DevelopmentModeDisabled:
- raiseError(tr("Device is not in the development mode."));
- break;
- case BlackBerryDeviceInformation::InferiorProcessTimedOut:
- raiseError(tr("Timeout querying device information."));
- break;
- case BlackBerryDeviceInformation::FailedToStartInferiorProcess:
- raiseError(tr("Failed to query device information."));
- break;
- case BlackBerryDeviceInformation::InferiorProcessCrashed:
- raiseError(tr("Process to query device information has crashed."));
- break;
- default:
- raiseError(tr("Cannot query device information."));
- break;
- }
- m_eventLoop->exit(false);
- return;
- }
-
- if (m_debugTokenCheckEnabled && !m_deviceInfo->debugTokenValid()) {
- //: %1: Error message from BlackBerryDeviceInformation
- const QString errorMsg =
- tr("%1. Upload a valid debug token into the device.")
- .arg(m_deviceInfo->debugTokenValidationError());
- raiseError(errorMsg);
- m_eventLoop->exit(false);
- return;
- }
-
- if (m_runtimeCheckEnabled) {
- QnxVersionNumber deviceRuntimeVersion(m_deviceInfo->scmBundle());
- QFileInfo fi(target()->kit()->autoDetectionSource());
-
- if (deviceRuntimeVersion.isEmpty()) {
- // Skip the check if device runtime is not determined
- m_eventLoop->exit(true);
- raiseWarning(tr("Cannot determine device runtime version."));
- return;
- }
-
- QnxVersionNumber apiLevelVersion = QnxVersionNumber::fromNdkEnvFileName(fi.baseName());
- if (apiLevelVersion.isEmpty()) {
- // Skip the check if device API level version is not determined
- m_eventLoop->exit(true);
- raiseWarning(tr("Cannot determine API level version."));
- return;
- }
-
- bool ok = true;
- if (apiLevelVersion > deviceRuntimeVersion) {
- raiseError(tr("The device runtime version (%1) is inferior to the API level version (%2)")
- .arg(deviceRuntimeVersion.toString(), apiLevelVersion.toString()));
-
- QMetaObject::invokeMethod(this, "handleVersionMismatch", Qt::BlockingQueuedConnection,
- Q_RETURN_ARG(bool, ok),
- Q_ARG(QString, deviceRuntimeVersion.toString()),
- Q_ARG(QString, apiLevelVersion.toString()));
- }
-
- m_eventLoop->exit(ok);
- return;
- }
-
- m_eventLoop->exit(true);
-}
-
-void BlackBerryCheckDeviceStatusStep::emitOutputInfo()
-{
- emit addOutput(tr("Checking device status..."), BuildStep::MessageOutput);
-}
-
-void BlackBerryCheckDeviceStatusStep::enableDebugTokenCheck(bool enable)
-{
- m_debugTokenCheckEnabled = enable;
-}
-
-void BlackBerryCheckDeviceStatusStep::enableRuntimeCheck(bool enable)
-{
- m_runtimeCheckEnabled = enable;
-}
-
-bool BlackBerryCheckDeviceStatusStep::handleVersionMismatch(const QString &runtimeVersion, const QString &apiLevelVersion)
-{
- // TODO: Check if a matching API level exists in the user configurations,
- // otherwise let the user download the matching device runtime.
- const QMessageBox::StandardButton answer = QMessageBox::question(Core::ICore::mainWindow(), tr("Confirmation"),
- tr("The device runtime version (%1) does not match the API level version (%2).\n"
- "Do you want to continue anyway?").arg(runtimeVersion, apiLevelVersion),
- QMessageBox::Yes | QMessageBox::No);
- return answer == QMessageBox::Yes;
-}
-
-bool BlackBerryCheckDeviceStatusStep::init()
-{
- m_device = BlackBerryDeviceConfiguration::device(target()->kit());
- if (!m_device)
- return false;
-
- if (m_device->sshParameters().host.isEmpty()) {
- raiseError(tr("No hostname specified for the device"));
- return false;
- }
-
- return true;
-}
-
-void BlackBerryCheckDeviceStatusStep::run(QFutureInterface<bool> &fi)
-{
- if (!m_runtimeCheckEnabled && !m_debugTokenCheckEnabled)
- return fi.reportResult(true);
-
- m_eventLoop = new QEventLoop;
- m_deviceInfo = new BlackBerryDeviceInformation;
-
- connect(m_deviceInfo, SIGNAL(started()), this, SLOT(emitOutputInfo()));
- connect(m_deviceInfo, SIGNAL(finished(int)), this, SLOT(checkDeviceInfo(int)), Qt::DirectConnection);
- m_deviceInfo->setDeviceTarget(m_device->sshParameters().host, m_device->sshParameters().password);
-
- bool returnValue = m_eventLoop->exec();
-
- delete m_eventLoop;
- m_eventLoop = 0;
-
- delete m_deviceInfo;
- m_deviceInfo = 0;
-
- return fi.reportResult(returnValue);
-}
-
-ProjectExplorer::BuildStepConfigWidget *BlackBerryCheckDeviceStatusStep::createConfigWidget()
-{
- return new BlackBerryCheckDeviceStatusStepConfigWidget(this);
-}
-
-void BlackBerryCheckDeviceStatusStep::raiseError(const QString &errorMessage)
-{
- ProjectExplorer::Task task = ProjectExplorer::Task(ProjectExplorer::Task::Error, errorMessage, Utils::FileName(), -1,
- ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
- emit addTask(task, 1);
- emit addOutput(errorMessage, BuildStep::ErrorMessageOutput);
-}
-
-void BlackBerryCheckDeviceStatusStep::raiseWarning(const QString &warningMessage)
-{
- ProjectExplorer::Task task = ProjectExplorer::Task(ProjectExplorer::Task::Warning, warningMessage, Utils::FileName(), -1,
- ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
- emit addTask(task, 1);
- emit addOutput(warningMessage, BuildStep::ErrorOutput);
-}
-
-
-bool BlackBerryCheckDeviceStatusStep::fromMap(const QVariantMap &map)
-{
- m_runtimeCheckEnabled = map.value(QLatin1String(RUNTIME_CHECK_ENABLED), false).toBool();
- m_debugTokenCheckEnabled = map.value(QLatin1String(DEBUG_TOKEN_CHECK_ENABLED), false).toBool();
-
- return BuildStep::fromMap(map);
-}
-
-QVariantMap BlackBerryCheckDeviceStatusStep::toMap() const
-{
- QVariantMap map = BuildStep::toMap();
- map.insert(QLatin1String(RUNTIME_CHECK_ENABLED), m_runtimeCheckEnabled);
- map.insert(QLatin1String(DEBUG_TOKEN_CHECK_ENABLED), m_debugTokenCheckEnabled);
-
- return map;
-}
-
-bool BlackBerryCheckDeviceStatusStep::debugTokenCheckEnabled() const
-{
- return m_debugTokenCheckEnabled;
-}
-
-bool BlackBerryCheckDeviceStatusStep::runtimeCheckEnabled() const
-{
- return m_runtimeCheckEnabled;
-}
diff --git a/src/plugins/qnx/blackberrycheckdevicestatusstep.h b/src/plugins/qnx/blackberrycheckdevicestatusstep.h
deleted file mode 100644
index 21b841a2cf..0000000000
--- a/src/plugins/qnx/blackberrycheckdevicestatusstep.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYCHECKDEVICESTATUSSTEP_H
-#define QNX_INTERNAL_BLACKBERRYCHECKDEVICESTATUSSTEP_H
-
-#include "blackberrydeviceconfiguration.h"
-
-#include <projectexplorer/buildstep.h>
-
-QT_BEGIN_NAMESPACE
-class QEventLoop;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeviceInformation;
-class BlackBerryCheckDeviceStatusStep : public ProjectExplorer::BuildStep
-{
- Q_OBJECT
- friend class BlackBerryCheckDeviceStatusStepFactory;
-
-public:
- explicit BlackBerryCheckDeviceStatusStep(ProjectExplorer::BuildStepList *bsl);
-
- bool init();
- void run(QFutureInterface<bool> &fi);
- ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
-
- void raiseError(const QString &error);
- void raiseWarning(const QString &warning);
-
- bool fromMap(const QVariantMap &map);
- QVariantMap toMap() const;
-
- bool debugTokenCheckEnabled () const;
- bool runtimeCheckEnabled() const;
-
-protected:
- BlackBerryCheckDeviceStatusStep(ProjectExplorer::BuildStepList *bsl,
- BlackBerryCheckDeviceStatusStep *bs);
-
-protected slots:
- void checkDeviceInfo(int status);
- void emitOutputInfo();
-
- void enableDebugTokenCheck(bool enable);
- void enableRuntimeCheck(bool enable);
-
- bool handleVersionMismatch(const QString &runtimeVersion, const QString &apiLevelVersion);
-
-private:
- BlackBerryDeviceInformation *m_deviceInfo;
- BlackBerryDeviceConfiguration::ConstPtr m_device;
- QEventLoop *m_eventLoop;
-
- bool m_runtimeCheckEnabled;
- bool m_debugTokenCheckEnabled;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYCHECKDEVICESTATUSSTEP_H
diff --git a/src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.cpp b/src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.cpp
deleted file mode 100644
index 17a0bc523c..0000000000
--- a/src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrycheckdevicestatusstepconfigwidget.h"
-#include "ui_blackberrycheckdevicestatusstepconfigwidget.h"
-#include "blackberrycheckdevicestatusstep.h"
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryCheckDeviceStatusStepConfigWidget::BlackBerryCheckDeviceStatusStepConfigWidget(
- BlackBerryCheckDeviceStatusStep *checkDeviceStatuStep)
- : ProjectExplorer::BuildStepConfigWidget()
- , m_checkDeviceStatusStep(checkDeviceStatuStep)
- , m_ui(new Ui::BlackBerryCheckDeviceStatusStepConfigWidget)
-{
- m_ui->setupUi(this);
- m_ui->checkRuntime->setChecked(m_checkDeviceStatusStep->runtimeCheckEnabled());
- m_ui->checkDebugToken->setChecked(m_checkDeviceStatusStep->debugTokenCheckEnabled());
-
- connect(m_ui->checkRuntime, SIGNAL(clicked(bool)),
- m_checkDeviceStatusStep, SLOT(enableRuntimeCheck(bool)));
- connect(m_ui->checkDebugToken, SIGNAL(clicked(bool)),
- m_checkDeviceStatusStep, SLOT(enableDebugTokenCheck(bool)));
-}
-
-BlackBerryCheckDeviceStatusStepConfigWidget::~BlackBerryCheckDeviceStatusStepConfigWidget()
-{
- delete m_ui;
-}
-
-QString BlackBerryCheckDeviceStatusStepConfigWidget::displayName() const
-{
- return tr("<b>Check device status</b>");
-}
-
-QString BlackBerryCheckDeviceStatusStepConfigWidget::summaryText() const
-{
- return displayName();
-}
-
-bool BlackBerryCheckDeviceStatusStepConfigWidget::showWidget() const
-{
- return true;
-}
diff --git a/src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.h b/src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.h
deleted file mode 100644
index b94f2302dd..0000000000
--- a/src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYCHECKDEVICESTATUSSTEPCONFIGWIDGET_H
-#define QNX_INTERNAL_BLACKBERRYCHECKDEVICESTATUSSTEPCONFIGWIDGET_H
-
-#include <projectexplorer/buildstep.h>
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BlackBerryCheckDeviceStatusStepConfigWidget; }
-
-class BlackBerryCheckDeviceStatusStep;
-class BlackBerryCheckDeviceStatusStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
-{
- Q_OBJECT
-public:
- explicit BlackBerryCheckDeviceStatusStepConfigWidget(
- BlackBerryCheckDeviceStatusStep *checkDeviceStatuStep);
- ~BlackBerryCheckDeviceStatusStepConfigWidget();
-
- QString displayName() const;
- QString summaryText() const;
-
- bool showWidget() const;
-private:
- BlackBerryCheckDeviceStatusStep *m_checkDeviceStatusStep;
- Ui::BlackBerryCheckDeviceStatusStepConfigWidget *m_ui;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYCHECKDEVICESTATUSSTEPCONFIGWIDGET_H
diff --git a/src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.ui b/src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.ui
deleted file mode 100644
index 370a193292..0000000000
--- a/src/plugins/qnx/blackberrycheckdevicestatusstepconfigwidget.ui
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryCheckDeviceStatusStepConfigWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryCheckDeviceStatusStepConfigWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>126</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QCheckBox" name="checkRuntime">
- <property name="text">
- <string>Check device runtime</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkDebugToken">
- <property name="text">
- <string>Check debug token</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrycheckdevicestatusstepfactory.cpp b/src/plugins/qnx/blackberrycheckdevicestatusstepfactory.cpp
deleted file mode 100644
index 05d6808cbf..0000000000
--- a/src/plugins/qnx/blackberrycheckdevicestatusstepfactory.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrycheckdevicestatusstepfactory.h"
-
-#include "blackberrycheckdevicestatusstep.h"
-#include "blackberrydeviceconfigurationfactory.h"
-#include "qnxconstants.h"
-
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/kitinformation.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryCheckDeviceStatusStepFactory::BlackBerryCheckDeviceStatusStepFactory(QObject *parent) :
- ProjectExplorer::IBuildStepFactory(parent)
-{
-}
-
-QList<Core::Id> BlackBerryCheckDeviceStatusStepFactory::availableCreationIds(
- ProjectExplorer::BuildStepList *parent) const
-{
- if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- return QList<Core::Id>();
-
- Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->target()->kit());
- if (deviceType != BlackBerryDeviceConfigurationFactory::deviceType())
- return QList<Core::Id>();
-
- return QList<Core::Id>() << Core::Id(Constants::QNX_CHECK_DEVICE_STATUS_BS_ID);
-}
-
-QString BlackBerryCheckDeviceStatusStepFactory::displayNameForId(Core::Id id) const
-{
- if (id == Constants::QNX_CHECK_DEVICE_STATUS_BS_ID)
- return tr("Check Device Status");
- return QString();
-}
-
-bool BlackBerryCheckDeviceStatusStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, Core::Id id) const
-{
- return availableCreationIds(parent).contains(id);
-}
-
-ProjectExplorer::BuildStep *BlackBerryCheckDeviceStatusStepFactory::create(ProjectExplorer::BuildStepList *parent,
- const Core::Id id)
-{
- if (!canCreate(parent, id))
- return 0;
- return new BlackBerryCheckDeviceStatusStep(parent);
-}
-
-bool BlackBerryCheckDeviceStatusStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const
-{
- return canCreate(parent, ProjectExplorer::idFromMap(map));
-}
-
-ProjectExplorer::BuildStep *BlackBerryCheckDeviceStatusStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map)
-{
- if (!canRestore(parent, map))
- return 0;
- BlackBerryCheckDeviceStatusStep *bs = new BlackBerryCheckDeviceStatusStep(parent);
- if (bs->fromMap(map))
- return bs;
- delete bs;
- return 0;
-}
-
-bool BlackBerryCheckDeviceStatusStepFactory::canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) const
-{
- return canCreate(parent, product->id());
-}
-
-ProjectExplorer::BuildStep *BlackBerryCheckDeviceStatusStepFactory::clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product)
-{
- if (!canClone(parent, product))
- return 0;
- return new BlackBerryCheckDeviceStatusStep(parent, static_cast<BlackBerryCheckDeviceStatusStep *>(product));
-}
diff --git a/src/plugins/qnx/blackberrycheckdevicestatusstepfactory.h b/src/plugins/qnx/blackberrycheckdevicestatusstepfactory.h
deleted file mode 100644
index 6c6d18e7e3..0000000000
--- a/src/plugins/qnx/blackberrycheckdevicestatusstepfactory.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYCHECKDEVICESTATUSSTEPFACTORY_H
-#define QNX_INTERNAL_BLACKBERRYCHECKDEVICESTATUSSTEPFACTORY_H
-
-#include <projectexplorer/buildstep.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryCheckDeviceStatusStepFactory : public ProjectExplorer::IBuildStepFactory
-{
- Q_OBJECT
-public:
- explicit BlackBerryCheckDeviceStatusStepFactory(QObject *parent = 0);
-
- QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- QString displayNameForId(Core::Id id) const;
-
- bool canCreate(ProjectExplorer::BuildStepList *parent, Core::Id id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, Core::Id id);
-
- bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
- ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map);
-
- bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) const;
- ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYCHECKDEVICESTATUSSTEPFACTORY_H
diff --git a/src/plugins/qnx/blackberryconfigurationmanager.cpp b/src/plugins/qnx/blackberryconfigurationmanager.cpp
deleted file mode 100644
index b2bc841d05..0000000000
--- a/src/plugins/qnx/blackberryconfigurationmanager.cpp
+++ /dev/null
@@ -1,543 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryconfigurationmanager.h"
-#include "blackberrycertificate.h"
-#include "blackberryapilevelconfiguration.h"
-#include "blackberryruntimeconfiguration.h"
-
-#include "qnxtoolchain.h"
-#include "qnxutils.h"
-
-#include <coreplugin/icore.h>
-
-#include <utils/persistentsettings.h>
-#include <utils/hostosinfo.h>
-
-#include <projectexplorer/kit.h>
-#include <projectexplorer/kitmanager.h>
-#include <projectexplorer/kitinformation.h>
-#include <projectexplorer/toolchainmanager.h>
-
-#include <qtsupport/qtversionmanager.h>
-#include <qtsupport/qtkitinformation.h>
-
-#include <debugger/debuggerkitinformation.h>
-#include <qmakeprojectmanager/qmakekitinformation.h>
-
-#include <QMessageBox>
-#include <QFileInfo>
-#include <QDebug>
-#include <QDir>
-
-using namespace ProjectExplorer;
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryConfigurationManager *BlackBerryConfigurationManager::m_instance = 0;
-
-namespace {
-const QLatin1String SettingsGroup("BlackBerryConfiguration");
-const QLatin1String NDKLocationKey("NDKLocation"); // For 10.1 NDK support (< QTC 3.0)
-const QLatin1String NDKEnvFileKey("NDKEnvFile");
-const QLatin1String ManualNDKsGroup("ManualNDKs");
-const QLatin1String ActiveNDKsGroup("ActiveNDKs");
-const QLatin1String DefaultConfigurationKey("DefaultConfiguration");
-const QLatin1String NewestConfigurationValue("Newest");
-const QLatin1String BBConfigsFileVersionKey("Version");
-const QLatin1String BBConfigDataKey("BBConfiguration.");
-const QLatin1String BBConfigCountKey("BBConfiguration.Count");
-}
-
-static Utils::FileName bbConfigSettingsFileName()
-{
- return Utils::FileName::fromString(Core::ICore::userResourcePath() + QLatin1String("/qnx/")
- + QLatin1String(Constants::QNX_BLACKBERRY_CONFIGS_FILENAME));
-}
-
-template <class T> static bool sortConfigurationsByVersion(const T *a, const T *b)
-{
- return a->version() > b->version();
-}
-
-BlackBerryConfigurationManager::BlackBerryConfigurationManager(QObject *parent)
- : QObject(parent),
- m_defaultConfiguration(0)
-{
- m_writer = new Utils::PersistentSettingsWriter(bbConfigSettingsFileName(),
- QLatin1String("BlackBerryConfigurations"));
- connect(Core::ICore::instance(), SIGNAL(saveSettingsRequested()), this, SLOT(saveSettings()));
- m_instance = this;
-}
-
-void BlackBerryConfigurationManager::saveConfigurations()
-{
- QTC_ASSERT(m_writer, return);
- QVariantMap data;
- data.insert(QLatin1String(BBConfigsFileVersionKey), 1);
- int count = 0;
- foreach (BlackBerryApiLevelConfiguration *apiLevel, m_apiLevels) {
- QVariantMap tmp = apiLevel->toMap();
- if (tmp.isEmpty())
- continue;
-
- data.insert(BBConfigDataKey + QString::number(count), tmp);
- ++count;
- }
-
- foreach (BlackBerryRuntimeConfiguration *runtime, m_runtimes) {
- QVariantMap tmp = runtime->toMap();
- if (tmp.isEmpty())
- continue;
-
- data.insert(BBConfigDataKey + QString::number(count), tmp);
- ++count;
- }
-
- data.insert(QLatin1String(BBConfigCountKey), count);
-
- const QString newestConfig = (newestApiLevelEnabled())
- ? NewestConfigurationValue : defaultApiLevel()->envFile().toString();
-
- //save default configuration
- data.insert(QLatin1String(DefaultConfigurationKey), newestConfig);
-
- m_writer->save(data, Core::ICore::mainWindow());
-}
-
-void BlackBerryConfigurationManager::restoreConfigurations()
-{
- Utils::PersistentSettingsReader reader;
- if (!reader.load(bbConfigSettingsFileName()))
- return;
-
- QVariantMap data = reader.restoreValues();
-
- // load default configuration
- const QString ndkEnvFile = data.value(DefaultConfigurationKey).toString();
-
- // use newest API level
- const bool useNewestConfiguration = (ndkEnvFile == NewestConfigurationValue);
-
- int count = data.value(BBConfigCountKey, 0).toInt();
-
- for (int i = 0; i < count; ++i) {
- const QString key = BBConfigDataKey + QString::number(i);
-
- if (!data.contains(key))
- continue;
-
- const QVariantMap dMap = data.value(key).toMap();
- const QString configurationType =
- dMap.value(QLatin1String(Constants::QNX_BB_KEY_CONFIGURATION_TYPE)).toString();
- if (configurationType == QLatin1String(Constants::QNX_BB_RUNTIME_TYPE)) {
- BlackBerryRuntimeConfiguration *runtime = new BlackBerryRuntimeConfiguration(dMap);
- insertRuntimeByVersion(runtime);
- } else if (configurationType == QLatin1String(Constants::QNX_BB_APILEVEL_TYPE)
- || configurationType.isEmpty()) { // Backward compatibility
- BlackBerryApiLevelConfiguration *apiLevel = new BlackBerryApiLevelConfiguration(dMap);
- insertApiLevelByVersion(apiLevel);
-
- if (!useNewestConfiguration && (apiLevel->envFile().toString() == ndkEnvFile))
- setDefaultConfiguration(apiLevel);
- }
- }
-
- emit settingsChanged();
-}
-
-// Backward compatibility: Read existing entries in the ManualNDKsGroup
-// and then remove the group since not used.
-void BlackBerryConfigurationManager::loadManualConfigurations()
-{
- QSettings *settings = Core::ICore::settings();
-
- settings->beginGroup(SettingsGroup);
- settings->beginGroup(ManualNDKsGroup);
-
- foreach (const QString &manualNdk, settings->childGroups()) {
- settings->beginGroup(manualNdk);
- QString ndkEnvPath = settings->value(NDKEnvFileKey).toString();
- // For 10.1 NDK support (< QTC 3.0):
- // Since QTC 3.0 BBConfigurations are based on the bbndk-env file
- // to support multiple targets per NDK
- if (ndkEnvPath.isEmpty()) {
- QString ndkPath = settings->value(NDKLocationKey).toString();
- ndkEnvPath = QnxUtils::envFilePath(ndkPath);
- }
-
- BlackBerryApiLevelConfiguration *config =
- new BlackBerryApiLevelConfiguration(Utils::FileName::fromString(ndkEnvPath));
- if (!addApiLevel(config))
- delete config;
-
- settings->endGroup();
- }
-
- settings->endGroup();
- settings->remove(ManualNDKsGroup);
- settings->endGroup();
-}
-
-void BlackBerryConfigurationManager::loadAutoDetectedApiLevels()
-{
- foreach (const ConfigInstallInformation &ndkInfo, QnxUtils::installedConfigs()) {
- BlackBerryApiLevelConfiguration *config = new BlackBerryApiLevelConfiguration(ndkInfo);
- if (!addApiLevel(config)) {
- delete config;
- }
- }
-}
-
-void BlackBerryConfigurationManager::loadAutoDetectedRuntimes()
-{
- QRegExp regExp(QLatin1String("runtime_(\\d+)_(\\d+)_(\\d+)_(\\d+)"));
- foreach (BlackBerryApiLevelConfiguration *apiLevel, m_apiLevels) {
- QDir ndkDir(apiLevel->ndkPath());
- foreach (const QFileInfo& fi, ndkDir.entryInfoList(QDir::Dirs)) {
- if (regExp.exactMatch(fi.baseName())) {
- BlackBerryRuntimeConfiguration *runtime =
- new BlackBerryRuntimeConfiguration(fi.absoluteFilePath());
- if (!addRuntime(runtime))
- delete runtime;
- }
- }
- }
-}
-
-void BlackBerryConfigurationManager::setDefaultConfiguration(
- BlackBerryApiLevelConfiguration *config)
-{
- if (config && !m_apiLevels.contains(config)) {
- qWarning() << "BlackBerryConfigurationManager::setDefaultConfiguration -"
- " configuration does not belong to this instance: "
- << config->envFile().toString();
- return;
- }
-
- m_defaultConfiguration = config;
- emit settingsChanged();
-}
-
-bool BlackBerryConfigurationManager::newestApiLevelEnabled() const
-{
- return !m_defaultConfiguration;
-}
-
-void BlackBerryConfigurationManager::emitSettingsChanged()
-{
- emit settingsChanged();
-}
-
-#ifdef WITH_TESTS
-void BlackBerryConfigurationManager::initUnitTest()
-{
- foreach (BlackBerryApiLevelConfiguration *apiLevel, m_apiLevels)
- removeApiLevel(apiLevel);
-
- foreach (BlackBerryRuntimeConfiguration *runtime, m_runtimes)
- removeRuntime(runtime);
-
- m_defaultConfiguration = 0;
-}
-#endif
-
-void BlackBerryConfigurationManager::setKitsAutoDetectionSource()
-{
- foreach (Kit *kit, KitManager::kits()) {
- if (kit->isAutoDetected() &&
- (DeviceTypeKitInformation::deviceTypeId(kit) == Constants::QNX_BB_OS_TYPE) &&
- kit->autoDetectionSource().isEmpty()) {
- QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
- foreach (BlackBerryApiLevelConfiguration *config, m_apiLevels) {
- if ((version &&
- (version->qmakeCommand() == config->qmake4BinaryFile() || version->qmakeCommand() == config->qmake5BinaryFile()))
- && (SysRootKitInformation::sysRoot(kit) == config->sysRoot())) {
- kit->setAutoDetectionSource(config->envFile().toString());
- // Set stickyness since not necessary saved for those kits
- kit->setSticky(QtSupport::QtKitInformation::id(), true);
- kit->setSticky(ToolChainKitInformation::id(), true);
- kit->setSticky(DeviceTypeKitInformation::id(), true);
- kit->setSticky(SysRootKitInformation::id(), true);
- kit->setSticky(Debugger::DebuggerKitInformation::id(), true);
- kit->setSticky(QmakeProjectManager::QmakeKitInformation::id(), true);
- }
- }
- }
- }
-}
-
-void BlackBerryConfigurationManager::insertApiLevelByVersion(
- BlackBerryApiLevelConfiguration *apiLevel)
-{
- QList<BlackBerryApiLevelConfiguration *>::iterator it =
- qLowerBound(m_apiLevels.begin(), m_apiLevels.end(),
- apiLevel, sortConfigurationsByVersion<BlackBerryApiLevelConfiguration>);
- m_apiLevels.insert(it, apiLevel);
-}
-
-void BlackBerryConfigurationManager::insertRuntimeByVersion(
- BlackBerryRuntimeConfiguration *runtime)
-{
- QList<BlackBerryRuntimeConfiguration *>::iterator it =
- qLowerBound(m_runtimes.begin(), m_runtimes.end(),
- runtime, sortConfigurationsByVersion<BlackBerryRuntimeConfiguration>);
- m_runtimes.insert(it, runtime);
-}
-
-// Switch to QnxToolchain for exisintg configuration using GccToolChain
-void BlackBerryConfigurationManager::checkToolChainConfiguration()
-{
- foreach (BlackBerryApiLevelConfiguration *config, m_apiLevels) {
- foreach (ToolChain *tc, ToolChainManager::toolChains()) {
- if (tc->compilerCommand() == config->qccCompilerPath()
- && !tc->id().startsWith(QLatin1String(Constants::QNX_TOOLCHAIN_ID))) {
- if (config->isActive()) {
- // reset
- config->deactivate();
- config->activate();
- break;
- }
- }
- }
- }
-}
-
-bool BlackBerryConfigurationManager::addApiLevel(BlackBerryApiLevelConfiguration *config)
-{
- foreach (BlackBerryApiLevelConfiguration *c, m_apiLevels) {
- if (config->envFile() == c->envFile()) {
- if (!config->isAutoDetected())
- QMessageBox::warning(Core::ICore::mainWindow(), tr("NDK Already Known"),
- tr("The NDK already has a configuration."), QMessageBox::Ok);
- return false;
- }
- }
-
- if (config->isValid()) {
- insertApiLevelByVersion(config);
- emit settingsChanged();
- return true;
- }
-
- return false;
-}
-
-void BlackBerryConfigurationManager::removeApiLevel(BlackBerryApiLevelConfiguration *config)
-{
- if (!config)
- return;
-
- if (config->isActive())
- config->deactivate();
-
- m_apiLevels.removeAll(config);
-
- if (defaultApiLevel() == config)
- setDefaultConfiguration(0);
-
- delete config;
-
- emit settingsChanged();
-}
-
-bool BlackBerryConfigurationManager::addRuntime(BlackBerryRuntimeConfiguration *runtime)
-{
- foreach (BlackBerryRuntimeConfiguration *rt, m_runtimes) {
- if (runtime->path() == rt->path())
- return false;
- }
-
- insertRuntimeByVersion(runtime);
- return true;
-}
-
-void BlackBerryConfigurationManager::removeRuntime(BlackBerryRuntimeConfiguration *runtime)
-{
- if (!runtime)
- return;
-
- m_runtimes.removeAll(runtime);
- delete runtime;
-}
-
-QList<BlackBerryApiLevelConfiguration *> BlackBerryConfigurationManager::apiLevels() const
-{
- return m_apiLevels;
-}
-
-QList<BlackBerryRuntimeConfiguration *> BlackBerryConfigurationManager::runtimes() const
-{
- return m_runtimes;
-}
-
-QList<BlackBerryApiLevelConfiguration *> BlackBerryConfigurationManager::manualApiLevels() const
-{
- QList<BlackBerryApiLevelConfiguration*> manuals;
- foreach (BlackBerryApiLevelConfiguration *config, m_apiLevels) {
- if (!config->isAutoDetected())
- manuals << config;
- }
-
- return manuals;
-}
-
-QList<BlackBerryApiLevelConfiguration *> BlackBerryConfigurationManager::activeApiLevels() const
-{
- QList<BlackBerryApiLevelConfiguration*> actives;
- foreach (BlackBerryApiLevelConfiguration *config, m_apiLevels) {
- if (config->isActive())
- actives << config;
- }
-
- return actives;
-}
-
-BlackBerryApiLevelConfiguration *BlackBerryConfigurationManager::apiLevelFromEnvFile(
- const Utils::FileName &envFile) const
-{
- if (envFile.isEmpty())
- return 0;
-
- foreach (BlackBerryApiLevelConfiguration *config, m_apiLevels) {
- if (config->envFile() == envFile)
- return config;
- }
-
- return 0;
-}
-
-BlackBerryRuntimeConfiguration *BlackBerryConfigurationManager::runtimeFromFilePath(
- const QString &path)
-{
- foreach (BlackBerryRuntimeConfiguration *runtime, m_runtimes) {
- if (runtime->path() == path)
- return runtime;
- }
-
- return 0;
-}
-
-BlackBerryApiLevelConfiguration *BlackBerryConfigurationManager::defaultApiLevel() const
-{
- if (m_apiLevels.isEmpty())
- return 0;
-
- // !m_defaultConfiguration means use newest configuration
- if (!m_defaultConfiguration)
- return m_apiLevels.first();
-
- return m_defaultConfiguration;
-}
-
-QList<Utils::EnvironmentItem> BlackBerryConfigurationManager::defaultConfigurationEnv() const
-{
- const BlackBerryApiLevelConfiguration *config = defaultApiLevel();
-
- if (config)
- return config->qnxEnv();
-
- return QList<Utils::EnvironmentItem>();
-}
-
-void BlackBerryConfigurationManager::loadAutoDetectedConfigurations(QFlags<ConfigurationType> types)
-{
- if (types.testFlag(ApiLevel))
- loadAutoDetectedApiLevels();
- if (types.testFlag(Runtime))
- loadAutoDetectedRuntimes();
- emit settingsChanged();
-}
-
-void BlackBerryConfigurationManager::loadSettings()
-{
- restoreConfigurations();
- // For backward compatibility
- loadManualConfigurations();
- loadAutoDetectedApiLevels();
- loadAutoDetectedRuntimes();
- checkToolChainConfiguration();
-
- // Backward compatibility: Set kit's auto detection source
- // for existing BlackBerry kits that do not have it set yet.
- setKitsAutoDetectionSource();
-
- emit settingsLoaded();
- emit settingsChanged();
-}
-
-void BlackBerryConfigurationManager::saveSettings()
-{
- saveConfigurations();
-}
-
-BlackBerryConfigurationManager *BlackBerryConfigurationManager::instance()
-{
- return m_instance;
-}
-
-BlackBerryConfigurationManager::~BlackBerryConfigurationManager()
-{
- m_instance = 0;
- qDeleteAll(m_apiLevels);
- qDeleteAll(m_runtimes);
- delete m_writer;
-}
-
-QString BlackBerryConfigurationManager::barsignerCskPath() const
-{
- return QnxUtils::bbDataDirPath() + QLatin1String("/barsigner.csk");
-}
-
-QString BlackBerryConfigurationManager::idTokenPath() const
-{
- return QnxUtils::bbDataDirPath() + QLatin1String("/bbidtoken.csk");
-}
-
-QString BlackBerryConfigurationManager::barsignerDbPath() const
-{
- return QnxUtils::bbDataDirPath() + QLatin1String("/barsigner.db");
-}
-
-QString BlackBerryConfigurationManager::defaultKeystorePath() const
-{
- return QnxUtils::bbDataDirPath() + QLatin1String("/author.p12");
-}
-
-QString BlackBerryConfigurationManager::defaultDebugTokenPath() const
-{
- return QnxUtils::bbDataDirPath() + QLatin1String("/debugtoken.bar");
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberryconfigurationmanager.h b/src/plugins/qnx/blackberryconfigurationmanager.h
deleted file mode 100644
index 9088a7bea9..0000000000
--- a/src/plugins/qnx/blackberryconfigurationmanager.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYCONFIGURATIONMANAGER_H
-#define BLACKBERRYCONFIGURATIONMANAGER_H
-
-#include <utils/environment.h>
-#include <utils/fileutils.h>
-
-#include <QSettings>
-#include <QObject>
-
-namespace Utils { class PersistentSettingsWriter; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryApiLevelConfiguration;
-class BlackBerryRuntimeConfiguration;
-class QnxPlugin;
-
-class BlackBerryConfigurationManager : public QObject
-{
- Q_OBJECT
-public:
- enum ConfigurationType {
- ApiLevel = 0x01,
- Runtime = 0x02
- };
- Q_DECLARE_FLAGS(ConfigurationTypes, ConfigurationType)
-
- static BlackBerryConfigurationManager *instance();
- ~BlackBerryConfigurationManager();
- bool addApiLevel(BlackBerryApiLevelConfiguration *config);
- void removeApiLevel(BlackBerryApiLevelConfiguration *config);
- bool addRuntime(BlackBerryRuntimeConfiguration *runtime);
- void removeRuntime(BlackBerryRuntimeConfiguration *runtime);
- QList<BlackBerryApiLevelConfiguration*> apiLevels() const;
- QList<BlackBerryRuntimeConfiguration *> runtimes() const;
- QList<BlackBerryApiLevelConfiguration*> manualApiLevels() const;
- QList<BlackBerryApiLevelConfiguration *> activeApiLevels() const;
- BlackBerryApiLevelConfiguration *apiLevelFromEnvFile(const Utils::FileName &envFile) const;
- BlackBerryRuntimeConfiguration *runtimeFromFilePath(const QString &path);
- BlackBerryApiLevelConfiguration *defaultApiLevel() const;
-
- QString barsignerCskPath() const;
- QString idTokenPath() const;
- QString barsignerDbPath() const;
- QString defaultKeystorePath() const;
- QString defaultDebugTokenPath() const;
-
- // returns the environment for the default API level
- QList<Utils::EnvironmentItem> defaultConfigurationEnv() const;
-
- void loadAutoDetectedConfigurations(QFlags<ConfigurationType> types);
- void setDefaultConfiguration(BlackBerryApiLevelConfiguration *config);
-
- bool newestApiLevelEnabled() const;
-
- void emitSettingsChanged();
-
-#ifdef WITH_TESTS
- void initUnitTest();
-#endif
-
-public slots:
- void loadSettings();
- void saveSettings();
- void checkToolChainConfiguration();
-
-signals:
- void settingsLoaded();
- void settingsChanged();
-
-private:
- BlackBerryConfigurationManager(QObject *parent = 0);
-
- static BlackBerryConfigurationManager *m_instance;
-
- QList<BlackBerryApiLevelConfiguration*> m_apiLevels;
- QList<BlackBerryRuntimeConfiguration*> m_runtimes;
-
- BlackBerryApiLevelConfiguration *m_defaultConfiguration;
-
- Utils::PersistentSettingsWriter *m_writer;
-
- void saveConfigurations();
- void restoreConfigurations();
-
- void loadAutoDetectedApiLevels();
- void loadAutoDetectedRuntimes();
-
- void loadManualConfigurations();
- void setKitsAutoDetectionSource();
-
- void insertApiLevelByVersion(BlackBerryApiLevelConfiguration* apiLevel);
- void insertRuntimeByVersion(BlackBerryRuntimeConfiguration* runtime);
-
- friend class QnxPlugin;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qnx::Internal::BlackBerryConfigurationManager::ConfigurationTypes)
-
-#endif // BLACKBERRYCONFIGURATIONMANAGER_H
diff --git a/src/plugins/qnx/blackberrycreatecertificatedialog.cpp b/src/plugins/qnx/blackberrycreatecertificatedialog.cpp
deleted file mode 100644
index 8f1708a5c3..0000000000
--- a/src/plugins/qnx/blackberrycreatecertificatedialog.cpp
+++ /dev/null
@@ -1,217 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrycreatecertificatedialog.h"
-#include "blackberrycertificate.h"
-#include "blackberryconfigurationmanager.h"
-#include "ui_blackberrycreatecertificatedialog.h"
-
-#include <QPushButton>
-#include <QDir>
-#include <QDebug>
-#include <QMessageBox>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryCreateCertificateDialog::BlackBerryCreateCertificateDialog(
- QWidget *parent, Qt::WindowFlags f) :
- QDialog(parent, f),
- m_ui(new Ui_BlackBerryCreateCertificateDialog),
- m_certificate(0)
-{
- m_ui->setupUi(this);
- m_ui->progressBar->hide();
- m_ui->status->clear();
-
- m_cancelButton = m_ui->buttonBox->button(QDialogButtonBox::Cancel);
- Q_ASSERT(m_cancelButton);
-
- m_okButton = m_ui->buttonBox->button(QDialogButtonBox::Ok);
- m_okButton->setEnabled(false);
-
- connect(m_cancelButton, SIGNAL(clicked()),
- this, SLOT(reject()));
- connect(m_okButton, SIGNAL(clicked()),
- this, SLOT(createCertificate()));
- 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)));
-}
-
-QString BlackBerryCreateCertificateDialog::author() const
-{
- return m_ui->author->text();
-}
-
-QString BlackBerryCreateCertificateDialog::certPath() const
-{
- return BlackBerryConfigurationManager::instance()->defaultKeystorePath();
-}
-
-QString BlackBerryCreateCertificateDialog::keystorePassword() const
-{
- return m_ui->password->text();
-}
-
-BlackBerryCertificate * BlackBerryCreateCertificateDialog::certificate() const
-{
- return m_certificate;
-}
-
-void BlackBerryCreateCertificateDialog::validate()
-{
- if (m_ui->author->text().isEmpty()
- || m_ui->password->text().isEmpty()
- || m_ui->password2->text().isEmpty()) {
- m_ui->status->clear();
- m_okButton->setEnabled(false);
- return;
- }
-
- QFileInfo fileInfo(certPath());
-
- if (!fileInfo.dir().exists()) {
- m_ui->status->setText(tr("Base directory does not exist."));
- m_okButton->setEnabled(false);
- return;
- }
-
- if (m_ui->password->text() != m_ui->password2->text()) {
- m_ui->status->setText(tr("The entered passwords do not match."));
- m_okButton->setEnabled(false);
- return;
- }
-
- if (m_ui->password->text().size() < 6) {
- m_ui->status->setText(tr("Password must be at least 6 characters long."));
- m_okButton->setEnabled(false);
- return;
- }
-
- m_ui->status->clear();
- m_okButton->setEnabled(true);
-}
-
-void BlackBerryCreateCertificateDialog::createCertificate()
-{
- setBusy(true);
-
- QFile file(certPath());
-
- if (file.exists()) {
- const int result = QMessageBox::question(this, tr("Are you sure?"),
- tr("The file \"%1\" will be overwritten. Do you want to proceed?")
- .arg(file.fileName()), QMessageBox::Yes | QMessageBox::No);
-
- if (result & QMessageBox::Yes) {
- file.remove();
- } else {
- setBusy(false);
- return;
- }
- }
-
- m_certificate = new BlackBerryCertificate(certPath(),
- author(), keystorePassword());
-
- connect(m_certificate, SIGNAL(finished(int)), this, SLOT(certificateCreated(int)));
- m_certificate->store();
-}
-
-void BlackBerryCreateCertificateDialog::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 BlackBerryCreateCertificateDialog::certificateCreated(int status)
-{
- QString errorMessage;
-
- switch (status) {
- case BlackBerryCertificate::Success:
- accept();
- return;
- case BlackBerryCertificate::Busy:
- errorMessage = tr("The blackberry-keytool process is already running.");
- break;
- case BlackBerryCertificate::WrongPassword:
- errorMessage = tr("The password entered is invalid.");
- break;
- case BlackBerryCertificate::PasswordTooSmall:
- errorMessage = tr("The password entered is too short.");
- break;
- case BlackBerryCertificate::InvalidOutputFormat:
- errorMessage = tr("Invalid output format.");
- break;
- case BlackBerryCertificate::Error:
- default:
- errorMessage = tr("An unknown error occurred.");
- break;
- }
-
- m_certificate->deleteLater();
- m_certificate = 0;
- QMessageBox::critical(this, tr("Error"), errorMessage);
-
- reject();
-}
-
-void BlackBerryCreateCertificateDialog::setBusy(bool busy)
-{
- m_okButton->setEnabled(!busy);
- m_cancelButton->setEnabled(!busy);
- m_ui->author->setEnabled(!busy);
- m_ui->password->setEnabled(!busy);
- m_ui->password2->setEnabled(!busy);
- m_ui->showPassword->setEnabled(!busy);
- m_ui->progressBar->setVisible(busy);
-
- if (busy)
- m_ui->status->setText(tr("Please be patient..."));
- else
- m_ui->status->clear();
-}
-
-}
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrycreatecertificatedialog.h b/src/plugins/qnx/blackberrycreatecertificatedialog.h
deleted file mode 100644
index e23039cbc1..0000000000
--- a/src/plugins/qnx/blackberrycreatecertificatedialog.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYCREATECERTIFICATEDIALOG_H
-#define QNX_INTERNAL_BLACKBERRYCREATECERTIFICATEDIALOG_H
-
-#include <QDialog>
-
-QT_BEGIN_NAMESPACE
-class QPushButton;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class Ui_BlackBerryCreateCertificateDialog;
-class BlackBerryCertificate;
-
-class BlackBerryCreateCertificateDialog : public QDialog
-{
-Q_OBJECT
-
-public:
- explicit BlackBerryCreateCertificateDialog(QWidget *parent = 0,
- Qt::WindowFlags f = 0);
-
- QString author() const;
- QString certPath() const;
- QString keystorePassword() const;
-
- BlackBerryCertificate *certificate() const;
-
-private slots:
- void validate();
- void createCertificate();
- void checkBoxChanged(int state);
- void certificateCreated(int status);
-
-private:
- void setBusy(bool busy);
-
- Ui_BlackBerryCreateCertificateDialog *m_ui;
-
- BlackBerryCertificate *m_certificate;
-
- QPushButton *m_cancelButton;
- QPushButton *m_okButton;
-};
-
-}
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYCREATECERTIFICATEDIALOG_H
diff --git a/src/plugins/qnx/blackberrycreatecertificatedialog.ui b/src/plugins/qnx/blackberrycreatecertificatedialog.ui
deleted file mode 100644
index 02369458c1..0000000000
--- a/src/plugins/qnx/blackberrycreatecertificatedialog.ui
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryCreateCertificateDialog</class>
- <widget class="QDialog" name="Qnx::Internal::BlackBerryCreateCertificateDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>495</width>
- <height>191</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Create Certificate</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>
- <widget class="QProgressBar" name="progressBar">
- <property name="maximum">
- <number>0</number>
- </property>
- <property name="value">
- <number>-1</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrycreatepackagestep.cpp b/src/plugins/qnx/blackberrycreatepackagestep.cpp
deleted file mode 100644
index da34a85afc..0000000000
--- a/src/plugins/qnx/blackberrycreatepackagestep.cpp
+++ /dev/null
@@ -1,576 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrycreatepackagestep.h"
-
-#include "qnxconstants.h"
-#include "blackberrycreatepackagestepconfigwidget.h"
-#include "blackberrydeployconfiguration.h"
-#include "qnxutils.h"
-#include "bardescriptordocument.h"
-#include "blackberryqtversion.h"
-#include "blackberrydeviceconfiguration.h"
-#include "blackberrydeployinformation.h"
-#include "blackberrysigningpasswordsdialog.h"
-#include "bardescriptordocument.h"
-
-#include <debugger/debuggerrunconfigurationaspect.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/runconfiguration.h>
-#include <qmakeprojectmanager/qmakebuildconfiguration.h>
-#include <qmakeprojectmanager/qmakenodes.h>
-#include <qmakeprojectmanager/qmakeproject.h>
-#include <qtsupport/qtkitinformation.h>
-#include <utils/qtcassert.h>
-#include <coreplugin/documentmanager.h>
-#include <coreplugin/icore.h>
-
-#include <QMessageBox>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-const char PACKAGER_CMD[] = "blackberry-nativepackager";
-
-const char PACKAGE_MODE_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.PackageMode";
-const char CSK_PASSWORD_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.CskPassword";
-const char KEYSTORE_PASSWORD_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.KeystorePassword";
-const char SAVE_PASSWORDS_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.SavePasswords";
-const char BUNDLE_MODE_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.BundleMode";
-const char QT_LIBRARY_PATH_KEY[] = "Qt4ProjectManager.BlackBerryCreatePackageStep.QtLibraryPath";
-}
-
-static void prependOrSetQtEnvironment(Utils::Environment &env,
- const QString &key,
- const QString &value,
- bool &updated)
-{
- const QString currentValue = env.value(key);
- const QString newValue = value + QLatin1String(":$") + key;
- if (!currentValue.isEmpty()) {
- if (currentValue == newValue)
- return;
- else
- env.unset(key);
- }
-
- env.prependOrSet(key, newValue);
- updated = true;
-}
-
-static void setQtEnvironment(Utils::Environment &env, const QString &qtPath,
- bool &updated, bool isQt5)
-{
- prependOrSetQtEnvironment(env, QLatin1String("LD_LIBRARY_PATH"),
- QString::fromLatin1("%1/lib").arg(qtPath),
- updated);
- prependOrSetQtEnvironment(env, QLatin1String("QML_IMPORT_PATH"),
- QString::fromLatin1("%1/imports").arg(qtPath),
- updated);
- prependOrSetQtEnvironment(env, QLatin1String("QT_PLUGIN_PATH"),
- QString::fromLatin1("%1/plugins").arg(qtPath),
- updated);
- if (isQt5) {
- prependOrSetQtEnvironment(env, QLatin1String("QML2_IMPORT_PATH"),
- QString::fromLatin1("%1/qml").arg(qtPath),
- updated);
- }
-}
-
-static bool removeQtAssets(BarDescriptorAssetList &assetList)
-{
- bool assetsRemoved = false;
- foreach (const BarDescriptorAsset &a, assetList) {
- if (a.destination == QLatin1String("runtime/qt/lib") ||
- a.destination == QLatin1String("runtime/qt/plugins") ||
- a.destination == QLatin1String("runtime/qt/imports") ||
- a.destination == QLatin1String("runtime/qt/qml")) {
- assetList.removeOne(a);
- assetsRemoved = true;
- }
- }
-
- return assetsRemoved;
-}
-
-static bool addQtAssets(BarDescriptorAssetList &assetList, BlackBerryQtVersion *qtVersion)
-{
- const bool isQt5 = qtVersion->qtVersion().majorVersion == 5;
- bool libAssetExists = false;
- bool pluginAssetExists = false;
- bool importAssetExists = false;
- bool qmlAssetExists = false;
- const QString qtInstallLibsPath =
- qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_LIBS"));
- const QString qtInstallPluginPath =
- qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_PLUGINS"));
- const QString qtInstallImportsPath =
- qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_IMPORTS"));
- const QString qtInstallQmlPath =
- qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_QML"));
- foreach (const BarDescriptorAsset &a, assetList) {
- // TODO: Also check if the asset's source is correct
- if (a.destination == QLatin1String("runtime/qt/lib")) {
- if (a.source == qtInstallLibsPath)
- libAssetExists = true;
- else
- assetList.removeOne(a);
- } else if (a.destination == QLatin1String("runtime/qt/plugins")) {
- if (a.source == qtInstallPluginPath)
- pluginAssetExists = true;
- else
- assetList.removeOne(a);
- } else if (a.destination == QLatin1String("runtime/qt/imports")) {
- if (a.source == qtInstallImportsPath)
- importAssetExists = true;
- else
- assetList.removeOne(a);
- } else if (isQt5 && a.destination == QLatin1String("runtime/qt/qml")) {
- if (a.destination == qtInstallQmlPath)
- qmlAssetExists = true;
- else
- assetList.removeOne(a);
- }
- }
-
- // return false if all assets already exist
- if (libAssetExists && pluginAssetExists && importAssetExists) {
- if (!isQt5 || qmlAssetExists)
- return false;
- }
-
- QList<QPair<QString, QString> > qtFolders;
- qtFolders.append(qMakePair(QString::fromLatin1("runtime/qt/lib"),
- qtInstallLibsPath));
- qtFolders.append(qMakePair(QString::fromLatin1("runtime/qt/plugins"),
- qtInstallPluginPath));
- qtFolders.append(qMakePair(QString::fromLatin1("runtime/qt/imports"),
- qtInstallImportsPath));
-
- if (isQt5) {
- qtFolders.append(qMakePair(QString::fromLatin1("runtime/qt/qml"),
- qtInstallQmlPath));
- }
-
- for (QList<QPair<QString, QString> >::const_iterator it = qtFolders.constBegin();
- it != qtFolders.constEnd(); ++it) {
- const QString target = it->first;
- const QString qtFolder = it->second;
- if (QFileInfo::exists(qtFolder)) {
- BarDescriptorAsset asset;
- asset.source = qtFolder;
- asset.destination = target;
- asset.entry = false;
- assetList << asset;
- }
- }
-
- return true;
-}
-
-BlackBerryCreatePackageStep::BlackBerryCreatePackageStep(ProjectExplorer::BuildStepList *bsl)
- : BlackBerryAbstractDeployStep(bsl, Core::Id(Constants::QNX_CREATE_PACKAGE_BS_ID))
-{
- ctor();
-}
-
-BlackBerryCreatePackageStep::BlackBerryCreatePackageStep(ProjectExplorer::BuildStepList *bsl,
- BlackBerryCreatePackageStep *bs)
- : BlackBerryAbstractDeployStep(bsl, bs)
-{
- ctor();
-}
-
-void BlackBerryCreatePackageStep::ctor()
-{
- setDisplayName(tr("Create packages"));
-
- m_packageMode = DevelopmentMode;
- m_bundleMode = PreInstalledQt;
- m_qtLibraryPath = QLatin1String("qt");
-}
-
-bool BlackBerryCreatePackageStep::init()
-{
- if (!BlackBerryAbstractDeployStep::init())
- return false;
-
- const Utils::FileName packageCmd =
- target()->activeBuildConfiguration()->environment().searchInPath(QLatin1String(PACKAGER_CMD));
- if (packageCmd.isEmpty()) {
- raiseError(tr("Could not find packager command \"%1\" in the build environment.")
- .arg(QLatin1String(PACKAGER_CMD)));
- return false;
- }
-
- BlackBerryDeployConfiguration *deployConfig = qobject_cast<BlackBerryDeployConfiguration *>(deployConfiguration());
- QTC_ASSERT(deployConfig, return false);
-
- QList<BarPackageDeployInformation> packagesToDeploy = deployConfig->deploymentInfo()->enabledPackages();
- if (packagesToDeploy.isEmpty()) {
- raiseError(tr("No packages enabled for deployment."));
- return false;
- }
-
- foreach (const BarPackageDeployInformation &info, packagesToDeploy) {
- if (info.appDescriptorPath().isEmpty()) {
- raiseError(tr("BAR application descriptor file not specified. Check deployment settings."));
- return false;
- }
-
- if (info.packagePath().isEmpty()) {
- raiseError(tr("No package specified. Check deployment settings."));
- return false;
- }
-
- const QString buildDir = info.packagePath().toFileInfo().absolutePath();
- QDir dir(buildDir);
- if (!dir.exists()) {
- if (!dir.mkpath(buildDir)) {
- raiseError(tr("Could not create build directory \"%1\".").arg(buildDir));
- return false;
- }
- }
-
- const Utils::FileName appDescriptorPath = info.appDescriptorPath();
- if (!doUpdateAppDescriptorFile(appDescriptorPath, PlaceHolders))
- // If there is an error, prepareAppDescriptorFile() will raise it
- return false;
-
- QStringList args;
- if (m_packageMode == DevelopmentMode) {
- args << QLatin1String("-devMode");
- if (!debugToken().isEmpty())
- args << QLatin1String("-debugToken") << QnxUtils::addQuotes(QDir::toNativeSeparators(debugToken()));
- } else if (m_packageMode == SigningPackageMode) {
- if (m_cskPassword.isEmpty() || m_keystorePassword.isEmpty()) {
- BlackBerrySigningPasswordsDialog dlg;
- dlg.setCskPassword(m_cskPassword);
- dlg.setStorePassword(m_keystorePassword);
- if (dlg.exec() == QDialog::Rejected) {
- raiseError(tr("Missing passwords for signing packages."));
- return false;
- }
-
- m_cskPassword = dlg.cskPassword();
- m_keystorePassword = dlg.storePassword();
-
- emit cskPasswordChanged(m_cskPassword);
- emit keystorePasswordChanged(m_keystorePassword);
- }
- args << QLatin1String("-sign");
- args << QLatin1String("-cskpass");
- args << m_cskPassword;
- args << QLatin1String("-storepass");
- args << m_keystorePassword;
- }
- args << QLatin1String("-package") << QnxUtils::addQuotes(info.packagePath().toUserOutput());
- args << QnxUtils::addQuotes(appDescriptorPath.toUserOutput());
-
- addCommand(packageCmd.toString(), args);
- }
-
- return true;
-}
-
-ProjectExplorer::BuildStepConfigWidget *BlackBerryCreatePackageStep::createConfigWidget()
-{
- BlackBerryCreatePackageStepConfigWidget *config = new BlackBerryCreatePackageStepConfigWidget(this);
- connect(config, SIGNAL(bundleModeChanged()), this, SLOT(updateAppDescriptorFile()));
- return config;
-}
-
-QString BlackBerryCreatePackageStep::debugToken() const
-{
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target()->kit());
- if (!device)
- return QString();
-
- return device->debugToken();
-}
-
-bool BlackBerryCreatePackageStep::fromMap(const QVariantMap &map)
-{
- m_packageMode = static_cast<PackageMode>(map.value(QLatin1String(PACKAGE_MODE_KEY),
- DevelopmentMode).toInt());
- m_savePasswords = map.value(QLatin1String(SAVE_PASSWORDS_KEY), false).toBool();
- if (m_savePasswords) {
- m_cskPassword = map.value(QLatin1String(CSK_PASSWORD_KEY)).toString();
- m_keystorePassword = map.value(QLatin1String(KEYSTORE_PASSWORD_KEY)).toString();
- }
- m_bundleMode = static_cast<BundleMode>(map.value(QLatin1String(BUNDLE_MODE_KEY),
- PreInstalledQt).toInt());
- m_qtLibraryPath = map.value(QLatin1String(QT_LIBRARY_PATH_KEY),
- QLatin1String("qt")).toString();
- return BlackBerryAbstractDeployStep::fromMap(map);
-}
-
-QVariantMap BlackBerryCreatePackageStep::toMap() const
-{
- QVariantMap map = BlackBerryAbstractDeployStep::toMap();
- map.insert(QLatin1String(PACKAGE_MODE_KEY), m_packageMode);
- map.insert(QLatin1String(SAVE_PASSWORDS_KEY), m_savePasswords);
- if (m_savePasswords) {
- map.insert(QLatin1String(CSK_PASSWORD_KEY), m_cskPassword);
- map.insert(QLatin1String(KEYSTORE_PASSWORD_KEY), m_keystorePassword);
- }
- map.insert(QLatin1String(BUNDLE_MODE_KEY), m_bundleMode);
- map.insert(QLatin1String(QT_LIBRARY_PATH_KEY), m_qtLibraryPath);
- return map;
-}
-
-BlackBerryCreatePackageStep::PackageMode BlackBerryCreatePackageStep::packageMode() const
-{
- return m_packageMode;
-}
-
-QString BlackBerryCreatePackageStep::cskPassword() const
-{
- return m_cskPassword;
-}
-
-QString BlackBerryCreatePackageStep::keystorePassword() const
-{
- return m_keystorePassword;
-}
-
-bool BlackBerryCreatePackageStep::savePasswords() const
-{
- return m_savePasswords;
-}
-
-BlackBerryCreatePackageStep::BundleMode BlackBerryCreatePackageStep::bundleMode() const
-{
- return m_bundleMode;
-}
-
-QString BlackBerryCreatePackageStep::qtLibraryPath() const
-{
- return m_qtLibraryPath;
-}
-
-QString BlackBerryCreatePackageStep::fullDeployedQtLibraryPath() const
-{
- return QLatin1String(Constants::QNX_BLACKBERRY_DEFAULT_DEPLOY_QT_BASEPATH) + m_qtLibraryPath;
-}
-
-void BlackBerryCreatePackageStep::setPackageMode(BlackBerryCreatePackageStep::PackageMode packageMode)
-{
- m_packageMode = packageMode;
-}
-
-void BlackBerryCreatePackageStep::setCskPassword(const QString &cskPassword)
-{
- m_cskPassword = cskPassword;
-}
-
-void BlackBerryCreatePackageStep::setKeystorePassword(const QString &storePassword)
-{
- m_keystorePassword = storePassword;
-}
-
-void BlackBerryCreatePackageStep::setSavePasswords(bool savePasswords)
-{
- m_savePasswords = savePasswords;
-}
-
-void BlackBerryCreatePackageStep::setBundleMode(BlackBerryCreatePackageStep::BundleMode bundleMode)
-{
- m_bundleMode = bundleMode;
-}
-
-void BlackBerryCreatePackageStep::setQtLibraryPath(const QString &qtLibraryPath)
-{
- m_qtLibraryPath = qtLibraryPath;
-}
-
-void BlackBerryCreatePackageStep::updateAppDescriptorFile()
-{
- BlackBerryDeployConfiguration *deployConfig = qobject_cast<BlackBerryDeployConfiguration *>(deployConfiguration());
- QTC_ASSERT(deployConfig, return);
-
- QList<BarPackageDeployInformation> packagesToDeploy = deployConfig->deploymentInfo()->enabledPackages();
- if (packagesToDeploy.isEmpty())
- return;
-
- foreach (const BarPackageDeployInformation &info, packagesToDeploy)
- doUpdateAppDescriptorFile(info.appDescriptorPath(), QtEnvironment);
-}
-
-bool BlackBerryCreatePackageStep::doUpdateAppDescriptorFile(const Utils::FileName &appDescriptorPath,
- QFlags<EditMode> types,
- bool skipConfirmation)
-{
- Core::FileChangeBlocker fb(appDescriptorPath.toString());
- BarDescriptorDocument doc;
- QString errorString;
- if (!doc.open(&errorString, appDescriptorPath.toString())) {
- raiseError(tr("Error opening BAR application descriptor file \"%1\" - %2")
- .arg(appDescriptorPath.toUserOutput())
- .arg(errorString));
- return false;
- }
-
- BarDescriptorAssetList assetList = doc.value(BarDescriptorDocument::asset)
- .value<BarDescriptorAssetList>();
- bool updated = false;
- if (types.testFlag(PlaceHolders)) {
-
- foreach (const BarDescriptorAsset &a, assetList) {
- if (a.source.contains(QLatin1String("%SRC_DIR%"))) {
- // Keep backward compatibility with older templates
- QHash<QString, QString> placeHoldersHash;
- placeHoldersHash[QLatin1String("%SRC_DIR%")] = QString();
- doc.expandPlaceHolders(placeHoldersHash);
- updated = true;
- }
-
- // Update the entry point source path to make use of the BUILD_DIR variable
- // if not set
- if (a.entry) {
- BarDescriptorAsset asset = a;
- if (asset.source.contains(QLatin1String("${BUILD_DIR}/")))
- break;
- asset.source = QLatin1String("${BUILD_DIR}/") + asset.destination;
- assetList.removeOne(a);
- assetList << asset;
- updated = true;
- break;
- }
- }
- }
-
- if (types.testFlag(QtEnvironment)) {
- bool environmentUpdated = false;
- bool assetsUpdated = false;
- // Set up correct environment depending on using bundled/pre-installed Qt
- QList<Utils::EnvironmentItem> envItems =
- doc.value(BarDescriptorDocument::env).value<QList<Utils::EnvironmentItem> >();
- Utils::Environment env(Utils::EnvironmentItem::toStringList(envItems), Utils::OsTypeOtherUnix);
- BlackBerryQtVersion *qtVersion = dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtKitInformation::qtVersion(target()->kit()));
- const bool isQt5 = qtVersion->qtVersion().majorVersion == 5;
- if (!qtVersion) {
- raiseError(tr("Error preparing BAR application descriptor file."));
- return false;
- }
-
- if (m_packageMode == SigningPackageMode
- || (m_packageMode == DevelopmentMode && m_bundleMode == PreInstalledQt)) {
- QtSupport::QtVersionNumber versionNumber = qtVersion->qtVersion();
- setQtEnvironment(env, QString::fromLatin1("/usr/lib/qt%1").arg(versionNumber.majorVersion),
- environmentUpdated, isQt5);
- // remove qt assets if existing since not needed
- assetsUpdated = removeQtAssets(assetList);
- } else if (m_packageMode == DevelopmentMode && m_bundleMode == BundleQt) {
- assetsUpdated = addQtAssets(assetList, qtVersion);
- // TODO: Check for every Qt environment if the corresponding
- // assets exist for broken/internal builds(?)
- setQtEnvironment(env, QLatin1String("app/native/runtime/qt"),
- environmentUpdated, isQt5);
- } else if (m_packageMode == DevelopmentMode && m_bundleMode == DeployedQt) {
- setQtEnvironment(env, fullDeployedQtLibraryPath(),
- environmentUpdated, isQt5);
- // remove qt assets if existing since not needed
- assetsUpdated = removeQtAssets(assetList);
- }
-
- if (environmentUpdated) {
- QMessageBox::StandardButton answer = QMessageBox::Yes;
- if (!skipConfirmation) {
- QString confirmationText = tr("In order to link to the correct Qt library specified in the deployment settings "
- "Qt Creator needs to update the Qt environment variables "
- "in the BAR application file as follows:\n\n"
- "<env var=\"LD_LIBRARY_PATH\" value=\"%1\"/>\n"
- "<env var=\"QT_PLUGIN_PATH\" value=\"%2\"/>\n"
- "<env var=\"QML_IMPORT_PATH\" value=\"%3\"/>\n")
- .arg(env.value(QLatin1String("LD_LIBRARY_PATH")),
- env.value(QLatin1String("QT_PLUGIN_PATH")),
- env.value(QLatin1String("QML_IMPORT_PATH")));
-
- if (isQt5)
- confirmationText.append(QString::fromLatin1("<env var=\"QML2_IMPORT_PATH\" value=\"%1\"/>\n")
- .arg(env.value(QLatin1String("QML2_IMPORT_PATH"))));
-
- confirmationText.append(tr("\nDo you want to update it?"));
- answer = QMessageBox::question(Core::ICore::mainWindow(), tr("Confirmation"),
- confirmationText,
- QMessageBox::Yes | QMessageBox::No);
- }
-
- if (answer == QMessageBox::Yes) {
- QVariant envVar;
- envVar.setValue(Utils::EnvironmentItem::fromStringList(env.toStringList()));
- doc.setValue(BarDescriptorDocument::env, envVar);
- updated = true;
- }
- }
-
- if (assetsUpdated) {
- doc.setValue(BarDescriptorDocument::asset, QVariant::fromValue(assetList));
- updated = true;
- }
- }
-
- // Skip unnecessary saving
- if (!updated)
- return true;
-
- if (!doc.save(&errorString)) {
- raiseError(tr("Error saving BAR application descriptor file \"%1\" - %2")
- .arg(appDescriptorPath.toUserOutput())
- .arg(errorString));
- return false;
- }
-
- return true;
-}
-
-void BlackBerryCreatePackageStep::processStarted(const ProjectExplorer::ProcessParameters &params)
-{
- if (m_packageMode == SigningPackageMode) {
- QString arguments = params.prettyArguments();
-
- const QString cskPasswordLine = QLatin1String(" -cskpass ") + m_cskPassword;
- const QString hiddenCskPasswordLine = QLatin1String(" -cskpass <hidden>");
- arguments.replace(cskPasswordLine, hiddenCskPasswordLine);
-
- const QString storePasswordLine = QLatin1String(" -storepass ") + m_keystorePassword;
- const QString hiddenStorePasswordLine = QLatin1String(" -storepass <hidden>");
- arguments.replace(storePasswordLine, hiddenStorePasswordLine);
-
- emitOutputInfo(params, arguments);
- } else {
- BlackBerryAbstractDeployStep::processStarted(params);
- }
-}
diff --git a/src/plugins/qnx/blackberrycreatepackagestep.h b/src/plugins/qnx/blackberrycreatepackagestep.h
deleted file mode 100644
index 721d48cb8b..0000000000
--- a/src/plugins/qnx/blackberrycreatepackagestep.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYCREATEPACKAGESTEP_H
-#define QNX_INTERNAL_BLACKBERRYCREATEPACKAGESTEP_H
-
-#include "blackberryabstractdeploystep.h"
-
-QT_BEGIN_NAMESPACE
-class QFile;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryCreatePackageStep : public BlackBerryAbstractDeployStep
-{
- Q_OBJECT
- friend class BlackBerryCreatePackageStepFactory;
- friend class BarDescriptorFileNodeManager;
-
-public:
- enum PackageMode {
- SigningPackageMode,
- DevelopmentMode
- };
-
- enum BundleMode {
- PreInstalledQt,
- BundleQt,
- DeployedQt
- };
-
- enum EditMode {
- PlaceHolders = 0x01,
- QtEnvironment = 0x02
- };
- Q_DECLARE_FLAGS(EditModes, EditMode)
-
- explicit BlackBerryCreatePackageStep(ProjectExplorer::BuildStepList *bsl);
-
- bool init();
- ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
-
- QString debugToken() const;
-
- bool fromMap(const QVariantMap &map);
- QVariantMap toMap() const;
-
- PackageMode packageMode() const;
- QString cskPassword() const;
- QString keystorePassword() const;
- bool savePasswords() const;
-
- BundleMode bundleMode() const;
- QString qtLibraryPath() const;
-
-public slots:
- void setPackageMode(PackageMode packageMode);
- void setCskPassword(const QString &cskPassword);
- void setKeystorePassword(const QString &keystorePassword);
- void setSavePasswords(bool savePasswords);
-
- void setBundleMode(BundleMode bundleMode);
- void setQtLibraryPath(const QString &qtLibraryPath);
- void updateAppDescriptorFile();
-
-signals:
- void cskPasswordChanged(QString);
- void keystorePasswordChanged(QString);
-
-protected:
- BlackBerryCreatePackageStep(ProjectExplorer::BuildStepList *bsl, BlackBerryCreatePackageStep *bs);
-
- void processStarted(const ProjectExplorer::ProcessParameters &params);
-
-private:
- void ctor();
-
- bool doUpdateAppDescriptorFile(const Utils::FileName &appDescriptorPath,
- QFlags<EditMode> types,
- bool skipConfirmation = false);
-
- QString fullDeployedQtLibraryPath() const;
-
- PackageMode m_packageMode;
- QString m_cskPassword;
- QString m_keystorePassword;
- bool m_savePasswords;
- BundleMode m_bundleMode;
- QString m_qtLibraryPath;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-Q_DECLARE_OPERATORS_FOR_FLAGS(Qnx::Internal::BlackBerryCreatePackageStep::EditModes)
-
-#endif // QNX_INTERNAL_BLACKBERRYCREATEPACKAGESTEP_H
diff --git a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.cpp b/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.cpp
deleted file mode 100644
index 6b6e215df2..0000000000
--- a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrycreatepackagestepconfigwidget.h"
-#include "ui_blackberrycreatepackagestepconfigwidget.h"
-#include "blackberrycreatepackagestep.h"
-#include "qnxdeployqtlibrariesdialog.h"
-
-#include <projectexplorer/kitinformation.h>
-#include <projectexplorer/target.h>
-#include <qtsupport/qtkitinformation.h>
-#include <utils/qtcassert.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryCreatePackageStepConfigWidget::BlackBerryCreatePackageStepConfigWidget(BlackBerryCreatePackageStep *step)
- : ProjectExplorer::BuildStepConfigWidget()
- , m_step(step)
-{
- m_ui = new Ui::BlackBerryCreatePackageStepConfigWidget;
- m_ui->setupUi(this);
-
- m_ui->cskPassword->setText(m_step->cskPassword());
- m_ui->keystorePassword->setText(m_step->keystorePassword());
- m_ui->savePasswords->setChecked(m_step->savePasswords());
- m_ui->qtLibraryPath->setText(m_step->qtLibraryPath());
-
- m_qtLibraryExplanations[0] = tr("Use the Qt libraries shipped with the BlackBerry device.");
- m_qtLibraryExplanations[1] = tr("Include Qt libraries in the package. "
- "This will increase the package size.");
- m_qtLibraryExplanations[2] = tr("Use deployed Qt libraries on the device.");
- m_ui->qtLibrary->addItem(tr("Use Pre-installed Qt"), BlackBerryCreatePackageStep::PreInstalledQt);
- m_ui->qtLibrary->addItem(tr("Bundle Qt in Package"), BlackBerryCreatePackageStep::BundleQt);
- m_ui->qtLibrary->addItem(tr("Use Deployed Qt"), BlackBerryCreatePackageStep::DeployedQt);
-
- connect(m_ui->signPackages, SIGNAL(toggled(bool)), this, SLOT(setPackageMode(bool)));
- connect(m_ui->cskPassword, SIGNAL(textChanged(QString)), m_step, SLOT(setCskPassword(QString)));
- connect(m_ui->keystorePassword, SIGNAL(textChanged(QString)),
- m_step, SLOT(setKeystorePassword(QString)));
- connect(m_ui->showPasswords, SIGNAL(toggled(bool)), this, SLOT(showPasswords(bool)));
- connect(m_ui->savePasswords, SIGNAL(toggled(bool)), m_step, SLOT(setSavePasswords(bool)));
- connect(m_ui->qtLibrary, SIGNAL(currentIndexChanged(int)), this, SLOT(setBundleMode(int)));
- connect(m_ui->qtLibrary, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDeployWidgetsState()));
- connect(m_ui->qtLibraryPath, SIGNAL(textChanged(QString)),
- m_step, SLOT(setQtLibraryPath(QString)));
- connect(m_ui->qtLibraryPath, SIGNAL(textChanged(QString)),
- this, SLOT(updateDeployWidgetsState()));
- connect(m_ui->deployNowButton, SIGNAL(clicked()), this, SLOT(deployLibraries()));
- connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitsChanged()), this, SLOT(updateDeployWidgetsState()));
-
- connect(m_step, SIGNAL(cskPasswordChanged(QString)), m_ui->cskPassword, SLOT(setText(QString)));
- connect(m_step, SIGNAL(keystorePasswordChanged(QString)),
- m_ui->keystorePassword, SLOT(setText(QString)));
-
- m_ui->signPackages->setChecked(m_step->packageMode() ==
- BlackBerryCreatePackageStep::SigningPackageMode);
- m_ui->developmentMode->setChecked(m_step->packageMode() ==
- BlackBerryCreatePackageStep::DevelopmentMode);
-
- m_ui->qtLibrary->setCurrentIndex(m_ui->qtLibrary->findData(m_step->bundleMode()));
- setBundleMode(m_step->bundleMode());
- updateDeployWidgetsState();
-}
-
-BlackBerryCreatePackageStepConfigWidget::~BlackBerryCreatePackageStepConfigWidget()
-{
- delete m_ui;
- m_ui = 0;
-}
-
-QString BlackBerryCreatePackageStepConfigWidget::displayName() const
-{
- return tr("<b>Create packages</b>");
-}
-
-QString BlackBerryCreatePackageStepConfigWidget::summaryText() const
-{
- return displayName();
-}
-
-bool BlackBerryCreatePackageStepConfigWidget::showWidget() const
-{
- return true;
-}
-
-void BlackBerryCreatePackageStepConfigWidget::setPackageMode(bool signPackagesChecked)
-{
- m_step->setPackageMode(signPackagesChecked ? BlackBerryCreatePackageStep::SigningPackageMode : BlackBerryCreatePackageStep::DevelopmentMode);
-}
-
-void BlackBerryCreatePackageStepConfigWidget::showPasswords(bool show)
-{
- m_ui->cskPassword->setEchoMode(show ? QLineEdit::Normal : QLineEdit::Password);
- m_ui->keystorePassword->setEchoMode(show ? QLineEdit::Normal : QLineEdit::Password);
-}
-
-void BlackBerryCreatePackageStepConfigWidget::setBundleMode(int qtLibraryIndex)
-{
- QTC_ASSERT(m_qtLibraryExplanations.contains(qtLibraryIndex), return);
-
- BlackBerryCreatePackageStep::BundleMode bundleMode =
- static_cast<BlackBerryCreatePackageStep::BundleMode>(
- m_ui->qtLibrary->itemData(qtLibraryIndex).toInt());
-
- m_step->setBundleMode(bundleMode);
- m_ui->qtLibraryExplanationLabel->setText(m_qtLibraryExplanations[qtLibraryIndex]);
- m_ui->qtLibraryPath->setVisible(bundleMode == BlackBerryCreatePackageStep::DeployedQt);
- m_ui->qtLibraryLabel->setVisible(bundleMode == BlackBerryCreatePackageStep::DeployedQt);
-
- emit bundleModeChanged();
-}
-
-void BlackBerryCreatePackageStepConfigWidget::updateDeployWidgetsState()
-{
- BlackBerryCreatePackageStep::BundleMode bundleMode =
- static_cast<BlackBerryCreatePackageStep::BundleMode>(
- m_ui->qtLibrary->itemData(m_ui->qtLibrary->currentIndex()).toInt());
-
- ProjectExplorer::Kit *kit = m_step->target()->kit();
- ProjectExplorer::IDevice::ConstPtr device = ProjectExplorer::DeviceKitInformation::device(kit);
-
- const bool enableButton = !m_ui->qtLibraryPath->text().isEmpty()
- && bundleMode == BlackBerryCreatePackageStep::DeployedQt
- && !device.isNull();
- const bool visibleButton = bundleMode == BlackBerryCreatePackageStep::DeployedQt;
- const bool visibleLabels = bundleMode == BlackBerryCreatePackageStep::DeployedQt
- && device.isNull();
-
- m_ui->deployNowButton->setEnabled(enableButton);
- m_ui->deployNowButton->setVisible(visibleButton);
-
- m_ui->deployErrorPixmap->setVisible(visibleLabels);
- m_ui->deployErrorLabel->setVisible(visibleLabels);
-}
-
-void BlackBerryCreatePackageStepConfigWidget::deployLibraries()
-{
- ProjectExplorer::Kit *kit = m_step->target()->kit();
- QnxDeployQtLibrariesDialog dlg(ProjectExplorer::DeviceKitInformation::device(kit),
- QnxDeployQtLibrariesDialog::BB10,
- this);
- dlg.execAndDeploy(QtSupport::QtKitInformation::qtVersionId(kit), m_ui->qtLibraryPath->text());
-}
diff --git a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.h b/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.h
deleted file mode 100644
index 8e0945a7e7..0000000000
--- a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYCREATEPACKAGESTEPCONFIGWIDGET_H
-#define QNX_INTERNAL_BLACKBERRYCREATEPACKAGESTEPCONFIGWIDGET_H
-
-#include <projectexplorer/buildstep.h>
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BlackBerryCreatePackageStepConfigWidget; }
-
-class BlackBerryCreatePackageStep;
-
-class BlackBerryCreatePackageStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
-{
- Q_OBJECT
-public:
- explicit BlackBerryCreatePackageStepConfigWidget(BlackBerryCreatePackageStep *step);
- ~BlackBerryCreatePackageStepConfigWidget();
-
- QString displayName() const;
- QString summaryText() const;
-
- bool showWidget() const;
-
-private slots:
- void setPackageMode(bool signPackagesChecked);
- void showPasswords(bool show);
- void setBundleMode(int qtLibraryIndex);
- void updateDeployWidgetsState();
- void deployLibraries();
-
-signals:
- void bundleModeChanged();
-
-private:
- BlackBerryCreatePackageStep *m_step;
- Ui::BlackBerryCreatePackageStepConfigWidget *m_ui;
-
- QMap<int, QString> m_qtLibraryExplanations;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYCREATEPACKAGESTEPCONFIGWIDGET_H
diff --git a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.ui b/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.ui
deleted file mode 100644
index 41ebb3f1ef..0000000000
--- a/src/plugins/qnx/blackberrycreatepackagestepconfigwidget.ui
+++ /dev/null
@@ -1,296 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryCreatePackageStepConfigWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryCreatePackageStepConfigWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>613</width>
- <height>204</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QRadioButton" name="signPackages">
- <property name="text">
- <string>Sign packages</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QWidget" name="signPackagesWidget" native="true">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>CSK password:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="cskPassword">
- <property name="echoMode">
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Keystore password:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="keystorePassword">
- <property name="echoMode">
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="0" colspan="2">
- <widget class="QCheckBox" name="savePasswords">
- <property name="toolTip">
- <string>Note: This will store the passwords in a world-readable file.</string>
- </property>
- <property name="text">
- <string>Save passwords</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QCheckBox" name="showPasswords">
- <property name="text">
- <string>Show passwords</string>
- </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>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="developmentMode">
- <property name="text">
- <string>Package in development mode</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QWidget" name="developmentModeWidget" native="true">
- <layout class="QGridLayout" name="gridLayout">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="qtLibrary"/>
- </item>
- <item row="0" column="2">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="qtLibraryLabel">
- <property name="text">
- <string>/accounts/devuser/</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="qtLibraryPath"/>
- </item>
- </layout>
- </item>
- <item row="0" column="3">
- <widget class="QPushButton" name="deployNowButton">
- <property name="text">
- <string>Deploy Now</string>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QLabel" name="deployErrorPixmap">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../coreplugin/core.qrc">:/core/images/warning.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="0" column="5">
- <widget class="QLabel" name="deployErrorLabel">
- <property name="text">
- <string>No device configured, cannot deploy.</string>
- </property>
- </widget>
- </item>
- <item row="0" column="6">
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="1" colspan="5">
- <widget class="QLabel" name="qtLibraryExplanationLabel">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <resources>
- <include location="../projectexplorer/projectexplorer.qrc"/>
- </resources>
- <connections>
- <connection>
- <sender>signPackages</sender>
- <signal>toggled(bool)</signal>
- <receiver>signPackagesWidget</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>40</x>
- <y>12</y>
- </hint>
- <hint type="destinationlabel">
- <x>12</x>
- <y>62</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>developmentMode</sender>
- <signal>toggled(bool)</signal>
- <receiver>developmentModeWidget</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>44</x>
- <y>129</y>
- </hint>
- <hint type="destinationlabel">
- <x>22</x>
- <y>169</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>signPackages</sender>
- <signal>toggled(bool)</signal>
- <receiver>developmentModeWidget</receiver>
- <slot>setDisabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>66</x>
- <y>16</y>
- </hint>
- <hint type="destinationlabel">
- <x>115</x>
- <y>174</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>developmentMode</sender>
- <signal>toggled(bool)</signal>
- <receiver>signPackagesWidget</receiver>
- <slot>setDisabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>69</x>
- <y>132</y>
- </hint>
- <hint type="destinationlabel">
- <x>338</x>
- <y>97</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
diff --git a/src/plugins/qnx/blackberrycreatepackagestepfactory.cpp b/src/plugins/qnx/blackberrycreatepackagestepfactory.cpp
deleted file mode 100644
index 2a391d3888..0000000000
--- a/src/plugins/qnx/blackberrycreatepackagestepfactory.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrycreatepackagestepfactory.h"
-
-#include "qnxconstants.h"
-#include "blackberrycreatepackagestep.h"
-#include "blackberrydeviceconfigurationfactory.h"
-
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/kitinformation.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryCreatePackageStepFactory::BlackBerryCreatePackageStepFactory(QObject *parent) :
- ProjectExplorer::IBuildStepFactory(parent)
-{
-}
-
-BlackBerryCreatePackageStepFactory::~BlackBerryCreatePackageStepFactory()
-{
-}
-
-QList<Core::Id> BlackBerryCreatePackageStepFactory::availableCreationIds(
- ProjectExplorer::BuildStepList *parent) const
-{
- if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- return QList<Core::Id>();
-
- Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->target()->kit());
- if (deviceType != BlackBerryDeviceConfigurationFactory::deviceType())
- return QList<Core::Id>();
-
- return QList<Core::Id>() << Core::Id(Constants::QNX_CREATE_PACKAGE_BS_ID);
-}
-
-QString BlackBerryCreatePackageStepFactory::displayNameForId(Core::Id id) const
-{
- if (id == Constants::QNX_CREATE_PACKAGE_BS_ID)
- return tr("Create BAR Packages");
- return QString();
-}
-
-bool BlackBerryCreatePackageStepFactory::canCreate(ProjectExplorer::BuildStepList *parent,
- const Core::Id id) const
-{
- return availableCreationIds(parent).contains(id);
-}
-
-ProjectExplorer::BuildStep *BlackBerryCreatePackageStepFactory::create(ProjectExplorer::BuildStepList *parent, Core::Id id)
-{
- if (!canCreate(parent, id))
- return 0;
- return new BlackBerryCreatePackageStep(parent);
-}
-
-bool BlackBerryCreatePackageStepFactory::canRestore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map) const
-{
- return canCreate(parent, ProjectExplorer::idFromMap(map));
-}
-
-ProjectExplorer::BuildStep *BlackBerryCreatePackageStepFactory::restore(
- ProjectExplorer::BuildStepList *parent, const QVariantMap &map)
-{
- if (!canRestore(parent, map))
- return 0;
- BlackBerryCreatePackageStep *bs = new BlackBerryCreatePackageStep(parent);
- if (bs->fromMap(map))
- return bs;
- delete bs;
- return 0;
-}
-
-bool BlackBerryCreatePackageStepFactory::canClone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *source) const
-{
- return canCreate(parent, source->id());
-}
-
-ProjectExplorer::BuildStep *BlackBerryCreatePackageStepFactory::clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *source)
-{
- if (!canClone(parent, source))
- return 0;
- return new BlackBerryCreatePackageStep(parent, static_cast<BlackBerryCreatePackageStep *>(source));
-}
diff --git a/src/plugins/qnx/blackberrycreatepackagestepfactory.h b/src/plugins/qnx/blackberrycreatepackagestepfactory.h
deleted file mode 100644
index dbe0189324..0000000000
--- a/src/plugins/qnx/blackberrycreatepackagestepfactory.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYCREATEPACKAGESTEPFACTORY_H
-#define QNX_INTERNAL_BLACKBERRYCREATEPACKAGESTEPFACTORY_H
-
-#include <projectexplorer/buildstep.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryCreatePackageStepFactory : public ProjectExplorer::IBuildStepFactory
-{
- Q_OBJECT
-public:
- explicit BlackBerryCreatePackageStepFactory(QObject *parent = 0);
- ~BlackBerryCreatePackageStepFactory();
-
- QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- QString displayNameForId(Core::Id id) const;
-
- bool canCreate(ProjectExplorer::BuildStepList *parent, Core::Id id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, Core::Id id);
-
- bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
- ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map);
-
- bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) const;
- ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYCREATEPACKAGESTEPFACTORY_H
diff --git a/src/plugins/qnx/blackberrydebugsupport.cpp b/src/plugins/qnx/blackberrydebugsupport.cpp
deleted file mode 100644
index 7f7fdf8a25..0000000000
--- a/src/plugins/qnx/blackberrydebugsupport.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydebugsupport.h"
-#include "blackberryapplicationrunner.h"
-
-#include <debugger/debuggerruncontrol.h>
-#include <debugger/debuggerstartparameters.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryDebugSupport::BlackBerryDebugSupport(BlackBerryRunConfiguration *runConfig,
- Debugger::DebuggerRunControl *runControl)
- : QObject(runControl)
- , m_runControl(runControl)
-{
- BlackBerryApplicationRunner::LaunchFlags launchFlags;
- if (m_runControl->startParameters().languages & Debugger::CppLanguage)
- launchFlags |= BlackBerryApplicationRunner::CppDebugLaunch;
- if (m_runControl->startParameters().languages & Debugger::QmlLanguage)
- launchFlags |= BlackBerryApplicationRunner::QmlDebugLaunch;
- m_runner = new BlackBerryApplicationRunner(launchFlags, runConfig, this);
-
- connect(m_runControl, &Debugger::DebuggerRunControl::requestRemoteSetup,
- this, &BlackBerryDebugSupport::launchRemoteApplication);
- connect(m_runControl, SIGNAL(stateChanged(Debugger::DebuggerState)),
- this, SLOT(handleDebuggerStateChanged(Debugger::DebuggerState)));
-
- connect(m_runner, SIGNAL(started()), this, SLOT(handleStarted()));
- connect(m_runner, SIGNAL(startFailed(QString)), this, SLOT(handleStartFailed(QString)));
- connect(m_runner, SIGNAL(output(QString,Utils::OutputFormat)),
- this, SLOT(handleApplicationOutput(QString,Utils::OutputFormat)));
-
- connect(this, SIGNAL(output(QString,Utils::OutputFormat)),
- runControl, SLOT(appendMessage(QString,Utils::OutputFormat)));
-}
-
-void BlackBerryDebugSupport::launchRemoteApplication()
-{
- m_runner->start();
-}
-
-void BlackBerryDebugSupport::handleStarted()
-{
- m_runControl->startParameters().attachPID = m_runner->pid(); // FIXME: Is that needed?
- Debugger::RemoteSetupResult result;
- result.success = true;
- result.inferiorPid = m_runner->pid();
- result.gdbServerPort = 8000;
- result.qmlServerPort = Debugger::InvalidPort;
- m_runControl->notifyEngineRemoteSetupFinished(result);
-}
-
-void BlackBerryDebugSupport::handleStartFailed(const QString &message)
-{
- Debugger::RemoteSetupResult result;
- result.success = false;
- result.reason = message;
- m_runControl->notifyEngineRemoteSetupFinished(result);
-}
-
-void BlackBerryDebugSupport::handleDebuggerStateChanged(Debugger::DebuggerState state)
-{
- if (state == Debugger::EngineShutdownOk || state == Debugger::DebuggerFinished) {
- if (m_runner->isRunning())
- m_runner->stop();
- }
-}
-
-void BlackBerryDebugSupport::handleApplicationOutput(const QString &msg, Utils::OutputFormat format)
-{
- Q_UNUSED(format)
- m_runControl->showMessage(msg, Debugger::AppOutput);
-}
diff --git a/src/plugins/qnx/blackberrydebugsupport.h b/src/plugins/qnx/blackberrydebugsupport.h
deleted file mode 100644
index 56741039cc..0000000000
--- a/src/plugins/qnx/blackberrydebugsupport.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEBUGSUPPORT_H
-#define QNX_INTERNAL_BLACKBERRYDEBUGSUPPORT_H
-
-#include <debugger/debuggerconstants.h>
-
-#include <utils/outputformat.h>
-
-#include <QObject>
-#include <QProcess>
-
-namespace Debugger { class DebuggerRunControl; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryConnect;
-class BlackBerryRunConfiguration;
-class BlackBerryApplicationRunner;
-
-class BlackBerryDebugSupport : public QObject
-{
- Q_OBJECT
-public:
- explicit BlackBerryDebugSupport(BlackBerryRunConfiguration *runConfig,
- Debugger::DebuggerRunControl *runControl);
-
-signals:
- void output(const QString &msg, Utils::OutputFormat format);
-
-private slots:
- void launchRemoteApplication();
-
- void handleStarted();
- void handleStartFailed(const QString &message);
-
- void handleDebuggerStateChanged(Debugger::DebuggerState state);
-
- void handleApplicationOutput(const QString &msg, Utils::OutputFormat format);
-
-private:
- Debugger::DebuggerRunControl *m_runControl;
- BlackBerryApplicationRunner *m_runner;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEBUGSUPPORT_H
diff --git a/src/plugins/qnx/blackberrydebugtokenpinsdialog.cpp b/src/plugins/qnx/blackberrydebugtokenpinsdialog.cpp
deleted file mode 100644
index d0c654a7e8..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenpinsdialog.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydebugtokenpinsdialog.h"
-#include "ui_blackberrydebugtokenpinsdialog.h"
-#include "blackberrydebugtokenreader.h"
-#include "blackberryconfigurationmanager.h"
-#include "blackberrysigningutils.h"
-
-#include <QStandardItemModel>
-#include <QMessageBox>
-#include <QLineEdit>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryDebugTokenPinsDialog::BlackBerryDebugTokenPinsDialog(const QString &debugToken, QWidget *parent) :
- QDialog(parent),
- ui(new Ui_BlackBerryDebugTokenPinsDialog),
- m_model(new QStandardItemModel(this)),
- m_debugTokenPath(debugToken),
- m_updated(false)
-{
- ui->setupUi(this);
- setWindowTitle(tr("Debug Token PINs"));
- ui->pins->setModel(m_model);
- ui->pathLabel->setText(debugToken);
- BlackBerryDebugTokenReader reader(debugToken);
- if (reader.isValid()) {
- QStringList pins = reader.pins().split(QLatin1Char(','));
- foreach (const QString &pin, pins)
- m_model->appendRow(new QStandardItem(pin));
- }
-
- m_okButton = ui->buttonBox->button(QDialogButtonBox::Ok);
-
- ui->editButton->setEnabled(false);
- ui->removeButton->setEnabled(false);
-
- connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addPin()));
- connect(ui->editButton, SIGNAL(clicked()), this, SLOT(editPin()));
- connect(ui->removeButton, SIGNAL(clicked()), this, SLOT(removePin()));
- connect(m_okButton, SIGNAL(clicked()), this, SLOT(emitUpdatedPins()));
- connect(ui->pins, SIGNAL(pressed(QModelIndex)), this, SLOT(updateUi(QModelIndex)));
-}
-
-BlackBerryDebugTokenPinsDialog::~BlackBerryDebugTokenPinsDialog()
-{
- delete ui;
-}
-
-void BlackBerryDebugTokenPinsDialog::addPin()
-{
- bool ok;
- const QString pin = promptPIN(QString(), &ok);
- if (ok && !pin.isEmpty()) {
- m_model->appendRow(new QStandardItem(pin));
- m_updated = true;
- }
-}
-
-void BlackBerryDebugTokenPinsDialog::editPin()
-{
- const QModelIndex index = ui->pins->currentIndex();
- if (!index.isValid())
- return;
-
- bool ok;
- QString pin = m_model->item(index.row(), 0)->text();
- QString newPin = promptPIN(pin, &ok);
- if (ok && newPin != pin) {
- m_model->item(index.row(), 0)->setText(newPin);
- m_updated = true;
- }
-}
-
-void BlackBerryDebugTokenPinsDialog::removePin()
-{
- const QModelIndex index = ui->pins->currentIndex();
- if (!index.isValid())
- return;
-
- const QString pin = m_model->item(index.row(), 0)->text();
- const int result = QMessageBox::question(this, tr("Confirmation"),
- tr("Are you sure you want to remove PIN: %1?")
- .arg(pin), QMessageBox::Yes | QMessageBox::No);
-
- if (result == QMessageBox::Yes) {
- m_model->removeRow(index.row());
- m_updated = true;
- }
-}
-
-void BlackBerryDebugTokenPinsDialog::updateUi(const QModelIndex& index)
-{
- ui->editButton->setEnabled(index.isValid());
- ui->removeButton->setEnabled(index.isValid());
-}
-
-void BlackBerryDebugTokenPinsDialog::emitUpdatedPins()
-{
- if (!m_updated)
- return;
-
- QStringList pins;
- for (int i = 0; i < m_model->rowCount(); i++)
- pins << m_model->item(i)->text();
-
- emit pinsUpdated(pins);
-}
-
-QString BlackBerryDebugTokenPinsDialog::promptPIN(const QString &value, bool *ok)
-{
- QDialog dialog(this);
- QVBoxLayout *layout = new QVBoxLayout;
- QLineEdit *lineEdit = new QLineEdit;
- QDialogButtonBox *buttonBox = new QDialogButtonBox;
-
- lineEdit->setMaxLength(8);
- lineEdit->setText(value);
-
- buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
- buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
-
- connect(buttonBox, SIGNAL(accepted()), &dialog, SLOT(accept()));
- connect(buttonBox, SIGNAL(rejected()), &dialog, SLOT(reject()));
-
- layout->addWidget(lineEdit);
- layout->addWidget(buttonBox);
-
- dialog.setWindowTitle(tr("Debug Token PIN"));
- dialog.setLayout(layout);
-
- const bool rejected = dialog.exec() == QDialog::Rejected;
- if (ok)
- *ok = !rejected;
-
- if (rejected)
- return QString();
-
- return lineEdit->text();
-}
-
-} // Internal
-} // Qnx
diff --git a/src/plugins/qnx/blackberrydebugtokenpinsdialog.h b/src/plugins/qnx/blackberrydebugtokenpinsdialog.h
deleted file mode 100644
index 6b099fe7f1..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenpinsdialog.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYDEBUGTOKENSDIALOG_H
-#define BLACKBERRYDEBUGTOKENSDIALOG_H
-
-#include <QDialog>
-
-QT_BEGIN_NAMESPACE
-class QStandardItemModel;
-class QModelIndex;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class Ui_BlackBerryDebugTokenPinsDialog;
-
-class BlackBerryDebugTokenPinsDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- explicit BlackBerryDebugTokenPinsDialog(const QString &debugToken, QWidget *parent = 0);
- ~BlackBerryDebugTokenPinsDialog();
-
-private slots:
- void addPin();
- void editPin();
- void removePin();
- void updateUi(const QModelIndex& index);
-
- void emitUpdatedPins();
- QString promptPIN(const QString& defaultValue, bool *ok = 0);
-
-signals:
- void pinsUpdated(const QStringList &pins);
-
-private:
- Ui_BlackBerryDebugTokenPinsDialog *ui;
- QStandardItemModel *m_model;
-
- QPushButton *m_okButton;
-
- QString m_debugTokenPath;
- bool m_updated;
-};
-
-} // Internal
-} // Qnx
-#endif // BLACKBERRYDEBUGTOKENSDIALOG_H
diff --git a/src/plugins/qnx/blackberrydebugtokenpinsdialog.ui b/src/plugins/qnx/blackberrydebugtokenpinsdialog.ui
deleted file mode 100644
index a4eb9e9632..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenpinsdialog.ui
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryDebugTokenPinsDialog</class>
- <widget class="QDialog" name="Qnx::Internal::BlackBerryDebugTokenPinsDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>432</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Dialog</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Debug token: &lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="pathLabel">
- <property name="text">
- <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>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QListView" name="pins">
- <property name="editTriggers">
- <set>QAbstractItemView::NoEditTriggers</set>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QPushButton" name="addButton">
- <property name="text">
- <string>Add</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="editButton">
- <property name="text">
- <string>Edit</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="removeButton">
- <property name="text">
- <string>Remove</string>
- </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>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>Qnx::Internal::BlackBerryDebugTokenPinsDialog</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel">
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>Qnx::Internal::BlackBerryDebugTokenPinsDialog</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
diff --git a/src/plugins/qnx/blackberrydebugtokenreader.cpp b/src/plugins/qnx/blackberrydebugtokenreader.cpp
deleted file mode 100644
index 0edc3e7119..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenreader.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydebugtokenreader.h"
-
-#include <QStringList>
-
-#ifdef QNX_ZIP_FILE_SUPPORT
-#include <private/qzipreader_p.h>
-#endif
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-#ifdef QNX_ZIP_FILE_SUPPORT
-const char MANIFEST_FILENAME[] = "META-INF/MANIFEST.MF";
-#endif
-
-const char MANIFEST_AUTHOR_KEY[] = "Package-Author: ";
-const char MANIFEST_AUTHOR_ID_KEY[] = "Package-Author-Id: ";
-const char MANIFEST_EXPIRY[] = "Debug-Token-Expiry-Date: ";
-const char MANIFEST_PINS[] = "Debug-Token-Device-Id: ";
-}
-
-BlackBerryDebugTokenReader::BlackBerryDebugTokenReader(const QString &filePath)
-{
-#ifdef QNX_ZIP_FILE_SUPPORT
- m_zipReader = new QZipReader(filePath);
-#else
- Q_UNUSED(filePath);
- Q_UNUSED(m_zipReader);
-#endif
-}
-
-BlackBerryDebugTokenReader::~BlackBerryDebugTokenReader()
-{
-#ifdef QNX_ZIP_FILE_SUPPORT
- m_zipReader->close();
- delete m_zipReader;
- m_zipReader = 0;
-#endif
-}
-
-bool BlackBerryDebugTokenReader::isValid() const
-{
-#ifdef QNX_ZIP_FILE_SUPPORT
- return m_zipReader->status() == QZipReader::NoError;
-#else
- return false;
-#endif
-}
-
-QString BlackBerryDebugTokenReader::author() const
-{
- return manifestValue(MANIFEST_AUTHOR_KEY);
-}
-
-QString BlackBerryDebugTokenReader::authorId() const
-{
- return manifestValue(MANIFEST_AUTHOR_ID_KEY);
-}
-
-QString BlackBerryDebugTokenReader::expiry() const
-{
- return manifestValue(MANIFEST_EXPIRY);
-}
-
-QString BlackBerryDebugTokenReader::pins() const
-{
- const QString value = manifestValue(MANIFEST_PINS);
- QStringList pins = value.split(QLatin1Char(','));
- QStringList pinsHexa;
- foreach (const QString &pin, pins) {
- QString hexa;
- pinsHexa << hexa.setNum(pin.toUInt(), 16);
- }
-
- return pinsHexa.join(QLatin1Char(','));
-}
-
-bool BlackBerryDebugTokenReader::isSupported()
-{
-#ifdef QNX_ZIP_FILE_SUPPORT
- return true;
-#else
- return false;
-#endif
-}
-
-QString BlackBerryDebugTokenReader::manifestValue(const QByteArray &key) const
-{
- if (!isValid())
- return QString();
-
-#ifdef QNX_ZIP_FILE_SUPPORT
- QByteArray manifestContent = m_zipReader->fileData(QLatin1String(MANIFEST_FILENAME));
- return value(key, manifestContent);
-#else
- Q_UNUSED(key);
- return QString();
-#endif
-}
-
-QString BlackBerryDebugTokenReader::value(const QByteArray &key, const QByteArray &data) const
-{
- int valueStart = data.indexOf(key) + key.size();
- int valueEnd = data.indexOf(QByteArray("\r\n"), valueStart);
- return QString::fromLatin1(data.mid(valueStart, valueEnd - valueStart));
-}
diff --git a/src/plugins/qnx/blackberrydebugtokenreader.h b/src/plugins/qnx/blackberrydebugtokenreader.h
deleted file mode 100644
index 920eb803c6..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenreader.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEBUGTOKENREADER_H
-#define QNX_INTERNAL_BLACKBERRYDEBUGTOKENREADER_H
-
-#include <QString>
-
-QT_BEGIN_NAMESPACE
-class QZipReader;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDebugTokenReader
-{
-public:
- BlackBerryDebugTokenReader(const QString &filePath);
- ~BlackBerryDebugTokenReader();
-
- bool isValid() const;
-
- QString author() const;
- QString authorId() const;
- QString expiry() const;
- QString pins() const;
-
- static bool isSupported();
-
-private:
- QString manifestValue(const QByteArray &key) const;
- QString value(const QByteArray &key, const QByteArray &data) const;
-
- QZipReader *m_zipReader;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEBUGTOKENREADER_H
diff --git a/src/plugins/qnx/blackberrydebugtokenrequestdialog.cpp b/src/plugins/qnx/blackberrydebugtokenrequestdialog.cpp
deleted file mode 100644
index a2029b892c..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenrequestdialog.cpp
+++ /dev/null
@@ -1,291 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydebugtokenrequestdialog.h"
-#include "blackberrydebugtokenrequester.h"
-#include "blackberrydeviceinformation.h"
-#include "blackberryconfigurationmanager.h"
-#include "blackberrysigningutils.h"
-#include "ui_blackberrydebugtokenrequestdialog.h"
-
-#include <QPushButton>
-#include <QDir>
-#include <QMessageBox>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryDebugTokenRequestDialog::BlackBerryDebugTokenRequestDialog(
- QWidget *parent, Qt::WindowFlags f) :
- QDialog(parent, f),
- m_ui(new Ui_BlackBerryDebugTokenRequestDialog),
- m_requester(new BlackBerryDebugTokenRequester(this)),
- m_deviceInfo(new BlackBerryDeviceInformation(this)),
- m_utils(BlackBerrySigningUtils::instance())
-{
- m_ui->setupUi(this);
- m_ui->progressBar->hide();
- m_ui->status->clear();
- m_ui->debugTokenPath->setExpectedKind(Utils::PathChooser::SaveFile);
- m_ui->debugTokenPath->setHistoryCompleter(QLatin1String("BB.DebugToken.History"));
- m_ui->debugTokenPath->setPromptDialogTitle(tr("Request Debug Token"));
- m_ui->debugTokenPath->setPromptDialogFilter(tr("BAR Files (*.bar)"));
-
- m_cancelButton = m_ui->buttonBox->button(QDialogButtonBox::Cancel);
- m_okButton = m_ui->buttonBox->button(QDialogButtonBox::Ok);
- m_okButton->setEnabled(false);
-
- connect(m_cancelButton, SIGNAL(clicked()),
- this, SLOT(reject()));
- connect(m_okButton, SIGNAL(clicked()),
- this, SLOT(requestDebugToken()));
- connect(m_ui->debugTokenPath, SIGNAL(changed(QString)),
- this, SLOT(validate()));
- connect(m_ui->debugTokenPath, SIGNAL(beforeBrowsing()),
- this, SLOT(setDefaultPath()));
- connect(m_ui->debugTokenPath, SIGNAL(editingFinished()),
- this, SLOT(appendExtension()));
- connect(m_ui->debugTokenPath, SIGNAL(editingFinished()),
- this, SLOT(expandPath()));
- connect(m_ui->devicePin, SIGNAL(textChanged(QString)),
- this, SLOT(validate()));
- connect(m_requester, SIGNAL(finished(int)),
- this, SLOT(debugTokenArrived(int)));
- connect(m_deviceInfo, SIGNAL(finished(int)),
- this, SLOT(setDevicePin(int)));
-}
-
-BlackBerryDebugTokenRequestDialog::~BlackBerryDebugTokenRequestDialog()
-{
- delete m_ui;
-}
-
-QString BlackBerryDebugTokenRequestDialog::debugToken() const
-{
- 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)
-{
- m_ui->devicePin->setPlaceholderText(tr("Requesting Device PIN..."));
- m_deviceInfo->setDeviceTarget(deviceIp, password);
-}
-
-void BlackBerryDebugTokenRequestDialog::validate()
-{
- if (!m_ui->debugTokenPath->isValid() || m_ui->devicePin->text().isEmpty()) {
- m_okButton->setEnabled(false);
- return;
- }
-
- QFileInfo fileInfo(m_ui->debugTokenPath->path());
-
- if (!fileInfo.dir().exists()) {
- m_ui->status->setText(tr("Base directory does not exist."));
- m_okButton->setEnabled(false);
- return;
- }
-
- m_ui->status->clear();
- m_okButton->setEnabled(true);
-}
-
-void BlackBerryDebugTokenRequestDialog::requestDebugToken()
-{
- setBusy(true);
-
- QFile file(m_ui->debugTokenPath->path());
-
- if (file.exists()) {
- const int result = QMessageBox::question(this, tr("Are you sure?"),
- tr("The file \"%1\" will be overwritten. Do you want to proceed?")
- .arg(file.fileName()), QMessageBox::Yes | QMessageBox::No);
-
- if (result & QMessageBox::Yes) {
- file.remove();
- } else {
- setBusy(false);
- return;
- }
- }
-
- bool ok;
- const QString cskPassword = m_utils.cskPassword(this, &ok);
-
- if (!ok) {
- setBusy(false);
- return;
- }
-
- const QString certificatePassword = m_utils.certificatePassword(this, &ok);
-
- if (!ok) {
- setBusy(false);
- return;
- }
-
- m_requester->requestDebugToken(m_ui->debugTokenPath->path(),
- cskPassword, BlackBerryConfigurationManager::instance()->defaultKeystorePath(),
- certificatePassword, m_ui->devicePin->text());
-}
-
-void BlackBerryDebugTokenRequestDialog::setDefaultPath()
-{
- const QString path = m_ui->debugTokenPath->path();
- const QString defaultFileName = QLatin1String("/debugToken.bar");
-
- if (path.isEmpty()) {
- m_ui->debugTokenPath->setPath(QDir::homePath() + defaultFileName);
- return;
- }
-
- const QFileInfo fileInfo(path);
-
- if (fileInfo.isDir())
- m_ui->debugTokenPath->setPath(path + defaultFileName);
-}
-
-void BlackBerryDebugTokenRequestDialog::appendExtension()
-{
- QString path = m_ui->debugTokenPath->path();
-
- if (path.isEmpty())
- return;
-
- if (!path.endsWith(QLatin1String(".bar"))) {
- path += QLatin1String(".bar");
- m_ui->debugTokenPath->setPath(path);
- }
-}
-
-void BlackBerryDebugTokenRequestDialog::expandPath()
-{
- const QString path = m_ui->debugTokenPath->path();
-
- if (path.isEmpty() || path.startsWith(QLatin1Char('/')))
- return;
-
- const QFileInfo fileInfo(path);
-
- m_ui->debugTokenPath->setPath(fileInfo.absoluteFilePath());
-}
-
-void BlackBerryDebugTokenRequestDialog::debugTokenArrived(int status)
-{
- QString errorString = tr("Failed to request debug token:") + QLatin1Char(' ');
-
- switch (status) {
- case BlackBerryDebugTokenRequester::Success:
- accept();
- return;
- case BlackBerryDebugTokenRequester::WrongCskPassword:
- m_utils.clearCskPassword();
- errorString += tr("Wrong CSK password.");
- break;
- case BlackBerryDebugTokenRequester::WrongKeystorePassword:
- m_utils.clearCertificatePassword();
- 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::NotYetRegistered:
- errorString += tr("Not yet registered to request debug tokens.");
- break;
- case BlackBerryDebugTokenRequester::UnknownError:
- default:
- m_utils.clearCertificatePassword();
- m_utils.clearCskPassword();
- errorString += tr("An unknwon error has occurred.");
- break;
- }
-
- QFile file(m_ui->debugTokenPath->path());
-
- if (file.exists())
- file.remove();
-
- QMessageBox::critical(this, tr("Error"), errorString);
-
- setBusy(false);
-}
-
-void BlackBerryDebugTokenRequestDialog::setDevicePin(int status)
-{
- m_ui->devicePin->setPlaceholderText(QString());
- if (status != BlackBerryDeviceInformation::Success)
- return;
-
- const QString devicePin = m_deviceInfo->devicePin();
- if (devicePin.isEmpty())
- return;
-
- m_ui->devicePin->setText(devicePin);
-}
-
-void BlackBerryDebugTokenRequestDialog::setBusy(bool busy)
-{
- m_okButton->setEnabled(!busy);
- m_cancelButton->setEnabled(!busy);
- m_ui->debugTokenPath->setEnabled(!busy);
- m_ui->devicePin->setEnabled(!busy);
- m_ui->progressBar->setVisible(busy);
-
- if (busy)
- m_ui->status->setText(tr("Requesting debug token..."));
- else
- m_ui->status->clear();
-}
-
-}
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrydebugtokenrequestdialog.h b/src/plugins/qnx/blackberrydebugtokenrequestdialog.h
deleted file mode 100644
index abd0d086e6..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenrequestdialog.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEBUGTOKENREQUESTDIALOG_H
-#define QNX_INTERNAL_BLACKBERRYDEBUGTOKENREQUESTDIALOG_H
-
-#include <QDialog>
-
-QT_BEGIN_NAMESPACE
-class QPushButton;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class Ui_BlackBerryDebugTokenRequestDialog;
-class BlackBerryDebugTokenRequester;
-class BlackBerryDeviceInformation;
-class BlackBerrySigningUtils;
-
-class BlackBerryDebugTokenRequestDialog : public QDialog
-{
-Q_OBJECT
-
-public:
- explicit BlackBerryDebugTokenRequestDialog(QWidget *parent = 0,
- Qt::WindowFlags f = 0);
- ~BlackBerryDebugTokenRequestDialog();
-
- QString debugToken() const;
- void setDevicePin(const QString &devicePin);
- void setTargetDetails(const QString &deviceIp, const QString &password);
-
-private slots:
- void validate();
- void requestDebugToken();
- void setDefaultPath();
- void appendExtension();
- void expandPath();
- void debugTokenArrived(int status);
- void setDevicePin(int status);
-
-private:
- void setBusy(bool busy);
-
- Ui_BlackBerryDebugTokenRequestDialog *m_ui;
-
- BlackBerryDebugTokenRequester *m_requester;
- BlackBerryDeviceInformation *m_deviceInfo;
- BlackBerrySigningUtils &m_utils;
-
- QPushButton *m_cancelButton;
- QPushButton *m_okButton;
-};
-
-}
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEBUGTOKENREQUESTDIALOG_H
diff --git a/src/plugins/qnx/blackberrydebugtokenrequestdialog.ui b/src/plugins/qnx/blackberrydebugtokenrequestdialog.ui
deleted file mode 100644
index aa65f78ce4..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenrequestdialog.ui
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryDebugTokenRequestDialog</class>
- <widget class="QDialog" name="Qnx::Internal::BlackBerryDebugTokenRequestDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>388</width>
- <height>153</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Request Debug Token</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>Debug token path:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="Utils::PathChooser" name="debugTokenPath" native="true"/>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Device PIN:</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="devicePin">
- <property name="inputMask">
- <string notr="true">HHHHHHHH</string>
- </property>
- <property name="maxLength">
- <number>8</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QProgressBar" name="progressBar">
- <property name="maximum">
- <number>0</number>
- </property>
- <property name="value">
- <number>0</number>
- </property>
- </widget>
- </item>
- <item>
- <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>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>Utils::PathChooser</class>
- <extends>QWidget</extends>
- <header location="global">utils/pathchooser.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrydebugtokenrequester.cpp b/src/plugins/qnx/blackberrydebugtokenrequester.cpp
deleted file mode 100644
index 9767b7f7c8..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenrequester.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydebugtokenrequester.h"
-
-namespace {
-static const char PROCESS_NAME[] = "blackberry-debugtokenrequest";
-static const char ERR_WRONG_CSK_PASS[] = "The signature on the code signing request didn't verify.";
-static const char ERR_WRONG_CSK_PASS_10_2[] = "The specified CSK password is not valid.";
-static const char ERR_WRONG_KEYSTORE_PASS[] = "Failed to decrypt keystore, invalid password";
-static const char ERR_WRONG_KEYSTORE_PASS_10_2[] = "Failed to decrypt keystore, invalid store password or store password not supplied.";
-static const char ERR_NETWORK_UNREACHABLE[] = "Network is unreachable";
-static const char ERR_NOT_YET_REGISTGERED[] = "Not yet registered to request debug tokens";
-}
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryDebugTokenRequester::BlackBerryDebugTokenRequester(QObject *parent) :
- BlackBerryNdkProcess(QLatin1String(PROCESS_NAME), parent)
-{
- addErrorStringMapping(QLatin1String(ERR_WRONG_CSK_PASS), WrongCskPassword);
- addErrorStringMapping(QLatin1String(ERR_WRONG_CSK_PASS_10_2), WrongCskPassword);
- addErrorStringMapping(QLatin1String(ERR_WRONG_KEYSTORE_PASS), WrongKeystorePassword);
- addErrorStringMapping(QLatin1String(ERR_WRONG_KEYSTORE_PASS_10_2), WrongKeystorePassword);
- addErrorStringMapping(QLatin1String(ERR_NETWORK_UNREACHABLE), NetworkUnreachable);
- addErrorStringMapping(QLatin1String(ERR_NOT_YET_REGISTGERED), NotYetRegistered);
-}
-
-void BlackBerryDebugTokenRequester::requestDebugToken(const QString &path,
- const QString &cskPassword, const QString &keyStore,
- const QString &keyStorePassword, const QString &devicePin)
-{
- QStringList arguments;
-
- arguments << QLatin1String("-keystore")
- << keyStore
- << QLatin1String("-storepass")
- << keyStorePassword
- << QLatin1String("-cskpass")
- << cskPassword;
-
- // devicePin may contain multiple pins
- QStringList pins = devicePin.split(QLatin1Char(','));
- foreach (const QString &pin, pins)
- arguments << QLatin1String("-devicepin") << pin;
-
- arguments << path;
-
- start(arguments);
-
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrydebugtokenrequester.h b/src/plugins/qnx/blackberrydebugtokenrequester.h
deleted file mode 100644
index e3238224b8..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenrequester.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEBUGTOKENREQUESTER_H
-#define QNX_INTERNAL_BLACKBERRYDEBUGTOKENREQUESTER_H
-
-#include "blackberryndkprocess.h"
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDebugTokenRequester : public BlackBerryNdkProcess
-{
- Q_OBJECT
-
-public:
- enum ReturnStatus
- {
- WrongCskPassword = UserStatus,
- WrongKeystorePassword,
- NetworkUnreachable,
- IllegalPin,
- NotYetRegistered
- };
-
- explicit BlackBerryDebugTokenRequester(QObject *parent = 0);
-
- void requestDebugToken(const QString &path, const QString &cskPassword,
- const QString &keyStore, const QString &keyStorePassword,
- const QString &devicePin);
-};
-
-}
-}
-
-#endif // QNX_INTERNAL_BLACKBERRYDEBUGTOKENREQUESTER_H
diff --git a/src/plugins/qnx/blackberrydebugtokenuploader.cpp b/src/plugins/qnx/blackberrydebugtokenuploader.cpp
deleted file mode 100644
index 876f1a0b1d..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenuploader.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydebugtokenuploader.h"
-
-#include "qnxconstants.h"
-
-namespace {
-static const char ERR_NO_ROUTE_HOST[] = "Cannot connect";
-static const char ERR_AUTH_FAILED[] = "Authentication failed";
-static const char ERR_DEVELOPMENT_MODE_DISABLED[] = "Device is not in the Development Mode";
-static const char ERR_FILE_NOT_EXIST[] = "File does not exist";
-}
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryDebugTokenUploader::BlackBerryDebugTokenUploader(QObject *parent) :
- BlackBerryNdkProcess(QLatin1String(Constants::QNX_BLACKBERRY_DEPLOY_CMD), parent)
-{
- addErrorStringMapping(QLatin1String(ERR_NO_ROUTE_HOST), NoRouteToHost);
- addErrorStringMapping(QLatin1String(ERR_AUTH_FAILED), AuthenticationFailed);
- addErrorStringMapping(QLatin1String(ERR_DEVELOPMENT_MODE_DISABLED), DevelopmentModeDisabled);
- addErrorStringMapping(QLatin1String(ERR_FILE_NOT_EXIST), InvalidDebugTokenPath);
-}
-
-void BlackBerryDebugTokenUploader::uploadDebugToken(const QString &path,
- const QString &deviceIp, const QString &devicePassword)
-{
- QStringList arguments;
-
- arguments << QLatin1String("-installDebugToken")
- << path
- << QLatin1String("-device")
- << deviceIp
- << QLatin1String("-password")
- << devicePassword;
-
- start(arguments);
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrydebugtokenuploader.h b/src/plugins/qnx/blackberrydebugtokenuploader.h
deleted file mode 100644
index be111247cc..0000000000
--- a/src/plugins/qnx/blackberrydebugtokenuploader.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEBUGTOKENUPLOADER_H
-#define QNX_INTERNAL_BLACKBERRYDEBUGTOKENUPLOADER_H
-
-#include "blackberryndkprocess.h"
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDebugTokenUploader : public BlackBerryNdkProcess
-{
- Q_OBJECT
-
-public:
- enum ReturnStatus
- {
- NoRouteToHost = UserStatus,
- AuthenticationFailed,
- DevelopmentModeDisabled,
- FailedToStartInferiorProcess,
- InferiorProcessTimedOut,
- InferiorProcessCrashed,
- InferiorProcessWriteError,
- InferiorProcessReadError,
- InvalidDebugTokenPath
- };
-
- explicit BlackBerryDebugTokenUploader(QObject *parent = 0);
-
- void uploadDebugToken(const QString &path, const QString &deviceIp,
- const QString &devicePassword);
-};
-
-}
-}
-
-#endif // QNX_INTERNAL_BLACKBERRYDEBUGTOKENUPLOADER_H
diff --git a/src/plugins/qnx/blackberrydeployconfiguration.cpp b/src/plugins/qnx/blackberrydeployconfiguration.cpp
deleted file mode 100644
index bc2c559598..0000000000
--- a/src/plugins/qnx/blackberrydeployconfiguration.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeployconfiguration.h"
-
-#include "qnxconstants.h"
-#include "bardescriptorfilenode.h"
-#include "blackberrydeployconfigurationwidget.h"
-#include "blackberrydeployinformation.h"
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-const char DEPLOYMENT_INFO_KEY[] = "Qnx.BlackBerry.DeployInformation";
-}
-
-BlackBerryDeployConfiguration::BlackBerryDeployConfiguration(ProjectExplorer::Target *parent)
- : ProjectExplorer::DeployConfiguration(parent, Core::Id(Constants::QNX_BB_DEPLOYCONFIGURATION_ID))
-{
- ctor();
-}
-
-BlackBerryDeployConfiguration::BlackBerryDeployConfiguration(ProjectExplorer::Target *parent,
- BlackBerryDeployConfiguration *source)
- : ProjectExplorer::DeployConfiguration(parent, source)
-{
- ctor();
- cloneSteps(source);
-}
-
-void BlackBerryDeployConfiguration::ctor()
-{
- m_deployInformation = new BlackBerryDeployInformation(target());
-
- setDefaultDisplayName(tr("Deploy to BlackBerry Device"));
-}
-
-BlackBerryDeployConfiguration::~BlackBerryDeployConfiguration()
-{
-}
-
-BlackBerryDeployInformation *BlackBerryDeployConfiguration::deploymentInfo() const
-{
- return m_deployInformation;
-}
-
-ProjectExplorer::NamedWidget *BlackBerryDeployConfiguration::createConfigWidget()
-{
- return new BlackBerryDeployConfigurationWidget(this);
-}
-
-QVariantMap BlackBerryDeployConfiguration::toMap() const
-{
- QVariantMap map(ProjectExplorer::DeployConfiguration::toMap());
- map.insert(QLatin1String(DEPLOYMENT_INFO_KEY), deploymentInfo()->toMap());
- return map;
-}
-
-bool BlackBerryDeployConfiguration::fromMap(const QVariantMap &map)
-{
- if (!ProjectExplorer::DeployConfiguration::fromMap(map))
- return false;
-
- QVariantMap deployInfoMap = map.value(QLatin1String(DEPLOYMENT_INFO_KEY)).toMap();
- deploymentInfo()->fromMap(deployInfoMap);
- return true;
-}
diff --git a/src/plugins/qnx/blackberrydeployconfiguration.h b/src/plugins/qnx/blackberrydeployconfiguration.h
deleted file mode 100644
index cd4c73869f..0000000000
--- a/src/plugins/qnx/blackberrydeployconfiguration.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEPLOYCONFIGURATION_H
-#define QNX_INTERNAL_BLACKBERRYDEPLOYCONFIGURATION_H
-
-#include <projectexplorer/deployconfiguration.h>
-
-#include "blackberrydeviceconfiguration.h"
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeployInformation;
-
-class BlackBerryDeployConfiguration : public ProjectExplorer::DeployConfiguration
-{
- Q_OBJECT
- friend class BlackBerryDeployConfigurationFactory;
-
-public:
- explicit BlackBerryDeployConfiguration(ProjectExplorer::Target *parent);
- virtual ~BlackBerryDeployConfiguration();
-
- ProjectExplorer::NamedWidget *createConfigWidget();
-
- BlackBerryDeployInformation *deploymentInfo() const;
-
- QVariantMap toMap() const;
-
-protected:
- BlackBerryDeployConfiguration(ProjectExplorer::Target *parent, BlackBerryDeployConfiguration *source);
-
- bool fromMap(const QVariantMap &map);
-
-private:
- void ctor();
-
- BlackBerryDeployInformation *m_deployInformation;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEPLOYCONFIGURATION_H
diff --git a/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp b/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp
deleted file mode 100644
index 71f9abe0de..0000000000
--- a/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeployconfigurationfactory.h"
-
-#include "qnxconstants.h"
-#include "blackberrycheckdevicestatusstep.h"
-#include "blackberrydeployconfiguration.h"
-#include "blackberrycreatepackagestep.h"
-#include "blackberrydeploystep.h"
-#include "blackberrydeviceconfigurationfactory.h"
-
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/kitinformation.h>
-#include <projectexplorer/target.h>
-#include <qmakeprojectmanager/qmakeproject.h>
-#include <remotelinux/genericdirectuploadstep.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryDeployConfigurationFactory::BlackBerryDeployConfigurationFactory(QObject *parent) :
- ProjectExplorer::DeployConfigurationFactory(parent)
-{
-}
-
-BlackBerryDeployConfigurationFactory::~BlackBerryDeployConfigurationFactory()
-{
-}
-
-QList<Core::Id> BlackBerryDeployConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
-{
- QList<Core::Id> result;
-
- QmakeProjectManager::QmakeProject *project = qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project());
- if (!project)
- return result;
-
- Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->kit());
- if (deviceType != BlackBerryDeviceConfigurationFactory::deviceType())
- return result;
-
- result << Core::Id(Constants::QNX_BB_DEPLOYCONFIGURATION_ID);
- return result;
-}
-
-QString BlackBerryDeployConfigurationFactory::displayNameForId(Core::Id id) const
-{
- if (id == Constants::QNX_BB_DEPLOYCONFIGURATION_ID)
- return tr("Deploy to BlackBerry Device");
-
- return QString();
-}
-
-bool BlackBerryDeployConfigurationFactory::canCreate(ProjectExplorer::Target *parent,
- const Core::Id id) const
-{
- return availableCreationIds(parent).contains(id);
-}
-
-ProjectExplorer::DeployConfiguration *BlackBerryDeployConfigurationFactory::create(
- ProjectExplorer::Target *parent, const Core::Id id)
-{
- if (!canCreate(parent, id))
- return 0;
-
- BlackBerryDeployConfiguration *dc = new BlackBerryDeployConfiguration(parent);
- dc->stepList()->insertStep(0, new BlackBerryCheckDeviceStatusStep(dc->stepList()));
- dc->stepList()->insertStep(1, new BlackBerryCreatePackageStep(dc->stepList()));
- dc->stepList()->insertStep(2, new BlackBerryDeployStep(dc->stepList()));
- return dc;
-}
-
-bool BlackBerryDeployConfigurationFactory::canRestore(ProjectExplorer::Target *parent,
- const QVariantMap &map) const
-{
- return canCreate(parent, ProjectExplorer::idFromMap(map));
-}
-
-ProjectExplorer::DeployConfiguration *BlackBerryDeployConfigurationFactory::restore(
- ProjectExplorer::Target *parent, const QVariantMap &map)
-{
- if (!canRestore(parent, map))
- return 0;
-
- BlackBerryDeployConfiguration *dc = new BlackBerryDeployConfiguration(parent);
- if (dc->fromMap(map))
- return dc;
-
- delete dc;
- return 0;
-}
-
-bool BlackBerryDeployConfigurationFactory::canClone(ProjectExplorer::Target *parent,
- ProjectExplorer::DeployConfiguration *source) const
-{
- return canCreate(parent, source->id());
-}
-
-ProjectExplorer::DeployConfiguration *BlackBerryDeployConfigurationFactory::clone(
- ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source)
-{
- if (!canClone(parent, source))
- return 0;
- BlackBerryDeployConfiguration *old = static_cast<BlackBerryDeployConfiguration *>(source);
- return new BlackBerryDeployConfiguration(parent, old);
-}
diff --git a/src/plugins/qnx/blackberrydeployconfigurationfactory.h b/src/plugins/qnx/blackberrydeployconfigurationfactory.h
deleted file mode 100644
index 37a144f0a5..0000000000
--- a/src/plugins/qnx/blackberrydeployconfigurationfactory.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEPLOYCONFIGURATIONFACTORY_H
-#define QNX_INTERNAL_BLACKBERRYDEPLOYCONFIGURATIONFACTORY_H
-
-#include <projectexplorer/deployconfiguration.h>
-
-namespace ProjectExplorer { class Target; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory
-{
- Q_OBJECT
-public:
- explicit BlackBerryDeployConfigurationFactory(QObject *parent = 0);
- ~BlackBerryDeployConfigurationFactory();
-
- QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
- QString displayNameForId(Core::Id id) const;
-
- bool canCreate(ProjectExplorer::Target *parent, Core::Id id) const;
- ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, Core::Id id);
-
- bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
- ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent,
- const QVariantMap &map);
-
- bool canClone(ProjectExplorer::Target *parent,
- ProjectExplorer::DeployConfiguration *source) const;
- ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent,
- ProjectExplorer::DeployConfiguration *source);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEPLOYCONFIGURATIONFACTORY_H
diff --git a/src/plugins/qnx/blackberrydeployconfigurationwidget.cpp b/src/plugins/qnx/blackberrydeployconfigurationwidget.cpp
deleted file mode 100644
index 51c5cd7801..0000000000
--- a/src/plugins/qnx/blackberrydeployconfigurationwidget.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeployconfigurationwidget.h"
-#include "ui_blackberrydeployconfigurationwidget.h"
-#include "blackberrydeployconfiguration.h"
-#include "blackberrydeployinformation.h"
-#include "pathchooserdelegate.h"
-
-#include <coreplugin/icore.h>
-#include <projectexplorer/devicesupport/devicemanager.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <utils/pathchooser.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryDeployConfigurationWidget::BlackBerryDeployConfigurationWidget(BlackBerryDeployConfiguration *dc,
- QWidget *parent)
- : ProjectExplorer::NamedWidget(parent)
- , m_ui(new Ui::BlackBerryDeployConfigurationWidget)
- , m_deployConfiguration(0)
-{
- m_ui->setupUi(this);
- m_deployConfiguration = dc;
-
- m_ui->deployPackagesView->setModel(m_deployConfiguration->deploymentInfo());
-
- PathChooserDelegate *appDescriptorPathDelegate = new PathChooserDelegate(this);
- appDescriptorPathDelegate->setExpectedKind(Utils::PathChooser::File);
- appDescriptorPathDelegate->setHistoryCompleter(QLatin1String("BB.BarXml.History"));
- appDescriptorPathDelegate->setPromptDialogFilter(QLatin1String("*.xml"));
-
- PathChooserDelegate *barPathDelegate = new PathChooserDelegate(this);
- barPathDelegate->setExpectedKind(Utils::PathChooser::File);
- barPathDelegate->setHistoryCompleter(QLatin1String("BB.AppBar.History"));
- barPathDelegate->setPromptDialogFilter(QLatin1String("*.bar"));
-
- m_ui->deployPackagesView->setItemDelegateForColumn(1, appDescriptorPathDelegate);
- m_ui->deployPackagesView->setItemDelegateForColumn(2, barPathDelegate);
-
- m_ui->deployPackagesView->header()->resizeSections(QHeaderView::ResizeToContents);
-}
-
-BlackBerryDeployConfigurationWidget::~BlackBerryDeployConfigurationWidget()
-{
- delete m_ui;
-}
diff --git a/src/plugins/qnx/blackberrydeployconfigurationwidget.h b/src/plugins/qnx/blackberrydeployconfigurationwidget.h
deleted file mode 100644
index cb06ed6323..0000000000
--- a/src/plugins/qnx/blackberrydeployconfigurationwidget.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEPLOYCONFIGURATIONWIDGET_H
-#define QNX_INTERNAL_BLACKBERRYDEPLOYCONFIGURATIONWIDGET_H
-
-#include <projectexplorer/deployconfiguration.h>
-#include <projectexplorer/namedwidget.h>
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BlackBerryDeployConfigurationWidget; }
-
-class BlackBerryDeployConfiguration;
-
-class BlackBerryDeployConfigurationWidget : public ProjectExplorer::NamedWidget
-{
- Q_OBJECT
-public:
- explicit BlackBerryDeployConfigurationWidget(BlackBerryDeployConfiguration *dc, QWidget *parent = 0);
- ~BlackBerryDeployConfigurationWidget();
-
-private:
- Ui::BlackBerryDeployConfigurationWidget *m_ui;
-
- BlackBerryDeployConfiguration *m_deployConfiguration;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEPLOYCONFIGURATIONWIDGET_H
diff --git a/src/plugins/qnx/blackberrydeployconfigurationwidget.ui b/src/plugins/qnx/blackberrydeployconfigurationwidget.ui
deleted file mode 100644
index 393ed5c2f6..0000000000
--- a/src/plugins/qnx/blackberrydeployconfigurationwidget.ui
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryDeployConfigurationWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryDeployConfigurationWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>599</width>
- <height>213</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Packages to deploy:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTreeView" name="deployPackagesView">
- <property name="alternatingRowColors">
- <bool>true</bool>
- </property>
- <property name="textElideMode">
- <enum>Qt::ElideLeft</enum>
- </property>
- <property name="rootIsDecorated">
- <bool>false</bool>
- </property>
- <property name="itemsExpandable">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrydeployinformation.cpp b/src/plugins/qnx/blackberrydeployinformation.cpp
deleted file mode 100644
index fa81f9b403..0000000000
--- a/src/plugins/qnx/blackberrydeployinformation.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeployinformation.h"
-
-#include "blackberrydeployconfiguration.h"
-
-#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/target.h>
-#include <qmakeprojectmanager/qmakeproject.h>
-#include <qmakeprojectmanager/qmakenodes.h>
-#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtkitinformation.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-const char COUNT_KEY[] = "Qnx.BlackBerry.DeployInformationCount";
-const char DEPLOYINFO_KEY[] = "Qnx.BlackBerry.DeployInformation.%1";
-
-const char ENABLED_KEY[] = "Qnx.BlackBerry.DeployInformation.Enabled";
-const char APPDESCRIPTOR_KEY[] = "Qnx.BlackBerry.DeployInformation.AppDescriptor";
-const char PACKAGE_KEY[] = "Qnx.BlackBerry.DeployInformation.Package";
-const char PROFILE_KEY[] = "Qnx.BlackBerry.DeployInformation.ProFile";
-const char TARGET_KEY[] = "Qnx.BlackBerry.DeployInformation.Target";
-const char SOURCE_KEY[] = "Qnx.BlackBerry.DeployInformation.Source";
-}
-
-Utils::FileName BarPackageDeployInformation::appDescriptorPath() const
-{
- if (userAppDescriptorPath.isEmpty())
- return Utils::FileName(sourceDir).appendPath(QLatin1String("bar-descriptor.xml"));
-
- return userAppDescriptorPath;
-}
-
-Utils::FileName BarPackageDeployInformation::packagePath() const
-{
- if (userPackagePath.isEmpty())
- return Utils::FileName(buildDir).appendPath(targetName).appendString(QLatin1String(".bar"));
-
- return userPackagePath;
-}
-
-// ----------------------------------------------------------------------------
-
-BlackBerryDeployInformation::BlackBerryDeployInformation(ProjectExplorer::Target *target)
- : QAbstractTableModel(target)
- , m_target(target)
-{
- connect(project(), SIGNAL(proFilesEvaluated()), this, SLOT(updateModel()));
-}
-
-int BlackBerryDeployInformation::rowCount(const QModelIndex &parent) const
-{
- if (parent.isValid())
- return 0;
-
- return m_deployInformation.count();
-}
-
-int BlackBerryDeployInformation::columnCount(const QModelIndex &parent) const
-{
- if (parent.isValid())
- return 0;
-
- return ColumnCount;
-}
-
-QVariant BlackBerryDeployInformation::data(const QModelIndex &index, int role) const
-{
- if (!index.isValid())
- return QVariant();
-
- if (index.row() >= m_deployInformation.count() || index.column() >= ColumnCount)
- return QVariant();
-
- BarPackageDeployInformation di = m_deployInformation[index.row()];
- if (role == Qt::CheckStateRole) {
- if (index.column() == EnabledColumn)
- return di.enabled ? Qt::Checked : Qt::Unchecked;
- } else if (role == Qt::DisplayRole || role == Qt::EditRole) {
- if (index.column() == AppDescriptorColumn)
- return di.appDescriptorPath().toUserOutput();
- else if (index.column() == PackageColumn)
- return di.packagePath().toUserOutput();
- }
-
- return QVariant();
-}
-
-QVariant BlackBerryDeployInformation::headerData(int section, Qt::Orientation orientation, int role) const
-{
- if (orientation == Qt::Vertical || role != Qt::DisplayRole)
- return QVariant();
-
- switch (section) {
- case EnabledColumn:
- return tr("Enabled");
- case AppDescriptorColumn:
- return tr("Application descriptor file");
- case PackageColumn:
- return tr("Package");
- default:
- return QVariant();
- }
-}
-
-bool BlackBerryDeployInformation::setData(const QModelIndex &index, const QVariant &value, int role)
-{
- if (!index.isValid())
- return false;
- if (index.row() >= m_deployInformation.count() || index.column() >= ColumnCount)
- return false;
-
- BarPackageDeployInformation &di = m_deployInformation[index.row()];
- if (role == Qt::CheckStateRole && index.column() == EnabledColumn) {
- di.enabled = static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked;
- } else if (role == Qt::EditRole) {
- if (index.column() == AppDescriptorColumn)
- di.userAppDescriptorPath = Utils::FileName::fromString(value.toString());
- else if (index.column() == PackageColumn)
- di.userPackagePath = Utils::FileName::fromString(value.toString());
- }
-
- emit dataChanged(index, index);
- return true;
-}
-
-Qt::ItemFlags BlackBerryDeployInformation::flags(const QModelIndex &index) const
-{
- Qt::ItemFlags flags = QAbstractTableModel::flags(index);
- switch (index.column()) {
- case EnabledColumn:
- flags |= Qt::ItemIsEditable | Qt::ItemIsUserCheckable;
- break;
- case AppDescriptorColumn:
- case PackageColumn:
- flags |= Qt::ItemIsEditable;
- break;
- }
-
- return flags;
-}
-
-QList<BarPackageDeployInformation> BlackBerryDeployInformation::enabledPackages() const
-{
- QList<BarPackageDeployInformation> result;
-
- foreach (const BarPackageDeployInformation& info, m_deployInformation) {
- if (info.enabled)
- result << info;
- }
-
- return result;
-}
-
-QList<BarPackageDeployInformation> BlackBerryDeployInformation::allPackages() const
-{
- return m_deployInformation;
-}
-
-QVariantMap BlackBerryDeployInformation::toMap() const
-{
- QVariantMap outerMap;
- outerMap[QLatin1String(COUNT_KEY)] = m_deployInformation.size();
-
- for (int i = 0; i < m_deployInformation.size(); ++i) {
- const BarPackageDeployInformation &deployInfo = m_deployInformation[i];
-
- QVariantMap deployInfoMap;
- deployInfoMap[QLatin1String(ENABLED_KEY)] = deployInfo.enabled;
- deployInfoMap[QLatin1String(APPDESCRIPTOR_KEY)] = deployInfo.userAppDescriptorPath.toString();
- deployInfoMap[QLatin1String(PACKAGE_KEY)] = deployInfo.userPackagePath.toString();
- deployInfoMap[QLatin1String(PROFILE_KEY)] = deployInfo.proFilePath.toString();
- deployInfoMap[QLatin1String(TARGET_KEY)] = deployInfo.targetName;
- deployInfoMap[QLatin1String(SOURCE_KEY)] = deployInfo.sourceDir.toString();
-
- outerMap[QString::fromLatin1(DEPLOYINFO_KEY).arg(i)] = deployInfoMap;
- }
-
- return outerMap;
-}
-
-void BlackBerryDeployInformation::fromMap(const QVariantMap &map)
-{
- beginResetModel();
- m_deployInformation.clear();
-
- int count = map.value(QLatin1String(COUNT_KEY)).toInt();
- for (int i = 0; i < count; ++i) {
- QVariantMap innerMap = map.value(QString::fromLatin1(DEPLOYINFO_KEY).arg(i)).toMap();
-
- const bool enabled = innerMap.value(QLatin1String(ENABLED_KEY)).toBool();
- const QString appDescriptorPath = innerMap.value(QLatin1String(APPDESCRIPTOR_KEY)).toString();
- const QString packagePath = innerMap.value(QLatin1String(PACKAGE_KEY)).toString();
- const QString proFilePath = innerMap.value(QLatin1String(PROFILE_KEY)).toString();
- const QString targetName = innerMap.value(QLatin1String(TARGET_KEY)).toString();
- const QString sourceDir = innerMap.value(QLatin1String(SOURCE_KEY)).toString();
-
- BarPackageDeployInformation deployInformation(enabled, Utils::FileName::fromString(proFilePath),
- Utils::FileName::fromString(sourceDir),
- m_target->activeBuildConfiguration()->buildDirectory(),
- targetName);
- deployInformation.userAppDescriptorPath = Utils::FileName::fromString(appDescriptorPath);
- deployInformation.userPackagePath = Utils::FileName::fromString(packagePath);
- m_deployInformation << deployInformation;
- }
-
- endResetModel();
-}
-
-ProjectExplorer::Target *BlackBerryDeployInformation::target() const
-{
- return m_target;
-}
-
-void BlackBerryDeployInformation::updateModel()
-{
- if (m_deployInformation.isEmpty()) {
- initModel();
- return;
- }
-
- beginResetModel();
- QList<BarPackageDeployInformation> keep;
- QList<QmakeProjectManager::QmakeProFileNode *> appNodes = project()->applicationProFiles();
- foreach (QmakeProjectManager::QmakeProFileNode *node, appNodes) {
- bool nodeFound = false;
- for (int i = 0; i < m_deployInformation.size(); ++i) {
- if (m_deployInformation[i].proFilePath == node->path()
- && (!m_deployInformation[i].userAppDescriptorPath.isEmpty()
- || !m_deployInformation[i].userPackagePath.isEmpty())) {
- BarPackageDeployInformation deployInformation = m_deployInformation[i];
- // In case the user resets the bar package path (or if it is empty already), we need the current build dir
- deployInformation.buildDir = m_target->activeBuildConfiguration()->buildDirectory();
- keep << deployInformation;
- nodeFound = true;
- break;
- }
- }
-
- if (!nodeFound)
- keep << deployInformationFromNode(node);
- }
- m_deployInformation = keep;
- endResetModel();
-}
-
-QmakeProjectManager::QmakeProject *BlackBerryDeployInformation::project() const
-{
- return static_cast<QmakeProjectManager::QmakeProject *>(m_target->project());
-}
-
-void BlackBerryDeployInformation::initModel()
-{
- if (!m_deployInformation.isEmpty())
- return;
-
- QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(m_target->kit());
- if (!version || !version->isValid()) {
- beginResetModel();
- m_deployInformation.clear();
- endResetModel();
- return;
- }
-
- const QmakeProjectManager::QmakeProFileNode *const rootNode = project()->rootQmakeProjectNode();
- if (!rootNode || rootNode->parseInProgress()) // Can be null right after project creation by wizard.
- return;
-
- disconnect(project(), SIGNAL(proFilesEvaluated()), this, SLOT(updateModel()));
-
- beginResetModel();
- m_deployInformation.clear();
-
- QList<QmakeProjectManager::QmakeProFileNode *> appNodes = project()->applicationProFiles();
- foreach (QmakeProjectManager::QmakeProFileNode *node, appNodes)
- m_deployInformation << deployInformationFromNode(node);
-
- endResetModel();
- connect(project(), SIGNAL(proFilesEvaluated()), this, SLOT(updateModel()));
-}
-
-BarPackageDeployInformation BlackBerryDeployInformation::deployInformationFromNode(QmakeProjectManager::QmakeProFileNode *node) const
-{
- QmakeProjectManager::TargetInformation ti = node->targetInformation();
-
- const Utils::FileName buildDir = m_target->activeBuildConfiguration()->buildDirectory();
-
- return BarPackageDeployInformation(true, node->path(), node->path(), buildDir, ti.target);
-}
diff --git a/src/plugins/qnx/blackberrydeployinformation.h b/src/plugins/qnx/blackberrydeployinformation.h
deleted file mode 100644
index 0e05941006..0000000000
--- a/src/plugins/qnx/blackberrydeployinformation.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEPLOYINFORMATION_H
-#define QNX_INTERNAL_BLACKBERRYDEPLOYINFORMATION_H
-
-#include <utils/fileutils.h>
-
-#include <QAbstractTableModel>
-
-namespace ProjectExplorer { class Target; }
-
-namespace QmakeProjectManager {
-class QmakeProFileNode;
-class QmakeProject;
-}
-
-namespace Qnx {
-namespace Internal {
-
-class BarPackageDeployInformation {
-public:
- BarPackageDeployInformation(bool enabled,
- const Utils::FileName &proFilePath,
- const Utils::FileName &sourceDir,
- const Utils::FileName &buildDir,
- const QString &targetName)
- : enabled(enabled)
- , proFilePath(proFilePath)
- , sourceDir(sourceDir)
- , buildDir(buildDir)
- , targetName(targetName)
- {
- }
-
- Utils::FileName appDescriptorPath() const;
- Utils::FileName packagePath() const;
-
- bool enabled;
- Utils::FileName proFilePath;
- Utils::FileName sourceDir;
- Utils::FileName buildDir;
- QString targetName;
-
- Utils::FileName userAppDescriptorPath;
- Utils::FileName userPackagePath;
-};
-
-class BlackBerryDeployInformation : public QAbstractTableModel
-{
- Q_OBJECT
-public:
- explicit BlackBerryDeployInformation(ProjectExplorer::Target *target);
-
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- int columnCount(const QModelIndex &parent = QModelIndex()) const;
-
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
-
- bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
-
- Qt::ItemFlags flags(const QModelIndex &index) const;
-
- QList<BarPackageDeployInformation> enabledPackages() const;
- QList<BarPackageDeployInformation> allPackages() const;
-
- QVariantMap toMap() const;
- void fromMap(const QVariantMap &map);
-
- ProjectExplorer::Target *target() const;
-
-private slots:
- void updateModel();
-
-private:
- enum Columns {
- EnabledColumn = 0,
- AppDescriptorColumn,
- PackageColumn,
- ColumnCount // Always have last
- };
-
- QmakeProjectManager::QmakeProject *project() const;
-
- void initModel();
- BarPackageDeployInformation deployInformationFromNode(QmakeProjectManager::QmakeProFileNode *node) const;
-
- ProjectExplorer::Target *m_target;
-
- QList<BarPackageDeployInformation> m_deployInformation;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEPLOYINFORMATION_H
diff --git a/src/plugins/qnx/blackberrydeploystep.cpp b/src/plugins/qnx/blackberrydeploystep.cpp
deleted file mode 100644
index ebce6d5029..0000000000
--- a/src/plugins/qnx/blackberrydeploystep.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeploystep.h"
-
-#include "qnxconstants.h"
-#include "blackberrydeployconfiguration.h"
-#include "blackberrydeploystepconfigwidget.h"
-#include "qnxutils.h"
-#include "blackberrydeployinformation.h"
-
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-#include <qmakeprojectmanager/qmakebuildconfiguration.h>
-#include <utils/qtcassert.h>
-#include <ssh/sshconnection.h>
-
-#include <QDir>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryDeployStep::BlackBerryDeployStep(ProjectExplorer::BuildStepList *bsl)
- : BlackBerryAbstractDeployStep(bsl, Core::Id(Constants::QNX_DEPLOY_PACKAGE_BS_ID))
-{
- setDisplayName(tr("Deploy packages"));
-}
-
-BlackBerryDeployStep::BlackBerryDeployStep(ProjectExplorer::BuildStepList *bsl, BlackBerryDeployStep *bs)
- : BlackBerryAbstractDeployStep(bsl, bs)
-{
- setDisplayName(tr("Deploy packages"));
-}
-
-BlackBerryDeployStep::~BlackBerryDeployStep()
-{
-}
-
-bool BlackBerryDeployStep::init()
-{
- if (!BlackBerryAbstractDeployStep::init())
- return false;
-
- Utils::FileName deployCmd =
- target()->activeBuildConfiguration()->environment().searchInPath(
- QLatin1String(Constants::QNX_BLACKBERRY_DEPLOY_CMD));
- if (deployCmd.isEmpty()) {
- raiseError(tr("Could not find deploy command \"%1\" in the build environment")
- .arg(QLatin1String(Constants::QNX_BLACKBERRY_DEPLOY_CMD)));
- return false;
- }
-
- if (deviceHost().isEmpty()) {
- raiseError(tr("No hostname specified for device"));
- return false;
- }
-
- BlackBerryDeployConfiguration *deployConfig = qobject_cast<BlackBerryDeployConfiguration *>(deployConfiguration());
- QTC_ASSERT(deployConfig, return false);
-
- QList<BarPackageDeployInformation> packagesToDeploy = deployConfig->deploymentInfo()->enabledPackages();
- if (packagesToDeploy.isEmpty()) {
- raiseError(tr("No packages enabled for deployment"));
- return false;
- }
-
- foreach (const BarPackageDeployInformation &info, packagesToDeploy) {
- QStringList args;
- args << QLatin1String("-installApp");
- args << QLatin1String("-device") << deviceHost();
- if (!password().isEmpty())
- args << QLatin1String("-password") << password();
- args << QnxUtils::addQuotes(info.packagePath().toUserOutput());
-
- addCommand(deployCmd.toString(), args);
- }
-
- return true;
-}
-
-void BlackBerryDeployStep::run(QFutureInterface<bool> &fi)
-{
- BlackBerryDeployConfiguration *deployConfig = qobject_cast<BlackBerryDeployConfiguration *>(deployConfiguration());
- QTC_ASSERT(deployConfig, return);
-
- QList<BarPackageDeployInformation> packagesToDeploy = deployConfig->deploymentInfo()->enabledPackages();
- foreach (const BarPackageDeployInformation &info, packagesToDeploy) {
- if (!info.packagePath().exists()) {
- raiseError(tr("Package \"%1\" does not exist. Create the package first.")
- .arg(info.packagePath().toUserOutput()));
- fi.reportResult(false);
- return;
- }
- }
-
- BlackBerryAbstractDeployStep::run(fi);
-}
-
-void BlackBerryDeployStep::cleanup()
-{
-}
-
-void BlackBerryDeployStep::processStarted(const ProjectExplorer::ProcessParameters &params)
-{
- QString arguments = params.prettyArguments();
- if (!password().isEmpty()) {
- const QString passwordLine = QLatin1String(" -password ") + password();
- const QString hiddenPasswordLine = QLatin1String(" -password <hidden>");
- arguments.replace(passwordLine, hiddenPasswordLine);
- }
-
- emitOutputInfo(params, arguments);
-}
-
-ProjectExplorer::BuildStepConfigWidget *BlackBerryDeployStep::createConfigWidget()
-{
- return new BlackBerryDeployStepConfigWidget();
-}
-
-QString BlackBerryDeployStep::deviceHost() const
-{
- BlackBerryDeviceConfiguration::ConstPtr device
- = BlackBerryDeviceConfiguration::device(target()->kit());
- if (device)
- return device->sshParameters().host;
- return QString();
-}
-
-QString BlackBerryDeployStep::password() const
-{
- BlackBerryDeviceConfiguration::ConstPtr device
- = BlackBerryDeviceConfiguration::device(target()->kit());
- if (device)
- return device->sshParameters().password;
- return QString();
-}
diff --git a/src/plugins/qnx/blackberrydeploystep.h b/src/plugins/qnx/blackberrydeploystep.h
deleted file mode 100644
index bca69a34b5..0000000000
--- a/src/plugins/qnx/blackberrydeploystep.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEPLOYSTEP_H
-#define QNX_INTERNAL_BLACKBERRYDEPLOYSTEP_H
-
-#include "blackberryabstractdeploystep.h"
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeployStep : public BlackBerryAbstractDeployStep
-{
- Q_OBJECT
- friend class BlackBerryDeployStepFactory;
-
-public:
- explicit BlackBerryDeployStep(ProjectExplorer::BuildStepList *bsl);
- ~BlackBerryDeployStep();
-
- bool init();
- void run(QFutureInterface<bool> &fi);
- void cleanup();
-
- ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
-
-protected:
- BlackBerryDeployStep(ProjectExplorer::BuildStepList *bsl, BlackBerryDeployStep *bs);
-
- void processStarted(const ProjectExplorer::ProcessParameters &params);
-
-private:
- QString deviceHost() const;
- QString password() const;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEPLOYSTEP_H
diff --git a/src/plugins/qnx/blackberrydeploystepconfigwidget.cpp b/src/plugins/qnx/blackberrydeploystepconfigwidget.cpp
deleted file mode 100644
index 449be7550c..0000000000
--- a/src/plugins/qnx/blackberrydeploystepconfigwidget.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeploystepconfigwidget.h"
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryDeployStepConfigWidget::BlackBerryDeployStepConfigWidget()
- : ProjectExplorer::BuildStepConfigWidget()
-{
-}
-
-QString BlackBerryDeployStepConfigWidget::summaryText() const
-{
- return displayName();
-}
-
-QString BlackBerryDeployStepConfigWidget::displayName() const
-{
- return tr("<b>Deploy packages</b>");
-}
-
-bool BlackBerryDeployStepConfigWidget::showWidget() const
-{
- return false;
-}
diff --git a/src/plugins/qnx/blackberrydeploystepconfigwidget.h b/src/plugins/qnx/blackberrydeploystepconfigwidget.h
deleted file mode 100644
index 5f4d390b42..0000000000
--- a/src/plugins/qnx/blackberrydeploystepconfigwidget.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEPLOYSTEPCONFIGWIDGET_H
-#define QNX_INTERNAL_BLACKBERRYDEPLOYSTEPCONFIGWIDGET_H
-
-#include <projectexplorer/buildstep.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeployStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
-{
- Q_OBJECT
-public:
- explicit BlackBerryDeployStepConfigWidget();
-
- QString summaryText() const;
- QString displayName() const;
-
- bool showWidget() const;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEPLOYSTEPCONFIGWIDGET_H
diff --git a/src/plugins/qnx/blackberrydeploystepfactory.cpp b/src/plugins/qnx/blackberrydeploystepfactory.cpp
deleted file mode 100644
index 6f8fd6118c..0000000000
--- a/src/plugins/qnx/blackberrydeploystepfactory.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeploystepfactory.h"
-#include "qnxconstants.h"
-#include "blackberrydeploystep.h"
-#include "blackberrydeviceconfigurationfactory.h"
-
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/kitinformation.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryDeployStepFactory::BlackBerryDeployStepFactory()
-{
-}
-
-QList<Core::Id> BlackBerryDeployStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
-{
- if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- return QList<Core::Id>();
-
- Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->target()->kit());
- if (deviceType != BlackBerryDeviceConfigurationFactory::deviceType())
- return QList<Core::Id>();
-
- return QList<Core::Id>() << Core::Id(Constants::QNX_DEPLOY_PACKAGE_BS_ID);
-}
-
-QString BlackBerryDeployStepFactory::displayNameForId(Core::Id id) const
-{
- if (id == Constants::QNX_DEPLOY_PACKAGE_BS_ID)
- return tr("Deploy Package");
- return QString();
-}
-
-bool BlackBerryDeployStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, Core::Id id) const
-{
- return availableCreationIds(parent).contains(id);
-}
-
-ProjectExplorer::BuildStep *BlackBerryDeployStepFactory::create(ProjectExplorer::BuildStepList *parent,
- const Core::Id id)
-{
- if (!canCreate(parent, id))
- return 0;
- return new BlackBerryDeployStep(parent);
-}
-
-bool BlackBerryDeployStepFactory::canRestore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map) const
-{
- return canCreate(parent, ProjectExplorer::idFromMap(map));
-}
-
-ProjectExplorer::BuildStep *BlackBerryDeployStepFactory::restore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map)
-{
- if (!canRestore(parent, map))
- return 0;
- BlackBerryDeployStep *bs = new BlackBerryDeployStep(parent);
- if (bs->fromMap(map))
- return bs;
- delete bs;
- return 0;
-}
-
-bool BlackBerryDeployStepFactory::canClone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product) const
-{
- return canCreate(parent, product->id());
-}
-
-ProjectExplorer::BuildStep *BlackBerryDeployStepFactory::clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product)
-{
- if (!canClone(parent, product))
- return 0;
- return new BlackBerryDeployStep(parent, static_cast<BlackBerryDeployStep *>(product));
-}
diff --git a/src/plugins/qnx/blackberrydeploystepfactory.h b/src/plugins/qnx/blackberrydeploystepfactory.h
deleted file mode 100644
index 73307de7d1..0000000000
--- a/src/plugins/qnx/blackberrydeploystepfactory.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEPLOYSTEPFACTORY_H
-#define QNX_INTERNAL_BLACKBERRYDEPLOYSTEPFACTORY_H
-
-#include <projectexplorer/buildstep.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeployStepFactory : public ProjectExplorer::IBuildStepFactory
-{
- Q_OBJECT
-public:
- BlackBerryDeployStepFactory();
-
- QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- QString displayNameForId(Core::Id id) const;
-
- bool canCreate(ProjectExplorer::BuildStepList *parent, Core::Id id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, Core::Id id);
-
- bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
- ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map);
-
- bool canClone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product) const;
- ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEPLOYSTEPFACTORY_H
diff --git a/src/plugins/qnx/blackberrydeviceconfiguration.cpp b/src/plugins/qnx/blackberrydeviceconfiguration.cpp
deleted file mode 100644
index 07e3efae5e..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfiguration.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeviceconfiguration.h"
-
-#include "qnxconstants.h"
-#include "qnxdeviceprocesssignaloperation.h"
-#include "qnxdeployqtlibrariesdialog.h"
-#include "blackberrydeviceconfigurationwidget.h"
-#include "blackberrydeviceconnectionmanager.h"
-#include "qnxdeviceprocesslist.h"
-
-#include <projectexplorer/kitinformation.h>
-#include <ssh/sshconnection.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-using namespace ProjectExplorer;
-
-namespace {
-const char ConnectToDeviceActionId[] = "Qnx.BlackBerry.ConnectToDeviceAction";
-const char DisconnectFromDeviceActionId[] = "Qnx.BlackBerry.DisconnectFromDeviceAction";
-const char DeployQtLibrariesActionId[] = "Qnx.BlackBerry.DeployQtLibrariesAction";
-}
-
-BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration()
- : RemoteLinux::LinuxDevice()
-{
-}
-
-BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const QString &name, Core::Id type,
- IDevice::MachineType machineType,
- IDevice::Origin origin, Core::Id id)
- : RemoteLinux::LinuxDevice(name, type, machineType, origin, id)
-{
-}
-
-BlackBerryDeviceConfiguration::BlackBerryDeviceConfiguration(const BlackBerryDeviceConfiguration &other)
- : RemoteLinux::LinuxDevice(other)
- , m_debugToken(other.m_debugToken)
-{
-}
-
-BlackBerryDeviceConfiguration::Ptr BlackBerryDeviceConfiguration::create()
-{
- return Ptr(new BlackBerryDeviceConfiguration);
-}
-
-BlackBerryDeviceConfiguration::Ptr BlackBerryDeviceConfiguration::create(const QString &name, Core::Id type,
- IDevice::MachineType machineType,
- IDevice::Origin origin, Core::Id id)
-{
- return Ptr(new BlackBerryDeviceConfiguration(name, type, machineType, origin, id));
-}
-
-QString BlackBerryDeviceConfiguration::debugToken() const
-{
- return m_debugToken;
-}
-
-void BlackBerryDeviceConfiguration::setDebugToken(const QString &debugToken)
-{
- m_debugToken = debugToken;
-}
-
-void BlackBerryDeviceConfiguration::fromMap(const QVariantMap &map)
-{
- RemoteLinux::LinuxDevice::fromMap(map);
- m_debugToken = map.value(QLatin1String(Constants::QNX_DEBUG_TOKEN_KEY)).toString();
-}
-
-IDevice::Ptr BlackBerryDeviceConfiguration::clone() const
-{
- return Ptr(new BlackBerryDeviceConfiguration(*this));
-}
-
-bool BlackBerryDeviceConfiguration::hasDeviceTester() const
-{
- // we are unable to easily verify that a device is available unless we duplicate
- // 'Connect to device' functionality, therefore disabling device-tester
- return false;
-}
-
-BlackBerryDeviceConfiguration::ConstPtr BlackBerryDeviceConfiguration::device(const Kit *k)
-{
- IDevice::ConstPtr dev = DeviceKitInformation::device(k);
- return dev.dynamicCast<const BlackBerryDeviceConfiguration>();
-}
-
-QString BlackBerryDeviceConfiguration::displayType() const
-{
- return tr("BlackBerry");
-}
-
-IDeviceWidget *BlackBerryDeviceConfiguration::createWidget()
-{
- return new BlackBerryDeviceConfigurationWidget(sharedFromThis()
- .staticCast<BlackBerryDeviceConfiguration>());
-}
-
-QList<Core::Id> BlackBerryDeviceConfiguration::actionIds() const
-{
- return QList<Core::Id>() << Core::Id(ConnectToDeviceActionId)
- << Core::Id(DisconnectFromDeviceActionId)
- << Core::Id(DeployQtLibrariesActionId);
-}
-
-QString BlackBerryDeviceConfiguration::displayNameForActionId(Core::Id actionId) const
-{
- if (actionId == Core::Id(ConnectToDeviceActionId))
- return tr("Connect to device");
- else if (actionId == Core::Id(DisconnectFromDeviceActionId))
- return tr("Disconnect from device");
- else if (actionId == Core::Id(DeployQtLibrariesActionId))
- return tr("Deploy Qt libraries...");
-
- return QString();
-}
-
-void BlackBerryDeviceConfiguration::executeAction(Core::Id actionId, QWidget *parent)
-{
- Q_UNUSED(parent);
-
- const BlackBerryDeviceConfiguration::ConstPtr device =
- sharedFromThis().staticCast<const BlackBerryDeviceConfiguration>();
-
- BlackBerryDeviceConnectionManager *connectionManager =
- BlackBerryDeviceConnectionManager::instance();
- if (actionId == Core::Id(ConnectToDeviceActionId)) {
- connectionManager->connectDevice(device);
- } else if (actionId == Core::Id(DisconnectFromDeviceActionId)
- && connectionManager->isConnected(id())) {
- connectionManager->disconnectDevice(device);
- } else if (actionId == Core::Id(DeployQtLibrariesActionId)) {
- QnxDeployQtLibrariesDialog dialog(device, QnxDeployQtLibrariesDialog::BB10, parent);
- dialog.exec();
- }
-}
-
-QVariantMap BlackBerryDeviceConfiguration::toMap() const
-{
- QVariantMap map = RemoteLinux::LinuxDevice::toMap();
- map.insert(QLatin1String(Constants::QNX_DEBUG_TOKEN_KEY), m_debugToken);
- return map;
-}
-
-DeviceProcessList *BlackBerryDeviceConfiguration::createProcessListModel(QObject *parent) const
-{
- return new QnxDeviceProcessList(sharedFromThis(), parent);
-}
-
-DeviceProcessSignalOperation::Ptr BlackBerryDeviceConfiguration::signalOperation() const
-{
- return DeviceProcessSignalOperation::Ptr(
- new BlackBerryDeviceProcessSignalOperation(sshParameters()));
-}
diff --git a/src/plugins/qnx/blackberrydeviceconfiguration.h b/src/plugins/qnx/blackberrydeviceconfiguration.h
deleted file mode 100644
index 6ef38f4ef7..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfiguration.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATION_H
-#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATION_H
-
-#include <remotelinux/linuxdevice.h>
-
-namespace ProjectExplorer { class Kit; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeviceConfiguration : public RemoteLinux::LinuxDevice
-{
- Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryDeviceConfiguration)
-public:
- typedef QSharedPointer<BlackBerryDeviceConfiguration> Ptr;
- typedef QSharedPointer<const BlackBerryDeviceConfiguration> ConstPtr;
-
-
- static Ptr create();
- static Ptr create(const QString &name, Core::Id type, MachineType machineType,
- Origin origin = ManuallyAdded, Core::Id id = Core::Id());
-
- QString debugToken() const;
- void setDebugToken(const QString &debugToken);
-
- void fromMap(const QVariantMap &map);
-
- QString displayType() const;
- ProjectExplorer::IDeviceWidget *createWidget();
- QList<Core::Id> actionIds() const;
- QString displayNameForActionId(Core::Id actionId) const;
- void executeAction(Core::Id actionId, QWidget *parent);
- ProjectExplorer::IDevice::Ptr clone() const;
- ProjectExplorer::DeviceProcessList *createProcessListModel(QObject *parent) const;
- bool hasDeviceTester() const;
- ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const;
-
- static ConstPtr device(const ProjectExplorer::Kit *k);
-
-protected:
- BlackBerryDeviceConfiguration();
- BlackBerryDeviceConfiguration(const QString &name, Core::Id type, MachineType machineType,
- Origin origin, Core::Id id);
- BlackBerryDeviceConfiguration(const BlackBerryDeviceConfiguration &other);
-
- QVariantMap toMap() const;
-
-private:
- QString m_debugToken;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATION_H
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationfactory.cpp b/src/plugins/qnx/blackberrydeviceconfigurationfactory.cpp
deleted file mode 100644
index 61585b61f5..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationfactory.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeviceconfigurationfactory.h"
-
-#include "qnxconstants.h"
-#include "blackberrydeviceconfigurationwizard.h"
-#include "blackberrydeviceconfiguration.h"
-
-#include <utils/qtcassert.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryDeviceConfigurationFactory::BlackBerryDeviceConfigurationFactory(QObject *parent) :
- ProjectExplorer::IDeviceFactory(parent)
-{
-}
-
-QString BlackBerryDeviceConfigurationFactory::displayNameForId(Core::Id type) const
-{
- Q_UNUSED(type);
- return tr("BlackBerry Device");
-}
-
-QList<Core::Id> BlackBerryDeviceConfigurationFactory::availableCreationIds() const
-{
- QList<Core::Id> result;
- result << Core::Id(Constants::QNX_BB_OS_TYPE);
- return result;
-}
-
-bool BlackBerryDeviceConfigurationFactory::canCreate() const
-{
- return true;
-}
-
-ProjectExplorer::IDevice::Ptr BlackBerryDeviceConfigurationFactory::create(Core::Id id) const
-{
- Q_UNUSED(id);
- BlackBerryDeviceConfigurationWizard wizard;
- if (wizard.exec() != QDialog::Accepted)
- return ProjectExplorer::IDevice::Ptr();
- return wizard.device();
-}
-
-bool BlackBerryDeviceConfigurationFactory::canRestore(const QVariantMap &map) const
-{
- return ProjectExplorer::IDevice::typeFromMap(map) == Constants::QNX_BB_OS_TYPE;
-}
-
-ProjectExplorer::IDevice::Ptr BlackBerryDeviceConfigurationFactory::restore(const QVariantMap &map) const
-{
- QTC_ASSERT(canRestore(map), return BlackBerryDeviceConfiguration::Ptr());
- const BlackBerryDeviceConfiguration::Ptr device = BlackBerryDeviceConfiguration::create();
- device->fromMap(map);
- return device;
-}
-
-Core::Id BlackBerryDeviceConfigurationFactory::deviceType()
-{
- return Core::Id(Constants::QNX_BB_OS_TYPE);
-}
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationfactory.h b/src/plugins/qnx/blackberrydeviceconfigurationfactory.h
deleted file mode 100644
index 67067f488d..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationfactory.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONFACTORY_H
-#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONFACTORY_H
-
-#include <projectexplorer/devicesupport/idevicefactory.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeviceConfigurationFactory : public ProjectExplorer::IDeviceFactory
-{
- Q_OBJECT
-public:
- explicit BlackBerryDeviceConfigurationFactory(QObject *parent = 0);
-
- QString displayNameForId(Core::Id type) const;
- QList<Core::Id> availableCreationIds() const;
-
- bool canCreate() const;
- ProjectExplorer::IDevice::Ptr create(Core::Id id) const;
-
- bool canRestore(const QVariantMap &map) const;
- ProjectExplorer::IDevice::Ptr restore(const QVariantMap &map) const;
-
- static Core::Id deviceType();
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONFACTORY_H
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp b/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp
deleted file mode 100644
index 48da7658b4..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwidget.cpp
+++ /dev/null
@@ -1,296 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeviceconfigurationwidget.h"
-#include "blackberrydebugtokenuploader.h"
-#include "blackberrydebugtokenrequestdialog.h"
-#include "ui_blackberrydeviceconfigurationwidget.h"
-#include "blackberrydeviceconnectionmanager.h"
-#include "blackberrysigningutils.h"
-#include "blackberrydebugtokenreader.h"
-#include "qnxconstants.h"
-#include "qnxutils.h"
-
-#include <ssh/sshconnection.h>
-#include <texteditor/texteditorsettings.h>
-#include <texteditor/fontsettings.h>
-#include <utils/pathchooser.h>
-#include <utils/fancylineedit.h>
-
-#include <QProgressDialog>
-#include <QMessageBox>
-#include <QFileInfo>
-#include <QFileDialog>
-#include <QDir>
-#include <QAbstractButton>
-
-using namespace ProjectExplorer;
-using namespace Qnx::Internal;
-
-BlackBerryDeviceConfigurationWidget::BlackBerryDeviceConfigurationWidget(const IDevice::Ptr &device, QWidget *parent) :
- IDeviceWidget(device, parent),
- ui(new Ui::BlackBerryDeviceConfigurationWidget),
- progressDialog(new QProgressDialog(this)),
- uploader(new BlackBerryDebugTokenUploader(this)),
- m_utils(BlackBerrySigningUtils::instance())
-{
- ui->setupUi(this);
-
- ui->connectionLog->setFont(TextEditor::TextEditorSettings::fontSettings().font());
-
- populateDebugTokenCombo(deviceConfiguration()->debugToken());
-
- connect(ui->hostLineEdit, SIGNAL(editingFinished()), this, SLOT(hostNameEditingFinished()));
- connect(ui->pwdLineEdit, SIGNAL(editingFinished()), this, SLOT(passwordEditingFinished()));
- connect(ui->keyFileLineEdit, SIGNAL(editingFinished()), this, SLOT(keyFileEditingFinished()));
- connect(ui->keyFileLineEdit, SIGNAL(browsingFinished()), this, SLOT(keyFileEditingFinished()));
- connect(ui->showPasswordCheckBox, SIGNAL(toggled(bool)), this, SLOT(showPassword(bool)));
- connect(ui->debugToken, SIGNAL(currentTextChanged(QString)), this, SLOT(updateUploadButton()));
- connect(ui->debugToken, SIGNAL(currentTextChanged(QString)), this, SLOT(debugTokenEditingFinished()));
- connect(uploader, SIGNAL(finished(int)), this, SLOT(uploadFinished(int)));
-
- connect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(connectionOutput(Core::Id,QString)),
- this, SLOT(appendConnectionLog(Core::Id,QString)));
- connect(BlackBerryDeviceConnectionManager::instance(), SIGNAL(deviceAboutToConnect(Core::Id)),
- this, SLOT(clearConnectionLog(Core::Id)));
-
- connect(ui->importButton, SIGNAL(clicked()), this, SLOT(importDebugToken()));
- connect(ui->requestButton, SIGNAL(clicked()), this, SLOT(requestDebugToken()));
- connect(ui->uploadButton, SIGNAL(clicked()), this, SLOT(uploadDebugToken()));
-
- connect(&m_utils, SIGNAL(debugTokenListChanged()), this, SLOT(updateDebugTokenCombo()));
-
- initGui();
-}
-
-BlackBerryDeviceConfigurationWidget::~BlackBerryDeviceConfigurationWidget()
-{
- m_utils.saveDebugTokens();
- delete ui;
-}
-
-void BlackBerryDeviceConfigurationWidget::hostNameEditingFinished()
-{
- QSsh::SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
- sshParams.host = ui->hostLineEdit->text();
- deviceConfiguration()->setSshParameters(sshParams);
-}
-
-void BlackBerryDeviceConfigurationWidget::passwordEditingFinished()
-{
- QSsh::SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
- sshParams.password = ui->pwdLineEdit->text();
- deviceConfiguration()->setSshParameters(sshParams);
-}
-
-void BlackBerryDeviceConfigurationWidget::keyFileEditingFinished()
-{
- QSsh::SshConnectionParameters sshParams = deviceConfiguration()->sshParameters();
- sshParams.privateKeyFile = ui->keyFileLineEdit->path();
- deviceConfiguration()->setSshParameters(sshParams);
-}
-
-void BlackBerryDeviceConfigurationWidget::showPassword(bool showClearText)
-{
- ui->pwdLineEdit->setEchoMode(showClearText
- ? QLineEdit::Normal : QLineEdit::Password);
-}
-
-void BlackBerryDeviceConfigurationWidget::debugTokenEditingFinished()
-{
- deviceConfiguration()->setDebugToken(ui->debugToken->currentText());
-}
-
-void BlackBerryDeviceConfigurationWidget::importDebugToken()
-{
- const QString debugToken = QFileDialog::getOpenFileName(this, tr("Select Debug Token"),
- QString(), tr("BAR file (*.bar)"));
-
- if (debugToken.isEmpty())
- return;
-
- BlackBerryDebugTokenReader debugTokenReader(debugToken);
- if (!debugTokenReader.isValid()) {
- QMessageBox::warning(this, tr("Invalid Debug Token"),
- tr("Debug token file %1 cannot be read.").arg(debugToken));
- return;
- }
-
- m_utils.addDebugToken(debugToken);
- populateDebugTokenCombo(debugToken);
- debugTokenEditingFinished();
-}
-
-void BlackBerryDeviceConfigurationWidget::requestDebugToken()
-{
- BlackBerryDebugTokenRequestDialog dialog;
-
- if (!ui->hostLineEdit->text().isEmpty() && !ui->pwdLineEdit->text().isEmpty())
- dialog.setTargetDetails(ui->hostLineEdit->text(), ui->pwdLineEdit->text());
-
- const int result = dialog.exec();
-
- if (result != QDialog::Accepted)
- return;
-
- m_utils.addDebugToken(dialog.debugToken());
- populateDebugTokenCombo(dialog.debugToken());
- debugTokenEditingFinished();
-}
-
-void BlackBerryDeviceConfigurationWidget::uploadDebugToken()
-{
- // check the debug token path before even laucnhing the uploader process
- if (!QFileInfo::exists(ui->debugToken->currentText())) {
- QMessageBox::critical(this, tr("Error"), tr("Invalid debug token path."));
- return;
- }
-
- progressDialog->show();
-
- uploader->uploadDebugToken(ui->debugToken->currentText(),
- ui->hostLineEdit->text(), ui->pwdLineEdit->text());
-}
-
-void BlackBerryDeviceConfigurationWidget::updateUploadButton()
-{
- const QString path = ui->debugToken->currentText();
- ui->uploadButton->setEnabled(QFileInfo::exists(path));
-}
-
-void BlackBerryDeviceConfigurationWidget::uploadFinished(int status)
-{
- progressDialog->hide();
-
- QString errorString = tr("Failed to upload debug token:") + QLatin1Char(' ');
-
- switch (status) {
- case BlackBerryDebugTokenUploader::Success:
- QMessageBox::information(this, tr("Qt Creator"), tr("Debug token successfully uploaded."));
- 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);
-}
-
-void BlackBerryDeviceConfigurationWidget::appendConnectionLog(Core::Id deviceId, const QString &line)
-{
- if (deviceId == device()->id())
- ui->connectionLog->appendPlainText(line.trimmed());
-}
-
-void BlackBerryDeviceConfigurationWidget::clearConnectionLog(Core::Id deviceId)
-{
- if (deviceId == device()->id())
- ui->connectionLog->clear();
-}
-
-void BlackBerryDeviceConfigurationWidget::populateDebugTokenCombo(const QString& current)
-{
- ui->debugToken->clear();
- ui->debugToken->addItems(m_utils.debugTokens());
- ui->debugToken->setEditText(current);
-}
-
-void BlackBerryDeviceConfigurationWidget::updateDebugTokenCombo()
-{
- populateDebugTokenCombo(ui->debugToken->currentText());
-}
-
-void BlackBerryDeviceConfigurationWidget::updateDeviceFromUi()
-{
- hostNameEditingFinished();
- passwordEditingFinished();
- keyFileEditingFinished();
- debugTokenEditingFinished();
-}
-
-void BlackBerryDeviceConfigurationWidget::initGui()
-{
- ui->keyFileLineEdit->setExpectedKind(Utils::PathChooser::File);
- ui->keyFileLineEdit->setHistoryCompleter(QLatin1String("BB.Key.History"));
- ui->keyFileLineEdit->lineEdit()->setMinimumWidth(0);
-
- const QSsh::SshConnectionParameters &sshParams = deviceConfiguration()->sshParameters();
-
- ui->hostLineEdit->setEnabled(!deviceConfiguration()->isAutoDetected());
-
- ui->hostLineEdit->setText(sshParams.host);
- ui->pwdLineEdit->setText(sshParams.password);
- ui->keyFileLineEdit->setPath(sshParams.privateKeyFile);
- ui->showPasswordCheckBox->setChecked(false);
- if (deviceConfiguration()->machineType() == IDevice::Emulator) {
- ui->debugToken->setEnabled(false);
- ui->requestButton->setEnabled(false);
- ui->uploadButton->setEnabled(false);
- ui->debugTokenLabel->setEnabled(false);
- }
-
- progressDialog->setWindowModality(Qt::WindowModal);
- progressDialog->setWindowTitle(tr("Operation in Progress"));
- progressDialog->setCancelButton(0);
- progressDialog->setLabelText(tr("Uploading debug token"));
- progressDialog->setMinimum(0);
- progressDialog->setMaximum(0);
-
- ui->connectionLog->setPlainText(BlackBerryDeviceConnectionManager::instance()->connectionLog(device()->id()).trimmed());
-}
-
-BlackBerryDeviceConfiguration::Ptr BlackBerryDeviceConfigurationWidget::deviceConfiguration() const
-{
- return device().dynamicCast<BlackBerryDeviceConfiguration>();
-}
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwidget.h b/src/plugins/qnx/blackberrydeviceconfigurationwidget.h
deleted file mode 100644
index 2ee33f405c..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwidget.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIDGET_H
-#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIDGET_H
-
-#include <projectexplorer/devicesupport/idevicewidget.h>
-
-#include "blackberrydeviceconfiguration.h"
-
-QT_BEGIN_NAMESPACE
-class QProgressDialog;
-class QAbstractButton;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDebugTokenUploader;
-class BlackBerrySigningUtils;
-
-namespace Ui { class BlackBerryDeviceConfigurationWidget; }
-
-class BlackBerryDeviceConfigurationWidget : public ProjectExplorer::IDeviceWidget
-{
- Q_OBJECT
-
-public:
- explicit BlackBerryDeviceConfigurationWidget(const ProjectExplorer::IDevice::Ptr &device,
- QWidget *parent = 0);
- ~BlackBerryDeviceConfigurationWidget();
-
-private slots:
- void hostNameEditingFinished();
- void passwordEditingFinished();
- void keyFileEditingFinished();
- void showPassword(bool showClearText);
- void debugTokenEditingFinished();
- void importDebugToken();
- void requestDebugToken();
- void uploadDebugToken();
- void updateUploadButton();
- void uploadFinished(int status);
- void appendConnectionLog(Core::Id deviceId, const QString &line);
- void clearConnectionLog(Core::Id deviceId);
- void populateDebugTokenCombo(const QString &current);
- void updateDebugTokenCombo();
-
-private:
- void updateDeviceFromUi();
- void initGui();
-
- BlackBerryDeviceConfiguration::Ptr deviceConfiguration() const;
-
- Ui::BlackBerryDeviceConfigurationWidget *ui;
- QAbstractButton *uploadButton;
-
- QProgressDialog *progressDialog;
-
- BlackBerryDebugTokenUploader *uploader;
- BlackBerrySigningUtils &m_utils;
-};
-
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIDGET_H
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwidget.ui b/src/plugins/qnx/blackberrydeviceconfigurationwidget.ui
deleted file mode 100644
index 1bcbf8e1b1..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwidget.ui
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryDeviceConfigurationWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryDeviceConfigurationWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>458</width>
- <height>308</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="hostNameLabel">
- <property name="text">
- <string>&amp;Device name:</string>
- </property>
- <property name="buddy">
- <cstring>hostLineEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="hostLineEdit">
- <property name="placeholderText">
- <string>IP or host name of the device</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="passwordLabel">
- <property name="text">
- <string>Device &amp;password:</string>
- </property>
- <property name="buddy">
- <cstring>pwdLineEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
- <widget class="QLineEdit" name="pwdLineEdit">
- <property name="echoMode">
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="showPasswordCheckBox">
- <property name="text">
- <string>Show password</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="debugTokenLabel">
- <property name="text">
- <string>Debug token:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="keyLabel">
- <property name="text">
- <string>Private key file:</string>
- </property>
- <property name="buddy">
- <cstring>keyFileLineEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="Utils::PathChooser" name="keyFileLineEdit" native="true"/>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Connection log:</string>
- </property>
- <property name="buddy">
- <cstring>connectionLog</cstring>
- </property>
- </widget>
- </item>
- <item row="7" column="0" colspan="2">
- <widget class="QPlainTextEdit" name="connectionLog">
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <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>
- <item>
- <widget class="QPushButton" name="importButton">
- <property name="text">
- <string>Import</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="requestButton">
- <property name="text">
- <string>Request</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="uploadButton">
- <property name="text">
- <string>Upload</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="1">
- <widget class="QComboBox" name="debugToken">
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- <zorder>keyFileLineEdit</zorder>
- <zorder>hostNameLabel</zorder>
- <zorder>hostLineEdit</zorder>
- <zorder>passwordLabel</zorder>
- <zorder>keyLabel</zorder>
- <zorder>debugTokenLabel</zorder>
- <zorder>label</zorder>
- <zorder>connectionLog</zorder>
- <zorder>debugToken</zorder>
- </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>hostLineEdit</tabstop>
- <tabstop>pwdLineEdit</tabstop>
- <tabstop>showPasswordCheckBox</tabstop>
- <tabstop>requestButton</tabstop>
- <tabstop>uploadButton</tabstop>
- <tabstop>connectionLog</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwizard.cpp b/src/plugins/qnx/blackberrydeviceconfigurationwizard.cpp
deleted file mode 100644
index dc3d1eb12f..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwizard.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeviceconfigurationwizard.h"
-#include "blackberrydeviceconfigurationwizardpages.h"
-#include "qnxconstants.h"
-#include "blackberrydeviceconfiguration.h"
-#include "blackberrydeviceconnectionmanager.h"
-
-#include <ssh/sshconnection.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryDeviceConfigurationWizard::BlackBerryDeviceConfigurationWizard(QWidget *parent) :
- Utils::Wizard(parent)
-{
- setWindowTitle(tr("New BlackBerry Device Configuration Setup"));
-
- m_setupPage = new BlackBerryDeviceConfigurationWizardSetupPage(this);
- m_queryPage = new BlackBerryDeviceConfigurationWizardQueryPage(m_holder, this);
- m_configPage = new BlackBerryDeviceConfigurationWizardConfigPage(m_holder, this);
- m_finalPage = new BlackBerryDeviceConfigurationWizardFinalPage(this);
-
- setPage(SetupPageId, m_setupPage);
- setPage(QueryPageId, m_queryPage);
- setPage(ConfigPageId, m_configPage);
- setPage(FinalPageId, m_finalPage);
- m_finalPage->setCommitPage(true);
-}
-
-ProjectExplorer::IDevice::Ptr BlackBerryDeviceConfigurationWizard::device()
-{
- QSsh::SshConnectionParameters sshParams;
- sshParams.options = QSsh::SshIgnoreDefaultProxy;
- sshParams.host = m_setupPage->hostName();
- sshParams.password = m_setupPage->password();
- sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationTypePublicKey;
- sshParams.privateKeyFile = BlackBerryDeviceConnectionManager::instance()->privateKeyPath();
- sshParams.userName = QLatin1String("devuser");
- sshParams.timeout = 10;
- sshParams.port = 22;
-
- BlackBerryDeviceConfiguration::Ptr configuration = BlackBerryDeviceConfiguration::create(
- m_configPage->configurationName(),
- Core::Id(Constants::QNX_BB_OS_TYPE),
- m_holder.isSimulator
- ? ProjectExplorer::IDevice::Emulator
- : ProjectExplorer::IDevice::Hardware);
- configuration->setSshParameters(sshParams);
- configuration->setDebugToken(m_configPage->debugToken());
- return configuration;
-}
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwizard.h b/src/plugins/qnx/blackberrydeviceconfigurationwizard.h
deleted file mode 100644
index d080b81681..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwizard.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H
-#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H
-
-#include "blackberrydeviceconfigurationwizardpages.h"
-
-#include <projectexplorer/devicesupport/idevice.h>
-#include <utils/wizard.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeviceConfigurationWizard : public Utils::Wizard
-{
- Q_OBJECT
-public:
- explicit BlackBerryDeviceConfigurationWizard(QWidget *parent = 0);
-
- ProjectExplorer::IDevice::Ptr device();
-
-private:
- enum PageId {
- SetupPageId,
- QueryPageId,
- ConfigPageId,
- FinalPageId
- };
-
- BlackBerryDeviceConfigurationWizardSetupPage *m_setupPage;
- BlackBerryDeviceConfigurationWizardQueryPage *m_queryPage;
- BlackBerryDeviceConfigurationWizardConfigPage *m_configPage;
- BlackBerryDeviceConfigurationWizardFinalPage *m_finalPage;
-
- BlackBerryDeviceConfigurationWizardHolder m_holder;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARD_H
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwizardconfigpage.ui b/src/plugins/qnx/blackberrydeviceconfigurationwizardconfigpage.ui
deleted file mode 100644
index a021d859f8..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwizardconfigpage.ui
+++ /dev/null
@@ -1,157 +0,0 @@
-<?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="3">
- <widget class="QPushButton" name="generateButton">
- <property name="text">
- <string>Generate</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QComboBox" name="debugTokenCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="editable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="4" column="0" colspan="4">
- <widget class="QLabel" name="label_3">
- <property name="font">
- <font>
- <italic>true</italic>
- </font>
- </property>
- <property name="text">
- <string>Debug token is needed for deploying applications to BlackBerry devices.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QPushButton" name="importButton">
- <property name="text">
- <string>Import</string>
- </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 or IP address:</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>
- <tabstops>
- <tabstop>generateButton</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp b/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp
deleted file mode 100644
index 49898e35a2..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.cpp
+++ /dev/null
@@ -1,458 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeviceconfigurationwizardpages.h"
-#include "blackberrydebugtokenrequestdialog.h"
-#include "blackberrydebugtokenreader.h"
-#include "blackberrysshkeysgenerator.h"
-#include "blackberrydeviceinformation.h"
-#include "ui_blackberrydeviceconfigurationwizardsetuppage.h"
-#include "ui_blackberrydeviceconfigurationwizardquerypage.h"
-#include "ui_blackberrydeviceconfigurationwizardconfigpage.h"
-#include "blackberrydeviceconnectionmanager.h"
-#include "blackberrysigningutils.h"
-#include "qnxutils.h"
-
-#include <coreplugin/icore.h>
-#include <ssh/sshkeygenerator.h>
-
-#include <QDir>
-#include <QFormLayout>
-#include <QMessageBox>
-#include <QFileDialog>
-#include <QFileInfo>
-#include <QHostInfo>
-#include <QAbstractItemModel>
-
-using namespace ProjectExplorer;
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-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
-{
- ItemKindRole = Qt::UserRole, DeviceNameRole, DeviceIpRole, DeviceTypeRole
-};
-}
-
-BlackBerryDeviceConfigurationWizardSetupPage::BlackBerryDeviceConfigurationWizardSetupPage(QWidget *parent)
- : QWizardPage(parent)
- , m_ui(new Ui::BlackBerryDeviceConfigurationWizardSetupPage)
- , m_deviceListDetector(new BlackBerryDeviceListDetector(this))
-
-{
- m_ui->setupUi(this);
- setTitle(tr("Connection"));
-
- connect(m_ui->deviceListWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onDeviceSelectionChanged()));
- connect(m_deviceListDetector, SIGNAL(deviceDetected(QString,QString,bool)),
- this, SLOT(onDeviceDetected(QString,QString,bool)));
- connect(m_deviceListDetector, SIGNAL(finished()), this, SLOT(onDeviceListDetectorFinished()));
- connect(m_ui->deviceHostIp, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged()));
-
- registerField(QLatin1String(DEVICEHOSTNAME_FIELD_ID), m_ui->deviceHostIp);
- registerField(QLatin1String(DEVICEPASSWORD_FIELD_ID), m_ui->password);
-}
-
-BlackBerryDeviceConfigurationWizardSetupPage::~BlackBerryDeviceConfigurationWizardSetupPage()
-{
- delete m_ui;
- m_ui = 0;
-}
-
-void BlackBerryDeviceConfigurationWizardSetupPage::initializePage()
-{
- m_ui->password->clear();
- refreshDeviceList();
-}
-
-void BlackBerryDeviceConfigurationWizardSetupPage::refreshDeviceList()
-{
- m_ui->deviceListWidget->clear();
-
- QListWidgetItem *manual = createDeviceListItem(tr("Specify device manually"), SpecifyManually);
- m_ui->deviceListWidget->addItem(manual);
- manual->setSelected(true);
-
- QListWidgetItem *pleaseWait =
- createDeviceListItem(tr("Auto-detecting devices - please wait..."), PleaseWait);
- m_ui->deviceListWidget->addItem(pleaseWait);
-
- m_deviceListDetector->detectDeviceList();
-}
-
-void BlackBerryDeviceConfigurationWizardSetupPage::onDeviceListDetectorFinished()
-{
- QListWidgetItem *pleaseWait = findDeviceListItem(PleaseWait);
- if (pleaseWait) {
- m_ui->deviceListWidget->removeItemWidget(pleaseWait);
- delete pleaseWait;
- }
-
- if (!findDeviceListItem(Autodetected)) {
- QListWidgetItem *note = createDeviceListItem(tr("No device has been auto-detected."), Note);
- note->setToolTip(tr("Device auto-detection is available in BB NDK 10.2. "
- "Make sure that your device is in Development Mode."));
- m_ui->deviceListWidget->addItem(note);
- }
-}
-
-void BlackBerryDeviceConfigurationWizardSetupPage::onDeviceDetected(
- const QString &deviceName, const QString &hostName, bool isSimulator)
-{
- QString displayName(deviceName);
- if (displayName != hostName)
- displayName.append(QLatin1String(" (")).append(hostName).append(QLatin1Char(')'));
-
- QListWidgetItem *device = createDeviceListItem(displayName, Autodetected);
- device->setData(DeviceNameRole, displayName);
- device->setData(DeviceIpRole, hostName);
- device->setData(DeviceTypeRole, isSimulator);
- QListWidgetItem *pleaseWait = findDeviceListItem(PleaseWait);
- int row = pleaseWait ? m_ui->deviceListWidget->row(pleaseWait) : m_ui->deviceListWidget->count();
- m_ui->deviceListWidget->insertItem(row, device);
-}
-
-void BlackBerryDeviceConfigurationWizardSetupPage::onDeviceSelectionChanged()
-{
- QList<QListWidgetItem *> selectedItems = m_ui->deviceListWidget->selectedItems();
- const QListWidgetItem *selected = selectedItems.count() == 1 ? selectedItems[0] : 0;
- const ItemKind itemKind = selected ? selected->data(ItemKindRole).value<ItemKind>() : Note;
- switch (itemKind) {
- case SpecifyManually:
- m_ui->deviceHostIp->setEnabled(true);
- m_ui->deviceHostIp->setText(QLatin1String("169.254.0.1"));
- m_ui->password->setEnabled(true);
- m_ui->deviceHostIp->selectAll();
- m_ui->deviceHostIp->setFocus();
- break;
- case Autodetected:
- m_ui->deviceHostIp->setEnabled(false);
- m_ui->deviceHostIp->setText(selected->data(DeviceIpRole).toString());
- m_ui->password->setEnabled(true);
- m_ui->password->setFocus();
- break;
- case PleaseWait:
- case Note:
- m_ui->deviceHostIp->setEnabled(false);
- m_ui->deviceHostIp->clear();
- m_ui->password->setEnabled(false);
- break;
- }
-}
-
-QListWidgetItem *BlackBerryDeviceConfigurationWizardSetupPage::createDeviceListItem(
- const QString &displayName, ItemKind itemKind) const
-{
- QListWidgetItem *item = new QListWidgetItem(displayName);
- if (itemKind == PleaseWait || itemKind == Note) {
- item->setFlags(item->flags() & ~Qt::ItemIsSelectable);
- QFont font = item->font();
- font.setItalic(true);
- item->setFont(font);
- }
- item->setData(ItemKindRole, QVariant::fromValue(itemKind));
- return item;
-}
-
-QListWidgetItem *BlackBerryDeviceConfigurationWizardSetupPage::findDeviceListItem(ItemKind itemKind) const
-{
- int count = m_ui->deviceListWidget->count();
- for (int i = 0; i < count; ++i) {
- QListWidgetItem *item = m_ui->deviceListWidget->item(i);
- if (item->data(ItemKindRole).value<ItemKind>() == itemKind)
- return item;
- }
- return 0;
-}
-
-bool BlackBerryDeviceConfigurationWizardSetupPage::isComplete() const
-{
- return !m_ui->deviceHostIp->text().isEmpty();
-}
-
-QString BlackBerryDeviceConfigurationWizardSetupPage::hostName() const
-{
- return m_ui->deviceHostIp->text();
-}
-
-QString BlackBerryDeviceConfigurationWizardSetupPage::password() const
-{
- return m_ui->password->text();
-}
-
-// ----------------------------------------------------------------------------
-
-BlackBerryDeviceConfigurationWizardQueryPage::BlackBerryDeviceConfigurationWizardQueryPage
- (BlackBerryDeviceConfigurationWizardHolder &holder, QWidget *parent)
- : QWizardPage(parent)
- , m_ui(new Ui::BlackBerryDeviceConfigurationWizardQueryPage)
- , m_holder(holder)
- , m_deviceInformation(new BlackBerryDeviceInformation(this))
-{
- m_ui->setupUi(this);
- setTitle(tr("Device Information"));
- m_ui->progressBar->setMaximum(Done);
-
- connect(m_deviceInformation,SIGNAL(finished(int)),this,SLOT(processQueryFinished(int)));
-}
-
-BlackBerryDeviceConfigurationWizardQueryPage::~BlackBerryDeviceConfigurationWizardQueryPage()
-{
- delete m_ui;
- m_ui = 0;
-}
-
-void BlackBerryDeviceConfigurationWizardQueryPage::initializePage()
-{
- m_holder.deviceInfoRetrieved = false;
-
- setState(Querying, tr("Querying device information. Please wait..."));
-
- m_deviceInformation->setDeviceTarget(
- field(QLatin1String(DEVICEHOSTNAME_FIELD_ID)).toString(),
- field(QLatin1String(DEVICEPASSWORD_FIELD_ID)).toString());
-}
-
-void BlackBerryDeviceConfigurationWizardQueryPage::processQueryFinished(int status)
-{
- m_holder.deviceInfoRetrieved = status == BlackBerryDeviceInformation::Success;
- m_holder.devicePin = m_deviceInformation->devicePin();
- m_holder.scmBundle = m_deviceInformation->scmBundle();
- m_holder.deviceName = m_deviceInformation->hostName();
- if (m_holder.deviceName.isEmpty())
- m_holder.deviceName = QLatin1String("BlackBerry at ")
- + field(QLatin1String(DEVICEHOSTNAME_FIELD_ID)).toString();
- 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();
- else
- setState(Done, tr("Cannot connect to the device. "
- "Check that the device is in development mode and has matching host name and password."));
-}
-
-void BlackBerryDeviceConfigurationWizardQueryPage::checkAndGenerateSSHKeys()
-{
- if (! BlackBerryDeviceConnectionManager::instance()->hasValidSSHKeys()) {
- setState(GeneratingSshKey, tr("Generating SSH keys. Please wait..."));
-
- BlackBerrySshKeysGenerator *sshKeysGenerator = new BlackBerrySshKeysGenerator();
- connect(sshKeysGenerator, SIGNAL(sshKeysGenerationFailed(QString)),
- this, SLOT(sshKeysGenerationFailed(QString)), Qt::QueuedConnection);
- connect(sshKeysGenerator, SIGNAL(sshKeysGenerationFinished(QByteArray,QByteArray)),
- this, SLOT(processSshKeys(QByteArray,QByteArray)), Qt::QueuedConnection);
- sshKeysGenerator->start();
- } else
- queryDone();
-}
-
-void BlackBerryDeviceConfigurationWizardQueryPage::sshKeysGenerationFailed(const QString &error)
-{
- // this slot can be called asynchronously - processing it only in GeneratingSshKey state
- if (m_state != GeneratingSshKey)
- return;
-
- QString message = tr("Failed generating SSH key needed for securing connection to a device. Error:");
- message += QLatin1Char(' ');
- message.append(error);
- setState(Done, message);
-}
-
-void BlackBerryDeviceConfigurationWizardQueryPage::processSshKeys(const QByteArray &privateKey,
- const QByteArray &publicKey)
-{
- // this slot can be called asynchronously - processing it only in GeneratingSshKey state
- if (m_state != GeneratingSshKey)
- return;
-
- // condition prevents overriding already generated SSH keys
- // this may happens when an user enter the QueryPage several times before
- // the first SSH keys are generated i.e. when multiple calls of checkAndGenerateSSHKeys()
- // before processSshKeys() is called, multiple processSshKeys() calls are triggered later.
- // only the first one is allowed to write the SSH keys.
- if (! BlackBerryDeviceConnectionManager::instance()->hasValidSSHKeys()) {
- QString error;
- if (!BlackBerryDeviceConnectionManager::instance()->setSSHKeys(privateKey, publicKey, &error)) {
- QString message = tr("Failed saving SSH key needed for securing connection to a device. Error:");
- message += QLatin1Char(' ');
- message.append(error);
- setState(Done, message);
- return;
- }
- }
-
- queryDone();
-}
-
-void BlackBerryDeviceConfigurationWizardQueryPage::queryDone()
-{
- setState(Done, tr("Device information retrieved successfully."));
-}
-
-void BlackBerryDeviceConfigurationWizardQueryPage::setState(QueryState state, const QString &message)
-{
- m_state = state;
- m_ui->statusLabel->setText(message);
- m_ui->progressBar->setVisible(state != Done);
- m_ui->progressBar->setValue(state);
- emit completeChanged();
-
- if (isComplete())
- if (wizard()->currentPage() == this)
- wizard()->next();
-}
-
-bool BlackBerryDeviceConfigurationWizardQueryPage::isComplete() const
-{
- return m_state == Done
- && m_holder.deviceInfoRetrieved
- && BlackBerryDeviceConnectionManager::instance()->hasValidSSHKeys();
-}
-
-// ----------------------------------------------------------------------------
-
-BlackBerryDeviceConfigurationWizardConfigPage::BlackBerryDeviceConfigurationWizardConfigPage
- (BlackBerryDeviceConfigurationWizardHolder &holder, QWidget *parent)
- : QWizardPage(parent)
- , m_ui(new Ui::BlackBerryDeviceConfigurationWizardConfigPage)
- , m_holder(holder)
- , m_utils(BlackBerrySigningUtils::instance())
-{
- m_ui->setupUi(this);
- setTitle(tr("Configuration"));
-
- m_ui->debugTokenCombo->addItems(m_utils.debugTokens());
-
- connect(m_ui->configurationNameField, SIGNAL(textChanged(QString)), this, SIGNAL(completeChanged()));
- connect(m_ui->debugTokenCombo, SIGNAL(currentTextChanged(QString)), this, SIGNAL(completeChanged()));
- connect(m_ui->generateButton, SIGNAL(clicked()), this, SLOT(generateDebugToken()));
- connect(m_ui->importButton, SIGNAL(clicked()), this, SLOT(importDebugToken()));
-
- registerField(QLatin1String(CONFIGURATIONNAME_FIELD_ID), m_ui->configurationNameField);
- registerField(QLatin1String(DEBUGTOKENPATH_FIELD_ID), m_ui->debugTokenCombo);
-}
-
-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->debugTokenCombo->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 = Utils::FileName::fromString(m_ui->debugTokenCombo->currentText());
- bool debugTokenComplete = m_holder.isSimulator || !m_holder.isProductionDevice
- || (!fileName.isEmpty() && fileName.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_utils.addDebugToken(dialog.debugToken());
- m_ui->debugTokenCombo->addItem(dialog.debugToken());
- const int index = m_ui->debugTokenCombo->findText(dialog.debugToken());
- if (index != -1)
- m_ui->debugTokenCombo->setCurrentIndex(index);
-}
-
-void BlackBerryDeviceConfigurationWizardConfigPage::importDebugToken()
-{
- const QString debugToken = QFileDialog::getOpenFileName(this, tr("Select Debug Token"),
- QString(), tr("BAR file (*.bar)"));
-
- if (debugToken.isEmpty())
- return;
-
- BlackBerryDebugTokenReader debugTokenReader(debugToken);
- if (!debugTokenReader.isValid()) {
- QMessageBox::warning(this, tr("Invalid Debug Token"),
- tr("Debug token file %1 cannot be read.").arg(debugToken));
- return;
- }
-
- m_utils.addDebugToken(debugToken);
- m_ui->debugTokenCombo->addItem(debugToken);
- const int index = m_ui->debugTokenCombo->findText(debugToken);
- if (index != -1)
- m_ui->debugTokenCombo->setCurrentIndex(index);
-}
-
-QString BlackBerryDeviceConfigurationWizardConfigPage::configurationName() const
-{
- return m_ui->configurationNameField->text();
-}
-
-QString BlackBerryDeviceConfigurationWizardConfigPage::debugToken() const
-{
- return m_ui->debugTokenCombo->currentText();
-}
-
-// ----------------------------------------------------------------------------
-
-BlackBerryDeviceConfigurationWizardFinalPage::BlackBerryDeviceConfigurationWizardFinalPage(QWidget *parent)
- : QWizardPage(parent)
-{
- setTitle(tr("Summary"));
-
- QVBoxLayout *layout = new QVBoxLayout(this);
- QLabel *label = new QLabel(tr("The new device configuration will be created now."), this);
- layout->addWidget(label);
-}
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.h b/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.h
deleted file mode 100644
index e5dd186320..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwizardpages.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARDPAGES_H
-#define QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARDPAGES_H
-
-#include "blackberrydevicelistdetector.h"
-
-#include <projectexplorer/devicesupport/idevice.h>
-
-#include <QWizardPage>
-#include <QListWidgetItem>
-
-namespace QSsh { class SshKeyGenerator; }
-
-namespace Qnx {
-namespace Internal {
-namespace Ui {
-class BlackBerryDeviceConfigurationWizardSetupPage;
-class BlackBerryDeviceConfigurationWizardQueryPage;
-class BlackBerryDeviceConfigurationWizardConfigPage;
-}
-class BlackBerrySshKeysGenerator;
-class BlackBerryDeviceInformation;
-class BlackBerrySigningUtils;
-
-struct BlackBerryDeviceConfigurationWizardHolder {
- QString devicePin;
- QString deviceName;
- QString scmBundle;
- QString debugTokenAuthor;
- bool isSimulator;
- bool debugTokenValid;
- bool deviceInfoRetrieved;
- bool isProductionDevice;
-
- BlackBerryDeviceConfigurationWizardHolder()
- : isSimulator(false)
- , debugTokenValid(false)
- , deviceInfoRetrieved(false)
- , isProductionDevice(true) {}
-};
-
-class BlackBerryDeviceConfigurationWizardSetupPage : public QWizardPage
-{
- Q_OBJECT
-public:
- enum ItemKind {
- SpecifyManually, Autodetected, PleaseWait, Note
- };
-
- explicit BlackBerryDeviceConfigurationWizardSetupPage(QWidget *parent = 0);
- ~BlackBerryDeviceConfigurationWizardSetupPage();
-
- void initializePage();
- bool isComplete() const;
-
- QString hostName() const;
- QString password() const;
-private slots:
- void onDeviceSelectionChanged();
- void onDeviceDetected(const QString &deviceName, const QString &hostName, bool isSimulator);
- void onDeviceListDetectorFinished();
-
-private:
- void refreshDeviceList();
- QListWidgetItem *createDeviceListItem(const QString &displayName, ItemKind itemKind) const;
- QListWidgetItem *findDeviceListItem(ItemKind itemKind) const;
-
- Ui::BlackBerryDeviceConfigurationWizardSetupPage *m_ui;
- BlackBerryDeviceListDetector *m_deviceListDetector;
-};
-
-class BlackBerryDeviceConfigurationWizardQueryPage : public QWizardPage
-{
- Q_OBJECT
- enum QueryState
- {
- Querying = 0, GeneratingSshKey, Done
- };
-
-public:
- explicit BlackBerryDeviceConfigurationWizardQueryPage(BlackBerryDeviceConfigurationWizardHolder &holder, QWidget *parent = 0);
- ~BlackBerryDeviceConfigurationWizardQueryPage();
-
- void initializePage();
- bool isComplete() const;
-
-private slots:
- void processQueryFinished(int status);
- void sshKeysGenerationFailed(const QString &error);
- void processSshKeys(const QByteArray &privateKey, const QByteArray &publicKey);
-
-private:
- void checkAndGenerateSSHKeys();
- void queryDone();
- void setState(QueryState state, const QString &message);
-
- Ui::BlackBerryDeviceConfigurationWizardQueryPage *m_ui;
- BlackBerryDeviceConfigurationWizardHolder &m_holder;
- BlackBerryDeviceInformation *m_deviceInformation;
- QueryState m_state;
-};
-
-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();
- void importDebugToken();
-
-private:
- Ui::BlackBerryDeviceConfigurationWizardConfigPage *m_ui;
- BlackBerryDeviceConfigurationWizardHolder &m_holder;
- BlackBerrySigningUtils &m_utils;
-};
-
-class BlackBerryDeviceConfigurationWizardFinalPage : public QWizardPage
-{
- Q_OBJECT
-public:
- explicit BlackBerryDeviceConfigurationWizardFinalPage(QWidget *parent = 0);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-Q_DECLARE_METATYPE(Qnx::Internal::BlackBerryDeviceConfigurationWizardSetupPage::ItemKind)
-
-#endif // QNX_INTERNAL_BLACKBERRYDEVICECONFIGURATIONWIZARDPAGES_H
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwizardquerypage.ui b/src/plugins/qnx/blackberrydeviceconfigurationwizardquerypage.ui
deleted file mode 100644
index 5286649f9d..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwizardquerypage.ui
+++ /dev/null
@@ -1,47 +0,0 @@
-<?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"/>
- </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>
diff --git a/src/plugins/qnx/blackberrydeviceconfigurationwizardsetuppage.ui b/src/plugins/qnx/blackberrydeviceconfigurationwizardsetuppage.ui
deleted file mode 100644
index b4a6b27a59..0000000000
--- a/src/plugins/qnx/blackberrydeviceconfigurationwizardsetuppage.ui
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryDeviceConfigurationWizardSetupPage</class>
- <widget class="QWizardPage" name="Qnx::Internal::BlackBerryDeviceConfigurationWizardSetupPage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>484</width>
- <height>182</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>WizardPage</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QListWidget" name="deviceListWidget"/>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="1" column="1">
- <widget class="QLineEdit" name="password">
- <property name="echoMode">
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Device password:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="deviceHostIp"/>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Device host name or IP address:</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrydeviceconnection.cpp b/src/plugins/qnx/blackberrydeviceconnection.cpp
deleted file mode 100644
index f701c2f439..0000000000
--- a/src/plugins/qnx/blackberrydeviceconnection.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeviceconnection.h"
-
-#include "blackberryconfigurationmanager.h"
-#include "qnxutils.h"
-
-#include <projectexplorer/devicesupport/devicemanager.h>
-#include <ssh/sshconnection.h>
-#include <utils/environment.h>
-
-#include <QProcess>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-const char CONNECT_SUCCESS_MSG[] = "Successfully connected";
-}
-
-BlackBerryDeviceConnection::BlackBerryDeviceConnection() :
- QObject(),
- m_connectionState(Disconnected),
- m_process(new QProcess(this))
-{
- connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished()));
- connect(m_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processFinished()));
- connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput()));
- connect(m_process, SIGNAL(readyReadStandardError()), this, SLOT(readStandardError()));
-}
-
-void BlackBerryDeviceConnection::connectDevice(const ProjectExplorer::IDevice::ConstPtr &device)
-{
- Utils::Environment env = Utils::Environment::systemEnvironment();
- env.modify(BlackBerryConfigurationManager::instance()->defaultConfigurationEnv());
-
- m_process->setEnvironment(env.toStringList());
-
- m_host = device->sshParameters().host;
- const QString password = device->sshParameters().password;
- const QString publicKeyFile = device->sshParameters().privateKeyFile + QLatin1String(".pub");
-
- // Since killing the blackberry-connect script won't kill the java process it launches,
- // let's just call the java process directly instead.
- Utils::FileName command = env.searchInPath(QLatin1String("java"));
- if (command.isEmpty()) {
- const QString line = tr("Error connecting to device: java could not be found in the environment.") + QLatin1Char('\n');
- emit processOutput(line);
- m_messageLog.append(line);
- return;
- }
-
- QStringList args;
- args << QLatin1String("-Xmx512M");
- args << QLatin1String("-jar");
- args << env.value(QLatin1String("QNX_HOST")) + QLatin1String("/usr/lib/Connect.jar");
-
- args << QLatin1String("-targetHost") << m_host;
- if (!password.isEmpty())
- args << QLatin1String("-password") << password;
- args << QLatin1String("-sshPublicKey") << publicKeyFile;
-
- m_connectionState = Connecting;
- m_process->start(command.toString(), args);
- m_messageLog.clear();
- emit deviceAboutToConnect();
-}
-
-void BlackBerryDeviceConnection::disconnectDevice()
-{
- m_process->terminate();
- if (!m_process->waitForFinished(5000))
- m_process->kill();
- m_connectionState = Disconnected;
-}
-
-QString BlackBerryDeviceConnection::host() const
-{
- return m_host;
-}
-
-BlackBerryDeviceConnection::State BlackBerryDeviceConnection::connectionState()
-{
- return m_connectionState;
-}
-
-QString BlackBerryDeviceConnection::messageLog() const
-{
- return m_messageLog;
-}
-
-void BlackBerryDeviceConnection::processFinished()
-{
- m_connectionState = Disconnected;
- emit deviceDisconnected();
-}
-
-void BlackBerryDeviceConnection::readStandardOutput()
-{
- m_process->setReadChannel(QProcess::StandardOutput);
- while (m_process->canReadLine()) {
- const QString line = QString::fromLocal8Bit(m_process->readLine());
-
- emit processOutput(line);
- m_messageLog.append(line);
-
- if (line.contains(QLatin1String(CONNECT_SUCCESS_MSG))) {
- m_connectionState = Connected;
- emit deviceConnected();
- }
- }
-}
-
-void BlackBerryDeviceConnection::readStandardError()
-{
- m_process->setReadChannel(QProcess::StandardError);
- while (m_process->canReadLine()) {
- const QString line = QString::fromLocal8Bit(m_process->readLine());
-
- emit processOutput(line);
- m_messageLog.append(line);
- }
-}
diff --git a/src/plugins/qnx/blackberrydeviceconnection.h b/src/plugins/qnx/blackberrydeviceconnection.h
deleted file mode 100644
index 3517466588..0000000000
--- a/src/plugins/qnx/blackberrydeviceconnection.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONNECTION_H
-#define QNX_INTERNAL_BLACKBERRYDEVICECONNECTION_H
-
-#include <QObject>
-
-#include <coreplugin/id.h>
-#include <projectexplorer/devicesupport/idevice.h>
-
-QT_BEGIN_NAMESPACE
-class QProcess;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeviceConnection : public QObject
-{
- Q_OBJECT
-public:
- enum State {
- Disconnected,
- Connecting,
- Connected
- };
-
- explicit BlackBerryDeviceConnection();
-
- void connectDevice(const ProjectExplorer::IDevice::ConstPtr &device);
- void disconnectDevice();
-
- QString host() const;
- State connectionState();
-
- QString messageLog() const;
-
-signals:
- void deviceAboutToConnect();
- void deviceConnected();
- void deviceDisconnected();
-
- void processOutput(const QString &output);
-
-private slots:
- void processFinished();
- void readStandardOutput();
- void readStandardError();
-
-private:
- QString m_host;
- State m_connectionState;
-
- QString m_messageLog;
-
- QProcess *m_process;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEVICECONNECTION_H
diff --git a/src/plugins/qnx/blackberrydeviceconnectionmanager.cpp b/src/plugins/qnx/blackberrydeviceconnectionmanager.cpp
deleted file mode 100644
index 6c9e9696ed..0000000000
--- a/src/plugins/qnx/blackberrydeviceconnectionmanager.cpp
+++ /dev/null
@@ -1,402 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeviceconnectionmanager.h"
-
-#include "blackberrydeviceconfiguration.h"
-#include "blackberrydeviceconnection.h"
-#include "blackberryconfigurationmanager.h"
-#include "qnxconstants.h"
-
-#include <coreplugin/icore.h>
-#include <projectexplorer/devicesupport/devicemanager.h>
-#include <ssh/sshconnection.h>
-#include <ssh/sshkeygenerator.h>
-#include <utils/fileutils.h>
-#include <utils/qtcassert.h>
-
-#include <QFileInfo>
-#include <QDir>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryDeviceConnectionManager *BlackBerryDeviceConnectionManager::m_instance = 0;
-
-BlackBerryDeviceConnectionManager::BlackBerryDeviceConnectionManager() :
- QObject()
-{
-}
-
-BlackBerryDeviceConnectionManager::~BlackBerryDeviceConnectionManager()
-{
- killAllConnections();
-}
-
-void BlackBerryDeviceConnectionManager::initialize()
-{
- ProjectExplorer::DeviceManager *deviceManager = ProjectExplorer::DeviceManager::instance();
- connect(deviceManager, SIGNAL(deviceAdded(Core::Id)), this, SLOT(connectDevice(Core::Id)));
- connect(deviceManager, SIGNAL(deviceRemoved(Core::Id)), this, SLOT(disconnectDevice(Core::Id)));
- connect(deviceManager, SIGNAL(deviceListReplaced()), this, SLOT(handleDeviceListChanged()));
-}
-
-void BlackBerryDeviceConnectionManager::killAllConnections()
-{
- QList<BlackBerryDeviceConnection*> connections = m_connections.uniqueKeys();
- foreach (BlackBerryDeviceConnection *connection, connections) {
- connection->disconnect();
- connection->disconnectDevice();
- delete connection;
- }
-}
-
-BlackBerryDeviceConnectionManager *BlackBerryDeviceConnectionManager::instance()
-{
- if (m_instance == 0)
- m_instance = new BlackBerryDeviceConnectionManager();
- return m_instance;
-}
-
-bool BlackBerryDeviceConnectionManager::isConnected(Core::Id deviceId)
-{
- BlackBerryDeviceConnection *connection = m_connections.key(deviceId);
- if (!connection)
- return false;
-
- return connection->connectionState() == BlackBerryDeviceConnection::Connected;
-}
-
-QString BlackBerryDeviceConnectionManager::connectionLog(Core::Id deviceId) const
-{
- BlackBerryDeviceConnection *connection = m_connections.key(deviceId);
- if (!connection)
- return QString();
-
- return connection->messageLog();
-}
-
-void BlackBerryDeviceConnectionManager::connectDevice(Core::Id deviceId)
-{
- ProjectExplorer::IDevice::ConstPtr device =
- ProjectExplorer::DeviceManager::instance()->find(deviceId);
- if (device.isNull())
- return;
-
- // BlackBerry Device connection needs the Qnx environments to be set
- // in order to find the Connect.jar package.
- // Let's delay the device connections at startup till the Qnx settings are loaded.
- if (BlackBerryConfigurationManager::instance()->apiLevels().isEmpty()) {
- m_pendingDeviceConnections << device;
- connect(BlackBerryConfigurationManager::instance(), SIGNAL(settingsLoaded()),
- this, SLOT(processPendingDeviceConnections()), Qt::UniqueConnection);
- return;
- }
-
- connectDevice(device);
-}
-
-void BlackBerryDeviceConnectionManager::connectDevice(const ProjectExplorer::IDevice::ConstPtr &device)
-{
- if (device->type() != Core::Id(Constants::QNX_BB_OS_TYPE))
- return;
-
- ProjectExplorer::DeviceManager::instance()->setDeviceState(device->id(),
- ProjectExplorer::IDevice::DeviceStateUnknown);
-
- // Disconnect existing connection if it only belongs to this device,
- // and if the host has changed
- BlackBerryDeviceConnection *connection = m_connections.key(device->id());
- if (connection && connection->host() != device->sshParameters().host) {
- if (connectionUsageCount(device->id()) == 1)
- disconnectDevice(device);
-
- m_connections.remove(connection, device->id());
- connection = 0;
- }
-
- if (!connection)
- connection = connectionForHost(device->sshParameters().host);
-
- if (!connection) {
- connection = new BlackBerryDeviceConnection();
- m_connections.insertMulti(connection, device->id());
-
- connect(connection, SIGNAL(deviceConnected()), this, SLOT(handleDeviceConnected()));
- connect(connection, SIGNAL(deviceDisconnected()), this, SLOT(handleDeviceDisconnected()));
- connect(connection, SIGNAL(processOutput(QString)), this, SLOT(handleProcessOutput(QString)));
- connect(connection, SIGNAL(deviceAboutToConnect()), this, SLOT(handleDeviceAboutToConnect()));
-
- connection->connectDevice(device);
- } else {
- if (!m_connections.values(connection).contains(device->id()))
- m_connections.insertMulti(connection, device->id());
-
- switch (connection->connectionState()) {
- case BlackBerryDeviceConnection::Connected:
- ProjectExplorer::DeviceManager::instance()->setDeviceState(device->id(),
- ProjectExplorer::IDevice::DeviceReadyToUse);
- break;
- case BlackBerryDeviceConnection::Connecting:
- ProjectExplorer::DeviceManager::instance()->setDeviceState(device->id(),
- ProjectExplorer::IDevice::DeviceStateUnknown);
- break;
- case BlackBerryDeviceConnection::Disconnected:
- connection->connectDevice(device);
- break;
- }
- }
-}
-
-void BlackBerryDeviceConnectionManager::disconnectDevice(const ProjectExplorer::IDevice::ConstPtr &device)
-{
- disconnectDevice(device->id());
-}
-
-/*!
- * @brief Returns default private key path in local settings.
- * @return the default private key path
- */
-const QString BlackBerryDeviceConnectionManager::privateKeyPath() const
-{
- return Core::ICore::userResourcePath() + QLatin1String("/qnx/id_rsa");
-}
-
-/*!
- * @brief Checks validity of default SSH keys used for connecting to a device.
- * @return true, if the default SSH keys are valid
- */
-bool BlackBerryDeviceConnectionManager::hasValidSSHKeys() const
-{
- const QString privateKey = privateKeyPath();
- QFileInfo privateKeyFileInfo(privateKey);
- QFileInfo publicKeyFileInfo(privateKey + QLatin1String(".pub"));
-
- return privateKeyFileInfo.exists() && privateKeyFileInfo.isReadable()
- && publicKeyFileInfo.exists() && publicKeyFileInfo.isReadable();
-}
-
-/*!
- * @brief Stores a new private and public SSH key in local settings.
- * @param privateKeyContent the private key content
- * @param publicKeyContent the public key content
- */
-bool BlackBerryDeviceConnectionManager::setSSHKeys(const QByteArray &privateKeyContent,
- const QByteArray &publicKeyContent, QString *error)
-{
- const QString privateKey = privateKeyPath();
- const QString publicKey = privateKey + QLatin1String(".pub");
-
- QFileInfo fileInfo(privateKey);
- QDir dir = fileInfo.dir();
- if (!dir.exists())
- dir.mkpath(QLatin1String("."));
-
- Utils::FileSaver privSaver(privateKey);
- privSaver.write(privateKeyContent);
- if (!privSaver.finalize(error))
- return false;
- QFile::setPermissions(privateKey, QFile::ReadOwner | QFile::WriteOwner);
-
- Utils::FileSaver pubSaver(publicKey);
- pubSaver.write(publicKeyContent);
- if (!pubSaver.finalize(error))
- return false;
-
- return true;
-}
-
-void BlackBerryDeviceConnectionManager::disconnectDevice(Core::Id deviceId)
-{
- BlackBerryDeviceConnection *connection = m_connections.key(deviceId);
- if (!connection)
- return;
-
- connection->disconnectDevice();
-}
-
-void BlackBerryDeviceConnectionManager::handleDeviceListChanged()
-{
- disconnectRemovedDevices();
- reconnectChangedDevices();
- connectAddedDevices();
-}
-
-void BlackBerryDeviceConnectionManager::handleDeviceConnected()
-{
- BlackBerryDeviceConnection *connection = qobject_cast<BlackBerryDeviceConnection*>(sender());
- QTC_ASSERT(connection, return);
-
- QList<Core::Id> knownDevices = m_connections.values(connection);
- foreach (Core::Id id, knownDevices)
- ProjectExplorer::DeviceManager::instance()->setDeviceState(id,
- ProjectExplorer::IDevice::DeviceReadyToUse);
-
- QList<Core::Id> sameHostDevices = devicesForHost(connection->host());
- foreach (Core::Id id, sameHostDevices) {
- if (!knownDevices.contains(id)) {
- m_connections.insertMulti(connection, id);
- ProjectExplorer::DeviceManager::instance()->setDeviceState(id,
- ProjectExplorer::IDevice::DeviceReadyToUse);
- }
- }
-
- emit deviceConnected();
-}
-
-void BlackBerryDeviceConnectionManager::handleDeviceDisconnected()
-{
- BlackBerryDeviceConnection *connection = qobject_cast<BlackBerryDeviceConnection*>(sender());
- QTC_ASSERT(connection, return);
-
- QList<Core::Id> disconnectedDevices = m_connections.values(connection);
- foreach (Core::Id id, disconnectedDevices) {
- ProjectExplorer::DeviceManager::instance()->setDeviceState(id,
- ProjectExplorer::IDevice::DeviceDisconnected);
- emit deviceDisconnected(id);
- }
-}
-
-void BlackBerryDeviceConnectionManager::handleDeviceAboutToConnect()
-{
- BlackBerryDeviceConnection *connection = qobject_cast<BlackBerryDeviceConnection*>(sender());
- QTC_ASSERT(connection, return);
-
- QList<Core::Id> deviceIds = m_connections.values(connection);
- foreach (Core::Id deviceId, deviceIds)
- emit deviceAboutToConnect(deviceId);
-}
-
-void BlackBerryDeviceConnectionManager::handleProcessOutput(const QString &output)
-{
- BlackBerryDeviceConnection *connection = qobject_cast<BlackBerryDeviceConnection*>(sender());
- QTC_ASSERT(connection, return);
-
- QList<Core::Id> deviceIds = m_connections.values(connection);
- foreach (Core::Id deviceId, deviceIds)
- emit connectionOutput(deviceId, output);
-}
-
-void BlackBerryDeviceConnectionManager::processPendingDeviceConnections()
-{
- if (m_pendingDeviceConnections.isEmpty()
- || BlackBerryConfigurationManager::instance()->apiLevels().isEmpty())
- return;
-
- foreach (ProjectExplorer::IDevice::ConstPtr device, m_pendingDeviceConnections)
- connectDevice(device);
-
- m_pendingDeviceConnections.clear();
- disconnect(BlackBerryConfigurationManager::instance(), SIGNAL(settingsLoaded()),
- this, SLOT(processPendingDeviceConnections()));
-}
-
-BlackBerryDeviceConnection *BlackBerryDeviceConnectionManager::connectionForHost(const QString &host) const
-{
- QList<BlackBerryDeviceConnection*> connections = m_connections.uniqueKeys();
-
- foreach (BlackBerryDeviceConnection *connection, connections) {
- if (connection->host() == host)
- return connection;
- }
-
- return 0;
-}
-
-QList<Core::Id> BlackBerryDeviceConnectionManager::devicesForHost(const QString &host) const
-{
- QList<Core::Id> result;
- ProjectExplorer::DeviceManager *deviceManager = ProjectExplorer::DeviceManager::instance();
-
- for (int i = 0; i < deviceManager->deviceCount(); ++i) {
- ProjectExplorer::IDevice::ConstPtr device = deviceManager->deviceAt(i);
- if (device->type() == Core::Id(Constants::QNX_BB_OS_TYPE)
- && device->sshParameters().host == host)
- result << device->id();
- }
-
- return result;
-}
-
-int BlackBerryDeviceConnectionManager::connectionUsageCount(Core::Id deviceId)
-{
- BlackBerryDeviceConnection *connection = m_connections.key(deviceId);
- return m_connections.count(connection);
-}
-
-void BlackBerryDeviceConnectionManager::disconnectRemovedDevices()
-{
- ProjectExplorer::DeviceManager *deviceManager = ProjectExplorer::DeviceManager::instance();
-
- QList<Core::Id> knownDevices = m_connections.values();
- foreach (Core::Id id, knownDevices) {
- ProjectExplorer::IDevice::ConstPtr device = deviceManager->find(id);
- if (device.isNull() && connectionUsageCount(id) <= 1)
- disconnectDevice(id);
- }
-}
-
-void BlackBerryDeviceConnectionManager::reconnectChangedDevices()
-{
- ProjectExplorer::DeviceManager *deviceManager = ProjectExplorer::DeviceManager::instance();
- QList<Core::Id> connectedDevices = m_connections.values();
-
- for (int i = 0; i < deviceManager->deviceCount(); ++i) {
- ProjectExplorer::IDevice::ConstPtr device = deviceManager->deviceAt(i);
- if (!connectedDevices.contains(device->id()))
- continue;
-
- BlackBerryDeviceConnection *connection = m_connections.key(device->id());
- QTC_ASSERT(connection, continue);
-
- if (connection->host() == device->sshParameters().host)
- continue;
-
- if (connectionUsageCount(device->id()) <= 1)
- disconnectDevice(device->id());
-
- m_connections.remove(connection, device->id());
- connectDevice(device->id());
- }
-}
-
-void BlackBerryDeviceConnectionManager::connectAddedDevices()
-{
- ProjectExplorer::DeviceManager *deviceManager = ProjectExplorer::DeviceManager::instance();
-
- QList<Core::Id> knownDevices = m_connections.values();
- for (int i = 0; i < deviceManager->deviceCount(); ++i) {
- Core::Id deviceId = deviceManager->deviceAt(i)->id();
- if (!knownDevices.contains(deviceId))
- connectDevice(deviceId);
- }
-}
diff --git a/src/plugins/qnx/blackberrydeviceconnectionmanager.h b/src/plugins/qnx/blackberrydeviceconnectionmanager.h
deleted file mode 100644
index f2ae361e33..0000000000
--- a/src/plugins/qnx/blackberrydeviceconnectionmanager.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEVICECONNECTIONMANAGER_H
-#define QNX_INTERNAL_BLACKBERRYDEVICECONNECTIONMANAGER_H
-
-#include <QObject>
-
-#include <coreplugin/id.h>
-#include <projectexplorer/devicesupport/idevice.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeviceConnection;
-
-class BlackBerryDeviceConnectionManager : public QObject
-{
- Q_OBJECT
-public:
- ~BlackBerryDeviceConnectionManager();
-
- void initialize();
- void killAllConnections();
-
- static BlackBerryDeviceConnectionManager *instance();
-
- bool isConnected(Core::Id deviceId);
-
- QString connectionLog(Core::Id deviceId) const;
-
- void connectDevice(const ProjectExplorer::IDevice::ConstPtr &device);
- void disconnectDevice(const ProjectExplorer::IDevice::ConstPtr &device);
-
- const QString privateKeyPath() const;
- bool hasValidSSHKeys() const;
- bool setSSHKeys(const QByteArray &privateKeyContent, const QByteArray &publicKeyContent,
- QString *error);
-
-signals:
- void connectionOutput(Core::Id deviceId, const QString &output);
- void deviceAboutToConnect(Core::Id deviceId);
- void deviceConnected();
- void deviceDisconnected(Core::Id deviceId);
-
-public slots:
- void connectDevice(Core::Id deviceId);
- void disconnectDevice(Core::Id deviceId);
-
-private slots:
- void handleDeviceListChanged();
-
- void handleDeviceAboutToConnect();
- void handleDeviceConnected();
- void handleDeviceDisconnected();
-
- void handleProcessOutput(const QString &output);
-
- void processPendingDeviceConnections();
-
-private:
- explicit BlackBerryDeviceConnectionManager();
-
- BlackBerryDeviceConnection *connectionForHost(const QString &host) const;
- QList<Core::Id> devicesForHost(const QString &host) const;
-
- int connectionUsageCount(Core::Id deviceId);
-
- void disconnectRemovedDevices();
- void reconnectChangedDevices();
- void connectAddedDevices();
-
- static BlackBerryDeviceConnectionManager *m_instance;
- QMultiMap<BlackBerryDeviceConnection*, Core::Id> m_connections;
-
- QList<ProjectExplorer::IDevice::ConstPtr> m_pendingDeviceConnections;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEVICECONNECTIONMANAGER_H
diff --git a/src/plugins/qnx/blackberrydeviceinformation.cpp b/src/plugins/qnx/blackberrydeviceinformation.cpp
deleted file mode 100644
index edb4fcb8dd..0000000000
--- a/src/plugins/qnx/blackberrydeviceinformation.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydeviceinformation.h"
-
-namespace {
-static const char PROCESS_NAME[] = "blackberry-deploy";
-static const char ERR_NO_ROUTE_HOST[] = "Cannot connect";
-static const char ERR_AUTH_FAILED[] = "Authentication failed";
-static const char ERR_DEVELOPMENT_MODE_DISABLED[] = "Device is not in the Development Mode";
-}
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryDeviceInformation::BlackBerryDeviceInformation(QObject *parent) :
- BlackBerryNdkProcess(QLatin1String(PROCESS_NAME), parent),
- m_debugTokenValid(false), m_isSimulator(false), m_isProductionDevice(true)
-{
- addErrorStringMapping(QLatin1String(ERR_NO_ROUTE_HOST), NoRouteToHost);
- addErrorStringMapping(QLatin1String(ERR_AUTH_FAILED), AuthenticationFailed);
- addErrorStringMapping(QLatin1String(ERR_DEVELOPMENT_MODE_DISABLED), DevelopmentModeDisabled);
-}
-
-void BlackBerryDeviceInformation::setDeviceTarget(const QString &deviceIp, const QString &devicePassword)
-{
- QStringList arguments;
-
- arguments << QLatin1String("-listDeviceInfo")
- << QLatin1String("-device")
- << deviceIp
- << QLatin1String("-password")
- << devicePassword;
-
- start(arguments);
-}
-
-void BlackBerryDeviceInformation::resetResults()
-{
- m_devicePin.clear();
- m_deviceOS.clear();
- m_hardwareId.clear();
- m_debugTokenAuthor.clear();
- m_debugTokenValidationError.clear();
- m_scmBundle.clear();
- m_hostName.clear();
- m_debugTokenValid = false;
- m_isSimulator = false;
- m_isProductionDevice = true;
-}
-
-QString BlackBerryDeviceInformation::devicePin() const
-{
- return m_devicePin;
-}
-
-QString BlackBerryDeviceInformation::deviceOS() const
-{
- return m_deviceOS;
-}
-
-QString BlackBerryDeviceInformation::hardwareId() const
-{
- return m_hardwareId;
-}
-
-QString BlackBerryDeviceInformation::debugTokenAuthor() const
-{
- return m_debugTokenAuthor;
-}
-
-QString BlackBerryDeviceInformation::debugTokenValidationError() const
-{
- return m_debugTokenValidationError;
-}
-
-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;
-}
-
-bool BlackBerryDeviceInformation::isProductionDevice() const
-{
- return m_isProductionDevice;
-}
-
-void BlackBerryDeviceInformation::processData(const QString &line)
-{
- static const QString devicepin = QLatin1String("devicepin::0x");
- static const QString device_os = QLatin1String("device_os::");
- static const QString hardwareid = QLatin1String("hardwareid::");
- static const QString debug_token_author = QLatin1String("[n]debug_token_author::");
- static const QString debug_token_validation_error = QLatin1String("[n]debug_token_validation_error::");
- static const QString debug_token_valid = QLatin1String("[n]debug_token_valid:b:");
- 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))
- m_deviceOS = line.mid(device_os.size()).trimmed();
- else if (line.startsWith(hardwareid))
- m_hardwareId = line.mid(hardwareid.size()).trimmed();
- else if (line.startsWith(debug_token_author))
- m_debugTokenAuthor = line.mid(debug_token_author.size()).trimmed();
- else if (line.startsWith(debug_token_validation_error))
- m_debugTokenValidationError = line.mid(debug_token_validation_error.size()).trimmed();
- else if (line.startsWith(debug_token_valid))
- m_debugTokenValid = line.mid(debug_token_valid.size()).trimmed() == QLatin1String("true");
- else if (line.startsWith(simulator))
- m_isSimulator = line.mid(simulator.size()).trimmed() == QLatin1String("true");
- else if (line.startsWith(scmbundle))
- 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
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrydeviceinformation.h b/src/plugins/qnx/blackberrydeviceinformation.h
deleted file mode 100644
index b08dba75b8..0000000000
--- a/src/plugins/qnx/blackberrydeviceinformation.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEVICEINFO_H
-#define QNX_INTERNAL_BLACKBERRYDEVICEINFO_H
-
-#include "blackberryndkprocess.h"
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeviceInformation : public BlackBerryNdkProcess
-{
- Q_OBJECT
-
-public:
- enum ReturnStatus
- {
- NoRouteToHost = UserStatus,
- AuthenticationFailed,
- DevelopmentModeDisabled,
- FailedToStartInferiorProcess,
- InferiorProcessTimedOut,
- InferiorProcessCrashed,
- InferiorProcessWriteError,
- InferiorProcessReadError
- };
-
- explicit BlackBerryDeviceInformation(QObject *parent = 0);
-
- void setDeviceTarget(const QString &deviceIp, const QString &devicePassword);
-
- QString devicePin() const;
- QString deviceOS() const;
- QString hardwareId() const;
- QString debugTokenAuthor() const;
- QString debugTokenValidationError() const;
- bool debugTokenValid() const;
- QString scmBundle() const;
- QString hostName() const;
- bool isSimulator() const;
- bool isProductionDevice() const;
-
-private:
- QString m_devicePin;
- QString m_deviceOS;
- QString m_hardwareId;
- QString m_debugTokenAuthor;
- QString m_scmBundle;
- QString m_hostName;
- QString m_debugTokenValidationError;
- bool m_debugTokenValid;
- bool m_isSimulator;
- bool m_isProductionDevice;
-
- void processData(const QString &line);
- void resetResults();
-};
-
-}
-}
-
-#endif // QNX_INTERNAL_BLACKBERRYDEBUGTOKENUPLOADER_H
diff --git a/src/plugins/qnx/blackberrydevicelistdetector.cpp b/src/plugins/qnx/blackberrydevicelistdetector.cpp
deleted file mode 100644
index c8a5a35df9..0000000000
--- a/src/plugins/qnx/blackberrydevicelistdetector.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrydevicelistdetector.h"
-
-#include "blackberryconfigurationmanager.h"
-#include "blackberryndkprocess.h"
-
-#include <utils/environment.h>
-
-#include <QStringList>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryDeviceListDetector::BlackBerryDeviceListDetector(QObject *parent)
- : QObject(parent)
- , m_process(new QProcess(this))
-{
- m_process->setProcessChannelMode(QProcess::MergedChannels);
-
- connect(m_process, SIGNAL(readyRead()), this, SLOT(processReadyRead()));
- connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished()));
- connect(m_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processFinished()));
-}
-
-void BlackBerryDeviceListDetector::detectDeviceList()
-{
- if (m_process->state() != QProcess::NotRunning)
- return;
-
- m_process->setEnvironment(Utils::EnvironmentItem::toStringList(
- BlackBerryConfigurationManager::instance()->defaultConfigurationEnv()));
- const QString command = BlackBerryNdkProcess::resolveNdkToolPath(QLatin1String("blackberry-deploy"));
- QStringList arguments;
- arguments << QLatin1String("-devices");
-
- m_process->start(command, arguments, QIODevice::ReadWrite | QIODevice::Unbuffered);
-}
-
-void BlackBerryDeviceListDetector::processReadyRead()
-{
- while (m_process->canReadLine())
- processData(readProcessLine());
-}
-
-void BlackBerryDeviceListDetector::processFinished()
-{
- while (!m_process->atEnd())
- processData(readProcessLine());
- emit finished();
-}
-
-const QString BlackBerryDeviceListDetector::readProcessLine()
-{
- // we assume that the process output is ASCII only
- QByteArray bytes = m_process->readLine();
- while (bytes.endsWith('\r') || bytes.endsWith('\n'))
- bytes.chop(1);
- return QString::fromLocal8Bit(bytes);
-}
-
-void BlackBerryDeviceListDetector::processData(const QString &line)
-{
- // line format is: deviceName,deviceHostNameOrIP,deviceType,versionIfSimulator
- QStringList list = line.split(QLatin1Char(','));
- if (list.count() == 4)
- emit deviceDetected (list[0], list[1], QLatin1String("Simulator") == list[2]);
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrydevicelistdetector.h b/src/plugins/qnx/blackberrydevicelistdetector.h
deleted file mode 100644
index b391ac1b31..0000000000
--- a/src/plugins/qnx/blackberrydevicelistdetector.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYDEVICELISTDETECTOR_H
-#define QNX_INTERNAL_BLACKBERRYDEVICELISTDETECTOR_H
-
-#include <QObject>
-#include <QString>
-
-QT_FORWARD_DECLARE_CLASS(QProcess)
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeviceListDetector : public QObject
-{
- Q_OBJECT
-public:
- explicit BlackBerryDeviceListDetector(QObject *parent = 0);
-
- void detectDeviceList();
-
-signals:
- void deviceDetected(const QString &deviceName, const QString &deviceHostName,
- bool isSimulator);
- void finished();
-
-private slots:
- void processReadyRead();
- void processFinished();
-
-private:
- const QString readProcessLine();
- void processData(const QString &line);
-
- QProcess *m_process;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYDEVICELISTDETECTOR_H
diff --git a/src/plugins/qnx/blackberryimportcertificatedialog.cpp b/src/plugins/qnx/blackberryimportcertificatedialog.cpp
deleted file mode 100644
index 8e989e90cf..0000000000
--- a/src/plugins/qnx/blackberryimportcertificatedialog.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryimportcertificatedialog.h"
-#include "blackberrycertificate.h"
-#include "ui_blackberryimportcertificatedialog.h"
-
-#include <QPushButton>
-#include <QMessageBox>
-
-#include <utils/pathchooser.h>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryImportCertificateDialog::BlackBerryImportCertificateDialog(
- QWidget *parent, Qt::WindowFlags f) :
- QDialog(parent, f),
- m_ui(new Ui_BlackBerryImportCertificateDialog),
- m_certificate(0)
-{
- m_ui->setupUi(this);
- m_ui->certPath->setExpectedKind(Utils::PathChooser::File);
- m_ui->certPath->setHistoryCompleter(QLatin1String("BB.Certificate.History"));
- m_ui->certPath->setPromptDialogTitle(tr("Import Certificate"));
- m_ui->certPath->setPromptDialogFilter(tr("PKCS 12 Archives (*.p12)"));
-
- m_cancelButton = m_ui->buttonBox->button(QDialogButtonBox::Cancel);
-
- m_okButton = m_ui->buttonBox->button(QDialogButtonBox::Ok);
- m_okButton->setEnabled(false);
-
- connect(m_cancelButton, SIGNAL(clicked()),
- this, SLOT(reject()));
- connect(m_okButton, SIGNAL(clicked()),
- this, SLOT(importCertificate()));
- connect(m_ui->certPath, SIGNAL(changed(QString)),
- this, SLOT(validate()));
- connect(m_ui->certPass, SIGNAL(textChanged(QString)),
- this, SLOT(validate()));
-}
-
-QString BlackBerryImportCertificateDialog::author() const
-{
- return m_author;
-}
-
-QString BlackBerryImportCertificateDialog::certPath() const
-{
- return m_ui->certPath->path();
-}
-
-QString BlackBerryImportCertificateDialog::keystorePassword() const
-{
- return m_ui->certPass->text();
-}
-
-BlackBerryCertificate * BlackBerryImportCertificateDialog::certificate() const
-{
- return m_certificate;
-}
-
-void BlackBerryImportCertificateDialog::importCertificate()
-{
- setBusy(true);
-
- m_certificate = new BlackBerryCertificate(certPath(),
- QString(), keystorePassword());
-
- connect(m_certificate, SIGNAL(finished(int)), this, SLOT(certificateLoaded(int)));
-
- m_certificate->load();
-}
-
-void BlackBerryImportCertificateDialog::validate()
-{
- if (!m_ui->certPath->isValid() || m_ui->certPass->text().isEmpty()) {
- m_okButton->setEnabled(false);
- return;
- }
-
- m_okButton->setEnabled(true);
-}
-
-void BlackBerryImportCertificateDialog::certificateLoaded(int status)
-{
- if (status != BlackBerryCertificate::Success) {
- setBusy(false);
-
- m_certificate->deleteLater();
- m_certificate = 0;
-
- QString message;
-
- if (status == BlackBerryCertificate::WrongPassword)
- message = tr("The keystore password is invalid.");
- else if (status == BlackBerryCertificate::InvalidOutputFormat)
- message = tr("Error parsing inferior process output.");
- else
- message = tr("An unknown error has occurred.");
-
- QMessageBox::information(this, tr("Error"), message);
-
- } else {
- m_author = m_certificate->author();
- accept();
- }
-}
-
-void BlackBerryImportCertificateDialog::setBusy(bool busy)
-{
- m_ui->certPath->setEnabled(!busy);
- m_ui->certPass->setEnabled(!busy);
- m_okButton->setEnabled(!busy);
- m_cancelButton->setEnabled(!busy);
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberryimportcertificatedialog.h b/src/plugins/qnx/blackberryimportcertificatedialog.h
deleted file mode 100644
index 41d06444ad..0000000000
--- a/src/plugins/qnx/blackberryimportcertificatedialog.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYIMPORTCERTIFICATEDIALOG_H
-#define QNX_INTERNAL_BLACKBERRYIMPORTCERTIFICATEDIALOG_H
-
-#include <QDialog>
-
-QT_BEGIN_NAMESPACE
-class QPushButton;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class Ui_BlackBerryImportCertificateDialog;
-class BlackBerryCertificate;
-
-class BlackBerryImportCertificateDialog : public QDialog
-{
-Q_OBJECT
-
-public:
- explicit BlackBerryImportCertificateDialog(QWidget *parent = 0,
- Qt::WindowFlags f = 0);
-
- QString author() const;
- QString certPath() const;
- QString keystorePassword() const;
-
- BlackBerryCertificate *certificate() const;
-
-private slots:
- void importCertificate();
- void validate();
- void certificateLoaded(int);
-
-private:
- void setBusy(bool busy);
-
- Ui_BlackBerryImportCertificateDialog *m_ui;
-
- BlackBerryCertificate *m_certificate;
-
- QString m_author;
-
- QPushButton *m_cancelButton;
- QPushButton *m_okButton;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYIMPORTCERTIFICATEDIALOG_H
diff --git a/src/plugins/qnx/blackberryimportcertificatedialog.ui b/src/plugins/qnx/blackberryimportcertificatedialog.ui
deleted file mode 100644
index 26d08fcfdc..0000000000
--- a/src/plugins/qnx/blackberryimportcertificatedialog.ui
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryImportCertificateDialog</class>
- <widget class="QDialog" name="Qnx::Internal::BlackBerryImportCertificateDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>412</width>
- <height>88</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Import Certificate</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>Path:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="Utils::PathChooser" name="certPath" native="true"/>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <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="certPass">
- <property name="echoMode">
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>Utils::PathChooser</class>
- <extends>QWidget</extends>
- <header location="global">utils/pathchooser.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberryinstallwizard.cpp b/src/plugins/qnx/blackberryinstallwizard.cpp
deleted file mode 100644
index 044685e2f6..0000000000
--- a/src/plugins/qnx/blackberryinstallwizard.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryinstallwizard.h"
-#include "blackberryinstallwizardpages.h"
-
-#include <QAbstractButton>
-
-#include <QMessageBox>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryInstallWizard::BlackBerryInstallWizard(BlackBerryInstallerDataHandler::Mode mode,
- BlackBerryInstallerDataHandler::Target target,
- const QString& version,
- QWidget *parent)
- : Utils::Wizard(parent)
- , m_ndkPage(0)
- , m_targetPage(0)
-{
- setWindowTitle(tr("BlackBerry NDK Installation Wizard"));
-
- m_data.mode = mode;
- m_data.installTarget = target;
- m_data.version = version;
-
-
- if (m_data.mode != BlackBerryInstallerDataHandler::UninstallMode) {
- m_optionPage = new BlackBerryInstallWizardOptionPage(m_data, this);
- m_ndkPage = new BlackBerryInstallWizardNdkPage(m_data, this);
- m_targetPage = new BlackBerryInstallWizardTargetPage(m_data, this);
- setPage(OptionPage, m_optionPage);
- setPage(NdkPageId, m_ndkPage);
- setPage(TargetPageId, m_targetPage);
- }
-
- m_processPage = new BlackBerryInstallWizardProcessPage(m_data, this);
- m_finalPage = new BlackBerryInstallWizardFinalPage(m_data, this);
-
- connect(m_finalPage, SIGNAL(done()), this, SIGNAL(processFinished()));
- disconnect(button(CancelButton), SIGNAL(clicked()), this, SLOT(reject()));
- connect(button(CancelButton), SIGNAL(clicked()), this, SLOT(handleProcessCancelled()));
-
- setPage(ProcessPageId, m_processPage);
- setPage(FinalPageId, m_finalPage);
-
- m_finalPage->setCommitPage(true);
-
- setOption(DisabledBackButtonOnLastPage, true);
-}
-
-void BlackBerryInstallWizard::handleProcessCancelled()
-{
- if ((m_targetPage && m_targetPage->isProcessRunning())
- || m_processPage->isProcessRunning()) {
- const QMessageBox::StandardButton answer = QMessageBox::question(this, tr("Confirmation"),
- tr("Are you sure you want to cancel?"),
- QMessageBox::Yes | QMessageBox::No);
- if (answer == QMessageBox::No)
- return;
- }
-
- reject();
-}
diff --git a/src/plugins/qnx/blackberryinstallwizard.h b/src/plugins/qnx/blackberryinstallwizard.h
deleted file mode 100644
index 7c38d0f5e2..0000000000
--- a/src/plugins/qnx/blackberryinstallwizard.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYINSTALLWIZARD_H
-#define QNX_INTERNAL_BLACKBERRYINSTALLWIZARD_H
-
-#include <utils/wizard.h>
-
-#include <QProcess>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryInstallWizardOptionPage;
-class BlackBerryInstallWizardNdkPage;
-class BlackBerryInstallWizardTargetPage;
-class BlackBerryInstallWizardProcessPage;
-class BlackBerryInstallWizardFinalPage;
-
-class BlackBerryInstallerDataHandler {
-public:
- enum Mode {
- InstallMode,
- UninstallMode,
- ManuallMode
- };
-
- enum Target {
- ApiLevel,
- Simulator,
- Runtime
- };
-
- QString ndkPath;
- QString target;
- QString version;
- int exitCode;
- QProcess::ExitStatus exitStatus;
- Mode mode;
- Target installTarget;
-};
-
-class BlackBerryInstallWizard : public Utils::Wizard
-{
- Q_OBJECT
-public:
- enum PageId {
- OptionPage,
- NdkPageId,
- TargetPageId,
- ProcessPageId,
- FinalPageId
- };
-
- explicit BlackBerryInstallWizard(BlackBerryInstallerDataHandler::Mode mode = BlackBerryInstallerDataHandler::InstallMode,
- BlackBerryInstallerDataHandler::Target target = BlackBerryInstallerDataHandler::ApiLevel,
- const QString& version = QString(),
- QWidget *parent = 0);
-
-signals:
- void processFinished();
-
-private slots:
- void handleProcessCancelled();
-
-private:
-
- BlackBerryInstallWizardOptionPage *m_optionPage;
- BlackBerryInstallWizardNdkPage *m_ndkPage;
- BlackBerryInstallWizardTargetPage *m_targetPage;
- BlackBerryInstallWizardProcessPage *m_processPage;
- BlackBerryInstallWizardFinalPage *m_finalPage;
-
- BlackBerryInstallerDataHandler m_data;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYINSTALLWIZARD_H
diff --git a/src/plugins/qnx/blackberryinstallwizardndkpage.ui b/src/plugins/qnx/blackberryinstallwizardndkpage.ui
deleted file mode 100644
index 133d1ca012..0000000000
--- a/src/plugins/qnx/blackberryinstallwizardndkpage.ui
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryInstallWizardNdkPage</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryInstallWizardNdkPage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Select Native SDK path:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QListWidget" name="ndkPathListWidget"/>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberryinstallwizardoptionpage.ui b/src/plugins/qnx/blackberryinstallwizardoptionpage.ui
deleted file mode 100644
index d632fec092..0000000000
--- a/src/plugins/qnx/blackberryinstallwizardoptionpage.ui
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryInstallWizardOptionPage</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryInstallWizardOptionPage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>457</width>
- <height>278</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QRadioButton" name="apiLevelButton">
- <property name="text">
- <string>Install API level</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QVBoxLayout" name="apiLevelOptionsLayout">
- <item>
- <widget class="QRadioButton" name="installButton">
- <property name="text">
- <string>Install new target</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="addButton">
- <property name="text">
- <string>Add existing target</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QRadioButton" name="simulatorButton">
- <property name="text">
- <string>Install simulator</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="runtimeButton">
- <property name="text">
- <string>Install runtime</string>
- </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>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberryinstallwizardpages.cpp b/src/plugins/qnx/blackberryinstallwizardpages.cpp
deleted file mode 100644
index 5d0a024fac..0000000000
--- a/src/plugins/qnx/blackberryinstallwizardpages.cpp
+++ /dev/null
@@ -1,564 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryinstallwizardpages.h"
-#include "blackberryconfigurationmanager.h"
-#include "blackberryapilevelconfiguration.h"
-
-#include "ui_blackberryinstallwizardoptionpage.h"
-#include "ui_blackberryinstallwizardtargetpage.h"
-#include "ui_blackberryinstallwizardprocesspage.h"
-#include "ui_blackberryinstallwizardndkpage.h"
-
-#include "qnxutils.h"
-
-#include <utils/synchronousprocess.h>
-#include <utils/pathchooser.h>
-
-#include <QProcess>
-
-#include <QTreeWidgetItem>
-
-#include <QFileInfo>
-#include <QDir>
-
-#include <QMessageBox>
-
-namespace Qnx {
-namespace Internal {
-
-namespace {
-const QLatin1String targetKeyWord("Native SDK");
-}
-
-NdkPathChooser::NdkPathChooser(Mode mode, QWidget *parent)
- : Utils::PathChooser(parent)
- , m_mode(mode)
-{
- setHistoryCompleter(QLatin1String("Qnx.NdkPath.History"));
- if (m_mode == NdkPathChooser::InstallMode) {
- setExpectedKind(Utils::PathChooser::Directory);
- } else {
- setExpectedKind(Utils::PathChooser::File);
- setPromptDialogFilter(Utils::HostOsInfo::isWindowsHost() ? QLatin1String("*.bat") :
- QLatin1String("*.sh"));
- }
- setAdditionalPathValidator([this](const QString &path, QString *errorMessage) {
- return validateNdkPath(path, errorMessage);
- });
-}
-
-bool NdkPathChooser::validateNdkPath(const QString &path, QString *errorMessage) const
-{
- Q_UNUSED(errorMessage);
- if (m_mode == InstallMode)
- return !(QnxUtils::sdkInstallerPath(path).isEmpty());
-
- QFileInfo fi(path);
- if (Utils::HostOsInfo::isWindowsHost())
- return fi.suffix() == QLatin1String("bat");
-
- return fi.suffix() == QLatin1String("sh");
-}
-
-//------------------------------------------------------------------
-
-BlackBerryInstallWizardOptionPage::BlackBerryInstallWizardOptionPage(BlackBerryInstallerDataHandler &data,
- QWidget *parent)
- : QWizardPage(parent)
- , m_ui(new Ui_BlackBerryInstallWizardOptionPage)
- , m_buttonGroup(new QButtonGroup(this))
- , m_envFileChooser(new NdkPathChooser(NdkPathChooser::ManualMode))
- , m_data(data)
-{
- m_ui->setupUi(this);
- setTitle(tr("Options"));
- connect(m_ui->addButton, SIGNAL(toggled(bool)), this, SLOT(handleApiLevelOptionChanged()));
- connect(m_envFileChooser, SIGNAL(pathChanged(QString)), this, SLOT(handlePathChanged(QString)));
- connect(m_ui->apiLevelButton, SIGNAL(toggled(bool)), this, SLOT(handleTargetChanged()));
- connect(m_ui->simulatorButton, SIGNAL(toggled(bool)), this, SLOT(handleTargetChanged()));
- connect(m_ui->runtimeButton, SIGNAL(toggled(bool)), this, SLOT(handleTargetChanged()));
-}
-
-BlackBerryInstallWizardOptionPage::~BlackBerryInstallWizardOptionPage()
-{
- delete m_ui;
-}
-
-void BlackBerryInstallWizardOptionPage::initializePage()
-{
- m_ui->apiLevelOptionsLayout->addWidget(m_envFileChooser);
- m_buttonGroup->addButton(m_ui->installButton);
- m_buttonGroup->addButton(m_ui->addButton);
-
- m_ui->apiLevelButton->setChecked(true);
- if (m_data.mode == BlackBerryInstallerDataHandler::ManuallMode)
- m_ui->addButton->setChecked(true);
- else
- m_ui->installButton->setChecked(true);
-
- m_envFileChooser->setEnabled(m_ui->addButton->isChecked());
-}
-
-bool BlackBerryInstallWizardOptionPage::isComplete() const
-{
- if (m_ui->addButton->isEnabled() && m_ui->addButton->isChecked())
- return m_envFileChooser->isValid();
-
- return true;
-}
-
-int BlackBerryInstallWizardOptionPage::nextId() const
-{
- if (m_ui->addButton->isChecked())
- return BlackBerryInstallWizard::FinalPageId;
-
- return BlackBerryInstallWizard::NdkPageId;
-}
-
-void BlackBerryInstallWizardOptionPage::handleApiLevelOptionChanged()
-{
- if (m_ui->addButton->isChecked())
- m_data.mode = BlackBerryInstallerDataHandler::ManuallMode;
- else
- m_data.mode = BlackBerryInstallerDataHandler::InstallMode;
-
- m_envFileChooser->setEnabled(m_ui->addButton->isChecked());
- emit completeChanged();
-}
-
-void BlackBerryInstallWizardOptionPage::handlePathChanged(const QString &envFilePath)
-{
- if (m_envFileChooser->isValid())
- m_data.ndkPath = envFilePath;
-
- emit completeChanged();
-}
-
-void BlackBerryInstallWizardOptionPage::handleTargetChanged()
-{
- m_ui->installButton->setEnabled(m_ui->apiLevelButton->isChecked());
- m_ui->addButton->setEnabled(m_ui->apiLevelButton->isChecked());
-
- if (m_ui->apiLevelButton->isChecked())
- m_data.installTarget = BlackBerryInstallerDataHandler::ApiLevel;
- else if (m_ui->simulatorButton->isChecked())
- m_data.installTarget = BlackBerryInstallerDataHandler::Simulator;
- else if (m_ui->runtimeButton->isChecked())
- m_data.installTarget = BlackBerryInstallerDataHandler::Runtime;
-
- emit completeChanged();
-}
-
-//------------------------------------------------------------------
-
-BlackBerryInstallWizardNdkPage::BlackBerryInstallWizardNdkPage(BlackBerryInstallerDataHandler &data, QWidget *parent)
- : QWizardPage(parent)
- , m_ui(new Ui_BlackBerryInstallWizardNdkPage)
- , m_data(data)
- , m_ndkPathChooser(new NdkPathChooser(NdkPathChooser::InstallMode))
- , m_manual(new QListWidgetItem)
- , m_validNdkPath(false)
-{
- m_ui->setupUi(this);
- setTitle(tr("Native SDK"));
- m_ui->verticalLayout->addWidget(m_ndkPathChooser);
- connect(m_ui->ndkPathListWidget, SIGNAL(itemSelectionChanged()), this, SLOT(setNdkPath()));
- connect(m_ndkPathChooser, SIGNAL(pathChanged(QString)), this, SLOT(setManualNdkPath()));
-}
-
-BlackBerryInstallWizardNdkPage::~BlackBerryInstallWizardNdkPage()
-{
- delete m_ui;
-}
-
-void BlackBerryInstallWizardNdkPage::initializePage()
-{
- m_manual->setText(tr("Specify 10.2 NDK path manually"));
- m_ui->ndkPathListWidget->addItem(m_manual);
- m_manual->setSelected(true);
- QFont font;
- font.setItalic(true);
- m_manual->setFont(font);
- foreach (const ConfigInstallInformation &ndk, QnxUtils::installedConfigs()) {
- bool found = false;
- for (int i = 0; i < m_ui->ndkPathListWidget->count(); i++) {
- QListWidgetItem* item = m_ui->ndkPathListWidget->item(i);
- if (item->text() == ndk.path) {
- found = true;
- break;
- }
- }
-
- if (found)
- continue;
-
- if (!QnxUtils::sdkInstallerPath(ndk.path).isEmpty()) {
- QListWidgetItem *ndkItem = new QListWidgetItem(m_ui->ndkPathListWidget);
- ndkItem->setText(ndk.path);
- }
- }
-}
-
-void BlackBerryInstallWizardNdkPage::setNdkPath()
-{
- if (m_ui->ndkPathListWidget->selectedItems().isEmpty())
- return;
-
- m_ndkPathChooser->setEnabled(m_manual->isSelected());
- QString selected = m_ui->ndkPathListWidget->selectedItems().first()->text();
- if (!QnxUtils::sdkInstallerPath(selected).isEmpty()) {
- m_validNdkPath = true;
- m_data.ndkPath = selected;
- } else {
- m_validNdkPath = false;
- }
-
- emit completeChanged();
-}
-
-void BlackBerryInstallWizardNdkPage::setManualNdkPath()
-{
- if (m_ndkPathChooser->isValid()) {
- m_validNdkPath = true;
- m_data.ndkPath = m_ndkPathChooser->path();
- } else {
- m_validNdkPath = false;
- }
-
- emit completeChanged();
-}
-
-bool BlackBerryInstallWizardNdkPage::isComplete() const
-{
- return m_validNdkPath;
-}
-
-//------------------------------------------------------------------
-
-BlackBerryInstallWizardTargetPage::BlackBerryInstallWizardTargetPage(BlackBerryInstallerDataHandler &data,
- QWidget *parent)
- : QWizardPage(parent)
- , m_data(data)
- , m_ui(new Ui_BlackBerryInstallWizardTargetPage)
- , m_isTargetValid(false)
- , m_targetListProcess(new QProcess(this))
-{
- m_ui->setupUi(this);
- setTitle(tr("Version"));
-
- connect(m_targetListProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(targetsListProcessFinished()));
- connect(m_ui->targetsTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(setTarget()));
-}
-
-BlackBerryInstallWizardTargetPage::~BlackBerryInstallWizardTargetPage()
-{
- Utils::SynchronousProcess::stopProcess(*m_targetListProcess);
- delete m_ui;
-}
-
-void BlackBerryInstallWizardTargetPage::initializePage()
-{
- // process may be running if going back and forth
- if (m_targetListProcess->state() == QProcess::Running) {
- disconnect(m_targetListProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(targetsListProcessFinished()));
- Utils::SynchronousProcess::stopProcess(*m_targetListProcess);
- connect(m_targetListProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(targetsListProcessFinished()));
- }
-
- updateAvailableTargetsList();
-}
-
-bool BlackBerryInstallWizardTargetPage::isComplete() const
-{
- return m_isTargetValid;
-}
-
-bool BlackBerryInstallWizardTargetPage::isProcessRunning() const
-{
- return (m_targetListProcess->state() == QProcess::Running);
-}
-
-void BlackBerryInstallWizardTargetPage::targetsListProcessFinished()
-{
- initTargetsTreeWidget();
- QString output = Utils::SynchronousProcess::normalizeNewlines(QString::fromLatin1(m_targetListProcess->readAll()));
- QList<QString> targetList = output.split(QLatin1Char('\n'));
- m_ui->targetsTreeWidget->clear();
- foreach (const QString &target, targetList) {
- if (!target.isEmpty() && target.contains(targetKeyWord)) {
- QTreeWidgetItem *item = new QTreeWidgetItem(m_ui->targetsTreeWidget);
- QStringList res = target.split(QLatin1Char('-'));
- if (res.count() > 1) {
- item->setText(0, res.at(0));
- item->setText(1, res.at(1));
- }
- }
- }
-
- m_ui->targetsTreeWidget->sortByColumn(0, Qt::DescendingOrder);
-
-}
-
-void BlackBerryInstallWizardTargetPage::setTarget()
-{
- if (m_ui->targetsTreeWidget->selectedItems().isEmpty())
- return;
-
- QString version = m_ui->targetsTreeWidget->selectedItems().first()->text(0);
- QString target = m_ui->targetsTreeWidget->selectedItems().first()->text(1);
- if (target.contains(targetKeyWord)) {
- m_data.target = target;
- m_data.version = version;
- m_isTargetValid = true;
- } else {
- m_isTargetValid = false;
- }
-
- emit completeChanged();
-}
-
-void BlackBerryInstallWizardTargetPage::initTargetsTreeWidget()
-{
- m_ui->targetsTreeWidget->clear();
- m_ui->targetsTreeWidget->setHeaderHidden(false);
- m_ui->targetsTreeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
- m_ui->targetsTreeWidget->setHeaderItem(new QTreeWidgetItem(QStringList() << tr("Version") << tr("Name")));
- m_ui->targetsTreeWidget->setTextElideMode(Qt::ElideNone);
- m_ui->targetsTreeWidget->setColumnCount(2);
-}
-
-void BlackBerryInstallWizardTargetPage::updateAvailableTargetsList()
-{
- m_ui->targetsTreeWidget->clear();
- m_ui->targetsTreeWidget->setHeaderHidden(true);
- QTreeWidgetItem *item = new QTreeWidgetItem(m_ui->targetsTreeWidget);
- item->setText(0, tr("Querying available versions. Please wait..."));
- QFont font;
- font.setItalic(true);
- item->setFont(0, font);
- QString qdeProcess = QnxUtils::qdeInstallProcess(m_data.ndkPath, QString(), QLatin1String(" --list"));
- QTC_ASSERT(!qdeProcess.isEmpty(), return);
- m_targetListProcess->start(qdeProcess);
-}
-
-//------------------------------------------------------------------
-
-BlackBerryInstallWizardProcessPage::BlackBerryInstallWizardProcessPage(BlackBerryInstallerDataHandler &data,
- QWidget *parent)
- : QWizardPage(parent)
- , m_ui(new Ui_BlackBerryInstallWizardProcessPage)
- , m_data(data)
- , m_targetProcess(new QProcess(this))
-{
- m_ui->setupUi(this);
- if (m_data.mode == BlackBerryInstallerDataHandler::UninstallMode)
- setTitle(tr("Uninstalling"));
- else
- setTitle(tr("Installing"));
-
- connect(m_targetProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(handleProcessFinished(int,QProcess::ExitStatus)));
-}
-
-BlackBerryInstallWizardProcessPage::~BlackBerryInstallWizardProcessPage()
-{
- Utils::SynchronousProcess::stopProcess(*m_targetProcess);
- delete m_ui;
-}
-
-static QString msgTarget(BlackBerryInstallerDataHandler::Target t)
-{
- switch (t) {
- case BlackBerryInstallerDataHandler::ApiLevel:
- return BlackBerryInstallWizardProcessPage::tr("API level");
- case BlackBerryInstallerDataHandler::Simulator:
- return BlackBerryInstallWizardProcessPage::tr("simulator");
- case BlackBerryInstallerDataHandler::Runtime:
- return BlackBerryInstallWizardProcessPage::tr("runtime");
- default:
- break;
- }
- return QString();
-}
-
-void BlackBerryInstallWizardProcessPage::initializePage()
-{
- if (m_data.mode == BlackBerryInstallerDataHandler::UninstallMode) {
- if (m_data.version.isEmpty()) {
- wizard()->next();
- return;
- }
-
- foreach (const ConfigInstallInformation &ndk, QnxUtils::installedConfigs()) {
- if (ndk.version == m_data.version) {
- m_data.ndkPath = ndk.path;
- m_data.target = ndk.name;
- break;
- }
- }
-
- m_ui->label->setText(tr("Uninstalling %1 version: %2")
- .arg(msgTarget(m_data.installTarget), m_data.version));
- } else {
- m_ui->label->setText(tr("Installing %1 version: %2")
- .arg(msgTarget(m_data.installTarget), m_data.version));
- }
- // m_targetProcess could be running
- if (m_targetProcess->state() == QProcess::Running) {
- disconnect(m_targetProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(handleProcessFinished(int,QProcess::ExitStatus)));
- Utils::SynchronousProcess::stopProcess(*m_targetProcess);
- connect(m_targetProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(handleProcessFinished(int,QProcess::ExitStatus)));
- }
-
- processTarget();
-}
-
-bool BlackBerryInstallWizardProcessPage::isComplete() const
-{
- return false;
-}
-
-bool BlackBerryInstallWizardProcessPage::isProcessRunning() const
-{
- return (m_targetProcess->state() == QProcess::Running);
-}
-
-void BlackBerryInstallWizardProcessPage::handleProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
-{
- m_data.exitCode = exitCode;
- m_data.exitStatus = exitStatus;
-
- if (wizard()->currentPage() == this)
- wizard()->next();
-}
-
-void BlackBerryInstallWizardProcessPage::processTarget()
-{
- QString target;
- if (m_data.installTarget == BlackBerryInstallerDataHandler::Simulator)
- target = QLatin1String(" --simulator");
- else if (m_data.installTarget == BlackBerryInstallerDataHandler::Runtime)
- target = QLatin1String(" --runtime");
-
- QString option;
- if (m_data.mode == BlackBerryInstallerDataHandler::UninstallMode)
- option = QLatin1String(" --uninstall");
- else
- option = QLatin1String(" --install");
-
- QString version = m_data.version;
- QTC_ASSERT(!version.isEmpty(), return);
-
- // deactivate target if activated before uninstalling
- if (m_data.mode == BlackBerryInstallerDataHandler::UninstallMode) {
- foreach (BlackBerryApiLevelConfiguration *config, BlackBerryConfigurationManager::instance()->apiLevels()) {
- if (m_data.target.contains((config->targetName())) && config->isActive()) {
- config->deactivate();
- break;
- }
- }
- }
-
- // Killing the sdkinstall process won't kill the qde process it launched
- // thus, let's directly launch the resulting qde process
- QString qdeProcess = QnxUtils::qdeInstallProcess(m_data.ndkPath, target, option, version);
- QTC_ASSERT(!qdeProcess.isEmpty(), return);
- m_targetProcess->start(qdeProcess);
-
- m_ui->progressBar->setMaximum(0);
- m_ui->progressBar->setMinimum(0);
- m_ui->progressBar->setValue(0);
-}
-
-// --------------------------------------------------------------------------------
-
-BlackBerryInstallWizardFinalPage::BlackBerryInstallWizardFinalPage(BlackBerryInstallerDataHandler &data,
- QWidget *parent)
- : QWizardPage(parent)
- , m_data(data)
-{
- setTitle(tr("Summary"));
-}
-
-void BlackBerryInstallWizardFinalPage::initializePage()
-{
- QVBoxLayout *layout = new QVBoxLayout(this);
- QLabel *label = new QLabel(this);
- layout->addWidget(label);
-
- if (m_data.mode == BlackBerryInstallerDataHandler::ManuallMode) {
- BlackBerryConfigurationManager *configManager = BlackBerryConfigurationManager::instance();
- BlackBerryApiLevelConfiguration *config =
- configManager->apiLevelFromEnvFile(Utils::FileName::fromString(m_data.ndkPath));
-
- if (!config) {
- config = new BlackBerryApiLevelConfiguration(Utils::FileName::fromString(m_data.ndkPath));
- if (!configManager->addApiLevel(config)) {
- delete config;
- // TODO: more explicit error message!
- label->setText(tr("An error has occurred while adding target from:\n %1").arg(m_data.ndkPath));
- return;
- }
-
- label->setText(tr("Target %1 is being added.").arg(m_data.ndkPath));
- emit done();
- return;
- } else {
- label->setText(tr("Target %1 is already added.").arg(m_data.ndkPath));
- return;
- }
- }
-
- QString message;
- const QString target = msgTarget(m_data.installTarget);
-
- if (m_data.exitCode == 0 && m_data.exitStatus == QProcess::NormalExit) {
- message = m_data.mode == BlackBerryInstallerDataHandler::UninstallMode ?
- tr("Finished uninstalling %1 version:\n %2").arg(target, m_data.version) :
- tr("Finished installing %1 version:\n %2").arg(target, m_data.version);
- emit done();
- } else {
- message = m_data.mode == BlackBerryInstallerDataHandler::UninstallMode ?
- tr("An error has occurred while uninstalling %1 version:\n %2").arg(target, m_data.version) :
- tr("An error has occurred while installing %1 version:\n %2").arg(target, m_data.version);
- }
- label->setText(message);
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberryinstallwizardpages.h b/src/plugins/qnx/blackberryinstallwizardpages.h
deleted file mode 100644
index 998d420216..0000000000
--- a/src/plugins/qnx/blackberryinstallwizardpages.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYINSTALLWIZARDPAGES_H
-#define QNX_INTERNAL_BLACKBERRYINSTALLWIZARDPAGES_H
-
-#include <QWizardPage>
-#include <QListWidgetItem>
-
-#include "blackberryinstallwizard.h"
-
-#include <utils/pathchooser.h>
-
-QT_BEGIN_NAMESPACE
-class QProcess;
-class QButtonGroup;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class Ui_BlackBerryInstallWizardOptionPage;
-class Ui_BlackBerryInstallWizardNdkPage;
-class Ui_BlackBerryInstallWizardTargetPage;
-class Ui_BlackBerryInstallWizardProcessPage;
-
-class NdkPathChooser : public Utils::PathChooser
-{
- Q_OBJECT
-public:
- enum Mode {
- InstallMode, // Select a valid 10.2 NDK path
- ManualMode // Select a target bbnk-env file path
- };
-
- NdkPathChooser(Mode mode, QWidget *parent = 0);
-
-private:
- bool validateNdkPath(const QString &path, QString *errorMessage) const;
-
- Mode m_mode;
-};
-
-class BlackBerryInstallWizardOptionPage : public QWizardPage
-{
- Q_OBJECT
-
-public:
- explicit BlackBerryInstallWizardOptionPage(BlackBerryInstallerDataHandler &data, QWidget *parent = 0);
- ~BlackBerryInstallWizardOptionPage();
- void initializePage();
- bool isComplete() const;
- int nextId() const;
-
-protected slots:
- void handleApiLevelOptionChanged();
- void handlePathChanged(const QString &envFilePath);
- void handleTargetChanged();
-
-signals:
- void installModeChanged();
-
-private:
- Ui_BlackBerryInstallWizardOptionPage *m_ui;
- QButtonGroup *m_buttonGroup;
-
- NdkPathChooser *m_envFileChooser;
- BlackBerryInstallerDataHandler &m_data;
-};
-
-class BlackBerryInstallWizardNdkPage : public QWizardPage
-{
- Q_OBJECT
-
-public:
- explicit BlackBerryInstallWizardNdkPage(BlackBerryInstallerDataHandler &data, QWidget *parent = 0);
- ~BlackBerryInstallWizardNdkPage();
- void initializePage();
- bool isComplete() const;
-
-protected slots:
- void setNdkPath();
- void setManualNdkPath();
-
-private:
- Ui_BlackBerryInstallWizardNdkPage *m_ui;
- BlackBerryInstallerDataHandler &m_data;
- NdkPathChooser* m_ndkPathChooser;
- QListWidgetItem* m_manual;
- bool m_validNdkPath;
-};
-
-class BlackBerryInstallWizardTargetPage : public QWizardPage
-{
- Q_OBJECT
-
-public:
- explicit BlackBerryInstallWizardTargetPage(BlackBerryInstallerDataHandler &data, QWidget *parent = 0);
- ~BlackBerryInstallWizardTargetPage();
-
- void initializePage();
- bool isComplete() const;
- bool isProcessRunning() const;
-
-protected slots:
- void targetsListProcessFinished();
- void setTarget();
-
-private:
- BlackBerryInstallerDataHandler &m_data;
- Ui_BlackBerryInstallWizardTargetPage *m_ui;
- bool m_isTargetValid;
- QProcess *m_targetListProcess;
-
- void initTargetsTreeWidget();
- void updateAvailableTargetsList();
-
-};
-
-class BlackBerryInstallWizardProcessPage : public QWizardPage
-{
- Q_OBJECT
-
-public:
- explicit BlackBerryInstallWizardProcessPage(BlackBerryInstallerDataHandler &data,
- QWidget *parent = 0);
- ~BlackBerryInstallWizardProcessPage();
-
- void initializePage();
- bool isComplete() const;
- bool isProcessRunning() const;
-
-protected slots:
- void handleProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
-
-private:
- Ui_BlackBerryInstallWizardProcessPage *m_ui;
- BlackBerryInstallerDataHandler &m_data;
- QProcess *m_targetProcess;
-
- void processTarget();
-};
-
-class BlackBerryInstallWizardFinalPage : public QWizardPage
-{
- Q_OBJECT
-
-public:
- explicit BlackBerryInstallWizardFinalPage(BlackBerryInstallerDataHandler &data, QWidget *parent = 0);
- void initializePage();
-
-signals:
- void done();
-
-private:
- BlackBerryInstallerDataHandler &m_data;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYINSTALLWIZARDPAGES_H
diff --git a/src/plugins/qnx/blackberryinstallwizardprocesspage.ui b/src/plugins/qnx/blackberryinstallwizardprocesspage.ui
deleted file mode 100644
index 02fe3f7643..0000000000
--- a/src/plugins/qnx/blackberryinstallwizardprocesspage.ui
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryInstallWizardProcessPage</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryInstallWizardProcessPage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Please wait...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QProgressBar" name="progressBar">
- <property name="value">
- <number>24</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>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberryinstallwizardtargetpage.ui b/src/plugins/qnx/blackberryinstallwizardtargetpage.ui
deleted file mode 100644
index e3af1ab580..0000000000
--- a/src/plugins/qnx/blackberryinstallwizardtargetpage.ui
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryInstallWizardTargetPage</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryInstallWizardTargetPage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>543</width>
- <height>373</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Please select version:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTreeWidget" name="targetsTreeWidget">
- <column>
- <property name="text">
- <string notr="true">1</string>
- </property>
- </column>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrykeyspage.cpp b/src/plugins/qnx/blackberrykeyspage.cpp
deleted file mode 100644
index e594af1850..0000000000
--- a/src/plugins/qnx/blackberrykeyspage.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrykeyspage.h"
-#include "blackberrykeyswidget.h"
-#include "qnxconstants.h"
-
-#include <projectexplorer/projectexplorerconstants.h>
-
-#include <QCoreApplication>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryKeysPage::BlackBerryKeysPage(QObject *parent) :
- Core::IOptionsPage(parent),
- m_widget(0)
-{
- setId(Core::Id(Constants::QNX_BB_SIGNING_ID));
- setDisplayName(tr("Keys"));
- setCategory(Constants::QNX_BB_CATEGORY);
- setDisplayCategory(QCoreApplication::translate("BlackBerry",
- Constants::QNX_BB_CATEGORY_TR));
-}
-
-QWidget *BlackBerryKeysPage::widget()
-{
- if (!m_widget)
- m_widget = new BlackBerryKeysWidget;
- return m_widget;
-}
-
-void BlackBerryKeysPage::apply()
-{
- m_widget->saveSettings();
-}
-
-void BlackBerryKeysPage::finish()
-{
- delete m_widget;
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrykeyspage.h b/src/plugins/qnx/blackberrykeyspage.h
deleted file mode 100644
index 52b0cb4f0a..0000000000
--- a/src/plugins/qnx/blackberrykeyspage.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYKEYSPAGE_H
-#define BLACKBERRYKEYSPAGE_H
-
-#include <coreplugin/dialogs/ioptionspage.h>
-
-#include <QPointer>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryKeysWidget;
-
-class BlackBerryKeysPage : public Core::IOptionsPage
-{
- Q_OBJECT
-public:
- explicit BlackBerryKeysPage(QObject *parent = 0);
- QWidget *widget();
- void apply();
- void finish();
-
-private:
- QPointer<BlackBerryKeysWidget> m_widget;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // BLACKBERRYKEYSPAGE_H
diff --git a/src/plugins/qnx/blackberrykeyswidget.cpp b/src/plugins/qnx/blackberrykeyswidget.cpp
deleted file mode 100644
index dcf6231b80..0000000000
--- a/src/plugins/qnx/blackberrykeyswidget.cpp
+++ /dev/null
@@ -1,370 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrykeyswidget.h"
-#include "blackberryconfigurationmanager.h"
-#include "blackberrycertificate.h"
-#include "blackberrysigningutils.h"
-#include "blackberrycreatecertificatedialog.h"
-#include "blackberrydebugtokenreader.h"
-#include "blackberrydebugtokenpinsdialog.h"
-#include "blackberrydebugtokenrequester.h"
-#include "blackberrydebugtokenrequestdialog.h"
-#include "ui_blackberrykeyswidget.h"
-
-#include "qnxconstants.h"
-
-#include <QInputDialog>
-#include <QFileDialog>
-#include <QMessageBox>
-
-#include <QStandardItemModel>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryKeysWidget::BlackBerryKeysWidget(QWidget *parent) :
- QWidget(parent),
- m_utils(BlackBerrySigningUtils::instance()),
- m_ui(new Ui_BlackBerryKeysWidget),
- m_dtModel(new QStandardItemModel(this)),
- m_requester(new BlackBerryDebugTokenRequester(this))
-{
- m_ui->setupUi(this);
- m_ui->keyStatus->setTextFormat(Qt::RichText);
- m_ui->keyStatus->setTextInteractionFlags(Qt::TextBrowserInteraction);
- m_ui->keyStatus->setOpenExternalLinks(true);
- m_ui->openCertificateButton->setVisible(false);
- m_ui->editDbTkButton->setEnabled(false);
- m_ui->removeDbTkButton->setEnabled(false);
- m_ui->debugTokens->setModel(m_dtModel);
-
- updateDebugTokenList();
-
- connect(m_ui->createCertificateButton, SIGNAL(clicked()),
- this, SLOT(createCertificate()));
- connect(m_ui->clearCertificateButton, SIGNAL(clicked()),
- this, SLOT(clearCertificate()));
- connect(m_ui->openCertificateButton, SIGNAL(clicked()),
- this, SLOT(loadDefaultCertificate()));
- connect(m_ui->requestDbTkButton, SIGNAL(clicked()),
- this, SLOT(requestDebugToken()));
- connect(m_ui->importDbTkButton, SIGNAL(clicked()),
- this, SLOT(importDebugToken()));
- connect(m_ui->editDbTkButton, SIGNAL(clicked()),
- this, SLOT(editDebugToken()));
- connect(m_ui->removeDbTkButton, SIGNAL(clicked()),
- this, SLOT(removeDebugToken()));
- connect(m_requester, SIGNAL(finished(int)),
- this, SLOT(requestFinished(int)));
- connect(m_ui->debugTokens, SIGNAL(pressed(QModelIndex)),
- this, SLOT(updateUi(QModelIndex)));
- connect(&m_utils, SIGNAL(debugTokenListChanged()),
- this, SLOT(updateDebugTokenList()));
-}
-
-void BlackBerryKeysWidget::saveSettings()
-{
- m_utils.saveDebugTokens();
-}
-
-void BlackBerryKeysWidget::initModel()
-{
- m_dtModel->clear();
- QStringList headers;
- headers << tr("Path") << tr("Author") << tr("PINs") << tr("Expiry");
- m_dtModel->setHorizontalHeaderLabels(headers);
-}
-
-void BlackBerryKeysWidget::certificateLoaded(int status)
-{
- disconnect(&m_utils, SIGNAL(defaultCertificateLoaded(int)), this, SLOT(certificateLoaded(int)));
-
- switch (status) {
- case BlackBerryCertificate::Success:
- m_ui->certificateAuthor->setText(m_utils.defaultCertificate()->author());
- m_ui->certificateAuthor->setVisible(true);
- m_ui->authorLabel->setVisible(true);
- m_ui->openCertificateButton->setVisible(false);
- break;
- case BlackBerryCertificate::WrongPassword:
- if (QMessageBox::question(this, tr("Qt Creator"),
- tr("Invalid certificate password. Try again?"),
- QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
- loadDefaultCertificate();
- } else {
- m_ui->certificateAuthor->clear();
- m_ui->openCertificateButton->setVisible(true);
- }
- break;
- case BlackBerryCertificate::Busy:
- case BlackBerryCertificate::InvalidOutputFormat:
- case BlackBerryCertificate::Error:
- setCertificateError(tr("Error loading certificate."));
- m_ui->openCertificateButton->setVisible(true);
- break;
- }
-}
-
-void BlackBerryKeysWidget::createCertificate()
-{
- if (m_utils.createCertificate())
- updateCertificateSection();
-}
-
-void BlackBerryKeysWidget::clearCertificate()
-{
- if (QMessageBox::warning(this, tr("Qt Creator"),
- tr("This action cannot be undone. Would you like to continue?"),
- QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
- m_utils.deleteDefaultCertificate();
- updateCertificateSection();
- }
-}
-
-void BlackBerryKeysWidget::showEvent(QShowEvent *)
-{
- updateKeysSection();
- updateCertificateSection();
-}
-
-void BlackBerryKeysWidget::updateCertificateSection()
-{
- if (m_utils.hasDefaultCertificate()) {
- setCreateCertificateVisible(false);
-
- m_ui->certificatePath->setText(BlackBerryConfigurationManager::instance()->defaultKeystorePath());
-
- const BlackBerryCertificate *certificate = m_utils.defaultCertificate();
-
- if (certificate) {
- m_ui->certificateAuthor->setText(certificate->author());
- m_ui->openCertificateButton->setVisible(false);
- return;
- }
-
- m_ui->openCertificateButton->setVisible(true);
- m_ui->certificateAuthor->setVisible(false);
- m_ui->authorLabel->setVisible(false);
- } else {
- setCreateCertificateVisible(true);
- }
-}
-
-void BlackBerryKeysWidget::updateKeysSection()
-{
- if (m_utils.hasLegacyKeys()) {
- m_ui->keyStatus->setText(tr("It appears you are using legacy key files. Please refer to the "
- "<a href=\"%1\">BlackBerry website</a> to find out how to update your keys.")
- .arg(QLatin1String(Qnx::Constants::QNX_LEGACY_KEYS_URL)));
- } else if (m_utils.hasRegisteredKeys()) {
- m_ui->keyStatus->setText(tr("Your keys are ready to be used"));
- } else {
- m_ui->keyStatus->setText(tr("No keys found. Please refer to the "
- "<a href=\"%1\">BlackBerry website</a> "
- "to find out how to request your keys.")
- .arg(QLatin1String(Qnx::Constants::QNX_REGISTER_KEYS_URL)));
- }
-}
-
-void BlackBerryKeysWidget::loadDefaultCertificate()
-{
- connect(&m_utils, SIGNAL(defaultCertificateLoaded(int)), this, SLOT(certificateLoaded(int)));
- m_utils.openDefaultCertificate(this);
-}
-
-void BlackBerryKeysWidget::updateDebugTokenList()
-{
- initModel();
- foreach (const QString &dt, m_utils.debugTokens()) {
- QList<QStandardItem*> row;
- BlackBerryDebugTokenReader debugTokenReader(dt);
- if (!debugTokenReader.isValid())
- continue;
-
- row << new QStandardItem(dt);
- row << new QStandardItem(debugTokenReader.author());
- row << new QStandardItem(debugTokenReader.pins());
- row << new QStandardItem(debugTokenReader.expiry());
- m_dtModel->appendRow(row);
- }
-
- m_ui->debugTokens->header()->resizeSections(QHeaderView::ResizeToContents);
-}
-
-void BlackBerryKeysWidget::requestDebugToken()
-{
- BlackBerryDebugTokenRequestDialog dialog(this);
- if (dialog.exec() != QDialog::Accepted)
- return;
-
- m_utils.addDebugToken(dialog.debugToken());
-}
-
-void BlackBerryKeysWidget::importDebugToken()
-{
- const QString debugToken = QFileDialog::getOpenFileName(this, tr("Select Debug Token"),
- QString(), tr("Bar file (*.bar)"));
- if (debugToken.isEmpty())
- return;
-
- BlackBerryDebugTokenReader debugTokenReader(debugToken);
- if (!debugTokenReader.isValid()) {
- QMessageBox::warning(this, tr("Invalid Debug Token"),
- tr("Debug token file %1 cannot be read.").arg(debugToken));
- return;
- }
-
- m_utils.addDebugToken(debugToken);
-}
-
-void BlackBerryKeysWidget::editDebugToken()
-{
- const QModelIndex index = m_ui->debugTokens->currentIndex();
- if (!index.isValid())
- return;
-
- QString pins = m_dtModel->item(index.row(), 0)->text();
-
- BlackBerryDebugTokenPinsDialog dialog(pins, this);
- connect(&dialog, SIGNAL(pinsUpdated(QStringList)), this, SLOT(updateDebugToken(QStringList)));
- dialog.exec();
-}
-
-void BlackBerryKeysWidget::removeDebugToken()
-{
- const QModelIndex index = m_ui->debugTokens->currentIndex();
- if (!index.isValid())
- return;
-
- const QString dt = m_dtModel->item(index.row(), 0)->text();
- const int result = QMessageBox::question(this, tr("Confirmation"),
- tr("Are you sure you want to remove %1?")
- .arg(dt), QMessageBox::Yes | QMessageBox::No);
-
- if (result == QMessageBox::Yes)
- m_utils.removeDebugToken(dt);
-}
-
-void BlackBerryKeysWidget::updateDebugToken(const QStringList &pins)
-{
- bool ok;
- const QString cskPassword = m_utils.cskPassword(this, &ok);
- if (!ok)
- return;
-
- const QString certificatePassword = m_utils.certificatePassword(this, &ok);
- if (!ok)
- return;
-
- const QString debugTokenPath = m_dtModel->item(m_ui->debugTokens->currentIndex().row(), 0)->text();
- m_requester->requestDebugToken(debugTokenPath,
- cskPassword, BlackBerryConfigurationManager::instance()->defaultKeystorePath(),
- certificatePassword, pins.join(QLatin1Char(',')));
-}
-
-void BlackBerryKeysWidget::requestFinished(int status)
-{
- QString errorString = tr("Failed to request debug token:") + QLatin1Char(' ');
-
- switch (status) {
- case BlackBerryDebugTokenRequester::Success:
- updateDebugTokenList();
- return;
- case BlackBerryDebugTokenRequester::WrongCskPassword:
- m_utils.clearCskPassword();
- errorString += tr("Wrong CSK password.");
- break;
- case BlackBerryDebugTokenRequester::WrongKeystorePassword:
- m_utils.clearCertificatePassword();
- 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::NotYetRegistered:
- errorString += tr("Not yet registered to request debug tokens.");
- break;
- case BlackBerryDebugTokenRequester::UnknownError:
- default:
- m_utils.clearCertificatePassword();
- m_utils.clearCskPassword();
- errorString += tr("An unknown error has occurred.");
- break;
- }
-
- QMessageBox::critical(this, tr("Error"), errorString);
-}
-
-void BlackBerryKeysWidget::updateUi(const QModelIndex &index)
-{
- m_ui->editDbTkButton->setEnabled(index.isValid());
- m_ui->removeDbTkButton->setEnabled(index.isValid());
-}
-
-void BlackBerryKeysWidget::setCertificateError(const QString &error)
-{
- m_ui->certificateAuthor->clear();
- QMessageBox::critical(this, tr("Qt Creator"), error);
-}
-
-void BlackBerryKeysWidget::setCreateCertificateVisible(bool visible)
-{
- m_ui->pathLabel->setVisible(!visible);
- m_ui->authorLabel->setVisible(!visible);
- m_ui->certificatePath->setVisible(!visible);
- m_ui->certificateAuthor->setVisible(!visible);
- m_ui->clearCertificateButton->setVisible(!visible);
- m_ui->openCertificateButton->setVisible(!visible);
- m_ui->noCertificateLabel->setVisible(visible);
- m_ui->createCertificateButton->setVisible(visible);
-}
-
-} // namespace Internal
-} // namespace Qnx
-
diff --git a/src/plugins/qnx/blackberrykeyswidget.h b/src/plugins/qnx/blackberrykeyswidget.h
deleted file mode 100644
index 57ca0c7bf9..0000000000
--- a/src/plugins/qnx/blackberrykeyswidget.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYKEYSWIDGET_H_H
-#define BLACKBERRYKEYSWIDGET_H_H
-
-#include <QWidget>
-#include <QString>
-
-QT_BEGIN_NAMESPACE
-class QStandardItemModel;
-class QModelIndex;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryCertificate;
-class BlackBerrySigningUtils;
-class BlackBerryDebugTokenRequester;
-class Ui_BlackBerryKeysWidget;
-
-class BlackBerryKeysWidget : public QWidget
-{
- Q_OBJECT
-public:
- explicit BlackBerryKeysWidget(QWidget *parent = 0);
- void saveSettings();
-
-private slots:
- void certificateLoaded(int status);
- void createCertificate();
- void clearCertificate();
- void loadDefaultCertificate();
- void updateDebugTokenList();
-
- void requestDebugToken();
- void importDebugToken();
- void editDebugToken();
- void removeDebugToken();
- void updateDebugToken(const QStringList &pins);
- void requestFinished(int status);
- void updateUi(const QModelIndex &index);
-
-protected:
- void showEvent(QShowEvent *event);
-
-private:
- void updateKeysSection();
- void updateCertificateSection();
- void setCertificateError(const QString &error);
- void setCreateCertificateVisible(bool show);
- void initModel();
-
- BlackBerrySigningUtils &m_utils;
-
- Ui_BlackBerryKeysWidget *m_ui;
- QStandardItemModel *m_dtModel;
- BlackBerryDebugTokenRequester *m_requester;
-};
-
-} // namespace Internal
-} // namespeace Qnx
-
-#endif // BLACKBERRYKEYSWIDGET_H_H
diff --git a/src/plugins/qnx/blackberrykeyswidget.ui b/src/plugins/qnx/blackberrykeyswidget.ui
deleted file mode 100644
index 666e81c170..0000000000
--- a/src/plugins/qnx/blackberrykeyswidget.ui
+++ /dev/null
@@ -1,254 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryKeysWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryKeysWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>959</width>
- <height>703</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>BlackBerry Signing Authority</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="keyStatus">
- <property name="font">
- <font>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="text">
- <string>STATUS</string>
- </property>
- <property name="textFormat">
- <enum>Qt::RichText</enum>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- <property name="textInteractionFlags">
- <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>Developer Certificate</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="pathLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Path:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="certificatePath">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>PATH</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="authorLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Author:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="certificateAuthor">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>LABEL</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="noCertificateLabel">
- <property name="font">
- <font>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="text">
- <string>No developer certificate has been found.</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>
- <item>
- <widget class="QPushButton" name="openCertificateButton">
- <property name="text">
- <string>Open Certificate</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="clearCertificateButton">
- <property name="text">
- <string>Clear Certificate</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="createCertificateButton">
- <property name="text">
- <string>Create Certificate...</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>Debug Tokens</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QTreeView" name="debugTokens">
- <property name="editTriggers">
- <set>QAbstractItemView::NoEditTriggers</set>
- </property>
- <property name="selectionMode">
- <enum>QAbstractItemView::ExtendedSelection</enum>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <widget class="QPushButton" name="requestDbTkButton">
- <property name="text">
- <string>Request...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="importDbTkButton">
- <property name="text">
- <string>Import...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="editDbTkButton">
- <property name="text">
- <string>Edit...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="removeDbTkButton">
- <property name="text">
- <string>Remove</string>
- </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>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrylogprocessrunner.cpp b/src/plugins/qnx/blackberrylogprocessrunner.cpp
deleted file mode 100644
index 73db7cbf31..0000000000
--- a/src/plugins/qnx/blackberrylogprocessrunner.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrylogprocessrunner.h"
-#include "slog2inforunner.h"
-
-#include <projectexplorer/devicesupport/sshdeviceprocess.h>
-#include <utils/qtcassert.h>
-
-using namespace Qnx::Internal;
-
-BlackBerryLogProcessRunner::BlackBerryLogProcessRunner(QObject *parent, const QString& appId, const BlackBerryDeviceConfiguration::ConstPtr &device)
- : QObject(parent)
-{
- Q_ASSERT(!appId.isEmpty() && device);
-
- m_appId = appId;
- m_device = device;
-
- m_slog2InfoRunner = new Slog2InfoRunner(appId, m_device, this);
- connect(m_slog2InfoRunner, SIGNAL(finished()), this, SIGNAL(finished()));
- connect(m_slog2InfoRunner, SIGNAL(output(QString,Utils::OutputFormat)), this, SIGNAL(output(QString,Utils::OutputFormat)));
-
- m_tailProcess = new ProjectExplorer::SshDeviceProcess(m_device, this);
- connect(m_tailProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readTailStandardOutput()));
- connect(m_tailProcess, SIGNAL(readyReadStandardError()), this, SLOT(readTailStandardError()));
- connect(m_tailProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(handleTailProcessError()));
-}
-
-void BlackBerryLogProcessRunner::start()
-{
- m_slog2InfoRunner->start();
- launchTailProcess();
-}
-
-void BlackBerryLogProcessRunner::readTailStandardOutput()
-{
- const QString message = QString::fromLatin1(m_tailProcess->readAllStandardOutput());
- emit output(message, Utils::StdOutFormat);
-}
-
-void BlackBerryLogProcessRunner::readTailStandardError()
-{
- const QString message = QString::fromLatin1(m_tailProcess->readAllStandardError());
- emit output(message, Utils::StdErrFormat);
-}
-
-void BlackBerryLogProcessRunner::handleTailProcessError()
-{
- emit output(tr("Cannot show debug output. Error: %1").arg(m_tailProcess->errorString()), Utils::StdErrFormat);
-}
-
-void BlackBerryLogProcessRunner::launchTailProcess()
-{
- if (m_tailProcess->state() == QProcess::Running)
- return;
-
- QStringList parameters;
- parameters << QLatin1String("-c")
- << QLatin1String("+1")
- << QLatin1String("-f")
- << QLatin1String("/accounts/1000/appdata/") + m_appId + QLatin1String("/logs/log");
- m_tailProcess->start(QLatin1String("tail"), parameters);
-}
-
-void BlackBerryLogProcessRunner::stop()
-{
- m_slog2InfoRunner->stop();
- m_tailProcess->kill();
-
- emit finished();
-}
diff --git a/src/plugins/qnx/blackberrylogprocessrunner.h b/src/plugins/qnx/blackberrylogprocessrunner.h
deleted file mode 100644
index 0de41610dd..0000000000
--- a/src/plugins/qnx/blackberrylogprocessrunner.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYSLOGPROCESS_H
-#define BLACKBERRYSLOGPROCESS_H
-
-#include "blackberrydeviceconfiguration.h"
-
-#include <utils/outputformat.h>
-
-#include <QObject>
-
-namespace ProjectExplorer { class SshDeviceProcess; }
-
-namespace Qnx {
-namespace Internal {
-
-class Slog2InfoRunner;
-
-class BlackBerryLogProcessRunner : public QObject
-{
- Q_OBJECT
-public:
- explicit BlackBerryLogProcessRunner(QObject *parent, const QString &appId, const BlackBerryDeviceConfiguration::ConstPtr &device);
- void start();
-
-signals:
- void output(const QString &msg, Utils::OutputFormat format);
- void finished();
-
-public slots:
- void stop();
-
-private slots:
- void launchTailProcess();
- void readTailStandardOutput();
- void readTailStandardError();
- void handleTailProcessError();
-
-private:
- QString m_appId;
-
- BlackBerryDeviceConfiguration::ConstPtr m_device;
- ProjectExplorer::SshDeviceProcess *m_tailProcess;
- Slog2InfoRunner *m_slog2InfoRunner;
-};
-} // namespace Internal
-} // namespace Qnx
-
-#endif // BLACKBERRYSLOGPROCESS_H
diff --git a/src/plugins/qnx/blackberryndkprocess.cpp b/src/plugins/qnx/blackberryndkprocess.cpp
deleted file mode 100644
index dfa64225ee..0000000000
--- a/src/plugins/qnx/blackberryndkprocess.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryndkprocess.h"
-#include "blackberryconfigurationmanager.h"
-
-#include <utils/hostosinfo.h>
-
-#include <QTextStream>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryNdkProcess::BlackBerryNdkProcess(const QString &command, QObject *parent) :
- QObject(parent),
- m_process(new QProcess(this)),
- m_command(command)
-{
- m_process->setProcessChannelMode(QProcess::MergedChannels);
- m_process->setEnvironment(Utils::EnvironmentItem::toStringList(
- BlackBerryConfigurationManager::instance()->defaultConfigurationEnv()));
-
- connect(m_process, SIGNAL(started()), this, SIGNAL(started()));
- connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(processFinished()));
- connect(m_process, SIGNAL(error(QProcess::ProcessError)),
- this, SLOT(processError(QProcess::ProcessError)));
-}
-
-const QString BlackBerryNdkProcess::resolveNdkToolPath(const QString &tool)
-{
- QString toolPath;
- QList<Utils::EnvironmentItem> qnxEnv =
- BlackBerryConfigurationManager::instance()->defaultConfigurationEnv();
- foreach (const Utils::EnvironmentItem &item, qnxEnv) {
- if (item.name == QLatin1String("QNX_HOST") && !item.value.isEmpty()) {
- toolPath = item.value
- + (QLatin1String("/usr/bin/")) + tool;
-
- if (Utils::HostOsInfo::isWindowsHost())
- toolPath += QLatin1String(".bat");
-
- break;
- }
- }
-
- return toolPath;
-}
-
-QString BlackBerryNdkProcess::command() const
-{
- return resolveNdkToolPath(m_command);
-}
-
-void BlackBerryNdkProcess::start(const QStringList &arguments)
-{
- if (m_process->state() != QProcess::NotRunning)
- return;
-
- resetResults();
-
- m_process->start(command(), arguments);
-}
-
-void BlackBerryNdkProcess::addErrorStringMapping(
- const QString &message, int errorCode)
-{
- m_errorStringMap.insert(message, errorCode);
-}
-
-void BlackBerryNdkProcess::processFinished()
-{
- QTextStream processOutput(m_process);
- if (m_process->exitCode() == 0) {
- while (!processOutput.atEnd())
- processData(processOutput.readLine());
-
- emit finished(Success);
- return;
- }
-
- int returnStatus = UnknownError;
- while (!processOutput.atEnd()) {
- returnStatus = errorLineToReturnStatus(processOutput.readLine());
- if (returnStatus >= 0)
- break;
- }
-
- emit finished(returnStatus);
-}
-
-void BlackBerryNdkProcess::processError(QProcess::ProcessError error)
-{
- int errorCode;
-
- switch (error) {
- case QProcess::FailedToStart:
- errorCode = FailedToStartInferiorProcess;
- break;
- case QProcess::Timedout:
- errorCode = InferiorProcessTimedOut;
- break;
- case QProcess::Crashed:
- errorCode = InferiorProcessCrashed;
- break;
- case QProcess::WriteError:
- errorCode = InferiorProcessWriteError;
- break;
- case QProcess::ReadError:
- errorCode = InferiorProcessReadError;
- break;
- case QProcess::UnknownError:
- default:
- errorCode = UnknownError;
- break;
- }
-
- emit finished(errorCode);
-}
-
-int BlackBerryNdkProcess::errorLineToReturnStatus(const QString &line) const
-{
- typedef QMap<QString, int>::ConstIterator ConstIt;
-
- const ConstIt cend = m_errorStringMap.constEnd();
- for (ConstIt it = m_errorStringMap.constBegin(); it != cend; ++it) {
- if (line.contains(it.key()))
- return it.value();
- }
-
- return -1;
-}
-
-void BlackBerryNdkProcess::processData(const QString &line)
-{
- Q_UNUSED(line);
-}
-
-void BlackBerryNdkProcess::resetResults()
-{
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberryndkprocess.h b/src/plugins/qnx/blackberryndkprocess.h
deleted file mode 100644
index b732299738..0000000000
--- a/src/plugins/qnx/blackberryndkprocess.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYNDKPROCESS_H
-#define QNX_INTERNAL_BLACKBERRYNDKPROCESS_H
-
-#include <QObject>
-#include <QProcess>
-#include <QMap>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryNdkProcess : public QObject
-{
- Q_OBJECT
-
-public:
- enum ProcessStatus
- {
- Success,
- FailedToStartInferiorProcess,
- InferiorProcessTimedOut,
- InferiorProcessCrashed,
- InferiorProcessWriteError,
- InferiorProcessReadError,
- UnknownError,
- UserStatus
- };
-
- /**
- * @brief Resolves full path to an NDK cmd-line tool.
- * @return a full-path to the NDK cmd-line tool;
- * or empty QString when no default QNX configuration is found.
- */
- static const QString resolveNdkToolPath(const QString &tool);
-
-signals:
- void finished(int status);
- void started();
-
-protected:
- explicit BlackBerryNdkProcess(const QString &command, QObject *parent = 0);
-
- void start(const QStringList &arguments);
- void addErrorStringMapping(const QString &message, int errorCode);
-
- QString command() const;
-
-private slots:
- void processFinished();
- void processError(QProcess::ProcessError error);
-
-private:
- int errorLineToReturnStatus(const QString &line) const;
- virtual void processData(const QString &line);
- virtual void resetResults();
-
- QProcess *m_process;
-
- QString m_command;
-
- QMap<QString, int> m_errorStringMap;
-};
-
-}
-}
-
-#endif // QNX_INTERNAL_BLACKBERRYNDKPROCESS_H
diff --git a/src/plugins/qnx/blackberryndksettingspage.cpp b/src/plugins/qnx/blackberryndksettingspage.cpp
deleted file mode 100644
index 9d74e55e12..0000000000
--- a/src/plugins/qnx/blackberryndksettingspage.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryndksettingspage.h"
-#include "blackberryndksettingswidget.h"
-#include "blackberryconfigurationmanager.h"
-#include "blackberryapilevelconfiguration.h"
-#include "qnxconstants.h"
-
-#include <projectexplorer/projectexplorerconstants.h>
-
-#include <QCoreApplication>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryNDKSettingsPage::BlackBerryNDKSettingsPage(QObject *parent) :
- Core::IOptionsPage(parent)
-{
- setId(Core::Id(Constants::QNX_BB_NDK_SETTINGS_ID));
- setDisplayName(tr("API Levels and Runtimes"));
- setCategory(Constants::QNX_BB_CATEGORY);
- setDisplayCategory(QCoreApplication::translate("BlackBerry",
- Constants::QNX_BB_CATEGORY_TR));
- setCategoryIcon(QLatin1String(Constants::QNX_BB_CATEGORY_ICON));
-}
-
-QWidget *BlackBerryNDKSettingsPage::widget()
-{
- if (!m_widget)
- m_widget = new BlackBerryNDKSettingsWidget;
- return m_widget;
-}
-
-void BlackBerryNDKSettingsPage::apply()
-{
- foreach (BlackBerryApiLevelConfiguration* config, m_widget->activatedApiLevels()) {
- if (!config->isActive())
- config->activate();
- }
-
- foreach (BlackBerryApiLevelConfiguration* config, m_widget->deactivatedApiLevels()) {
- if (config->isActive())
- config->deactivate();
- }
-
- BlackBerryConfigurationManager::instance()->setDefaultConfiguration(m_widget->defaultApiLevel());
-}
-
-void BlackBerryNDKSettingsPage::finish()
-{
- delete m_widget;
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberryndksettingspage.h b/src/plugins/qnx/blackberryndksettingspage.h
deleted file mode 100644
index 1593bdd959..0000000000
--- a/src/plugins/qnx/blackberryndksettingspage.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYNDKSETTINGSPAGE_H
-#define BLACKBERRYNDKSETTINGSPAGE_H
-
-#include <coreplugin/dialogs/ioptionspage.h>
-
-#include <QPointer>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryNDKSettingsWidget;
-
-class BlackBerryNDKSettingsPage : public Core::IOptionsPage
-{
- Q_OBJECT
-public:
- explicit BlackBerryNDKSettingsPage(QObject *parent = 0);
- QWidget *widget();
- void apply();
- void finish();
-
-private:
- QPointer<BlackBerryNDKSettingsWidget> m_widget;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // BLACKBERRYNDKSETTINGSPAGE_H
diff --git a/src/plugins/qnx/blackberryndksettingswidget.cpp b/src/plugins/qnx/blackberryndksettingswidget.cpp
deleted file mode 100644
index a80b9f16b2..0000000000
--- a/src/plugins/qnx/blackberryndksettingswidget.cpp
+++ /dev/null
@@ -1,464 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryndksettingswidget.h"
-#include "ui_blackberryndksettingswidget.h"
-#include "qnxutils.h"
-#include "blackberrysigningutils.h"
-
-#include "blackberryconfigurationmanager.h"
-#include "blackberryapilevelconfiguration.h"
-#include "blackberryruntimeconfiguration.h"
-
-#include <utils/pathchooser.h>
-
-#include <coreplugin/coreconstants.h>
-#include <coreplugin/icore.h>
-
-#include <QMessageBox>
-#include <QFileDialog>
-
-#include <QStandardItemModel>
-#include <QTreeWidgetItem>
-
-namespace Qnx {
-namespace Internal {
-
-static QIcon invalidConfigIcon(QString::fromLatin1(Core::Constants::ICON_ERROR));
-
-BlackBerryNDKSettingsWidget::BlackBerryNDKSettingsWidget(QWidget *parent) :
- QWidget(parent),
- m_ui(new Ui_BlackBerryNDKSettingsWidget),
- m_bbConfigManager(BlackBerryConfigurationManager::instance()),
- m_autoDetectedNdks(0),
- m_manualApiLevel(0)
-{
- m_ui->setupUi(this);
-
- updateInfoTable(0);
-
- m_activatedApiLevel << m_bbConfigManager->activeApiLevels();
-
- m_ui->ndksTreeWidget->header()->setSectionResizeMode(QHeaderView::Stretch);
- m_ui->ndksTreeWidget->header()->setStretchLastSection(false);
- m_ui->ndksTreeWidget->setHeaderItem(new QTreeWidgetItem(QStringList() << tr("Configuration")));
- m_ui->ndksTreeWidget->setTextElideMode(Qt::ElideNone);
- m_ui->ndksTreeWidget->setColumnCount(1);
-
- m_apiLevels = new QTreeWidgetItem(m_ui->ndksTreeWidget);
- m_apiLevels->setText(0, tr("API Levels"));
- m_runtimes = new QTreeWidgetItem(m_ui->ndksTreeWidget);
- m_runtimes->setText(0, tr("Runtimes"));
-
- m_autoDetectedNdks = new QTreeWidgetItem(m_apiLevels);
- m_autoDetectedNdks->setText(0, tr("Auto-Detected"));
- m_autoDetectedNdks->setFirstColumnSpanned(true);
- m_autoDetectedNdks->setFlags(Qt::ItemIsEnabled);
- m_manualApiLevel = new QTreeWidgetItem(m_apiLevels);
- m_manualApiLevel->setText(0, tr("Manual"));
- m_manualApiLevel->setFirstColumnSpanned(true);
- m_manualApiLevel->setFlags(Qt::ItemIsEnabled);
-
- m_ui->ndksTreeWidget->expandAll();
-
- connect(m_ui->addConfigButton, SIGNAL(clicked()), this, SLOT(addConfiguration()));
- connect(m_ui->removeConfigButton, SIGNAL(clicked()), this, SLOT(removeConfiguration()));
- connect(m_ui->activateNdkTargetButton, SIGNAL(clicked()), this, SLOT(activateApiLevel()));
- connect(m_ui->deactivateNdkTargetButton, SIGNAL(clicked()), this, SLOT(deactivateApiLevel()));
-
- connect(m_ui->cleanUpButton, SIGNAL(clicked()), this, SLOT(cleanUp()));
- connect(m_ui->ndksTreeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(updateInfoTable(QTreeWidgetItem*)));
- connect(this, SIGNAL(configurationsUpdated()), this, SLOT(populateDefaultConfigurationCombo()));
-
- // BlackBerryConfigurationManager.settingsChanged signal may be emitted multiple times
- // during the same event handling. This would result in multiple updatePage() calls even through
- // just one is needed.
- // QTimer allows to merge those multiple signal emits into a single updatePage() call.
- m_timer.setSingleShot(true);
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(updatePage()));
-
- updatePage();
- connect(m_bbConfigManager, SIGNAL(settingsChanged()), &m_timer, SLOT(start()));
-}
-
-bool BlackBerryNDKSettingsWidget::hasActiveNdk() const
-{
- return !m_bbConfigManager->apiLevels().isEmpty();
-}
-
-QList<BlackBerryApiLevelConfiguration *> BlackBerryNDKSettingsWidget::activatedApiLevels()
-{
- return m_activatedApiLevel;
-}
-
-QList<BlackBerryApiLevelConfiguration *> BlackBerryNDKSettingsWidget::deactivatedApiLevels()
-{
- return m_deactivatedApiLevel;
-}
-
-BlackBerryApiLevelConfiguration *BlackBerryNDKSettingsWidget::defaultApiLevel() const
-{
- const int currentIndex = m_ui->apiLevelCombo->currentIndex();
-
- return static_cast<BlackBerryApiLevelConfiguration*>(
- m_ui->apiLevelCombo->itemData(currentIndex).value<void*>());
-}
-
-void BlackBerryNDKSettingsWidget::updateInfoTable(QTreeWidgetItem* currentItem)
-{
- updateUi(currentItem);
- if (!currentItem)
- return;
-
- if (currentItem->parent() == m_runtimes) {
- BlackBerryRuntimeConfiguration *runtime = static_cast<BlackBerryRuntimeConfiguration*>(
- currentItem->data(0, Qt::UserRole).value<void*>());
- if (runtime) {
- m_ui->baseName->setText(runtime->displayName());
- m_ui->version->setText(runtime->version().toString());
- m_ui->path->setText(runtime->path());
-
- m_ui->removeConfigButton->setEnabled(runtime);
- m_ui->activateNdkTargetButton->setEnabled(false);
- m_ui->deactivateNdkTargetButton->setEnabled(false);
- }
-
- return;
- } else if (currentItem->parent() == m_autoDetectedNdks || currentItem->parent() == m_manualApiLevel) {
- BlackBerryApiLevelConfiguration *config = static_cast<BlackBerryApiLevelConfiguration*>(
- currentItem->data(0, Qt::UserRole).value<void*>());
-
- m_ui->path->setText(config->envFile().toString());
- m_ui->baseName->setText(config->displayName());
- m_ui->host->setText(QDir::toNativeSeparators(config->qnxHost().toString()));
- m_ui->target->setText(QDir::toNativeSeparators(config->sysRoot().toString()));
- m_ui->version->setText(config->version().toString());
- }
-}
-
-void BlackBerryNDKSettingsWidget::updateConfigurationList()
-{
- m_activatedApiLevel.clear();
- m_activatedApiLevel << m_bbConfigManager->activeApiLevels();
- m_deactivatedApiLevel.clear();
-
- qDeleteAll(m_autoDetectedNdks->takeChildren());
- qDeleteAll(m_manualApiLevel->takeChildren());
- qDeleteAll(m_runtimes->takeChildren());
-
- bool enableCleanUp = false;
- foreach (BlackBerryApiLevelConfiguration *config, m_bbConfigManager->apiLevels()) {
- QTreeWidgetItem *parent = config->isAutoDetected() ? m_autoDetectedNdks : m_manualApiLevel;
- QTreeWidgetItem *item = new QTreeWidgetItem(parent);
- item->setText(0, config->displayName());
- item->setData(0, Qt::UserRole, QVariant::fromValue(static_cast<void*>(config)));
- QFont font;
- font.setBold(config->isActive() || m_activatedApiLevel.contains(config));
- item->setFont(0, font);
- item->setIcon(0, config->isValid() ? QIcon() : invalidConfigIcon);
- // TODO: Do the same if qmake, qcc, debugger are no longer detected...
- if (!config->isValid()) {
- QString toolTip = tr("Invalid target %1:").arg(config->targetName());
- if (config->isAutoDetected() && !config->autoDetectionSource().exists())
- toolTip += QLatin1Char('\n') + tr("- Target no longer installed.");
-
- if (!config->envFile().exists())
- toolTip += QLatin1Char('\n') + tr("- No NDK environment file found.");
-
- if (config->qmake4BinaryFile().isEmpty()
- && config->qmake5BinaryFile().isEmpty())
- toolTip += QLatin1Char('\n') + tr("- No Qt version found.");
-
- if (config->qccCompilerPath().isEmpty())
- toolTip += QLatin1Char('\n') + tr("- No compiler found.");
-
- if (config->armDebuggerPath().isEmpty())
- toolTip += QLatin1Char('\n') + tr("- No debugger found for device.");
-
- if (config->x86DebuggerPath().isEmpty())
- toolTip += QLatin1Char('\n') + tr("- No debugger found for simulator.");
-
- item->setToolTip(0, toolTip);
- enableCleanUp = true;
- }
- }
-
- foreach (BlackBerryRuntimeConfiguration *runtime, m_bbConfigManager->runtimes()) {
- QTreeWidgetItem *item = new QTreeWidgetItem(m_runtimes);
- item->setText(0, runtime->displayName());
- item->setData(0, Qt::UserRole, QVariant::fromValue(static_cast<void*>(runtime)));
- }
-
- m_ui->ndksTreeWidget->setCurrentItem(m_autoDetectedNdks->child(0));
- m_ui->cleanUpButton->setEnabled(enableCleanUp);
-}
-
-void BlackBerryNDKSettingsWidget::addConfiguration()
-{
- launchBlackBerryInstallerWizard(BlackBerryInstallerDataHandler::InstallMode, BlackBerryInstallerDataHandler::ApiLevel);
- emit configurationsUpdated();
-}
-
-void BlackBerryNDKSettingsWidget::removeConfiguration()
-{
- QTreeWidgetItem * current = m_ui->ndksTreeWidget->currentItem();
- if (!current)
- return;
-
- if (current->parent() == m_runtimes) {
- uninstallConfiguration(BlackBerryInstallerDataHandler::Runtime);
- emit configurationsUpdated();
- } else {
- const QString ndk = m_ui->ndksTreeWidget->currentItem()->text(0);
- BlackBerryApiLevelConfiguration *config = static_cast<BlackBerryApiLevelConfiguration*>(
- current->data(0, Qt::UserRole).value<void*>());
- if (config->isAutoDetected()) {
- uninstallConfiguration(BlackBerryInstallerDataHandler::ApiLevel);
- emit configurationsUpdated();
- return;
- }
-
- QMessageBox::StandardButton button =
- QMessageBox::question(Core::ICore::mainWindow(),
- tr("Clean BlackBerry 10 Configuration"),
- tr("Are you sure you want to remove:\n %1?").arg(ndk),
- QMessageBox::Yes | QMessageBox::No);
-
- if (button == QMessageBox::Yes) {
- m_activatedApiLevel.removeOne(config);
- m_deactivatedApiLevel.removeOne(config);
- m_bbConfigManager->removeApiLevel(config);
- m_manualApiLevel->removeChild(m_ui->ndksTreeWidget->currentItem());
- emit configurationsUpdated();
- }
- }
-}
-
-void BlackBerryNDKSettingsWidget::activateApiLevel()
-{
- if (!m_ui->ndksTreeWidget->currentItem())
- return;
-
- BlackBerryApiLevelConfiguration *config = static_cast<BlackBerryApiLevelConfiguration*>(
- m_ui->ndksTreeWidget->currentItem()->data(0, Qt::UserRole).value<void*>());
-
- if (!m_activatedApiLevel.contains(config)) {
- m_activatedApiLevel << config;
- if (m_deactivatedApiLevel.contains(config))
- m_deactivatedApiLevel.removeAt(m_deactivatedApiLevel.indexOf(config));
-
- updateUi(m_ui->ndksTreeWidget->currentItem());
- emit configurationsUpdated();
- }
-}
-
-void BlackBerryNDKSettingsWidget::deactivateApiLevel()
-{
- if (!m_ui->ndksTreeWidget->currentItem())
- return;
-
- BlackBerryApiLevelConfiguration *config = static_cast<BlackBerryApiLevelConfiguration*>(
- m_ui->ndksTreeWidget->currentItem()->data(0, Qt::UserRole).value<void*>());
- if (m_activatedApiLevel.contains(config)) {
- m_deactivatedApiLevel << config;
- m_activatedApiLevel.removeAt(m_activatedApiLevel.indexOf(config));
- updateUi(m_ui->ndksTreeWidget->currentItem());
- emit configurationsUpdated();
- }
-}
-
-void BlackBerryNDKSettingsWidget::updateUi(QTreeWidgetItem *item)
-{
- if (!item || (item->parent() != m_runtimes &&
- item->parent() != m_autoDetectedNdks &&
- item->parent() != m_manualApiLevel )) {
- m_ui->removeConfigButton->setEnabled(false);
- m_ui->activateNdkTargetButton->setEnabled(false);
- m_ui->deactivateNdkTargetButton->setEnabled(false);
- m_ui->informationBox->setVisible(false);
- return;
- }
-
- const bool isRuntimeItem = item->parent() == m_runtimes;
- // Update the infornation to show in the information panel
- m_ui->informationBox->setVisible(true);
- m_ui->informationBox->setTitle(isRuntimeItem ?
- tr("Runtime Information") : tr("API Level Information"));
- m_ui->pathLabel->setText(isRuntimeItem ? tr("Path:") : tr("Environment file:"));
- m_ui->hostLabel->setVisible(!isRuntimeItem);
- m_ui->host->setVisible(!isRuntimeItem);
- m_ui->targetLabel->setVisible(!isRuntimeItem);
- m_ui->target->setVisible(!isRuntimeItem);
-
- if (!isRuntimeItem) {
- BlackBerryApiLevelConfiguration *config = static_cast<BlackBerryApiLevelConfiguration*>(
- item->data(0, Qt::UserRole).value<void*>());
- const bool contains = m_activatedApiLevel.contains(config);
- QFont font;
- font.setBold(contains);
- item->setFont(0, font);
-
- m_ui->activateNdkTargetButton->setEnabled(!contains);
- m_ui->deactivateNdkTargetButton->setEnabled(contains);
- // Disable remove button for auto detected pre-10.2 NDKs (uninstall wizard doesn't handle them)
- m_ui->removeConfigButton->setEnabled(!(config->isAutoDetected()
- && QnxUtils::sdkInstallerPath(config->ndkPath()).isEmpty()));
- }
-}
-
-void BlackBerryNDKSettingsWidget::uninstallConfiguration(BlackBerryInstallerDataHandler::Target target)
-{
- const QMessageBox::StandardButton answer = QMessageBox::question(this, tr("Confirmation"),
- tr("Are you sure you want to uninstall %1?").
- arg(m_ui->baseName->text()),
- QMessageBox::Yes | QMessageBox::No);
-
- if (answer == QMessageBox::Yes) {
- if (target == BlackBerryInstallerDataHandler::ApiLevel) {
- launchBlackBerryInstallerWizard(BlackBerryInstallerDataHandler::UninstallMode,
- BlackBerryInstallerDataHandler::ApiLevel, m_ui->version->text());
- } else if (target == BlackBerryInstallerDataHandler::Runtime) {
- if (m_ui->ndksTreeWidget->currentItem()) {
- launchBlackBerryInstallerWizard(BlackBerryInstallerDataHandler::UninstallMode,
- BlackBerryInstallerDataHandler::Runtime,
- m_ui->ndksTreeWidget->currentItem()->text(0));
- }
- }
-
- }
-}
-
-void BlackBerryNDKSettingsWidget::cleanUp()
-{
- foreach (BlackBerryApiLevelConfiguration *config, m_bbConfigManager->apiLevels()) {
- if (!config->isValid()) {
- m_activatedApiLevel.removeOne(config);
- m_deactivatedApiLevel.removeOne(config);
- m_bbConfigManager->removeApiLevel(config);
- }
- }
-
- updateConfigurationList();
-}
-
-void BlackBerryNDKSettingsWidget::handleInstallationFinished()
-{
- m_bbConfigManager->loadAutoDetectedConfigurations(
- BlackBerryConfigurationManager::ApiLevel | BlackBerryConfigurationManager::Runtime);
-}
-
-void BlackBerryNDKSettingsWidget::handleUninstallationFinished()
-{
- QTreeWidgetItem *current = m_ui->ndksTreeWidget->currentItem();
- if (!current)
- return;
-
- if (current->parent() == m_runtimes) {
- BlackBerryRuntimeConfiguration *runtime = static_cast<BlackBerryRuntimeConfiguration*>(
- current->data(0, Qt::UserRole).value<void*>());
- m_bbConfigManager->removeRuntime(runtime);
- updateConfigurationList();
- return;
- }
-
- const QString targetName = current->text(0);
- // Check if the target is corrrecly uninstalled
- foreach (const ConfigInstallInformation &ndk, QnxUtils::installedConfigs()) {
- if (ndk.name == targetName)
- return;
- }
-
- BlackBerryApiLevelConfiguration *config = static_cast<BlackBerryApiLevelConfiguration*>(
- current->data(0, Qt::UserRole).value<void*>());
- if (m_activatedApiLevel.contains(config))
- m_activatedApiLevel.removeAt(m_activatedApiLevel.indexOf(config));
- else if (m_deactivatedApiLevel.contains(config))
- m_deactivatedApiLevel.removeAt(m_deactivatedApiLevel.indexOf(config));
-
- m_bbConfigManager->removeApiLevel(config);
-
- updateConfigurationList();
-}
-
-void BlackBerryNDKSettingsWidget::populateDefaultConfigurationCombo()
-{
- // prevent QComboBox::currentIndexChanged() from being emitted
- m_ui->apiLevelCombo->clear();
-
- QList<BlackBerryApiLevelConfiguration*> configurations = m_bbConfigManager->apiLevels();
-
- m_ui->apiLevelCombo->addItem(tr("Newest Version"),
- QVariant::fromValue(static_cast<void*>(0)));
-
- if (configurations.isEmpty())
- return;
-
- int configIndex = 0;
-
- BlackBerryApiLevelConfiguration *defaultConfig = m_bbConfigManager->defaultApiLevel();
-
- foreach (BlackBerryApiLevelConfiguration *config, configurations) {
- m_ui->apiLevelCombo->addItem(config->displayName(),
- QVariant::fromValue(static_cast<void*>(config)));
-
- if (config == defaultConfig)
- configIndex = m_ui->apiLevelCombo->count() - 1;
- }
-
- const int currentIndex = (m_bbConfigManager->newestApiLevelEnabled()) ? 0 : configIndex;
-
- m_ui->apiLevelCombo->setCurrentIndex(currentIndex);
-}
-
-void BlackBerryNDKSettingsWidget::launchBlackBerryInstallerWizard(
- BlackBerryInstallerDataHandler::Mode mode,
- BlackBerryInstallerDataHandler::Target target,
- const QString& targetVersion)
-{
- BlackBerryInstallWizard wizard(mode, target, targetVersion, this);
- if (mode == BlackBerryInstallerDataHandler::InstallMode)
- connect(&wizard, SIGNAL(processFinished()), this, SLOT(handleInstallationFinished()));
- else
- connect(&wizard, SIGNAL(processFinished()), this, SLOT(handleUninstallationFinished()));
-
- wizard.exec();
-}
-
-void BlackBerryNDKSettingsWidget::updatePage()
-{
- updateConfigurationList();
- populateDefaultConfigurationCombo();
-}
-
-} // namespace Internal
-} // namespace Qnx
-
diff --git a/src/plugins/qnx/blackberryndksettingswidget.h b/src/plugins/qnx/blackberryndksettingswidget.h
deleted file mode 100644
index 3f782beab1..0000000000
--- a/src/plugins/qnx/blackberryndksettingswidget.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYNDKSETTINGSWIDGET_H
-#define BLACKBERRYNDKSETTINGSWIDGET_H
-
-#include "blackberryinstallwizard.h"
-
-#include <QWidget>
-#include <QTimer>
-
-QT_BEGIN_NAMESPACE
-class QStandardItemModel;
-class QTreeWidgetItem;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryApiLevelConfiguration;
-class BlackBerryConfigurationManager;
-class Ui_BlackBerryNDKSettingsWidget;
-
-class BlackBerryNDKSettingsWidget : public QWidget
-{
- Q_OBJECT
-public:
- explicit BlackBerryNDKSettingsWidget(QWidget *parent = 0);
-
- bool hasActiveNdk() const;
-
- QList<BlackBerryApiLevelConfiguration *> activatedApiLevels();
- QList<BlackBerryApiLevelConfiguration *> deactivatedApiLevels();
-
- BlackBerryApiLevelConfiguration *defaultApiLevel() const;
-
-signals:
- void configurationsUpdated();
-
-public slots:
- void updateInfoTable(QTreeWidgetItem* currentItem);
- void updateConfigurationList();
- void addConfiguration();
- void removeConfiguration();
- void activateApiLevel();
- void deactivateApiLevel();
- void uninstallConfiguration(BlackBerryInstallerDataHandler::Target target);
- void cleanUp();
- void handleInstallationFinished();
- void handleUninstallationFinished();
- void updateUi(QTreeWidgetItem* item);
- void populateDefaultConfigurationCombo();
- void updatePage();
-
-private:
- void launchBlackBerryInstallerWizard(BlackBerryInstallerDataHandler::Mode mode,
- BlackBerryInstallerDataHandler::Target target,
- const QString& tagetVersion = QString());
-
- Ui_BlackBerryNDKSettingsWidget *m_ui;
- BlackBerryConfigurationManager *m_bbConfigManager;
-
- QTreeWidgetItem *m_apiLevels;
- QTreeWidgetItem *m_runtimes;
-
- QTreeWidgetItem *m_autoDetectedNdks;
- QTreeWidgetItem *m_manualApiLevel;
-
- QList<BlackBerryApiLevelConfiguration *> m_activatedApiLevel;
- QList<BlackBerryApiLevelConfiguration *> m_deactivatedApiLevel;
-
- QTimer m_timer;
-};
-
-} // namespace Internal
-} // namespeace Qnx
-
-#endif // BLACKBERRYNDKSETTINGSWIDGET_H
diff --git a/src/plugins/qnx/blackberryndksettingswidget.ui b/src/plugins/qnx/blackberryndksettingswidget.ui
deleted file mode 100644
index 587209caa6..0000000000
--- a/src/plugins/qnx/blackberryndksettingswidget.ui
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryNDKSettingsWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryNDKSettingsWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>773</width>
- <height>412</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" colspan="2">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Default API level:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="apiLevelCombo"/>
- </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="1" column="0">
- <widget class="QTreeWidget" name="ndksTreeWidget">
- <column>
- <property name="text">
- <string notr="true">1</string>
- </property>
- </column>
- </widget>
- </item>
- <item row="1" column="1" rowspan="2">
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QPushButton" name="addConfigButton">
- <property name="text">
- <string>Add...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="removeConfigButton">
- <property name="text">
- <string>Remove</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>13</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="activateNdkTargetButton">
- <property name="text">
- <string>Activate</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="deactivateNdkTargetButton">
- <property name="text">
- <string>Deactivate</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_3">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>13</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="cleanUpButton">
- <property name="text">
- <string>Clean Up</string>
- </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>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="2" column="0">
- <widget class="QGroupBox" name="informationBox">
- <property name="title">
- <string>GroupBox</string>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <item row="2" column="0">
- <widget class="QLabel" name="pathLabel">
- <property name="text">
- <string>Path:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="path">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="baseNameLabel">
- <property name="text">
- <string>Name:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="baseName">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="versionLabel">
- <property name="text">
- <string>Version:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="hostLabel">
- <property name="text">
- <string>Host:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QLabel" name="host">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="targetLabel">
- <property name="text">
- <string>Target:</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QLabel" name="target">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QLabel" name="version">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberrypotentialkit.cpp b/src/plugins/qnx/blackberrypotentialkit.cpp
deleted file mode 100644
index 6d53f225e5..0000000000
--- a/src/plugins/qnx/blackberrypotentialkit.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrypotentialkit.h"
-
-#include "blackberryconfigurationmanager.h"
-#include "blackberryapilevelconfiguration.h"
-#include "qnxconstants.h"
-
-#include <coreplugin/coreconstants.h>
-#include <coreplugin/icore.h>
-
-#include <QGridLayout>
-#include <QLabel>
-#include <QList>
-#include <QPushButton>
-
-using namespace Qnx::Internal;
-
-QString BlackBerryPotentialKit::displayName() const
-{
- return tr("Configure BlackBerry...");
-}
-
-void BlackBerryPotentialKit::executeFromMenu()
-{
- openSettings();
-}
-
-QWidget *BlackBerryPotentialKit::createWidget(QWidget *parent) const
-{
- return shouldShow() ? new BlackBerryPotentialKitWidget(parent) : 0;
-}
-
-bool BlackBerryPotentialKit::isEnabled() const
-{
- return shouldShow();
-}
-
-bool BlackBerryPotentialKit::shouldShow()
-{
- QList<BlackBerryApiLevelConfiguration *> configs =
- BlackBerryConfigurationManager::instance()->apiLevels();
- if (configs.isEmpty())
- return false; // do not display when we do not have any BlackBerry API Level registered
- foreach (BlackBerryApiLevelConfiguration *config, configs) {
- if (config->isValid() && config->isActive())
- return false; // do not display when there is at least one valid and active API Level
- }
- return true;
-}
-
-void BlackBerryPotentialKit::openSettings(QWidget *parent)
-{
- Core::ICore::showOptionsDialog(Qnx::Constants::QNX_BB_SETUP_ID, parent);
-}
-
-BlackBerryPotentialKitWidget::BlackBerryPotentialKitWidget(QWidget *parent)
- : Utils::DetailsWidget(parent)
-{
- setSummaryText(tr("<b>BlackBerry has not been configured. Create BlackBerry kits.</b>"));
- setIcon(QIcon(QLatin1String(Core::Constants::ICON_WARNING)));
- QWidget *mainWidget = new QWidget(this);
- setWidget(mainWidget);
-
- QGridLayout *layout = new QGridLayout(mainWidget);
- layout->setMargin(0);
- QLabel *label = new QLabel;
- label->setText(tr("Qt Creator needs additional settings to enable BlackBerry support."
- " You can configure those settings in the Options dialog."));
- label->setWordWrap(true);
- layout->addWidget(label, 0, 0, 1, 2);
-
- QPushButton *openOptions = new QPushButton;
- openOptions->setText(Core::ICore::msgShowOptionsDialog());
- openOptions->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- layout->addWidget(openOptions, 1, 1);
-
- connect(openOptions, SIGNAL(clicked()), this, SLOT(openOptions()));
- connect(BlackBerryConfigurationManager::instance(), SIGNAL(settingsChanged()),
- this, SLOT(recheck()));
-}
-
-void BlackBerryPotentialKitWidget::openOptions()
-{
- BlackBerryPotentialKit::openSettings(this);
-}
-
-void BlackBerryPotentialKitWidget::recheck()
-{
- setVisible(BlackBerryPotentialKit::shouldShow());
-}
diff --git a/src/plugins/qnx/blackberrypotentialkit.h b/src/plugins/qnx/blackberrypotentialkit.h
deleted file mode 100644
index b9c1d529b8..0000000000
--- a/src/plugins/qnx/blackberrypotentialkit.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYPOTENTIALKIT_H
-#define BLACKBERRYPOTENTIALKIT_H
-
-#include <projectexplorer/ipotentialkit.h>
-#include <utils/detailswidget.h>
-
-class BlackBerryPotentialKit : public ProjectExplorer::IPotentialKit
-{
- Q_OBJECT
-public:
- QString displayName() const;
- void executeFromMenu();
- QWidget *createWidget(QWidget *parent) const;
- bool isEnabled() const;
-
- static bool shouldShow();
- static void openSettings(QWidget *parent = 0);
-};
-
-class BlackBerryPotentialKitWidget : public Utils::DetailsWidget
-{
- Q_OBJECT
-public:
- explicit BlackBerryPotentialKitWidget(QWidget *parent);
-
-public slots:
- void openOptions();
- void recheck();
-
-};
-
-#endif // BLACKBERRYPOTENTIALKIT_H
diff --git a/src/plugins/qnx/blackberryprocessparser.cpp b/src/plugins/qnx/blackberryprocessparser.cpp
deleted file mode 100644
index 49a6b2c34b..0000000000
--- a/src/plugins/qnx/blackberryprocessparser.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryprocessparser.h"
-
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/task.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-const char ERROR_MESSAGE_START[] = "Error: ";
-const char WARNING_MESSAGE_START[] = "Warning: ";
-const char PROGRESS_MESSAGE_START[] = "Info: Progress ";
-const char PID_MESSAGE_START[] = "result::";
-const char APPLICATION_ID_MESSAGE_START[] = "Info: Launching ";
-
-const char AUTHENTICATION_ERROR[] = "Authentication failed.";
-}
-
-BlackBerryProcessParser::BlackBerryProcessParser()
-{
- m_messageReplacements[QLatin1String(AUTHENTICATION_ERROR)] =
- tr("Authentication failed. Please make sure the password for the device is correct.");
-}
-
-void BlackBerryProcessParser::stdOutput(const QString &line)
-{
- parse(line);
- IOutputParser::stdOutput(line);
-}
-
-void BlackBerryProcessParser::stdError(const QString &line)
-{
- parse(line);
- IOutputParser::stdError(line);
-}
-
-void BlackBerryProcessParser::parse(const QString &line)
-{
- bool isErrorMessage = line.startsWith(QLatin1String(ERROR_MESSAGE_START));
- bool isWarningMessage = line.startsWith(QLatin1String(WARNING_MESSAGE_START));
- if (isErrorMessage || isWarningMessage)
- parseErrorAndWarningMessage(line, isErrorMessage);
- else if (line.startsWith(QLatin1String(PROGRESS_MESSAGE_START)))
- parseProgress(line);
- else if (line.startsWith(QLatin1String(PID_MESSAGE_START)))
- parsePid(line);
- else if (line.startsWith(QLatin1String(APPLICATION_ID_MESSAGE_START)))
- parseApplicationId(line);
-}
-
-void BlackBerryProcessParser::parseErrorAndWarningMessage(const QString &line, bool isErrorMessage)
-{
- QString message = line.mid(line.indexOf(QLatin1String(": ")) + 2).trimmed();
-
- foreach (const QString &key, m_messageReplacements.keys()) {
- if (message.startsWith(key)) {
- message = m_messageReplacements[key];
- break;
- }
- }
-
- ProjectExplorer::Task task(isErrorMessage ? ProjectExplorer::Task::Error : ProjectExplorer::Task::Warning,
- message,
- Utils::FileName(),
- -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
- emit addTask(task, 1);
-}
-
-void BlackBerryProcessParser::parseProgress(const QString &line)
-{
- const QString startOfLine = QLatin1String(PROGRESS_MESSAGE_START);
-
- const int percentPos = line.indexOf(QLatin1Char('%'));
- const QString progressStr = line.mid(startOfLine.length(), percentPos - startOfLine.length());
-
- bool ok;
- const int progress = progressStr.toInt(&ok);
- if (ok)
- emit progressParsed(progress);
-}
-
-void BlackBerryProcessParser::parsePid(const QString &line)
-{
- int pidIndex = -1;
- if (line.contains(QLatin1String("running"))) // "result::running,<pid>"
- pidIndex = 16;
- else // "result::<pid>"
- pidIndex = 8;
-
- bool ok;
- const qint64 pid = line.mid(pidIndex).toInt(&ok);
- if (ok)
- emit pidParsed(pid);
-}
-
-void BlackBerryProcessParser::parseApplicationId(const QString &line)
-{
- const int endOfId = line.indexOf(QLatin1String("..."));
- const QString applicationId = line.mid(16, endOfId - 16);
- emit applicationIdParsed(applicationId);
-}
diff --git a/src/plugins/qnx/blackberryprocessparser.h b/src/plugins/qnx/blackberryprocessparser.h
deleted file mode 100644
index 50aeb4a12a..0000000000
--- a/src/plugins/qnx/blackberryprocessparser.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYPROCESSPARSER_H
-#define QNX_INTERNAL_BLACKBERRYPROCESSPARSER_H
-
-#include <projectexplorer/ioutputparser.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryProcessParser : public ProjectExplorer::IOutputParser
-{
- Q_OBJECT
-
-public:
- BlackBerryProcessParser();
-
- void stdOutput(const QString &line);
- void stdError(const QString &line);
-
-signals:
- void progressParsed(int progress);
- void pidParsed(qint64 pid);
- void applicationIdParsed(const QString &applicationId);
-
-private:
- void parse(const QString &line);
-
- void parseErrorAndWarningMessage(const QString &line, bool isErrorMessage);
- void parseProgress(const QString &line);
- void parsePid(const QString &line);
- void parseApplicationId(const QString &line);
-
- QMap<QString, QString> m_messageReplacements;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYPROCESSPARSER_H
diff --git a/src/plugins/qnx/blackberryqtversion.cpp b/src/plugins/qnx/blackberryqtversion.cpp
deleted file mode 100644
index 1c2cd2e6e7..0000000000
--- a/src/plugins/qnx/blackberryqtversion.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryqtversion.h"
-
-#include "qnxutils.h"
-#include "qnxconstants.h"
-
-#include <coreplugin/featureprovider.h>
-#include <utils/environment.h>
-#include <utils/hostosinfo.h>
-#include <utils/qtcassert.h>
-
-#include <qtsupport/qtsupportconstants.h>
-
-#include <QFileInfo>
-#include <QTextStream>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-namespace {
-const QLatin1String NndkEnvFile("ndkEnvFile");
-}
-
-BlackBerryQtVersion::BlackBerryQtVersion()
- : QnxAbstractQtVersion()
-{
-}
-
-BlackBerryQtVersion::BlackBerryQtVersion(QnxArchitecture arch, const Utils::FileName &path, bool isAutoDetected, const QString &autoDetectionSource, const QString &sdkPath)
- : QnxAbstractQtVersion(arch, path, isAutoDetected, autoDetectionSource)
-{
- if (!sdkPath.isEmpty()) {
- if (QFileInfo(sdkPath).isDir()) {
- setSdkPath(sdkPath);
- } else {
- m_ndkEnvFile = sdkPath;
- setSdkPath(QFileInfo(sdkPath).absolutePath());
- }
-
- } else {
- setDefaultSdkPath();
- }
-}
-
-BlackBerryQtVersion::~BlackBerryQtVersion()
-{
-
-}
-
-BlackBerryQtVersion *BlackBerryQtVersion::clone() const
-{
- return new BlackBerryQtVersion(*this);
-}
-
-QString BlackBerryQtVersion::type() const
-{
- return QLatin1String(Constants::QNX_BB_QT);
-}
-
-QString BlackBerryQtVersion::description() const
-{
- return tr("BlackBerry %1", "Qt Version is meant for BlackBerry").arg(archString());
-}
-
-QVariantMap BlackBerryQtVersion::toMap() const
-{
- QVariantMap result = QnxAbstractQtVersion::toMap();
- result.insert(NndkEnvFile, m_ndkEnvFile);
- return result;
-}
-
-void BlackBerryQtVersion::fromMap(const QVariantMap &map)
-{
- QnxAbstractQtVersion::fromMap(map);
- m_ndkEnvFile = map.value(NndkEnvFile).toString();
-}
-
-QList<Utils::EnvironmentItem> BlackBerryQtVersion::environment() const
-{
- QTC_CHECK(!sdkPath().isEmpty());
- if (sdkPath().isEmpty())
- return QList<Utils::EnvironmentItem>();
-
- QString envFile = m_ndkEnvFile.isEmpty() ? QnxUtils::envFilePath(sdkPath()) : m_ndkEnvFile;
- QList<Utils::EnvironmentItem> env = QnxUtils::qnxEnvironmentFromEnvFile(envFile);
-
- // BB NDK Host is having qmake executable which is using qt.conf file to specify
- // base information. The qt.conf file is using 'CPUVARDIR' environment variable
- // to provide correct information for both x86 and armle-v7 architectures.
- // BlackBerryQtVersion represents as specific environment for each Qt4/Qt5
- // and x86/armle-v7 combination. Therefore we need to explicitly specify
- // CPUVARDIR to match expected architecture() otherwise qmake environment is
- // always resolved to be for armle-v7 architecture only as it is specified
- // BB NDK environment file.
-
- env.append(Utils::EnvironmentItem(QLatin1String("CPUVARDIR"),
- architecture() == X86 ? QLatin1String("x86") : QLatin1String("armle-v7")));
-
- return env;
-}
-
-void BlackBerryQtVersion::setDefaultSdkPath()
-{
- QHash<QString, QString> info = versionInfo();
- QString qtHostPrefix;
- if (info.contains(QLatin1String("QT_HOST_PREFIX")))
- qtHostPrefix = info.value(QLatin1String("QT_HOST_PREFIX"));
- else
- return;
-
- if (QnxUtils::isValidNdkPath(qtHostPrefix))
- setSdkPath(qtHostPrefix);
-}
-
-Core::FeatureSet BlackBerryQtVersion::availableFeatures() const
-{
- Core::FeatureSet features = QnxAbstractQtVersion::availableFeatures();
- features |= Core::FeatureSet(Constants::QNX_BB_FEATURE);
- features.remove(Core::Feature(QtSupport::Constants::FEATURE_QT_CONSOLE));
- features.remove(Core::Feature(QtSupport::Constants::FEATURE_QT_WEBKIT));
- return features;
-}
-
-QString BlackBerryQtVersion::platformName() const
-{
- return QLatin1String(Constants::QNX_BB_PLATFORM_NAME);
-}
-
-QString BlackBerryQtVersion::platformDisplayName() const
-{
- return tr("BlackBerry");
-}
-
-QString BlackBerryQtVersion::sdkDescription() const
-{
- return tr("BlackBerry Native SDK:");
-}
diff --git a/src/plugins/qnx/blackberryqtversion.h b/src/plugins/qnx/blackberryqtversion.h
deleted file mode 100644
index 90e588ec08..0000000000
--- a/src/plugins/qnx/blackberryqtversion.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYQTVERSION_H
-#define QNX_INTERNAL_BLACKBERRYQTVERSION_H
-
-#include "qnxconstants.h"
-#include "qnxabstractqtversion.h"
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryQtVersion : public QnxAbstractQtVersion
-{
- Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::BlackBerryQtVersion)
-public:
- BlackBerryQtVersion();
- BlackBerryQtVersion(QnxArchitecture arch, const Utils::FileName &path,
- bool isAutoDetected = false,
- const QString &autoDetectionSource = QString(),
- const QString &sdkPath = QString());
- BlackBerryQtVersion *clone() const;
- ~BlackBerryQtVersion();
-
- QString type() const;
-
- QString description() const;
-
- QVariantMap toMap() const;
- void fromMap(const QVariantMap &map);
-
- Core::FeatureSet availableFeatures() const;
- QString platformName() const;
- QString platformDisplayName() const;
-
- QString sdkDescription() const;
-
-private:
- QList<Utils::EnvironmentItem> environment() const;
- void setDefaultSdkPath();
-
- QString m_ndkEnvFile;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYQTVERSION_H
diff --git a/src/plugins/qnx/blackberryqtversionfactory.cpp b/src/plugins/qnx/blackberryqtversionfactory.cpp
deleted file mode 100644
index 4bc9759eaa..0000000000
--- a/src/plugins/qnx/blackberryqtversionfactory.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryqtversionfactory.h"
-
-#include "qnxconstants.h"
-#include "blackberryqtversion.h"
-#include "qnxutils.h"
-
-#include <qtsupport/profilereader.h>
-
-#include <QFileInfo>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryQtVersionFactory::BlackBerryQtVersionFactory(QObject *parent) :
- QtSupport::QtVersionFactory(parent)
-{
-}
-
-BlackBerryQtVersionFactory::~BlackBerryQtVersionFactory()
-{
-}
-
-bool BlackBerryQtVersionFactory::canRestore(const QString &type)
-{
- return type == QLatin1String(Constants::QNX_BB_QT);
-}
-
-QtSupport::BaseQtVersion *BlackBerryQtVersionFactory::restore(const QString &type, const QVariantMap &data)
-{
- if (!canRestore(type))
- return 0;
- BlackBerryQtVersion *v = new BlackBerryQtVersion();
- v->fromMap(data);
- return v;
-}
-
-int BlackBerryQtVersionFactory::priority() const
-{
- return Constants::QNX_BB_QT_FACTORY_PRIO;
-}
-
-QtSupport::BaseQtVersion *BlackBerryQtVersionFactory::create(const Utils::FileName &qmakePath,
- ProFileEvaluator *evaluator,
- bool isAutoDetected,
- const QString &autoDetectionSource)
-{
- QFileInfo fi = qmakePath.toFileInfo();
- if (!fi.exists() || !fi.isExecutable() || !fi.isFile())
- return 0;
-
- if (evaluator->values(QLatin1String("CONFIG")).contains(QLatin1String("blackberry")) ||
- evaluator->values(QLatin1String("QMAKE_PLATFORM")).contains(QLatin1String("blackberry"))) {
- QString cpuDir = evaluator->value(QLatin1String("QNX_CPUDIR"));
- return new BlackBerryQtVersion(QnxUtils::cpudirToArch(cpuDir), qmakePath,
- isAutoDetected, autoDetectionSource);
- }
-
- return 0;
-}
diff --git a/src/plugins/qnx/blackberryqtversionfactory.h b/src/plugins/qnx/blackberryqtversionfactory.h
deleted file mode 100644
index acbd1f1510..0000000000
--- a/src/plugins/qnx/blackberryqtversionfactory.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYQTVERSIONFACTORY_H
-#define QNX_INTERNAL_BLACKBERRYQTVERSIONFACTORY_H
-
-#include <qtsupport/qtversionfactory.h>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryQtVersionFactory : public QtSupport::QtVersionFactory
-{
- Q_OBJECT
-public:
- explicit BlackBerryQtVersionFactory(QObject *parent = 0);
- ~BlackBerryQtVersionFactory();
-
- virtual bool canRestore(const QString &type);
- virtual QtSupport::BaseQtVersion *restore(const QString &type, const QVariantMap &data);
-
- virtual int priority() const;
- virtual QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath,
- ProFileEvaluator *evaluator,
- bool isAutoDetected = false,
- const QString &autoDetectionSource = QString());
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYQTVERSIONFACTORY_H
diff --git a/src/plugins/qnx/blackberryrunconfiguration.cpp b/src/plugins/qnx/blackberryrunconfiguration.cpp
deleted file mode 100644
index aca6eda098..0000000000
--- a/src/plugins/qnx/blackberryrunconfiguration.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryrunconfiguration.h"
-#include "qnxconstants.h"
-#include "blackberrydeployconfiguration.h"
-#include "blackberryrunconfigurationwidget.h"
-#include "blackberrydeployinformation.h"
-
-#include <projectexplorer/buildtargetinfo.h>
-#include <projectexplorer/target.h>
-#include <ssh/sshconnection.h>
-
-#include <QFileInfo>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-using namespace ProjectExplorer;
-
-BlackBerryRunConfiguration::BlackBerryRunConfiguration(Target *parent, Core::Id id, const Utils::FileName &path)
- : RunConfiguration(parent, id)
- , m_proFilePath(path)
-{
- init();
-}
-
-BlackBerryRunConfiguration::BlackBerryRunConfiguration(Target *parent,
- BlackBerryRunConfiguration *source)
- : RunConfiguration(parent, source)
- , m_proFilePath(source->m_proFilePath)
-{
- init();
-}
-
-void BlackBerryRunConfiguration::init()
-{
- updateDisplayName();
-
- connect(deployConfiguration()->deploymentInfo(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SIGNAL(targetInformationChanged()));
- connect(deployConfiguration()->deploymentInfo(), SIGNAL(modelReset()), this, SIGNAL(targetInformationChanged()));
-}
-
-void BlackBerryRunConfiguration::updateDisplayName()
-{
- if (!m_proFilePath.isEmpty())
- setDefaultDisplayName(m_proFilePath.toFileInfo().completeBaseName());
- else
- setDefaultDisplayName(tr("Run on BlackBerry device"));
-}
-
-QWidget *BlackBerryRunConfiguration::createConfigurationWidget()
-{
- return new BlackBerryRunConfigurationWidget(this);
-}
-
-Utils::FileName BlackBerryRunConfiguration::proFilePath() const
-{
- return m_proFilePath;
-}
-
-QString BlackBerryRunConfiguration::deviceName() const
-{
- BlackBerryDeviceConfiguration::ConstPtr device
- = BlackBerryDeviceConfiguration::device(target()->kit());
- if (!device)
- return QString();
-
- return device->displayName();
-}
-
-Utils::FileName BlackBerryRunConfiguration::barPackage() const
-{
- BlackBerryDeployConfiguration *dc = deployConfiguration();
- if (!dc)
- return Utils::FileName();
-
- QList<BarPackageDeployInformation> packages = dc->deploymentInfo()->enabledPackages();
- foreach (const BarPackageDeployInformation package, packages) {
- if (package.proFilePath == proFilePath())
- return package.packagePath();
- }
- return Utils::FileName();
-}
-
-QString BlackBerryRunConfiguration::localExecutableFilePath() const
-{
- return target()->applicationTargets().targetForProject(m_proFilePath).toString();
-}
-
-bool BlackBerryRunConfiguration::fromMap(const QVariantMap &map)
-{
- if (!RunConfiguration::fromMap(map))
- return false;
-
- m_proFilePath = Utils::FileName::fromUserInput(
- map.value(QLatin1String(Constants::QNX_PROFILEPATH_KEY)).toString());
- if (m_proFilePath.isEmpty() || !m_proFilePath.exists())
- return false;
-
- init();
- return true;
-}
-
-QVariantMap BlackBerryRunConfiguration::toMap() const
-{
- QVariantMap map(RunConfiguration::toMap());
- map.insert(QLatin1String(Constants::QNX_PROFILEPATH_KEY), m_proFilePath.toString());
- return map;
-}
-
-BlackBerryDeployConfiguration *BlackBerryRunConfiguration::deployConfiguration() const
-{
- return qobject_cast<BlackBerryDeployConfiguration *>(target()->activeDeployConfiguration());
-}
-
-QString BlackBerryRunConfiguration::key() const
-{
- return barPackage().toString() + QLatin1Char('_')
- + BlackBerryDeviceConfiguration::device(target()->kit())->sshParameters().host;
-}
diff --git a/src/plugins/qnx/blackberryrunconfiguration.h b/src/plugins/qnx/blackberryrunconfiguration.h
deleted file mode 100644
index daf3fcc892..0000000000
--- a/src/plugins/qnx/blackberryrunconfiguration.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYRUNCONFIGURATION_H
-#define QNX_INTERNAL_BLACKBERRYRUNCONFIGURATION_H
-
-#include <projectexplorer/runconfiguration.h>
-
-#include <utils/fileutils.h>
-
-namespace ProjectExplorer { class Target; }
-
-namespace QmakeProjectManager {
-class QmakeBuildConfiguration;
-class QmakeProject;
-}
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryDeployConfiguration;
-
-class BlackBerryRunConfiguration : public ProjectExplorer::RunConfiguration
-{
- Q_OBJECT
- friend class BlackBerryRunConfigurationFactory;
-
-public:
- explicit BlackBerryRunConfiguration(ProjectExplorer::Target *parent, Core::Id id,
- const Utils::FileName &path);
-
- QWidget *createConfigurationWidget();
-
- Utils::FileName proFilePath() const;
-
- QString deviceName() const;
- Utils::FileName barPackage() const;
-
- QString localExecutableFilePath() const;
-
- bool fromMap(const QVariantMap &map);
- QVariantMap toMap() const;
-
- BlackBerryDeployConfiguration *deployConfiguration() const;
- QmakeProjectManager::QmakeBuildConfiguration *activeQmakeBuildConfiguration() const;
-
- QString key() const;
-
-signals:
- void targetInformationChanged();
-
-protected:
- BlackBerryRunConfiguration(ProjectExplorer::Target *parent, BlackBerryRunConfiguration *source);
-
-private:
- void init();
- void updateDisplayName();
-
- Utils::FileName m_proFilePath;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYRUNCONFIGURATION_H
diff --git a/src/plugins/qnx/blackberryrunconfigurationfactory.cpp b/src/plugins/qnx/blackberryrunconfigurationfactory.cpp
deleted file mode 100644
index f8d2160f90..0000000000
--- a/src/plugins/qnx/blackberryrunconfigurationfactory.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryrunconfigurationfactory.h"
-#include "qnxconstants.h"
-#include "blackberryrunconfiguration.h"
-#include "blackberrydeviceconfigurationfactory.h"
-
-#include <projectexplorer/kitinformation.h>
-#include <projectexplorer/target.h>
-#include <qmakeprojectmanager/qmakeproject.h>
-#include <qmakeprojectmanager/qmakenodes.h>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-static Utils::FileName pathFromId(Core::Id id)
-{
- return Utils::FileName::fromString(id.suffixAfter(Constants::QNX_BB_RUNCONFIGURATION_PREFIX));
-}
-
-BlackBerryRunConfigurationFactory::BlackBerryRunConfigurationFactory(QObject *parent) :
- ProjectExplorer::IRunConfigurationFactory(parent)
-{
-}
-
-QList<Core::Id> BlackBerryRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent, CreationMode mode) const
-{
- using QmakeProjectManager::QmakeProject;
- if (!canHandle(parent))
- return QList<Core::Id>();
-
- QmakeProject *qt4Project = qobject_cast<QmakeProject *>(parent->project());
- if (!qt4Project)
- return QList<Core::Id>();
-
- QList<QmakeProjectManager::QmakeProFileNode *> nodes = qt4Project->applicationProFiles();
- if (mode == AutoCreate)
- nodes = QmakeProject::nodesWithQtcRunnable(nodes);
- return QmakeProject::idsForNodes(Core::Id(Constants::QNX_BB_RUNCONFIGURATION_PREFIX),
- nodes);
-}
-
-QString BlackBerryRunConfigurationFactory::displayNameForId(Core::Id id) const
-{
- const Utils::FileName path = pathFromId(id);
- if (path.isEmpty())
- return QString();
-
- if (id.name().startsWith(Constants::QNX_BB_RUNCONFIGURATION_PREFIX))
- return path.toFileInfo().completeBaseName();
-
- return QString();
-}
-
-bool BlackBerryRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, Core::Id id) const
-{
- if (!canHandle(parent))
- return false;
-
- QmakeProjectManager::QmakeProject *qt4Project = qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project());
- if (!qt4Project)
- return false;
-
- if (!id.name().startsWith(Constants::QNX_BB_RUNCONFIGURATION_PREFIX))
- return false;
-
- return qt4Project->hasApplicationProFile(pathFromId(id));
-}
-
-ProjectExplorer::RunConfiguration *BlackBerryRunConfigurationFactory::doCreate(ProjectExplorer::Target *parent,
- const Core::Id id)
-{
- return new BlackBerryRunConfiguration(parent, id, pathFromId(id));
-}
-
-bool BlackBerryRunConfigurationFactory::canRestore(ProjectExplorer::Target *parent,
- const QVariantMap &map) const
-{
- if (!canHandle(parent))
- return false;
-
- return ProjectExplorer::idFromMap(map).name().startsWith(Constants::QNX_BB_RUNCONFIGURATION_PREFIX);
-}
-
-ProjectExplorer::RunConfiguration *BlackBerryRunConfigurationFactory::doRestore(
- ProjectExplorer::Target *parent,
- const QVariantMap &map)
-{
- Q_UNUSED(map);
- return new BlackBerryRunConfiguration(parent, Core::Id(Constants::QNX_BB_RUNCONFIGURATION_PREFIX),
- Utils::FileName());
-}
-
-bool BlackBerryRunConfigurationFactory::canClone(ProjectExplorer::Target *parent,
- ProjectExplorer::RunConfiguration *source) const
-{
- return canCreate(parent, source->id());
-}
-
-ProjectExplorer::RunConfiguration *BlackBerryRunConfigurationFactory::clone(
- ProjectExplorer::Target *parent,
- ProjectExplorer::RunConfiguration *source)
-{
- if (!canClone(parent, source))
- return 0;
-
- BlackBerryRunConfiguration *old = static_cast<BlackBerryRunConfiguration *>(source);
- return new BlackBerryRunConfiguration(parent, old);
-
-}
-
-bool BlackBerryRunConfigurationFactory::canHandle(ProjectExplorer::Target *t) const
-{
- if (!t->project()->supportsKit(t->kit()))
- return false;
- if (!qobject_cast<QmakeProjectManager::QmakeProject *>(t->project()))
- return false;
-
- Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(t->kit());
- if (deviceType != BlackBerryDeviceConfigurationFactory::deviceType())
- return false;
-
- return true;
-}
diff --git a/src/plugins/qnx/blackberryrunconfigurationfactory.h b/src/plugins/qnx/blackberryrunconfigurationfactory.h
deleted file mode 100644
index c19a6e33a0..0000000000
--- a/src/plugins/qnx/blackberryrunconfigurationfactory.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYRUNCONFIGURATIONFACTORY_H
-#define QNX_INTERNAL_BLACKBERRYRUNCONFIGURATIONFACTORY_H
-
-#include <projectexplorer/runconfiguration.h>
-
-namespace QmakeProjectManager { class QmakeProFileNode; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory
-{
- Q_OBJECT
-public:
- explicit BlackBerryRunConfigurationFactory(QObject *parent = 0);
-
- QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent, CreationMode mode) const;
- QString displayNameForId(Core::Id id) const;
-
- bool canCreate(ProjectExplorer::Target *parent, Core::Id id) const;
- ProjectExplorer::RunConfiguration *doCreate(ProjectExplorer::Target *parent, Core::Id id);
-
- bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
-
- bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) const;
- ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent,
- ProjectExplorer::RunConfiguration *source);
-
-private:
- bool canHandle(ProjectExplorer::Target *t) const;
-
- ProjectExplorer::RunConfiguration *doRestore(ProjectExplorer::Target *parent,
- const QVariantMap &map);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYRUNCONFIGURATIONFACTORY_H
diff --git a/src/plugins/qnx/blackberryrunconfigurationwidget.cpp b/src/plugins/qnx/blackberryrunconfigurationwidget.cpp
deleted file mode 100644
index 0cebcc9105..0000000000
--- a/src/plugins/qnx/blackberryrunconfigurationwidget.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryrunconfigurationwidget.h"
-#include "ui_blackberryrunconfigurationwidget.h"
-#include "blackberryrunconfiguration.h"
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryRunConfigurationWidget::BlackBerryRunConfigurationWidget(BlackBerryRunConfiguration *config, QWidget *parent)
- : QWidget(parent)
- , m_ui(new Ui::BlackBerryRunConfigurationWidget)
- , m_runConfiguration(config)
-{
- m_ui->setupUi(this);
-
- updateUi();
-
- connect(m_runConfiguration, SIGNAL(targetInformationChanged()), this, SLOT(updateUi()));
-}
-
-BlackBerryRunConfigurationWidget::~BlackBerryRunConfigurationWidget()
-{
- delete m_ui;
-}
-
-void BlackBerryRunConfigurationWidget::updateUi()
-{
- m_ui->deviceLabel->setText(m_runConfiguration->deviceName());
- m_ui->packageLabel->setText(m_runConfiguration->barPackage().toString());
-}
diff --git a/src/plugins/qnx/blackberryrunconfigurationwidget.h b/src/plugins/qnx/blackberryrunconfigurationwidget.h
deleted file mode 100644
index 38a8256647..0000000000
--- a/src/plugins/qnx/blackberryrunconfigurationwidget.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYRUNCONFIGURATIONWIDGET_H
-#define QNX_INTERNAL_BLACKBERRYRUNCONFIGURATIONWIDGET_H
-
-#include <QWidget>
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BlackBerryRunConfigurationWidget; }
-
-class BlackBerryRunConfiguration;
-
-class BlackBerryRunConfigurationWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit BlackBerryRunConfigurationWidget(BlackBerryRunConfiguration *config, QWidget *parent = 0);
- ~BlackBerryRunConfigurationWidget();
-
-private slots:
- void updateUi();
-
-private:
- Ui::BlackBerryRunConfigurationWidget *m_ui;
-
- BlackBerryRunConfiguration *m_runConfiguration;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYRUNCONFIGURATIONWIDGET_H
diff --git a/src/plugins/qnx/blackberryrunconfigurationwidget.ui b/src/plugins/qnx/blackberryrunconfigurationwidget.ui
deleted file mode 100644
index a76e316cd3..0000000000
--- a/src/plugins/qnx/blackberryrunconfigurationwidget.ui
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerryRunConfigurationWidget</class>
- <widget class="QWidget" name="Qnx::Internal::BlackBerryRunConfigurationWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>374</width>
- <height>53</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Device:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="deviceLabel"/>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Package:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="packageLabel"/>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/blackberryruncontrol.cpp b/src/plugins/qnx/blackberryruncontrol.cpp
deleted file mode 100644
index b14983e1e2..0000000000
--- a/src/plugins/qnx/blackberryruncontrol.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryruncontrol.h"
-#include "blackberryapplicationrunner.h"
-#include "blackberryrunconfiguration.h"
-#include "blackberrydeviceconnectionmanager.h"
-
-#include <QIcon>
-#include <QTimer>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerryRunControl::BlackBerryRunControl(BlackBerryRunConfiguration *runConfiguration)
- : ProjectExplorer::RunControl(runConfiguration, ProjectExplorer::NormalRunMode)
-{
- setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
-
- m_runner = new BlackBerryApplicationRunner(BlackBerryApplicationRunner::LaunchFlags(), runConfiguration, this);
-
- connect(m_runner, SIGNAL(started()), this, SIGNAL(started()));
- connect(m_runner, SIGNAL(finished()), this, SIGNAL(finished()));
- connect(m_runner, SIGNAL(output(QString,Utils::OutputFormat)),
- this, SLOT(appendMessage(QString,Utils::OutputFormat)));
- connect(m_runner, SIGNAL(startFailed(QString)), this, SLOT(handleStartFailed(QString)));
-}
-
-void BlackBerryRunControl::start()
-{
- m_runner->start();
-}
-
-ProjectExplorer::RunControl::StopResult BlackBerryRunControl::stop()
-{
- return m_runner->stop();
-}
-
-bool BlackBerryRunControl::isRunning() const
-{
- return m_runner->isRunning();
-}
-
-void BlackBerryRunControl::handleStartFailed(const QString &message)
-{
- appendMessage(message, Utils::StdErrFormat);
-}
diff --git a/src/plugins/qnx/blackberryruncontrol.h b/src/plugins/qnx/blackberryruncontrol.h
deleted file mode 100644
index b9a3ccc5eb..0000000000
--- a/src/plugins/qnx/blackberryruncontrol.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYRUNCONTROL_H
-#define QNX_INTERNAL_BLACKBERRYRUNCONTROL_H
-
-#include <projectexplorer/runconfiguration.h>
-
-namespace QmakeProjectManager { class QmakeBuildConfiguration; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryConnect;
-class BlackBerryRunConfiguration;
-class BlackBerryApplicationRunner;
-
-class BlackBerryRunControl : public ProjectExplorer::RunControl
-{
- Q_OBJECT
-public:
- explicit BlackBerryRunControl(BlackBerryRunConfiguration *runConfiguration);
-
- void start();
- ProjectExplorer::RunControl::StopResult stop();
- bool isRunning() const;
-
-private slots:
- void handleStartFailed(const QString &message);
-
-private:
- BlackBerryApplicationRunner *m_runner;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYRUNCONTROL_H
diff --git a/src/plugins/qnx/blackberryruncontrolfactory.cpp b/src/plugins/qnx/blackberryruncontrolfactory.cpp
deleted file mode 100644
index 1ef762d3c9..0000000000
--- a/src/plugins/qnx/blackberryruncontrolfactory.cpp
+++ /dev/null
@@ -1,223 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryruncontrolfactory.h"
-#include "blackberryrunconfiguration.h"
-#include "blackberryruncontrol.h"
-#include "blackberrydeployconfiguration.h"
-#include "blackberrydebugsupport.h"
-#include "blackberryqtversion.h"
-#include "blackberrydeviceconnectionmanager.h"
-#include "blackberryapplicationrunner.h"
-#include "qnxutils.h"
-
-#include <debugger/debuggerplugin.h>
-#include <debugger/debuggerrunconfigurationaspect.h>
-#include <debugger/debuggerruncontrol.h>
-#include <debugger/debuggerkitinformation.h>
-#include <projectexplorer/deployconfiguration.h>
-#include <projectexplorer/project.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/toolchain.h>
-#include <qmakeprojectmanager/qmakebuildconfiguration.h>
-#include <qtsupport/qtkitinformation.h>
-#include <analyzerbase/analyzerstartparameters.h>
-#include <analyzerbase/analyzermanager.h>
-#include <analyzerbase/analyzerruncontrol.h>
-#include <coreplugin/messagemanager.h>
-
-using namespace Analyzer;
-using namespace Debugger;
-using namespace ProjectExplorer;
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerryRunControlFactory::BlackBerryRunControlFactory(QObject *parent)
- : IRunControlFactory(parent)
-{
-}
-
-bool BlackBerryRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mode) const
-{
- Q_UNUSED(mode);
-
- BlackBerryRunConfiguration *rc = qobject_cast<BlackBerryRunConfiguration *>(runConfiguration);
- if (!rc)
- return false;
-
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(rc->target()->kit());
- if (!device)
- return false;
-
- // The device can only run the same application once, any subsequent runs will
- // not launch a second instance. Disable the Run button if the application is already
- // running on the device.
- if (m_activeRunControls.contains(rc->key())) {
- QPointer<RunControl> activeRunControl = m_activeRunControls[rc->key()];
- if (activeRunControl && activeRunControl.data()->isRunning())
- return false;
- else
- m_activeRunControls.remove(rc->key());
- }
-
- BlackBerryDeployConfiguration *activeDeployConf = qobject_cast<BlackBerryDeployConfiguration *>(
- rc->target()->activeDeployConfiguration());
- return activeDeployConf != 0;
-}
-
-static void createAnalyzerStartParameters(AnalyzerStartParameters *pStartParameters, BlackBerryRunConfiguration* runConfiguration, RunMode mode)
-{
- QTC_ASSERT(pStartParameters, return);
- pStartParameters->runMode = mode;
- if (mode == QmlProfilerRunMode)
- pStartParameters->startMode = StartLocal;
-
- Target *target = runConfiguration->target();
- Kit *kit = target->kit();
-
- IDevice::ConstPtr device = DeviceKitInformation::device(kit);
- if (device) {
- pStartParameters->connParams = device->sshParameters();
- pStartParameters->analyzerHost = device->qmlProfilerHost();
- }
- pStartParameters->sysroot = SysRootKitInformation::sysRoot(kit).toString();
-
- DebuggerRunConfigurationAspect *aspect = runConfiguration->extraAspect<DebuggerRunConfigurationAspect>();
- if (aspect)
- pStartParameters->analyzerPort = aspect->qmlDebugServerPort();
-}
-
-static DebuggerStartParameters startParameters(BlackBerryRunConfiguration *runConfig)
-{
- DebuggerStartParameters params;
- Target *target = runConfig->target();
- Kit *k = target->kit();
-
- params.startMode = AttachToRemoteServer;
- params.debuggerCommand = DebuggerKitInformation::debuggerCommand(k).toString();
- params.sysRoot = SysRootKitInformation::sysRoot(k).toString();
- params.useCtrlCStub = true;
- params.runConfiguration = runConfig;
-
- if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
- params.toolChainAbi = tc->targetAbi();
-
- params.executable = runConfig->localExecutableFilePath();
- params.displayName = runConfig->displayName();
- params.remoteSetupNeeded = true;
-
- DebuggerRunConfigurationAspect *aspect = runConfig->extraAspect<DebuggerRunConfigurationAspect>();
- if (aspect->useQmlDebugger()) {
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->kit());
- if (device) {
- params.qmlServerAddress = device->sshParameters().host;
- params.qmlServerPort = aspect->qmlDebugServerPort();
- params.languages |= QmlLanguage;
- }
- }
- if (aspect->useCppDebugger())
- params.languages |= CppLanguage;
-
- if (const Project *project = runConfig->target()->project()) {
- params.projectSourceDirectory = project->projectDirectory().toString();
- if (const BuildConfiguration *buildConfig = runConfig->target()->activeBuildConfiguration())
- params.projectBuildDirectory = buildConfig->buildDirectory().toString();
- params.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
- }
-
- BlackBerryQtVersion *qtVersion =
- dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
- if (qtVersion)
- params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
-
- return params;
-}
-
-RunControl *BlackBerryRunControlFactory::create(RunConfiguration *runConfiguration,
- RunMode mode, QString *errorMessage)
-{
- BlackBerryRunConfiguration *rc = qobject_cast<BlackBerryRunConfiguration *>(runConfiguration);
- if (!rc)
- return 0;
-
- BlackBerryDeployConfiguration *activeDeployConf = qobject_cast<BlackBerryDeployConfiguration *>(
- rc->target()->activeDeployConfiguration());
- if (!activeDeployConf) {
- if (errorMessage)
- *errorMessage = tr("No active deploy configuration");
- return 0;
- }
-
- if (mode == NormalRunMode) {
- BlackBerryRunControl *runControl = new BlackBerryRunControl(rc);
- m_activeRunControls[rc->key()] = runControl;
- return runControl;
- }
- if (mode == QmlProfilerRunMode) {
- QtSupport::BaseQtVersion *qtVer = QtSupport::QtKitInformation::qtVersion(rc->target()->kit());
- if (qtVer && qtVer->qtVersion() <= QtSupport::QtVersionNumber(4, 8, 6))
- Core::MessageManager::write(tr("Target Qt version (%1) might not support QML profiling. "
- "Cascades applications are not affected and should work as expected. "
- "For more info see http://wiki.qt.io/Qt_Creator_with_BlackBerry_10")
- .arg(qtVer->qtVersionString()), Core::MessageManager::Flash
- );
-
- AnalyzerStartParameters params;
- createAnalyzerStartParameters(&params, rc, mode);
-
- AnalyzerRunControl *runControl = AnalyzerManager::createRunControl(params, runConfiguration);
- BlackBerryApplicationRunner::LaunchFlags launchFlags(BlackBerryApplicationRunner::QmlDebugLaunch
- | BlackBerryApplicationRunner::QmlDebugLaunchBlocking
- | BlackBerryApplicationRunner::QmlProfilerLaunch);
- BlackBerryApplicationRunner *runner = new BlackBerryApplicationRunner(launchFlags, rc, runControl);
-
- connect(runner, SIGNAL(finished()), runControl, SLOT(notifyRemoteFinished()));
- connect(runner, SIGNAL(output(QString,Utils::OutputFormat)),
- runControl, SLOT(logApplicationMessage(QString,Utils::OutputFormat)));
- connect(runControl, SIGNAL(starting(const Analyzer::AnalyzerRunControl*)),
- runner, SLOT(start()));
- connect(runControl, SIGNAL(finished()), runner, SLOT(stop()));
- return runControl;
- }
-
- DebuggerRunControl *runControl = DebuggerRunControlFactory::doCreate(startParameters(rc), errorMessage);
- if (!runControl)
- return 0;
-
- new BlackBerryDebugSupport(rc, runControl);
- m_activeRunControls[rc->key()] = runControl;
- return runControl;
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberryruncontrolfactory.h b/src/plugins/qnx/blackberryruncontrolfactory.h
deleted file mode 100644
index 04fcdc2b2b..0000000000
--- a/src/plugins/qnx/blackberryruncontrolfactory.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYRUNCONTROLFACTORY_H
-#define QNX_INTERNAL_BLACKBERRYRUNCONTROLFACTORY_H
-
-#include <debugger/debuggerstartparameters.h>
-
-#include <projectexplorer/runconfiguration.h>
-
-namespace RemoteLinux { class RemoteLinuxRunConfiguration; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryRunConfiguration;
-
-class BlackBerryRunControlFactory : public ProjectExplorer::IRunControlFactory
-{
- Q_OBJECT
-
-public:
- BlackBerryRunControlFactory(QObject *parent = 0);
-
- bool canRun(ProjectExplorer::RunConfiguration *runConfiguration,
- ProjectExplorer::RunMode mode) const;
- ProjectExplorer::RunControl *create(ProjectExplorer::RunConfiguration *runConfiguration,
- ProjectExplorer::RunMode mode,
- QString *errorMessage);
-
-private:
- mutable QMap<QString, QPointer<ProjectExplorer::RunControl> > m_activeRunControls;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYRUNCONTROLFACTORY_H
diff --git a/src/plugins/qnx/blackberryruntimeconfiguration.cpp b/src/plugins/qnx/blackberryruntimeconfiguration.cpp
deleted file mode 100644
index 19c1188745..0000000000
--- a/src/plugins/qnx/blackberryruntimeconfiguration.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberryruntimeconfiguration.h"
-
-#include "qnxconstants.h"
-
-#include <QVariantMap>
-#include <QFileInfo>
-#include <QCoreApplication>
-
-namespace Qnx {
-namespace Internal {
-
-const QLatin1String PathKey("Path");
-const QLatin1String DisplayNameKey("DisplayName");
-const QLatin1String VersionKey("Version");
-
-BlackBerryRuntimeConfiguration::BlackBerryRuntimeConfiguration(
- const QString &path,
- const QnxVersionNumber &version)
- : m_path(path)
-{
- if (!version.isEmpty())
- m_version = version;
- else
- m_version = QnxVersionNumber::fromFileName(QFileInfo(path).baseName(),
- QRegExp(QLatin1String("^runtime_(.*)$")));
-
- m_displayName = QCoreApplication::translate("Qnx::Internal::BlackBerryRuntimeConfiguration", "Runtime %1").arg(m_version.toString());
-}
-
-BlackBerryRuntimeConfiguration::BlackBerryRuntimeConfiguration(const QVariantMap &data)
-{
- m_path = data.value(QLatin1String(PathKey)).toString();
- m_displayName = data.value(QLatin1String(DisplayNameKey)).toString();
- m_version = QnxVersionNumber(data.value(QLatin1String(VersionKey)).toString());
-}
-
-QString BlackBerryRuntimeConfiguration::path() const
-{
- return m_path;
-}
-
-QString BlackBerryRuntimeConfiguration::displayName() const
-{
- return m_displayName;
-}
-
-QnxVersionNumber BlackBerryRuntimeConfiguration::version() const
-{
- return m_version;
-}
-
-QVariantMap BlackBerryRuntimeConfiguration::toMap() const
-{
- QVariantMap data;
- data.insert(QLatin1String(Qnx::Constants::QNX_BB_KEY_CONFIGURATION_TYPE),
- QLatin1String(Qnx::Constants::QNX_BB_RUNTIME_TYPE));
- data.insert(QLatin1String(PathKey), m_path);
- data.insert(QLatin1String(DisplayNameKey), m_displayName);
- data.insert(QLatin1String(VersionKey), m_version.toString());
- return data;
-}
-
-}
-}
diff --git a/src/plugins/qnx/blackberryruntimeconfiguration.h b/src/plugins/qnx/blackberryruntimeconfiguration.h
deleted file mode 100644
index 24a5c3bf72..0000000000
--- a/src/plugins/qnx/blackberryruntimeconfiguration.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYRUNTIMECONFIGURATION_H
-#define BLACKBERRYRUNTIMECONFIGURATION_H
-
-#include "qnxversionnumber.h"
-
-#include <QVariantMap>
-
-namespace Qnx {
-namespace Internal {
-class BlackBerryRuntimeConfiguration
-{
-public:
- BlackBerryRuntimeConfiguration(const QString &path,
- const QnxVersionNumber &version = QnxVersionNumber());
- BlackBerryRuntimeConfiguration(const QVariantMap &data);
-
- QString path() const;
- QString displayName() const;
- QnxVersionNumber version() const;
- QVariantMap toMap() const;
-
-private:
- QString m_path;
- QString m_displayName;
- QnxVersionNumber m_version;
-};
-
-}
-}
-
-#endif // BLACKBERRYRUNTIMECONFIGURATION_H
diff --git a/src/plugins/qnx/blackberrysetuppage.cpp b/src/plugins/qnx/blackberrysetuppage.cpp
deleted file mode 100644
index 6e19183a05..0000000000
--- a/src/plugins/qnx/blackberrysetuppage.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrysetuppage.h"
-#include "blackberrysetupwidget.h"
-#include "qnxconstants.h"
-
-#include <QCoreApplication>
-
-namespace Qnx {
-namespace Internal {
-
-BlackBerrySetupPage::BlackBerrySetupPage(QObject *parent)
- : Core::IOptionsPage(parent)
-{
- setId(Core::Id(Constants::QNX_BB_SETUP_ID));
- setDisplayName(tr("Setup"));
- setCategory(Constants::QNX_BB_CATEGORY);
- setDisplayCategory(QCoreApplication::translate("BlackBerry", Constants::QNX_BB_CATEGORY_TR));
- setCategoryIcon(QLatin1String(Constants::QNX_BB_CATEGORY_ICON));
-}
-
-QWidget *BlackBerrySetupPage::widget()
-{
- if (!m_widget)
- m_widget = new BlackBerrySetupWidget;
- return m_widget;
-}
-
-void BlackBerrySetupPage::apply()
-{
-}
-
-void BlackBerrySetupPage::finish()
-{
- delete m_widget;
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrysetuppage.h b/src/plugins/qnx/blackberrysetuppage.h
deleted file mode 100644
index 466ab7806b..0000000000
--- a/src/plugins/qnx/blackberrysetuppage.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYSETUPPAGE_H
-#define BLACKBERRYSETUPPAGE_H
-
-#include <coreplugin/dialogs/ioptionspage.h>
-
-#include <QPointer>
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerrySetupWidget;
-
-class BlackBerrySetupPage : public Core::IOptionsPage
-{
- Q_OBJECT
-public:
- explicit BlackBerrySetupPage(QObject *parent = 0);
- QWidget *widget();
- void apply();
- void finish();
-
-private:
- QPointer<BlackBerrySetupWidget> m_widget;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // BLACKBERRYSETUPPAGE_H
diff --git a/src/plugins/qnx/blackberrysetupwidget.cpp b/src/plugins/qnx/blackberrysetupwidget.cpp
deleted file mode 100644
index 379d48db43..0000000000
--- a/src/plugins/qnx/blackberrysetupwidget.cpp
+++ /dev/null
@@ -1,336 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrysetupwidget.h"
-
-#include "blackberryconfigurationmanager.h"
-#include "blackberryapilevelconfiguration.h"
-#include "blackberrysigningutils.h"
-#include "blackberrydeviceconfigurationwizard.h"
-#include "blackberryinstallwizard.h"
-#include "blackberrycertificate.h"
-#include "qnxconstants.h"
-
-#include <coreplugin/coreconstants.h>
-#include <projectexplorer/devicesupport/devicemanager.h>
-
-#include <QFileInfo>
-#include <QFrame>
-#include <QHBoxLayout>
-#include <QLabel>
-#include <QPushButton>
-#include <QDesktopServices>
-#include <QWizard>
-#include <QUrl>
-#include <QMessageBox>
-
-namespace Qnx {
-namespace Internal {
-
-SetupItem::SetupItem(const QString &desc, QWidget *parent)
-: QFrame(parent)
-{
- m_timer.setSingleShot(true);
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(validate()));
-
- setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
- QVBoxLayout *frameLayout = new QVBoxLayout(this);
-
- QHBoxLayout *childLayout = new QHBoxLayout;
- frameLayout->addLayout(childLayout);
-
- m_icon = new QLabel;
- childLayout->addWidget(m_icon);
-
- m_label = new QLabel;
- m_label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
- childLayout->addWidget(m_label);
-
- m_button = new QPushButton;
- childLayout->addWidget(m_button);
- QObject::connect(m_button, SIGNAL(clicked()), this, SLOT(onFixPressed()));
-
- if (!desc.isEmpty()) {
- m_desc = new QLabel(desc);
- m_desc->setWordWrap(true);
- QFont font = m_desc->font();
- font.setItalic(true);
- m_desc->setFont(font);
- frameLayout->addWidget(m_desc);
- }
-}
-
-void SetupItem::set(Status status, const QString &message, const QString &fixText)
-{
- QString icon;
- switch (status) {
- case Ok:
- icon = QLatin1String(Qnx::Constants::QNX_OK_ICON);
- break;
- case Info:
- icon = QLatin1String(Core::Constants::ICON_INFO);
- break;
- case Warning:
- icon = QLatin1String(Core::Constants::ICON_WARNING);
- break;
- case Error:
- icon = QLatin1String(Core::Constants::ICON_ERROR);
- break;
- }
- m_icon->setPixmap(QPixmap(icon));
- m_label->setText(message);
- m_button->setVisible(!fixText.isEmpty());
- m_button->setText(fixText);
-}
-
-void SetupItem::onFixPressed()
-{
- fix();
- validate();
-}
-
-void SetupItem::validateLater()
-{
- // BlackBerryConfigurationManager.settingsChanged and DeviceManager.updated signals
- // may be emitted multiple times during the same event handling. This would result in multiple
- // validation() calls even through just one is needed.
- // QTimer allows to merge those multiple signal emits into a single validate() call.
- m_timer.start();
-}
-
-APILevelSetupItem::APILevelSetupItem(QWidget *parent)
-: SetupItem(tr("API Level defines kits, Qt versions, compilers, debuggers needed"
- " for building BlackBerry applications."), parent)
-{
- validate();
- connect(BlackBerryConfigurationManager::instance(), SIGNAL(settingsChanged()),
- this, SLOT(validateLater()));
-}
-
-void APILevelSetupItem::validate()
-{
- FoundTypes found = resolvedFoundType();
- if (!found.testFlag(Any))
- set(Error, tr("No API Level is installed."), tr("Install"));
- else if (!found.testFlag(Valid))
- set(Error, tr("No valid API Level is installed."), tr("Install"));
- else if (!found.testFlag(Active))
- set(Error, tr("Valid API Level is not activated."), tr("Activate"));
- else if (!found.testFlag(V_10_2))
- set(Warning, tr("Valid API Level 10.2 or newer is not installed."), tr("Install"));
- else if (!found.testFlag(V_10_2_AS_DEFAULT))
- set(Warning, tr("Valid API Level 10.2 or newer is not set as default."), tr("Set"));
- else
- set(Ok, tr("API Level is configured."));
- // TODO: should we check something more e.g. BB10 kits are valid?
-}
-
-void APILevelSetupItem::fix()
-{
- FoundTypes found = resolvedFoundType();
- if (!found.testFlag(Any) || !found.testFlag(Valid)) {
- installAPILevel();
- } else if (!found.testFlag(Active)) {
- foreach (BlackBerryApiLevelConfiguration *config,
- BlackBerryConfigurationManager::instance()->apiLevels()) {
- if (config->isValid() && !config->isActive()) {
- config->activate();
- break;
- }
- }
- } else if (!found.testFlag(V_10_2)) {
- // TODO: install filter for 10.2 only
- installAPILevel();
- } else if (!found.testFlag(V_10_2_AS_DEFAULT)) {
- BlackBerryConfigurationManager::instance()->setDefaultConfiguration(0);
- }
-}
-
-APILevelSetupItem::FoundTypes APILevelSetupItem::resolvedFoundType()
-{
- FoundTypes found;
-
- // TODO: for now, all Trunk versions are understood as 10.2 compliant
- QnxVersionNumber version_10_2(QLatin1String("10.2.0.0"));
- foreach (BlackBerryApiLevelConfiguration *config,
- BlackBerryConfigurationManager::instance()->apiLevels()) {
- found |= Any;
- if (config->isValid()) {
- found |= Valid;
- if (config->isActive())
- found |= Active;
- if (config->version() > version_10_2)
- found |= V_10_2;
- }
- }
-
- BlackBerryApiLevelConfiguration *config =
- BlackBerryConfigurationManager::instance()->defaultApiLevel();
- if (config && config->version() > version_10_2)
- found |= V_10_2_AS_DEFAULT;
-
- return found;
-}
-
-void APILevelSetupItem::installAPILevel()
-{
- BlackBerryInstallWizard wizard(
- BlackBerryInstallerDataHandler::InstallMode,
- BlackBerryInstallerDataHandler::ApiLevel, QString(), this);
- connect(&wizard, SIGNAL(processFinished()), this, SLOT(handleInstallationFinished()));
- wizard.exec();
-}
-
-void APILevelSetupItem::handleInstallationFinished()
-{
- // manually-added API Levels are automatically registered by BlackBerryInstallWizard
- // auto-detected API Levels needs to reloaded explicitly
- BlackBerryConfigurationManager::instance()->loadAutoDetectedConfigurations(
- BlackBerryConfigurationManager::ApiLevel);
- validate();
-}
-
-SigningKeysSetupItem::SigningKeysSetupItem(QWidget *parent)
-: SetupItem(tr("Signing keys are needed for signing BlackBerry applications"
- " and managing debug tokens."), parent)
-{
- validate();
- connect(&BlackBerrySigningUtils::instance(), SIGNAL(defaultCertificateLoaded(int)),
- this, SLOT(validate()));
-}
-
-void SigningKeysSetupItem::validate()
-{
- BlackBerrySigningUtils &utils = BlackBerrySigningUtils::instance();
- if (utils.hasLegacyKeys())
- set(Error, tr("Found legacy BlackBerry signing keys."), tr("Update"));
- else if (!utils.hasRegisteredKeys())
- set(Error, tr("Cannot find BlackBerry signing keys."), tr("Request"));
- else if (!QFileInfo::exists(BlackBerryConfigurationManager::instance()->defaultKeystorePath()))
- set(Error, tr("Cannot find developer certificate."), tr("Create"));
- else if (utils.defaultCertificateOpeningStatus() != BlackBerrySigningUtils::Opened)
- set(Info, tr("Developer certificate is not opened."), tr("Open"));
- else
- set(Ok, tr("Signing keys are ready to use."));
-}
-
-void SigningKeysSetupItem::fix()
-{
- BlackBerrySigningUtils &utils = BlackBerrySigningUtils::instance();
- if (utils.hasLegacyKeys()) {
- QDesktopServices::openUrl(QUrl(QLatin1String(Qnx::Constants::QNX_LEGACY_KEYS_URL)));
- } else if (!utils.hasRegisteredKeys()) {
- QDesktopServices::openUrl(QUrl(QLatin1String(Qnx::Constants::QNX_REGISTER_KEYS_URL)));
- } else if (!QFileInfo::exists(BlackBerryConfigurationManager::instance()->defaultKeystorePath())) {
- set(Info, tr("Opening certificate..."));
- utils.createCertificate();
- } else if (utils.defaultCertificateOpeningStatus() != BlackBerrySigningUtils::Opened) {
- connect(&utils, SIGNAL(defaultCertificateLoaded(int)), this, SLOT(defaultCertificateLoaded(int)));
- utils.openDefaultCertificate(this);
- }
-}
-
-void SigningKeysSetupItem::defaultCertificateLoaded(int status)
-{
- BlackBerrySigningUtils &utils = BlackBerrySigningUtils::instance();
- disconnect(&utils, SIGNAL(defaultCertificateLoaded(int)), this, SLOT(defaultCertificateLoaded(int)));
- switch (status) {
- case BlackBerryCertificate::Success:
- // handled by the connect in ctor already
- break;
- case BlackBerryCertificate::WrongPassword:
- QMessageBox::critical(this, tr("Qt Creator"), tr("Invalid certificate password."));
- break;
- case BlackBerryCertificate::Busy:
- case BlackBerryCertificate::InvalidOutputFormat:
- case BlackBerryCertificate::Error:
- QMessageBox::critical(this, tr("Qt Creator"), tr("Error loading certificate."));
- break;
- }
-}
-
-DeviceSetupItem::DeviceSetupItem(QWidget *parent)
-: SetupItem(tr("BlackBerry 10 device or simulator is needed for running BlackBerry applications."),
- parent)
-{
- validate();
- connect(ProjectExplorer::DeviceManager::instance(), SIGNAL(updated()),
- this, SLOT(validateLater()));
-}
-
-void DeviceSetupItem::validate()
-{
- bool found = false;
- ProjectExplorer::DeviceManager *manager = ProjectExplorer::DeviceManager::instance();
- for (int i = 0; i < manager->deviceCount(); i ++) {
- ProjectExplorer::IDevice::ConstPtr device = manager->deviceAt(i);
- if (device->type() == Constants::QNX_BB_OS_TYPE) {
- found = true;
- break;
- }
- }
- if (!found)
- set(Error, tr("No BlackBerry 10 device or simulator is registered."), tr("Add"));
- else
- set(Ok, tr("BlackBerry 10 device or simulator is registered."));
- // TODO: check for existence of an API Level matching a device?
-}
-
-void DeviceSetupItem::fix()
-{
- BlackBerryDeviceConfigurationWizard wizard(this);
- if (wizard.exec() == QDialog::Accepted)
- ProjectExplorer::DeviceManager::instance()->addDevice(wizard.device());
-}
-
-BlackBerrySetupWidget::BlackBerrySetupWidget(QWidget *parent)
- : QWidget(parent)
-{
- QVBoxLayout *layout = new QVBoxLayout(this);
- setLayout(layout);
-
- layout->addWidget(new APILevelSetupItem);
- layout->addWidget(new SigningKeysSetupItem);
- layout->addWidget(new DeviceSetupItem);
-
- layout->addStretch();
-
- QLabel *howTo = new QLabel;
- howTo->setTextFormat(Qt::RichText);
- howTo->setTextInteractionFlags(Qt::TextBrowserInteraction);
- howTo->setOpenExternalLinks(true);
- howTo->setText(tr("<a href=\"%1\">How to Setup Qt Creator for BlackBerry 10 development</a>")
- .arg(QLatin1String(Qnx::Constants::QNX_BLACKBERRY_SETUP_URL)));
- layout->addWidget(howTo);
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/blackberrysetupwidget.h b/src/plugins/qnx/blackberrysetupwidget.h
deleted file mode 100644
index fdc3a10ef3..0000000000
--- a/src/plugins/qnx/blackberrysetupwidget.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef BLACKBERRYSETUPWIDGET_H
-#define BLACKBERRYSETUPWIDGET_H
-
-#include <QFrame>
-#include <QWidget>
-#include <QCoreApplication>
-#include <QTimer>
-
-QT_BEGIN_NAMESPACE
-class QLabel;
-class QPushButton;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-
-class SetupItem : public QFrame {
- Q_OBJECT
-
-public:
- enum Status {
- Ok, Info, Warning, Error
- };
-
- SetupItem(const QString &desc = QString(), QWidget *parent = 0);
-
-protected:
- void set(Status status, const QString &message, const QString &fixText = QString());
- Q_SLOT virtual void validate() = 0;
- virtual void fix() = 0;
-
-private slots:
- void onFixPressed();
- void validateLater();
-
-private:
- QLabel *m_icon;
- QLabel *m_label;
- QPushButton *m_button;
- QLabel *m_desc;
- QTimer m_timer;
-};
-
-class APILevelSetupItem : public SetupItem
-{
- Q_OBJECT
-
-public:
- APILevelSetupItem(QWidget *parent = 0);
-
- enum FoundType {
- Any = (1 << 0),
- Valid = (1 << 1),
- Active = (1 << 2),
- V_10_2 = (1 << 3),
- V_10_2_AS_DEFAULT = (1 << 4)
- };
- Q_DECLARE_FLAGS(FoundTypes, FoundType)
-
-protected:
- virtual void validate();
- virtual void fix();
-
-private slots:
- void handleInstallationFinished();
-
-private:
- FoundTypes resolvedFoundType();
- void installAPILevel();
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS(APILevelSetupItem::FoundTypes)
-
-class SigningKeysSetupItem : public SetupItem
-{
- Q_OBJECT
-
-public:
- SigningKeysSetupItem(QWidget *parent = 0);
-
-protected:
- virtual void validate();
- virtual void fix();
-
-private slots:
- void defaultCertificateLoaded(int status);
-};
-
-class DeviceSetupItem : public SetupItem
-{
- Q_OBJECT
-
-public:
- DeviceSetupItem(QWidget *parent = 0);
-
-protected:
- virtual void validate();
- virtual void fix();
-};
-
-class BlackBerrySetupWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit BlackBerrySetupWidget(QWidget *parent = 0);
-};
-
-} // namespace Internal
-} // namespeace Qnx
-
-#endif // BLACKBERRYSETUPWIDGET_H
diff --git a/src/plugins/qnx/blackberrysetupwizardpages.cpp b/src/plugins/qnx/blackberrysetupwizardpages.cpp
deleted file mode 100644
index b6bbf30872..0000000000
--- a/src/plugins/qnx/blackberrysetupwizardpages.cpp
+++ /dev/null
@@ -1,345 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrysetupwizardpages.h"
-#include "blackberryndksettingswidget.h"
-#include "blackberrysigningutils.h"
-#include "ui_blackberrysetupwizardkeyspage.h"
-#include "ui_blackberrysetupwizardcertificatepage.h"
-#include "ui_blackberrysetupwizarddevicepage.h"
-#include "ui_blackberrysetupwizardfinishpage.h"
-
-#include <QVBoxLayout>
-#include <QFileInfo>
-#include <QLabel>
-#include <QVBoxLayout>
-#include <QMessageBox>
-#include <QAbstractButton>
-#include <QDesktopServices>
-#include <QUrl>
-
-#include <QDebug>
-
-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/blackberrysigningpasswordsdialog.cpp b/src/plugins/qnx/blackberrysigningpasswordsdialog.cpp
deleted file mode 100644
index 316bfba956..0000000000
--- a/src/plugins/qnx/blackberrysigningpasswordsdialog.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrysigningpasswordsdialog.h"
-#include "ui_blackberrysigningpasswordsdialog.h"
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-BlackBerrySigningPasswordsDialog::BlackBerrySigningPasswordsDialog(QWidget *parent) :
- QDialog(parent),
- m_ui(new Ui::BlackBerrySigningPasswordsDialog)
-{
- m_ui->setupUi(this);
-}
-
-BlackBerrySigningPasswordsDialog::~BlackBerrySigningPasswordsDialog()
-{
- delete m_ui;
-}
-
-void BlackBerrySigningPasswordsDialog::setCskPassword(const QString &cskPassword)
-{
- m_ui->cskPassword->setText(cskPassword);
-}
-
-void BlackBerrySigningPasswordsDialog::setStorePassword(const QString &storePassword)
-{
- m_ui->storePassword->setText(storePassword);
-}
-
-QString BlackBerrySigningPasswordsDialog::cskPassword() const
-{
- return m_ui->cskPassword->text();
-}
-
-QString BlackBerrySigningPasswordsDialog::storePassword() const
-{
- return m_ui->storePassword->text();
-}
diff --git a/src/plugins/qnx/blackberrysigningpasswordsdialog.h b/src/plugins/qnx/blackberrysigningpasswordsdialog.h
deleted file mode 100644
index 43e254e579..0000000000
--- a/src/plugins/qnx/blackberrysigningpasswordsdialog.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYSIGNINGPASSWORDSDIALOG_H
-#define QNX_INTERNAL_BLACKBERRYSIGNINGPASSWORDSDIALOG_H
-
-#include <QDialog>
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class BlackBerrySigningPasswordsDialog; }
-
-class BlackBerrySigningPasswordsDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- explicit BlackBerrySigningPasswordsDialog(QWidget *parent = 0);
- ~BlackBerrySigningPasswordsDialog();
-
- void setCskPassword(const QString &cskPassword);
- void setStorePassword(const QString &storePassword);
-
- QString cskPassword() const;
- QString storePassword() const;
-
-private:
- Ui::BlackBerrySigningPasswordsDialog *m_ui;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYSIGNINGPASSWORDSDIALOG_H
diff --git a/src/plugins/qnx/blackberrysigningpasswordsdialog.ui b/src/plugins/qnx/blackberrysigningpasswordsdialog.ui
deleted file mode 100644
index 38715caf0f..0000000000
--- a/src/plugins/qnx/blackberrysigningpasswordsdialog.ui
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::BlackBerrySigningPasswordsDialog</class>
- <widget class="QDialog" name="Qnx::Internal::BlackBerrySigningPasswordsDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>313</width>
- <height>89</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Package signing passwords</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>CSK password:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="cskPassword">
- <property name="echoMode">
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Keystore password:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="storePassword">
- <property name="echoMode">
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>Qnx::Internal::BlackBerrySigningPasswordsDialog</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel">
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>Qnx::Internal::BlackBerrySigningPasswordsDialog</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
diff --git a/src/plugins/qnx/blackberrysigningutils.cpp b/src/plugins/qnx/blackberrysigningutils.cpp
deleted file mode 100644
index ad830f1172..0000000000
--- a/src/plugins/qnx/blackberrysigningutils.cpp
+++ /dev/null
@@ -1,285 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "blackberrysigningutils.h"
-#include "blackberrycertificate.h"
-#include "blackberryconfigurationmanager.h"
-#include "blackberrycreatecertificatedialog.h"
-#include "blackberrydebugtokenreader.h"
-
-#include <coreplugin/icore.h>
-
-#include <QDialog>
-#include <QFileInfo>
-#include <QString>
-#include <QFile>
-#include <QTextStream>
-#include <QInputDialog>
-
-using namespace Qnx::Internal;
-
-namespace {
-const QLatin1String DebugTokensGroup("DebugTokens");
-const QLatin1String DebugTokensPath("DebugTokenPath");
-}
-
-BlackBerrySigningUtils & BlackBerrySigningUtils::instance()
-{
- static BlackBerrySigningUtils utils;
-
- return utils;
-}
-
-BlackBerrySigningUtils::BlackBerrySigningUtils(QObject *parent) :
- QObject(parent),
- m_defaultCertificate(0),
- m_defaultCertificateStatus(NotOpened)
-{
- loadDebugTokens();
-}
-
-bool BlackBerrySigningUtils::hasRegisteredKeys()
-{
- return QFileInfo::exists(BlackBerryConfigurationManager::instance()->idTokenPath());
-}
-
-bool BlackBerrySigningUtils::hasLegacyKeys()
-{
- return QFileInfo::exists(BlackBerryConfigurationManager::instance()->barsignerCskPath());
-}
-
-bool BlackBerrySigningUtils::hasDefaultCertificate()
-{
- return QFileInfo::exists(BlackBerryConfigurationManager::instance()->defaultKeystorePath());
-}
-
-QString BlackBerrySigningUtils::cskPassword(QWidget *passwordPromptParent, bool *ok)
-{
- if (m_cskPassword.isEmpty())
- m_cskPassword = promptPassword(tr("Please provide your BlackBerry ID Token PIN."), passwordPromptParent, ok);
- else if (ok)
- *ok = true;
-
- return m_cskPassword;
-}
-
-QString BlackBerrySigningUtils::certificatePassword(QWidget *passwordPromptParent, bool *ok)
-{
- if (m_certificatePassword.isEmpty()) {
- m_certificatePassword =
- promptPassword(tr("Please enter your certificate password."), passwordPromptParent, ok);
- } else if (ok) {
- *ok = true;
- }
-
- return m_certificatePassword;
-}
-
-const BlackBerryCertificate * BlackBerrySigningUtils::defaultCertificate() const
-{
- return m_defaultCertificate;
-}
-
-BlackBerrySigningUtils::Status BlackBerrySigningUtils::defaultCertificateOpeningStatus() const
-{
- return m_defaultCertificateStatus;
-}
-
-void BlackBerrySigningUtils::openDefaultCertificate(QWidget *passwordPromptParent)
-{
- switch (m_defaultCertificateStatus) {
- case Opening:
- return;
- case Opened:
- emit defaultCertificateLoaded(BlackBerryCertificate::Success);
- return;
- default:
- m_defaultCertificateStatus = Opening;
- }
-
- bool ok;
- const QString password = certificatePassword(passwordPromptParent, &ok);
-
- // action has been canceled
- if (!ok) {
- m_defaultCertificateStatus = NotOpened;
- return;
- }
-
- if (m_defaultCertificate)
- m_defaultCertificate->deleteLater();
-
- m_defaultCertificate = new BlackBerryCertificate(BlackBerryConfigurationManager::instance()->defaultKeystorePath(),
- QString(), password, this);
-
- connect(m_defaultCertificate, SIGNAL(finished(int)), this, SLOT(certificateLoaded(int)));
-
- m_defaultCertificate->load();
-}
-
-void BlackBerrySigningUtils::setDefaultCertificate(BlackBerryCertificate *certificate)
-{
- if (m_defaultCertificate)
- m_defaultCertificate->deleteLater();
-
- certificate->setParent(this);
- m_defaultCertificate = certificate;
- m_defaultCertificateStatus = Opened;
-}
-
-void BlackBerrySigningUtils::clearCskPassword()
-{
- m_cskPassword.clear();
-}
-
-void BlackBerrySigningUtils::clearCertificatePassword()
-{
- m_certificatePassword.clear();
-}
-
-void BlackBerrySigningUtils::deleteDefaultCertificate()
-{
- clearCertificatePassword();
- m_defaultCertificate->deleteLater();
- m_defaultCertificate = 0;
- m_defaultCertificateStatus = NotOpened;
-
- QFile::remove(BlackBerryConfigurationManager::instance()->defaultKeystorePath());
-}
-
-QStringList BlackBerrySigningUtils::debugTokens() const
-{
- return m_debugTokens;
-}
-
-void BlackBerrySigningUtils::addDebugToken(const QString &dt)
-{
- if (m_debugTokens.contains(dt) || !QFileInfo(dt).exists())
- return;
-
- m_debugTokens << dt;
- emit debugTokenListChanged();
-}
-
-void BlackBerrySigningUtils::removeDebugToken(const QString &dt)
-{
- m_debugTokens.removeOne(dt);
- emit debugTokenListChanged();
-}
-
-bool BlackBerrySigningUtils::createCertificate()
-{
- BlackBerryCreateCertificateDialog dialog;
-
- const int result = dialog.exec();
-
- if (result == QDialog::Rejected)
- return false;
-
- BlackBerryCertificate *certificate = dialog.certificate();
-
- if (certificate)
- setDefaultCertificate(certificate);
-
- return certificate;
-}
-
-void BlackBerrySigningUtils::certificateLoaded(int status)
-{
- if (status != BlackBerryCertificate::Success) {
- m_defaultCertificateStatus = NotOpened;
- m_defaultCertificate->deleteLater();
- m_defaultCertificate = 0;
-
- // we have clear the password under any error since we are not able to distinquish
- // if password is correct or not in case BlackBerryCertificate::Error status happens
- clearCertificatePassword();
- } else
- m_defaultCertificateStatus = Opened;
-
-
- emit defaultCertificateLoaded(status);
-}
-
-void BlackBerrySigningUtils::saveDebugTokens()
-{
- if (m_debugTokens.isEmpty())
- return;
-
- QSettings *settings = Core::ICore::settings();
- settings->beginGroup(DebugTokensGroup);
-
- int count = 0;
- foreach (const QString &dt, m_debugTokens) {
- settings->beginGroup(QString::fromLatin1("debugToken_%1").arg(++count));
- settings->setValue(DebugTokensPath, dt);
- settings->endGroup();
- }
-
- settings->endGroup();
-}
-
-void BlackBerrySigningUtils::loadDebugTokens()
-{
- QSettings *settings = Core::ICore::settings();
- settings->beginGroup(DebugTokensGroup);
-
- foreach (const QString &dt, settings->childGroups()) {
- settings->beginGroup(dt);
- m_debugTokens << settings->value(DebugTokensPath).toString();
- settings->endGroup();
- }
-
- settings->endGroup();
-}
-
-QString BlackBerrySigningUtils::promptPassword(const QString &message,
- QWidget *dialogParent, bool *ok) const
-{
- QInputDialog dialog(dialogParent);
- dialog.setWindowTitle(tr("Qt Creator"));
- dialog.setInputMode(QInputDialog::TextInput);
- dialog.setLabelText(message);
- dialog.setTextEchoMode(QLineEdit::Password);
-
- if (dialog.exec() == QDialog::Rejected) {
- if (ok)
- *ok = false;
-
- return QString();
- }
-
- if (ok)
- *ok = true;
-
- return dialog.textValue();
-}
diff --git a/src/plugins/qnx/blackberrysigningutils.h b/src/plugins/qnx/blackberrysigningutils.h
deleted file mode 100644
index cc8df11939..0000000000
--- a/src/plugins/qnx/blackberrysigningutils.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_BLACKBERRYSIGNINGUTILS_H
-#define QNX_INTERNAL_BLACKBERRYSIGNINGUTILS_H
-
-#include <QtGlobal>
-#include <QObject>
-#include <QStringList>
-
-QT_BEGIN_NAMESPACE
-class QString;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerryCertificate;
-
-class BlackBerrySigningUtils : public QObject
-{
- Q_OBJECT
-
-public:
- enum Status {
- NotOpened,
- Opening,
- Opened
- };
-
- static BlackBerrySigningUtils &instance();
-
- bool hasRegisteredKeys();
- bool hasLegacyKeys();
- bool hasDefaultCertificate();
-
- QString cskPassword(QWidget *passwordPromptParent = 0, bool *ok = 0);
- QString certificatePassword(QWidget *passwordPromptParent = 0, bool *ok = 0);
-
- const BlackBerryCertificate *defaultCertificate() const;
- Status defaultCertificateOpeningStatus() const;
-
- void openDefaultCertificate(QWidget *passwordPromptParent = 0);
- void setDefaultCertificate(BlackBerryCertificate *certificate);
- void clearCskPassword();
- void clearCertificatePassword();
- void deleteDefaultCertificate();
- bool createCertificate();
- void addDebugToken(const QString &dt);
- void removeDebugToken(const QString &dt);
-
- QStringList debugTokens() const;
-
-signals:
- void defaultCertificateLoaded(int status);
- void debugTokenListChanged();
-
-public slots:
- void saveDebugTokens();
-
-private slots:
- void certificateLoaded(int status);
- void loadDebugTokens();
-
-private:
- Q_DISABLE_COPY(BlackBerrySigningUtils)
-
- BlackBerrySigningUtils(QObject *parent = 0);
-
- QString promptPassword(const QString &message, QWidget *dialogParent = 0, bool *ok = 0) const;
-
- BlackBerryCertificate *m_defaultCertificate;
- Status m_defaultCertificateStatus;
-
- QString m_cskPassword;
- QString m_certificatePassword;
-
- QStringList m_debugTokens;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_BLACKBERRYSIGNINGUTILS_H
diff --git a/src/plugins/qnx/blackberrysshkeysgenerator.cpp b/src/plugins/qnx/blackberrysshkeysgenerator.cpp
deleted file mode 100644
index ae298b7cc7..0000000000
--- a/src/plugins/qnx/blackberrysshkeysgenerator.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-#include "blackberrysshkeysgenerator.h"
-
-#include <ssh/sshkeygenerator.h>
-
-using namespace Qnx::Internal;
-
-BlackBerrySshKeysGenerator::BlackBerrySshKeysGenerator()
- : QThread(0)
- , m_keyGen(new QSsh::SshKeyGenerator)
-{
- connect(this, SIGNAL(finished()), this, SLOT(deleteLater()));
-}
-
-BlackBerrySshKeysGenerator::~BlackBerrySshKeysGenerator()
-{
- delete m_keyGen;
- m_keyGen = 0;
-}
-
-void BlackBerrySshKeysGenerator::run()
-{
- const bool success = m_keyGen->generateKeys(QSsh::SshKeyGenerator::Rsa,
- QSsh::SshKeyGenerator::Mixed, 4096,
- QSsh::SshKeyGenerator::DoNotOfferEncryption);
- if (success) {
- // BB10 devices allow to use public key with no comment
- // or a comment in username@hostname format
- // QSsh::SshKeyGenerator class creates comments in 'QtCreator/TIMEZONE' format
- // therefore stripping this comment out
- QByteArray publicKey = m_keyGen->publicKey();
- int firstSpace = publicKey.indexOf(' ');
- if (firstSpace >= 0) {
- int secondSpace = publicKey.indexOf(' ', firstSpace + 1);
- if (secondSpace >= 0)
- publicKey.truncate(secondSpace);
- }
-
- emit sshKeysGenerationFinished(m_keyGen->privateKey(), publicKey);
- } else
- emit sshKeysGenerationFailed(m_keyGen->error());
-}
diff --git a/src/plugins/qnx/blackberrysshkeysgenerator.h b/src/plugins/qnx/blackberrysshkeysgenerator.h
deleted file mode 100644
index 4b340395fa..0000000000
--- a/src/plugins/qnx/blackberrysshkeysgenerator.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-#ifndef BLACKBERRYSSHKEYSGENERATOR_H
-#define BLACKBERRYSSHKEYSGENERATOR_H
-
-#include <QThread>
-
-namespace QSsh { class SshKeyGenerator; }
-
-namespace Qnx {
-namespace Internal {
-
-class BlackBerrySshKeysGenerator : public QThread
-{
- Q_OBJECT
-public:
- BlackBerrySshKeysGenerator();
- ~BlackBerrySshKeysGenerator();
-
-signals:
- void sshKeysGenerationFailed(const QString &error);
- void sshKeysGenerationFinished(const QByteArray &privateKey, const QByteArray &publicKey);
-
-private:
- QSsh::SshKeyGenerator *m_keyGen;
- void run();
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // BLACKBERRYSSHKEYSGENERATOR_H
diff --git a/src/plugins/qnx/cascadesimport/bardescriptorconverter.cpp b/src/plugins/qnx/cascadesimport/bardescriptorconverter.cpp
deleted file mode 100644
index ce8e0813fc..0000000000
--- a/src/plugins/qnx/cascadesimport/bardescriptorconverter.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "bardescriptorconverter.h"
-
-#include <coreplugin/generatedfile.h>
-#include <utils/qtcassert.h>
-
-#include <QDomDocument>
-
-namespace Qnx {
-namespace Internal {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// BarDescriptorConverter
-//
-//////////////////////////////////////////////////////////////////////////////
-static const char S_ASSET[] = "asset";
-static const char S_PATH[] = "path";
-static const char S_SRC_DIR[] = "%SRC_DIR%/";
-
-BarDescriptorConverter::BarDescriptorConverter(ConvertedProjectContext &ctx)
- : FileConverter(ctx)
-{
-}
-
-QString BarDescriptorConverter::projectName() const
-{
- return convertedProjectContext().projectName();
-}
-
-QString BarDescriptorConverter::applicationBinaryName() const
-{
- return projectName();
-}
-
-QString BarDescriptorConverter::applicationBinaryPath() const
-{
- return projectName();
-}
-
-QDomElement BarDescriptorConverter::findElement(QDomDocument &doc, const QString &tagName,
- const QString &attributeName, const QString &attributeValue)
-{
- QDomElement ret;
- QTC_ASSERT(!tagName.isEmpty(), return ret);
- QDomElement rootElement = doc.documentElement();
- static const QLatin1String elementTextFakeAttributeNameString("S_ELEMENT_TEXT_FAKE_ATTRIBUTE_NAME");
- bool isFindText = (attributeName == elementTextFakeAttributeNameString);
- QRegExp rxAttrValue;
- if (!isFindText && !attributeValue.isEmpty())
- rxAttrValue = QRegExp(attributeValue, Qt::CaseSensitive, QRegExp::Wildcard);
- for (QDomElement el = rootElement.firstChildElement(tagName);
- !el.isNull(); el = el.nextSiblingElement(tagName)) {
- if (attributeName.isEmpty()) {
- // take first matching tag name
- ret = el;
- break;
- } else if (isFindText) {
- QString s = el.text();
- if (s == attributeValue) {
- ret = el;
- break;
- }
- } else if (el.hasAttribute(attributeName)) {
- if (attributeValue.isEmpty() || rxAttrValue.exactMatch(el.attribute(attributeName))) {
- ret = el;
- break;
- }
- }
- }
- return ret;
-}
-
-QDomElement BarDescriptorConverter::ensureElement(QDomDocument &doc, const QString &tagName,
- const QString &attributeName, const QString &attributeValue)
-{
- QDomElement ret = findElement(doc, tagName, attributeName, attributeValue);
- if (ret.isNull()) {
- QDomElement rootElement = doc.documentElement();
- ret = rootElement.appendChild(doc.createElement(tagName)).toElement();
- QTC_ASSERT(!ret.isNull(), return ret);
- }
- if (!attributeName.isEmpty())
- ret.setAttribute(attributeName, attributeValue);
- return ret;
-}
-
-QDomElement BarDescriptorConverter::removeElement(QDomDocument &doc, const QString &tagName,
- const QString &attributeName, const QString &attributeValue)
-{
- QDomElement ret = findElement(doc, tagName, attributeName, attributeValue);
- if (!ret.isNull()) {
- QDomNode nd = ret.parentNode();
- QTC_ASSERT(!nd.isNull(), return ret);
- nd.removeChild(ret);
- }
- return ret;
-}
-
-void BarDescriptorConverter::setEnv(QDomDocument &doc, const QString &name, const QString &value)
-{
- QDomElement el = ensureElement(doc, QLatin1String("env"), QLatin1String("var"), name);
- QTC_ASSERT(!el.isNull(), return);
- el.setAttribute(QString::fromLatin1("value"), value);
-}
-
-void BarDescriptorConverter::setAsset(QDomDocument &doc, const QString &srcPath,
- const QString &destPath, const QString &type, bool isEntry)
-{
- ImportLog &log = convertedProjectContext().importLog();
- log.logInfo(tr("Setting asset path: %1 to %2 type: %3 entry point: %4")
- .arg(srcPath).arg(destPath).arg(type).arg(isEntry));
- QDomElement assetElement = ensureElement(doc, QLatin1String(S_ASSET), QLatin1String(S_PATH), srcPath);
- QTC_ASSERT(!assetElement.isNull(), return);
- while (assetElement.hasChildNodes()) {
- QDomNode nd = assetElement.firstChild();
- assetElement.removeChild(nd);
- }
- assetElement.appendChild(doc.createTextNode(destPath));
-
- const QString typeString = QLatin1String("type");
- QString s = assetElement.attribute(typeString);
- if (s != type)
- assetElement.setAttribute(typeString, type);
-
- const QString entryString = QLatin1String("entry");
- s = assetElement.attribute(entryString);
- bool b = (s.compare(QLatin1String("true"), Qt::CaseInsensitive) == 0)
- || (s.compare(QLatin1String("1")) == 0);
- if (b != isEntry)
- assetElement.setAttribute(entryString, QVariant(isEntry).toString());
-}
-
-void BarDescriptorConverter::removeAsset(QDomDocument &doc, const QString &srcPath)
-{
- ImportLog &log = convertedProjectContext().importLog();
- log.logInfo(tr("Removing asset path: %1").arg(srcPath));
- removeElement(doc, QLatin1String(S_ASSET), QLatin1String(S_PATH), srcPath);
-}
-
-void BarDescriptorConverter::replaceAssetSourcePath(QDomDocument &doc, const QString &oldSrcPath,
- const QString &newSrcPath)
-{
- ImportLog &log = convertedProjectContext().importLog();
- QDomElement el = ensureElement(doc, QLatin1String(S_ASSET), QLatin1String(S_PATH), oldSrcPath);
- if (!el.isNull()) {
- log.logInfo(tr("Replacing asset source path: %1 -> %2").arg(oldSrcPath).arg(newSrcPath));
- el.setAttribute(QLatin1String(S_PATH), newSrcPath);
- }
-}
-
-void BarDescriptorConverter::fixImageAsset(QDomDocument &doc, const QString &definitionElementName)
-{
- ImportLog &log = convertedProjectContext().importLog();
- QString target;
- QDomElement el = findElement(doc, definitionElementName, QString(), QString());
- if (!el.isNull()) {
- const QString imageString = QLatin1String("image");
- for (QDomElement imageElement = el.firstChildElement(imageString); !imageElement.isNull();
- imageElement = imageElement.nextSiblingElement(imageString)) {
- target = imageElement.text();
- if (!target.isEmpty())
- replaceAssetSourcePath(doc, target, QLatin1String(S_SRC_DIR) + target);
- }
- } else {
- log.logWarning(tr("Cannot find image asset definition: <%1>").arg(definitionElementName));
- }
-}
-
-void BarDescriptorConverter::fixIconAsset(QDomDocument &doc)
-{
- const QString iconString = QString::fromLatin1("icon");
- fixImageAsset(doc, iconString);
-}
-
-void BarDescriptorConverter::fixSplashScreensAsset(QDomDocument &doc)
-{
- const QString splashScreensString = QString::fromLatin1("splashScreens");
- fixImageAsset(doc, splashScreensString);
-}
-
-bool BarDescriptorConverter::convertFile(Core::GeneratedFile &file, QString &errorMessage)
-{
- FileConverter::convertFile(file, errorMessage);
- if (errorMessage.isEmpty()) {
- QDomDocument doc;
- if (!doc.setContent(file.binaryContents(), &errorMessage)) {
- errorMessage = tr("Error parsing XML file \"%1\": %2").arg(file.path()).arg(errorMessage);
- return false;
- }
-
- // remove <configuration> elements, since they are Momentics specific
- QDomElement rootElement = doc.documentElement();
- const QString configurationString = QLatin1String("configuration");
- while (true) {
- QDomElement el = rootElement.firstChildElement(configurationString);
- if (el.isNull())
- break;
- rootElement.removeChild(el);
- }
-
- // remove obsolete assets
- removeAsset(doc, QLatin1String("translations"));
- removeAsset(doc, QLatin1String("translations/*"));
- // assets
- setAsset(doc, applicationBinaryPath(), applicationBinaryName(),
- QLatin1String("Qnx/Elf"), true);
- const QString assetsString = QLatin1String("assets");
- replaceAssetSourcePath(doc, assetsString, QLatin1String(S_SRC_DIR) + assetsString);
- fixIconAsset(doc);
- fixSplashScreensAsset(doc);
-
- file.setBinaryContents(doc.toByteArray(4));
- }
- return errorMessage.isEmpty();
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/cascadesimport/bardescriptorconverter.h b/src/plugins/qnx/cascadesimport/bardescriptorconverter.h
deleted file mode 100644
index 0342d0c12f..0000000000
--- a/src/plugins/qnx/cascadesimport/bardescriptorconverter.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_BLACKBERRY_CASCADESPROJECTIMPORT_BARDESCRIPTORCONVERTER_H
-#define QNX_BLACKBERRY_CASCADESPROJECTIMPORT_BARDESCRIPTORCONVERTER_H
-
-#include "fileconverter.h"
-
-#include <QCoreApplication>
-
-QT_BEGIN_NAMESPACE
-class QDomElement;
-class QDomDocument;
-QT_END_NAMESPACE
-
-namespace Qnx {
-namespace Internal {
-
-class BarDescriptorConverter : public FileConverter
-{
- Q_DECLARE_TR_FUNCTIONS(BarDescriptorConverter);
-public:
- BarDescriptorConverter(ConvertedProjectContext &ctx);
- virtual ~BarDescriptorConverter() {}
-
- bool convertFile(Core::GeneratedFile &file, QString &errorMessage);
-private:
- QString projectName() const;
- QString applicationBinaryName() const;
- QString applicationBinaryPath() const;
-
- QDomElement findElement(QDomDocument &doc, const QString &tagName,
- const QString &attributeName, const QString &attributeValue);
- QDomElement ensureElement(QDomDocument &doc, const QString &tagName,
- const QString &attributeName, const QString &attributeValue);
- QDomElement removeElement(QDomDocument &doc, const QString &tagName,
- const QString &attributeName, const QString &attributeValue);
-
- void fixImageAsset(QDomDocument &doc, const QString &definitionElementName);
- void fixIconAsset(QDomDocument &doc);
- void fixSplashScreensAsset(QDomDocument &doc);
-
- void setEnv(QDomDocument &doc, const QString &name, const QString &value);
- void setAsset(QDomDocument &doc, const QString &srcPath, const QString &destPath, const QString &type = QString(), bool isEntry = false);
- void removeAsset(QDomDocument &doc, const QString &srcPath);
- void replaceAssetSourcePath(QDomDocument &doc, const QString &oldSrcPath, const QString &newSrcPath);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_BLACKBERRY_CASCADESPROJECTIMPORT_BARDESCRIPTORCONVERTER_H
diff --git a/src/plugins/qnx/cascadesimport/cascadesimport.pri b/src/plugins/qnx/cascadesimport/cascadesimport.pri
deleted file mode 100644
index 82962717e3..0000000000
--- a/src/plugins/qnx/cascadesimport/cascadesimport.pri
+++ /dev/null
@@ -1,23 +0,0 @@
-SOURCES += \
- $$PWD/cascadesimportwizard.cpp \
- $$PWD/srcprojectwizardpage.cpp \
- $$PWD/fileconverter.cpp \
- $$PWD/bardescriptorconverter.cpp \
- $$PWD/projectfileconverter.cpp \
- $$PWD/importlogconverter.cpp \
- $$PWD/importlog.cpp \
-
-HEADERS += \
- $$PWD/cascadesimportwizard.h \
- $$PWD/srcprojectwizardpage.h \
- $$PWD/fileconverter.h \
- $$PWD/bardescriptorconverter.h \
- $$PWD/projectfileconverter.h \
- $$PWD/importlogconverter.h \
- $$PWD/importlog.h \
-
-FORMS += \
- $$PWD/srcprojectwizardpage.ui \
-
-RESOURCES += \
- $$PWD/cascadesimport.qrc \
diff --git a/src/plugins/qnx/cascadesimport/cascadesimport.qrc b/src/plugins/qnx/cascadesimport/cascadesimport.qrc
deleted file mode 100644
index da52ad2e54..0000000000
--- a/src/plugins/qnx/cascadesimport/cascadesimport.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/qnx/cascadesimport">
- <file>resources/templates/project.pro</file>
- </qresource>
-</RCC>
diff --git a/src/plugins/qnx/cascadesimport/cascadesimportwizard.cpp b/src/plugins/qnx/cascadesimport/cascadesimportwizard.cpp
deleted file mode 100644
index c2e624f393..0000000000
--- a/src/plugins/qnx/cascadesimport/cascadesimportwizard.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "cascadesimportwizard.h"
-#include "srcprojectwizardpage.h"
-#include "bardescriptorconverter.h"
-#include "importlogconverter.h"
-#include "projectfileconverter.h"
-
-#include <qnx/qnxconstants.h>
-
-#include <coreplugin/icore.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/customwizard/customwizard.h>
-#include <coreplugin/coreconstants.h>
-#include <coreplugin/documentmanager.h>
-
-#include <utils/projectintropage.h>
-
-#include <utils/qtcassert.h>
-
-#include <QDir>
-#include <QFileInfo>
-#include <QPainter>
-#include <QPixmap>
-#include <QIcon>
-#include <QStringBuilder>
-#include <QDirIterator>
-
-namespace Qnx {
-namespace Internal {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// CascadesImportWizardDialog
-//
-//////////////////////////////////////////////////////////////////////////////
-
-CascadesImportWizardDialog::CascadesImportWizardDialog(QWidget *parent) :
- Core::BaseFileWizard(parent)
-{
- setWindowTitle(tr("Import Existing Momentics Cascades Project"));
-
- m_srcProjectPage = new SrcProjectWizardPage(this);
- m_srcProjectPage->setTitle(tr("Momentics Cascades Project Name and Location"));
- addPage(m_srcProjectPage);
-
- m_destProjectPage = new Utils::ProjectIntroPage(this);
- m_destProjectPage->setTitle(tr("Project Name and Location"));
- m_destProjectPage->setPath(Core::DocumentManager::projectsDirectory());
- const int destProjectPageId = addPage(m_destProjectPage);
- wizardProgress()->item(destProjectPageId)->setTitle(tr("Qt Creator")); // Override default name
-
- connect(m_srcProjectPage, SIGNAL(validPathChanged(QString)), this, SLOT(onSrcProjectPathChanged(QString)));
-}
-
-QString CascadesImportWizardDialog::srcProjectPath() const
-{
- return m_srcProjectPage->path();
-}
-
-QString CascadesImportWizardDialog::destProjectPath() const
-{
- return m_destProjectPage->path() % QLatin1Char('/') % projectName();
-}
-
-QString CascadesImportWizardDialog::projectName() const
-{
- return m_destProjectPage->projectName();
-}
-
-void CascadesImportWizardDialog::onSrcProjectPathChanged(const QString &path)
-{
- Q_UNUSED(path);
- m_destProjectPage->setProjectName(m_srcProjectPage->projectName());
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Wizard
-//
-//////////////////////////////////////////////////////////////////////////////
-static const char IMPORT_LOG_FILE_NAME[] = "import.log";
-
-CascadesImportWizard::CascadesImportWizard()
-{
- setWizardKind(ProjectWizard);
- setIcon(QPixmap(QLatin1String(Qnx::Constants::QNX_BB_CATEGORY_ICON)));
- setDisplayName(tr("Momentics Cascades Project"));
- setId(QLatin1String("Q.QnxBlackBerryCascadesApp"));
- setRequiredFeatures(Core::FeatureSet(Constants::QNX_BB_FEATURE));
- setDescription(tr("Imports existing Cascades projects created within QNX Momentics IDE. "
- "This allows you to use the project in Qt Creator."));
- setCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY));
- setDisplayCategory(QLatin1String(ProjectExplorer::Constants::IMPORT_WIZARD_CATEGORY_DISPLAY));
-}
-
-Core::BaseFileWizard *CascadesImportWizard::create(QWidget *parent,
- const Core::WizardDialogParameters &parameters) const
-{
- CascadesImportWizardDialog *wizard = new CascadesImportWizardDialog(parent);
-
- foreach (QWizardPage *p, parameters.extensionPages())
- wizard->addPage(p);
-
- return wizard;
-}
-
-bool CascadesImportWizard::convertFile(Core::GeneratedFile &file,
- ConvertedProjectContext &projectContext, QString &errorMessage) const
-{
- bool ret = false;
- if (convertFileContent(file, projectContext, errorMessage))
- if (convertFilePath(file, projectContext, errorMessage))
- ret = true;
- return ret;
-}
-
-bool CascadesImportWizard::convertFileContent(Core::GeneratedFile &file,
- ConvertedProjectContext &projectContext, QString &errorMessage) const
-{
- QString filePath = file.path();
- QString fileName = filePath.section(QLatin1Char('/'), -1);
- bool isRootFile = (fileName == filePath);
- QString fileExtension = fileName.section(QLatin1Char('.'), -1).toLower();
- bool useFileConverter = true;
- if (isRootFile) {
- if (fileName == QLatin1String("bar-descriptor.xml")) {
- BarDescriptorConverter conv(projectContext);
- conv.convertFile(file, errorMessage);
- useFileConverter = false;
- } else if (fileName == QLatin1String(IMPORT_LOG_FILE_NAME)) {
- ImportLogConverter conv(projectContext);
- conv.convertFile(file, errorMessage);
- useFileConverter = false;
- } else if (fileExtension == QLatin1String("pro")) {
- ProjectFileConverter conv(projectContext);
- conv.convertFile(file, errorMessage);
- useFileConverter = false;
- }
- }
- if (useFileConverter) {
- FileConverter conv(projectContext);
- conv.convertFile(file, errorMessage);
- }
- return errorMessage.isEmpty();
-}
-
-bool CascadesImportWizard::convertFilePath(Core::GeneratedFile &file,
- ConvertedProjectContext &projectContext, QString &errorMessage) const
-{
- Q_UNUSED(errorMessage);
- const QString destProjectPath = projectContext.destProjectPath();
- file.setPath(destProjectPath % QLatin1Char('/') % file.path());
- return true;
-}
-
-void CascadesImportWizard::collectFiles_helper(QStringList &filePaths,
- ConvertedProjectContext &projectContext, const QString &rootPath,
- const QList< QRegExp > &blackList) const
-{
- const QString srcProjectPath = projectContext.srcProjectPath();
- bool isProjectRoot = (rootPath.length() == srcProjectPath.length());
- QDirIterator it(rootPath, QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
- while (it.hasNext()) {
- it.next();
- bool isBlacklisted = false;
- QString fileName = it.fileName();
- foreach (const QRegExp &rx, blackList) {
- QString pattern = rx.pattern();
- if (pattern.at(0) == QLatin1Char('/')) {
- if (isProjectRoot) {
- QString fn = QLatin1Char('/') % fileName;
- if (rx.exactMatch(fn)) {
- isBlacklisted = true;
- break;
- }
- }
- } else {
- if (rx.exactMatch(fileName)) {
- isBlacklisted = true;
- break;
- }
- }
- }
- if (!isBlacklisted) {
- QFileInfo fi = it.fileInfo();
- if (fi.isFile())
- filePaths << it.filePath().mid(srcProjectPath.length() + 1);
- else if (fi.isDir())
- collectFiles_helper(filePaths, projectContext, it.filePath(), blackList);
- }
- }
-}
-
-bool CascadesImportWizard::collectFiles(ConvertedProjectContext &projectContext, QString &errorMessage) const
-{
- static QList<QRegExp> blackList;
- if (blackList.isEmpty()) {
- blackList << QRegExp(QLatin1String("/arm"), Qt::CaseInsensitive, QRegExp::Wildcard)
- << QRegExp(QLatin1String("/x86"), Qt::CaseInsensitive, QRegExp::Wildcard)
- << QRegExp(QLatin1String("/translations"), Qt::CaseInsensitive, QRegExp::Wildcard)
- << QRegExp(QLatin1String("Makefile"), Qt::CaseInsensitive, QRegExp::Wildcard)
- << QRegExp(QLatin1String("Makefile.*"), Qt::CaseInsensitive, QRegExp::Wildcard)
- << QRegExp(QLatin1String("/config.pri"), Qt::CaseInsensitive, QRegExp::Wildcard)
- << QRegExp(QLatin1String("/precompiled.h"), Qt::CaseInsensitive, QRegExp::Wildcard);
- }
- QStringList filePaths;
- collectFiles_helper(filePaths, projectContext, projectContext.srcProjectPath(), blackList);
- filePaths << QLatin1String(IMPORT_LOG_FILE_NAME);
- projectContext.setCollectedFiles(filePaths);
- return errorMessage.isEmpty();
-}
-
-Core::GeneratedFiles CascadesImportWizard::generateFiles(const QWizard *w, QString *pErrorMessage) const
-{
- Core::GeneratedFiles files;
- QString errorMessage;
-
- const CascadesImportWizardDialog *wizardDialog = qobject_cast<const CascadesImportWizardDialog *>(w);
- if (wizardDialog) {
- ConvertedProjectContext projectContext;
- projectContext.setSrcProjectPath(wizardDialog->srcProjectPath());
- projectContext.setDestProjectPath(wizardDialog->destProjectPath());
-
- if (collectFiles(projectContext, errorMessage)) {
- foreach (const QString &filePath, projectContext.collectedFiles()) {
- Core::GeneratedFile file(filePath);
- if (convertFile(file, projectContext, errorMessage)) {
- if (!file.path().isEmpty())
- files << file;
- }
- if (!errorMessage.isEmpty()) {
- errorMessage = tr("Error generating file \"%1\": %2").arg(filePath).arg(errorMessage);
- break;
- }
- }
- }
- }
-
-
- if (!errorMessage.isEmpty())
- if (pErrorMessage)
- *pErrorMessage = errorMessage;
- return files;
-}
-
-bool CascadesImportWizard::postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage)
-{
- Q_UNUSED(w);
- return ProjectExplorer::CustomProjectWizard::postGenerateOpen(l, errorMessage);
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/cascadesimport/cascadesimportwizard.h b/src/plugins/qnx/cascadesimport/cascadesimportwizard.h
deleted file mode 100644
index 78e8e8f21f..0000000000
--- a/src/plugins/qnx/cascadesimport/cascadesimportwizard.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_BLACKBERRY_CASCADESIMPORT_WIZARD_H
-#define QNX_BLACKBERRY_CASCADESIMPORT_WIZARD_H
-
-#include "fileconverter.h"
-
-#include <coreplugin/basefilewizard.h>
-#include <coreplugin/basefilewizardfactory.h>
-#include <utils/wizard.h>
-
-namespace Utils { class ProjectIntroPage; }
-
-namespace Qnx {
-namespace Internal {
-
-class SrcProjectWizardPage;
-
-class CascadesImportWizardDialog : public Core::BaseFileWizard
-{
- Q_OBJECT
-public:
- CascadesImportWizardDialog(QWidget *parent = 0);
-
- QString srcProjectPath() const;
- QString destProjectPath() const;
-
- QString projectName() const;
-private slots:
- void onSrcProjectPathChanged(const QString &path);
-private:
- SrcProjectWizardPage *m_srcProjectPage;
- Utils::ProjectIntroPage *m_destProjectPage;
-};
-
-class CascadesImportWizard : public Core::BaseFileWizardFactory
-{
- Q_OBJECT
-public:
- CascadesImportWizard();
-
-protected:
- Core::BaseFileWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
- Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
- bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage);
-private:
- bool collectFiles(ConvertedProjectContext &projectContext, QString &errorMessage) const;
- void collectFiles_helper(QStringList &filePaths, ConvertedProjectContext &projectContext,
- const QString &rootPath, const QList< QRegExp > &blackList) const;
- bool convertFile(Core::GeneratedFile &file, ConvertedProjectContext &projectContext,
- QString &errorMessage) const;
- bool convertFilePath(Core::GeneratedFile &file, ConvertedProjectContext &projectContext,
- QString &errorMessage) const;
- bool convertFileContent(Core::GeneratedFile &file, ConvertedProjectContext &projectContext,
- QString &errorMessage) const;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_BLACKBERRY_CASCADESIMPORT_WIZARD_H
diff --git a/src/plugins/qnx/cascadesimport/fileconverter.cpp b/src/plugins/qnx/cascadesimport/fileconverter.cpp
deleted file mode 100644
index 57faafc511..0000000000
--- a/src/plugins/qnx/cascadesimport/fileconverter.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "fileconverter.h"
-
-#include <utils/fileutils.h>
-#include <coreplugin/generatedfile.h>
-
-namespace Qnx {
-namespace Internal {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// ConvertedProjectContext
-//
-//////////////////////////////////////////////////////////////////////////////
-QString ConvertedProjectContext::projectName() const
-{
- return destProjectPath().section(QLatin1Char('/'), -1);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// FileConverter
-//
-//////////////////////////////////////////////////////////////////////////////
-bool FileConverter::convertFile(Core::GeneratedFile &file, QString &errorMessage)
-{
- ImportLog &log = convertedProjectContext().importLog();
- log.logInfo(tr("===== Converting file: %1").arg(file.path()));
- loadFileContent(file, errorMessage);
- if (!errorMessage.isEmpty())
- logError(errorMessage);
- return errorMessage.isEmpty();
-}
-
-QByteArray FileConverter::loadFileContent(const QString &filePath, QString &errorMessage)
-{
- QByteArray ret;
- Utils::FileReader fr;
- QString absFilePath = filePath;
- if (!filePath.startsWith(QLatin1String(":/"))) {
- const QString srcProjectPath = convertedProjectContext().srcProjectPath();
- absFilePath = srcProjectPath + QLatin1Char('/') + filePath;
- }
- fr.fetch(absFilePath);
- if (!fr.errorString().isEmpty())
- errorMessage = fr.errorString();
- else
- ret = fr.data();
- return ret;
-}
-
-bool FileConverter::loadFileContent(Core::GeneratedFile &file, QString &errorMessage)
-{
- if (file.binaryContents().isEmpty()) {
- // virtual files have some content set already
- QString filePath = file.path();
- QByteArray ba = loadFileContent(filePath, errorMessage);
- file.setBinaryContents(ba);
- }
- return errorMessage.isEmpty();
-}
-
-void FileConverter::logError(const QString &errorMessage)
-{
- if (!errorMessage.isEmpty())
- convertedProjectContext().importLog().logError(errorMessage);
-}
-
-} // namespace Internal
-} // namespace Qnx
-
diff --git a/src/plugins/qnx/cascadesimport/fileconverter.h b/src/plugins/qnx/cascadesimport/fileconverter.h
deleted file mode 100644
index 7dce7c73fd..0000000000
--- a/src/plugins/qnx/cascadesimport/fileconverter.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_BLACKBERRY_CASCADESPROJECTIMPORT_FILECONVERTER_H
-#define QNX_BLACKBERRY_CASCADESPROJECTIMPORT_FILECONVERTER_H
-
-#include "importlog.h"
-
-#include <QStringList>
-#include <QCoreApplication>
-
-namespace Core { class GeneratedFile; }
-
-namespace Qnx {
-namespace Internal {
-
-class ConvertedProjectContext
-{
-public:
- void setSrcProjectPath(const QString &p) {m_srcProjectPath = p;}
- QString srcProjectPath() const {return m_srcProjectPath;}
- void setDestProjectPath(const QString &p) {m_destProjectPath = p;}
- QString destProjectPath() const {return m_destProjectPath;}
-
- QString projectName() const;
- const QStringList& collectedFiles() const {return m_collectedFiles;}
- void setCollectedFiles(const QStringList &files) {m_collectedFiles = files;}
- ImportLog& importLog() {return m_importLog;}
-private:
- QString m_srcProjectPath;
- QString m_destProjectPath;
- ImportLog m_importLog;
- QStringList m_collectedFiles;
-};
-
-class FileConverter
-{
- Q_DECLARE_TR_FUNCTIONS(FileConverter);
-public:
- FileConverter(ConvertedProjectContext &ctx) : m_convertedProjectContext(ctx) {}
- virtual ~FileConverter() {}
-
- virtual bool convertFile(Core::GeneratedFile &file, QString &errorMessage);
-protected:
- ConvertedProjectContext& convertedProjectContext() const {return m_convertedProjectContext;}
-
- bool loadFileContent(Core::GeneratedFile &file, QString &errorMessage);
- QByteArray loadFileContent(const QString &filePath, QString &errorMessage);
- void logError(const QString &errorMessage);
-
- ConvertedProjectContext &m_convertedProjectContext;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_BLACKBERRY_CASCADESPROJECTIMPORT_FILECONVERTER_H
diff --git a/src/plugins/qnx/cascadesimport/importlog.cpp b/src/plugins/qnx/cascadesimport/importlog.cpp
deleted file mode 100644
index 02d2be7aea..0000000000
--- a/src/plugins/qnx/cascadesimport/importlog.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "importlog.h"
-
-namespace Qnx {
-namespace Internal {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// ImportLogEntry
-//
-//////////////////////////////////////////////////////////////////////////////
-static const char S_ERROR[] = "error";
-static const char S_WARNING[] = "warning";
-static const char S_INFO[] = "info";
-static const char S_DEBUG[] = "debug";
-static const char S_UNDEFINED[] = "undefined";
-
-ImportLogEntry::ImportLogEntry(int sev, const QString &msg, const QString &context)
-: QVariantList()
-{
- reserve(UnusedIx);
- append(sev);
- append(msg);
- append(context);
-}
-
-static const char* severityEnumToStr(ImportLogEntry::Severity sev)
-{
- switch (sev) {
- case ImportLogEntry::Error:
- return S_ERROR;
- case ImportLogEntry::Warning:
- return S_WARNING;
- case ImportLogEntry::Info:
- return S_INFO;
- case ImportLogEntry::Debug:
- return S_DEBUG;
- default:
- break;
- }
- return S_UNDEFINED;
-}
-
-ImportLogEntry::Severity ImportLogEntry::severity() const
-{
- if (isValid())
- return (Severity)(at(SeverityIx).toInt());
- return Undefined;
-}
-
-QString ImportLogEntry::severityStr() const
-{
- return QLatin1String(severityEnumToStr(severity()));
-}
-
-QChar ImportLogEntry::severityAbbr() const
-{
- return severityStr().at(0).toUpper();
-}
-
-QString ImportLogEntry::message() const
-{
- if (isValid())
- return at(MessageIx).toString();
- return QString();
-}
-
-QString ImportLogEntry::context() const
-{
- if (isValid())
- return at(ContextIx).toString();
- return QString();
-}
-
-QString ImportLogEntry::toString() const
-{
- QString ret;
- if (severity() == Undefined)
- ret = message();
- else
- ret = QString::fromLatin1("[%1]%2 %3").arg(severityAbbr()).arg(context()).arg(message());
- return ret;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// ImportLog
-//
-//////////////////////////////////////////////////////////////////////////////
-QString ImportLog::toString() const
-{
- QString ret;
- foreach (const ImportLogEntry &sle, *this)
- ret += sle.toString() + QLatin1Char('\n');
- return ret;
-}
-
-ImportLog& ImportLog::logError(const QString &msg, const QString &context)
-{
- append(ImportLogEntry(ImportLogEntry::Error, msg, context));
- return *this;
-}
-
-ImportLog& ImportLog::logWarning(const QString &msg, const QString &context)
-{
- append(ImportLogEntry(ImportLogEntry::Warning, msg, context));
- return *this;
-}
-
-ImportLog& ImportLog::logInfo(const QString &msg, const QString &context)
-{
- append(ImportLogEntry(ImportLogEntry::Info, msg, context));
- return *this;
-}
-
-ImportLog& ImportLog::logDebug(const QString &msg, const QString &context)
-{
- append(ImportLogEntry(ImportLogEntry::Debug, msg, context));
- return *this;
-}
-
-} // namespace Internal
-} // namespace Qnx
-
diff --git a/src/plugins/qnx/cascadesimport/importlog.h b/src/plugins/qnx/cascadesimport/importlog.h
deleted file mode 100644
index 69b7aa521e..0000000000
--- a/src/plugins/qnx/cascadesimport/importlog.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_BLACKBERRY_CASCADESPROJECTIMPORT_IMPORTLOG_H
-#define QNX_BLACKBERRY_CASCADESPROJECTIMPORT_IMPORTLOG_H
-
-#include <QVariantList>
-
-namespace Qnx {
-namespace Internal {
-
-class ImportLogEntry : public QVariantList
-{
-public:
- enum Severity {Undefined = 0, Debug, Info, Warning, Error};
-
- ImportLogEntry() : QVariantList() {}
- ImportLogEntry(int sev, const QString &msg, const QString &context = QString());
- ImportLogEntry(const QVariantList &l) : QVariantList(l) {}
-
- bool isValid() const {return (count() >= UnusedIx);}
- Severity severity() const;
- QString severityStr() const;
- QChar severityAbbr() const;
- QString message() const;
- QString context() const;
- QString toString() const;
-private:
- enum FieldIndexes {SeverityIx = 0, MessageIx, ContextIx, UnusedIx};
-};
-
-class ImportLog : public QList<ImportLogEntry> ///< error list
-{
-public:
- QString toString() const;
-
- ImportLog& logError(const QString &msg, const QString &context = QString());
- ImportLog& logWarning(const QString &msg, const QString &context = QString());
- ImportLog& logInfo(const QString &msg, const QString &context = QString());
- ImportLog& logDebug(const QString &msg, const QString &context = QString());
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_BLACKBERRY_CASCADESPROJECTIMPORT_IMPORTLOG_H
diff --git a/src/plugins/qnx/cascadesimport/importlogconverter.cpp b/src/plugins/qnx/cascadesimport/importlogconverter.cpp
deleted file mode 100644
index 4a76181d2a..0000000000
--- a/src/plugins/qnx/cascadesimport/importlogconverter.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "importlogconverter.h"
-
-#include <qnx/qnxconstants.h>
-
-#include <utils/qtcassert.h>
-#include <coreplugin/generatedfile.h>
-
-#include <QDateTime>
-
-namespace Qnx {
-namespace Internal {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// ImportLogConverter
-//
-//////////////////////////////////////////////////////////////////////////////
-ImportLogConverter::ImportLogConverter(ConvertedProjectContext &ctx)
-: FileConverter(ctx)
-{
-}
-
-bool ImportLogConverter::convertFile(Core::GeneratedFile &file, QString &errorMessage)
-{
- Q_UNUSED(errorMessage);
- QString content;
- content += QLatin1String("========================================================\n");
- content += tr("Generated by cascades importer ver: %1, %2")
- .arg(QLatin1String(Qnx::Constants::QNX_BLACKBERRY_CASCADESIMPORTER_VERSION))
- .arg(QDateTime::currentDateTime().toString(Qt::ISODate));
- content += QLatin1String("\n========================================================\n\n");
- content += convertedProjectContext().importLog().toString();
- file.setContents(content);
- file.setAttributes(file.attributes() | Core::GeneratedFile::OpenEditorAttribute);
- return true;
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/cascadesimport/importlogconverter.h b/src/plugins/qnx/cascadesimport/importlogconverter.h
deleted file mode 100644
index 3e2e7d228f..0000000000
--- a/src/plugins/qnx/cascadesimport/importlogconverter.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_BLACKBERRY_CASCADESPROJECTIMPORT_IMPORTLOGCONVERTER_H
-#define QNX_BLACKBERRY_CASCADESPROJECTIMPORT_IMPORTLOGCONVERTER_H
-
-#include "fileconverter.h"
-
-namespace Qnx {
-namespace Internal {
-
-class ImportLogConverter : public FileConverter
-{
- Q_DECLARE_TR_FUNCTIONS(ImportLogConverter);
-public:
- ImportLogConverter(ConvertedProjectContext &ctx);
- virtual ~ImportLogConverter() {}
-
- bool convertFile(Core::GeneratedFile &file, QString &errorMessage);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_BLACKBERRY_CASCADESPROJECTIMPORT_IMPORTLOGCONVERTER_H
diff --git a/src/plugins/qnx/cascadesimport/projectfileconverter.cpp b/src/plugins/qnx/cascadesimport/projectfileconverter.cpp
deleted file mode 100644
index b0c0bef239..0000000000
--- a/src/plugins/qnx/cascadesimport/projectfileconverter.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "projectfileconverter.h"
-
-#include <qnx/qnxconstants.h>
-
-#include <coreplugin/generatedfile.h>
-#include <utils/qtcassert.h>
-
-#include <QDateTime>
-#include <QSet>
-
-namespace Qnx {
-namespace Internal {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// ProjectFileConverter
-//
-//////////////////////////////////////////////////////////////////////////////
-ProjectFileConverter::ProjectFileConverter(ConvertedProjectContext &ctx)
-: FileConverter(ctx)
-{
-}
-
-static QMap<QString, QString> scanForDefinedVariables(const Core::GeneratedFile &file)
-{
- QMap<QString, QString> ret;
- QString origContent = file.contents();
- QStringList lines = origContent.split(QLatin1Char('\n'), QString::KeepEmptyParts);
- QString line;
- foreach (QString ln, lines) {
- ln = ln.trimmed();
- if (ln.length() && (ln.at(0) == QLatin1Char('#')))
- continue;
- if ((line.length() > 0) && (line.at(line.length() - 1) == QLatin1Char('\\'))) {
- line = line.mid(line.length() - 1);
- line += ln;
- } else {
- line = ln;
- }
- if ((line.length() > 0) && (line.at(line.length() - 1) != QLatin1Char('\\'))) {
- int ix1 = line.indexOf(QLatin1Char('='));
- if (ix1 > 0) {
- int ix2 = (line.at(ix1 - 1) == QLatin1Char('+'))? ix1 - 1: ix1;
- QString k = line.mid(0, ix2).trimmed().toUpper();
- QString v = line.mid(ix1 + 1).trimmed();
- if (ix1 != ix2)
- v = ret.value(k) + QLatin1Char(' ') + v;
- ret[k] = v;
- }
- }
- }
- return ret;
-}
-
-static QSet<QString> parseVariable(const QString &varStr)
-{
- QStringList sl = varStr.split(QLatin1Char(' '), QString::SkipEmptyParts);
- QSet<QString> ret = QSet<QString>::fromList(sl);
- return ret;
-}
-
-static QString updateVariable(const QString &varStr, const QString &varsToAdd,
- const QString &varsToRemove)
-{
- QSet<QString> var = parseVariable(varStr);
-
- QSet<QString> ss = parseVariable(varsToAdd);
- foreach (const QString &s, ss)
- var << s;
-
- ss = parseVariable(varsToRemove);
- foreach (const QString &s, ss)
- var.remove(s);
-
- QStringList sl = QStringList::fromSet(var);
- return sl.join(QLatin1Char(' '));
-}
-
-bool ProjectFileConverter::convertFile(Core::GeneratedFile &file, QString &errorMessage)
-{
- if (!FileConverter::convertFile(file, errorMessage))
- return false;
-
- ImportLog &log = convertedProjectContext().importLog();
- QMap<QString, QString> origProjectVariables = scanForDefinedVariables(file);
- QString fileContent;
-
- QLatin1String path( ":/qnx/cascadesimport/resources/templates/project.pro");
- QByteArray ba = loadFileContent(path, errorMessage);
- if (!errorMessage.isEmpty())
- return false;
- fileContent = QString::fromUtf8(ba);
-
- QStringList headers;
- QStringList sources;
- QStringList resources;
- QStringList otherFiles;
-
- foreach (const QString &filePath, convertedProjectContext().collectedFiles()) {
- QString ext = filePath.section(QLatin1Char('.'), -1);
- if (ext.compare(QLatin1String("c"), Qt::CaseInsensitive) == 0)
- sources << filePath;
- else if (ext.compare(QLatin1String("cc"), Qt::CaseInsensitive) == 0)
- sources << filePath;
- else if (ext.compare(QLatin1String("cpp"), Qt::CaseInsensitive) == 0)
- sources << filePath;
- else if (ext.compare(QLatin1String("h"), Qt::CaseInsensitive) == 0)
- headers << filePath;
- else if (ext.compare(QLatin1String("hh"), Qt::CaseInsensitive) == 0)
- headers << filePath;
- else if (ext.compare(QLatin1String("hpp"), Qt::CaseInsensitive) == 0)
- headers << filePath;
- else if (ext.compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0)
- resources << filePath;
- else if (ext.compare(QLatin1String("qml"), Qt::CaseInsensitive) == 0)
- otherFiles << filePath;
- else if (ext.compare(QLatin1String("js"), Qt::CaseInsensitive) == 0)
- otherFiles << filePath;
- else if (ext.compare(QLatin1String("ts"), Qt::CaseInsensitive) == 0)
- otherFiles << filePath;
- else if (ext.compare(QLatin1String("pro"), Qt::CaseInsensitive) == 0)
- otherFiles << filePath;
- else if (filePath.compare(QLatin1String("bar-descriptor.xml"), Qt::CaseInsensitive) == 0)
- otherFiles << filePath;
- else if (filePath.startsWith(QLatin1String("assets/"), Qt::CaseInsensitive))
- // include all the content of the assets directory
- otherFiles << filePath;
- else if (filePath.startsWith(QLatin1String("src/"), Qt::CaseInsensitive))
- // include all the content of the src directory
- otherFiles << filePath;
- else if (ext.compare(QLatin1String("log"), Qt::CaseInsensitive) != 0)
- log.logWarning(tr("File \"%1\" not listed in \"%2\" file, should it be?")
- .arg(filePath).arg(file.path()));
- }
-
- fileContent.replace(QLatin1String("%HEADERS%"), headers.join(QLatin1String(" \\\n ")));
- fileContent.replace(QLatin1String("%SOURCES%"), sources.join(QLatin1String(" \\\n ")));
- fileContent.replace(QLatin1String("%RESOURCES%"), resources.join(QLatin1String(" \\\n ")));
- fileContent.replace(QLatin1String("%DISTFILES%"), otherFiles.join(QLatin1String(" \\\n ")));
- fileContent.replace(QLatin1String("%PROJECT_NAME%"), convertedProjectContext().projectName());
- fileContent.replace(QLatin1String("%TARGET%"), origProjectVariables.value(QLatin1String("TARGET"),
- convertedProjectContext().projectName()));
- fileContent.replace(QLatin1String("%EXTRA_LIBS%"), origProjectVariables.value(QLatin1String("LIBS")));
- fileContent.replace(QLatin1String("%IMPORTER_VERSION%"),
- QLatin1String(Qnx::Constants::QNX_BLACKBERRY_CASCADESIMPORTER_VERSION));
- fileContent.replace(QLatin1String("%DATE_TIME%"),
- QDateTime::currentDateTime().toString(Qt::ISODate));
- fileContent.replace(QLatin1String("%QT%"),
- updateVariable(origProjectVariables.value(QLatin1String("QT")),
- QLatin1String("declarative script svg sql network xml xmlpatterns"),
- QString()
- ));
- fileContent.replace(QLatin1String("%CONFIG%"),
- updateVariable(origProjectVariables.value(QLatin1String("CONFIG")),
- QLatin1String("qt warn_on"),
- QLatin1String("debug release debug_and_release cascades cascades10")
- ));
- fileContent.replace(QLatin1String("%MOBILITY%"), origProjectVariables.value(QLatin1String("MOBILITY")));
- file.setContents(fileContent);
- file.setAttributes(file.attributes() | Core::GeneratedFile::OpenProjectAttribute);
- return errorMessage.isEmpty();
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/cascadesimport/projectfileconverter.h b/src/plugins/qnx/cascadesimport/projectfileconverter.h
deleted file mode 100644
index bc69fac78d..0000000000
--- a/src/plugins/qnx/cascadesimport/projectfileconverter.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_BLACKBERRY_CASCADESPROJECTIMPORT_PROJECTFILECONVERTER_H
-#define QNX_BLACKBERRY_CASCADESPROJECTIMPORT_PROJECTFILECONVERTER_H
-
-#include "fileconverter.h"
-
-#include <QCoreApplication>
-
-#include <QMap>
-#include <QString>
-
-namespace Qnx {
-namespace Internal {
-
-class ProjectFileConverter : public FileConverter
-{
- Q_DECLARE_TR_FUNCTIONS(ProjectFileConverter);
-public:
- ProjectFileConverter(ConvertedProjectContext &ctx);
- virtual ~ProjectFileConverter() {}
-
- bool convertFile(Core::GeneratedFile &file, QString &errorMessage);
-private:
- QMap<QString, QString> definedVariables(const Core::GeneratedFile &file);
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_BLACKBERRY_CASCADESPROJECTIMPORT_PROJECTFILECONVERTER_H
diff --git a/src/plugins/qnx/cascadesimport/resources/templates/project.pro b/src/plugins/qnx/cascadesimport/resources/templates/project.pro
deleted file mode 100644
index 39960ad38e..0000000000
--- a/src/plugins/qnx/cascadesimport/resources/templates/project.pro
+++ /dev/null
@@ -1,46 +0,0 @@
-#========================================================================================
-# generated by CascadesProjectImporter ver. %IMPORTER_VERSION% - %DATE_TIME%
-#========================================================================================
-
-TEMPLATE = app
-TARGET = %TARGET%
-
-CONFIG += %CONFIG%
-
-# For cascades integration, some additional libraries are needed
-# and the library path needs to be set
-LIBS += -lbb -lbbcascades
-LIBS += %EXTRA_LIBS%
-
-QT -= gui
-QT += %QT%
-
-MOBILITY += %MOBILITY%
-
-QMAKE_CFLAGS += -Wno-psabi
-QMAKE_CXXFLAGS += -Wno-psabi
-
-CONFIG(release, debug|release) {
- zygotize {
- TEMPLATE = lib
- QMAKE_CFLAGS += -fstack-protector-strong -fvisibility=hidden -mthumb -Os
- QMAKE_CXXFLAGS += -fstack-protector-strong -fvisibility=hidden -mthumb -Os
- QMAKE_LFLAGS += -Wl,-z,relro
- DEFINES += _FORTIFY_SOURCE=2
- }
-}
-
-INCLUDEPATH += src
-
-HEADERS += \
- %HEADERS%
-
-SOURCES += \
- %SOURCES%
-
-RESOURCES += \
- %RESOURCES%
-
-DISTFILES += \
- bar-descriptor.xml \
- %DISTFILES%
diff --git a/src/plugins/qnx/cascadesimport/srcprojectwizardpage.cpp b/src/plugins/qnx/cascadesimport/srcprojectwizardpage.cpp
deleted file mode 100644
index 552ce45f9f..0000000000
--- a/src/plugins/qnx/cascadesimport/srcprojectwizardpage.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "srcprojectwizardpage.h"
-#include "ui_srcprojectwizardpage.h"
-
-#include <utils/wizard.h>
-
-#include <QDir>
-#include <QDirIterator>
-
-namespace Qnx {
-namespace Internal {
-
-static bool validateProjectPath(const QString &path, QString *errorMessage)
-{
- bool proFound = false;
- bool barDescriptorFound = false;
- QDirIterator di(path);
- while (di.hasNext()) {
- di.next();
- QFileInfo fi = di.fileInfo();
- if (fi.isFile()) {
- if (fi.fileName() == QLatin1String("bar-descriptor.xml"))
- barDescriptorFound = true;
- else if (fi.fileName().endsWith(QLatin1String(".pro")))
- proFound = true;
- }
- if (barDescriptorFound && proFound)
- break;
- }
- const bool ret = barDescriptorFound && proFound;
- if (!ret && errorMessage) {
- *errorMessage = QCoreApplication::translate("Qnx",
- "Directory does not seem to be a valid Cascades project.");
- }
- return ret;
-}
-
-
-SrcProjectWizardPage::SrcProjectWizardPage(QWidget *parent)
- : QWizardPage(parent), m_complete(false)
-{
- ui = new Ui::SrcProjectWizardPage;
- ui->setupUi(this);
- ui->pathChooser->setPromptDialogTitle(tr("Choose imported Cascades project directory"));
- ui->pathChooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
- ui->pathChooser->setAdditionalPathValidator(validateProjectPath);
-
- connect(ui->pathChooser, SIGNAL(pathChanged(QString)), this, SLOT(onPathChooserPathChanged(QString)));
-
- setPath(QDir::homePath());
-
- setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Momentics"));
-}
-
-SrcProjectWizardPage::~SrcProjectWizardPage()
-{
- delete ui;
-}
-
-void SrcProjectWizardPage::onPathChooserPathChanged(const QString &newPath)
-{
- bool newComplete = ui->pathChooser->isValid();
- if (newComplete != m_complete) {
- m_complete = newComplete;
- emit completeChanged();
- }
- if (newComplete) emit validPathChanged(newPath);
-}
-
-QString SrcProjectWizardPage::projectName() const
-{
- return path().section(QLatin1Char('/'), -1);
-}
-
-QString SrcProjectWizardPage::path() const
-{
- return Utils::FileName::fromUserInput(ui->pathChooser->path()).toString();
-}
-
-void SrcProjectWizardPage::setPath(const QString &path)
-{
- ui->pathChooser->setPath(path);
-}
-
-bool SrcProjectWizardPage::isComplete() const
-{
- return m_complete;
-}
-
-} // namespace Internal
-} // namespace Qnx
diff --git a/src/plugins/qnx/cascadesimport/srcprojectwizardpage.h b/src/plugins/qnx/cascadesimport/srcprojectwizardpage.h
deleted file mode 100644
index eb08e00b1f..0000000000
--- a/src/plugins/qnx/cascadesimport/srcprojectwizardpage.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-** Contact: BlackBerry Limited (blackberry-qt@qnx.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_BLACKBERRY_CASCADESPROJECTIMPORT_SRCPROJECTWIZARDPAGE_H
-#define QNX_BLACKBERRY_CASCADESPROJECTIMPORT_SRCPROJECTWIZARDPAGE_H
-
-#include <QWizardPage>
-
-namespace Qnx {
-namespace Internal {
-
-namespace Ui { class SrcProjectWizardPage; }
-
-class SrcProjectWizardPage : public QWizardPage
-{
- Q_OBJECT
-public:
- explicit SrcProjectWizardPage(QWidget *parent = 0);
- virtual ~SrcProjectWizardPage();
-
- QString projectName() const;
- QString path() const;
- void setPath(const QString &path);
-
- bool isComplete() const;
-signals:
- void validPathChanged(const QString &path);
-private slots:
- void onPathChooserPathChanged(const QString &newPath);
-private:
- Ui::SrcProjectWizardPage *ui;
- bool m_complete;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_BLACKBERRY_CASCADESPROJECTIMPORT_SRCPROJECTWIZARDPAGE_H
diff --git a/src/plugins/qnx/cascadesimport/srcprojectwizardpage.ui b/src/plugins/qnx/cascadesimport/srcprojectwizardpage.ui
deleted file mode 100644
index 25225cbaa9..0000000000
--- a/src/plugins/qnx/cascadesimport/srcprojectwizardpage.ui
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::SrcProjectWizardPage</class>
- <widget class="QWizardPage" name="Qnx::Internal::SrcProjectWizardPage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>520</width>
- <height>147</height>
- </rect>
- </property>
- <property name="title">
- <string>Choose the Location</string>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::ExpandingFieldsGrow</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="pathLabel">
- <property name="text">
- <string>Project path:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="Utils::PathChooser" name="pathChooser" native="true"/>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>Utils::PathChooser</class>
- <extends>QWidget</extends>
- <header location="global">utils/pathchooser.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/images/ok.png b/src/plugins/qnx/images/ok.png
deleted file mode 100644
index e5d13cd47c..0000000000
--- a/src/plugins/qnx/images/ok.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qnx/images/target-small.png b/src/plugins/qnx/images/target-small.png
deleted file mode 100644
index c8ead87cdf..0000000000
--- a/src/plugins/qnx/images/target-small.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qnx/images/target.png b/src/plugins/qnx/images/target.png
deleted file mode 100644
index 5260eb64d9..0000000000
--- a/src/plugins/qnx/images/target.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qnx/qnx.pro b/src/plugins/qnx/qnx.pro
index 94b7092b6c..0e4cb42a58 100644
--- a/src/plugins/qnx/qnx.pro
+++ b/src/plugins/qnx/qnx.pro
@@ -3,30 +3,8 @@ QT += network xml
include(../../qtcreatorplugin.pri)
SOURCES += qnxplugin.cpp \
- blackberryqtversionfactory.cpp \
- blackberryqtversion.cpp \
qnxbaseqtconfigwidget.cpp \
- blackberrydeployconfigurationfactory.cpp \
- blackberrydeployconfiguration.cpp \
- blackberrycreatepackagestep.cpp \
- blackberrycreatepackagestepconfigwidget.cpp \
- blackberrycreatepackagestepfactory.cpp \
- blackberrydeploystep.cpp \
- blackberrydeployconfigurationwidget.cpp \
- blackberrydeploystepconfigwidget.cpp \
- blackberrydeviceconfigurationfactory.cpp \
- blackberrydeviceconfigurationwizard.cpp \
- blackberrydeviceconfigurationwizardpages.cpp \
- blackberrydeploystepfactory.cpp \
- blackberryrunconfiguration.cpp \
- blackberryrunconfigurationwidget.cpp \
- blackberryrunconfigurationfactory.cpp \
- blackberryruncontrolfactory.cpp \
- blackberryruncontrol.cpp \
- blackberrydebugsupport.cpp \
- blackberryapplicationrunner.cpp \
qnxutils.cpp \
- blackberrydeviceconfigurationwidget.cpp \
qnxdeviceconfigurationfactory.cpp \
qnxdeviceconfigurationwizard.cpp \
qnxdeviceconfigurationwizardpages.cpp \
@@ -41,70 +19,17 @@ SOURCES += qnxplugin.cpp \
qnxruncontrol.cpp \
qnxqtversionfactory.cpp \
qnxqtversion.cpp \
- qnxabstractqtversion.cpp \
- blackberrydeviceconfiguration.cpp \
qnxdeployconfiguration.cpp \
qnxdeviceconfiguration.cpp \
- blackberrydeployinformation.cpp \
pathchooserdelegate.cpp \
- blackberryabstractdeploystep.cpp \
- blackberryndksettingswidget.cpp \
- blackberryndksettingspage.cpp \
- bardescriptoreditorfactory.cpp \
- bardescriptoreditor.cpp \
- bardescriptoreditorwidget.cpp \
- bardescriptordocument.cpp \
- bardescriptorpermissionsmodel.cpp \
- blackberrykeyswidget.cpp \
- blackberrykeyspage.cpp \
- blackberrycertificate.cpp \
- blackberryimportcertificatedialog.cpp \
- blackberrycreatecertificatedialog.cpp \
- blackberrydebugtokenrequester.cpp \
- blackberrydebugtokenrequestdialog.cpp \
- blackberrydebugtokenuploader.cpp \
- blackberrydebugtokenreader.cpp \
- blackberryndkprocess.cpp \
- blackberrydeviceconnection.cpp \
- blackberrydeviceconnectionmanager.cpp \
- blackberrydeviceinformation.cpp \
- blackberrysshkeysgenerator.cpp \
- blackberryprocessparser.cpp \
- blackberrysigningpasswordsdialog.cpp \
- bardescriptoreditorpackageinformationwidget.cpp \
- bardescriptoreditorauthorinformationwidget.cpp \
- bardescriptoreditorentrypointwidget.cpp \
- bardescriptoreditorgeneralwidget.cpp \
- bardescriptoreditorpermissionswidget.cpp \
- bardescriptoreditorenvironmentwidget.cpp \
- bardescriptoreditorassetswidget.cpp \
- bardescriptoreditorabstractpanelwidget.cpp \
- blackberrysigningutils.cpp \
qnxdevicetester.cpp \
- blackberryconfigurationmanager.cpp \
- blackberrydevicelistdetector.cpp \
- blackberrylogprocessrunner.cpp \
- blackberryinstallwizardpages.cpp \
- blackberryinstallwizard.cpp \
qnxdeviceprocesssignaloperation.cpp \
qnxdeviceprocesslist.cpp \
qnxtoolchain.cpp \
slog2inforunner.cpp \
- blackberrydebugtokenpinsdialog.cpp \
- blackberrycheckdevicestatusstepfactory.cpp \
- blackberrycheckdevicestatusstepconfigwidget.cpp \
- blackberrycheckdevicestatusstep.cpp \
qnxattachdebugsupport.cpp \
qnxattachdebugdialog.cpp \
- blackberrysetuppage.cpp \
- blackberrysetupwidget.cpp \
- blackberryruntimeconfiguration.cpp \
- blackberryapilevelconfiguration.cpp \
- blackberrypotentialkit.cpp \
- bardescriptorfilenode.cpp \
- bardescriptorfilenodemanager.cpp \
qnxconfiguration.cpp \
- qnxbaseconfiguration.cpp \
qnxsettingswidget.cpp \
qnxconfigurationmanager.cpp \
qnxsettingspage.cpp \
@@ -113,30 +38,8 @@ SOURCES += qnxplugin.cpp \
HEADERS += qnxplugin.h\
qnxconstants.h \
- blackberryqtversionfactory.h \
- blackberryqtversion.h \
qnxbaseqtconfigwidget.h \
- blackberrydeployconfigurationfactory.h \
- blackberrydeployconfiguration.h \
- blackberrycreatepackagestep.h \
- blackberrycreatepackagestepconfigwidget.h \
- blackberrycreatepackagestepfactory.h \
- blackberrydeploystep.h \
- blackberrydeployconfigurationwidget.h \
- blackberrydeploystepconfigwidget.h \
- blackberrydeviceconfigurationfactory.h \
- blackberrydeviceconfigurationwizard.h \
- blackberrydeviceconfigurationwizardpages.h \
- blackberrydeploystepfactory.h \
- blackberryrunconfiguration.h \
- blackberryrunconfigurationwidget.h \
- blackberryrunconfigurationfactory.h \
- blackberryruncontrolfactory.h \
- blackberryruncontrol.h \
- blackberrydebugsupport.h \
- blackberryapplicationrunner.h \
qnxutils.h \
- blackberrydeviceconfigurationwidget.h \
qnxdeviceconfigurationfactory.h \
qnxdeviceconfigurationwizard.h \
qnxdeviceconfigurationwizardpages.h \
@@ -151,70 +54,17 @@ HEADERS += qnxplugin.h\
qnxruncontrol.h \
qnxqtversionfactory.h \
qnxqtversion.h \
- qnxabstractqtversion.h \
- blackberrydeviceconfiguration.h \
qnxdeployconfiguration.h \
qnxdeviceconfiguration.h \
- blackberrydeployinformation.h \
pathchooserdelegate.h \
- blackberryabstractdeploystep.h \
- blackberryndksettingswidget.h \
- blackberryndksettingspage.h \
- bardescriptoreditorfactory.h \
- bardescriptoreditor.h \
- bardescriptoreditorwidget.h \
- bardescriptordocument.h \
- bardescriptorpermissionsmodel.h \
- blackberrykeyswidget.h \
- blackberrykeyspage.h \
- blackberrycertificate.h \
- blackberryimportcertificatedialog.h \
- blackberrycreatecertificatedialog.h \
- blackberrydebugtokenrequester.h \
- blackberrydebugtokenrequestdialog.h \
- blackberrydebugtokenuploader.h \
- blackberrydebugtokenreader.h \
- blackberryndkprocess.h \
- blackberrydeviceconnection.h \
- blackberrydeviceconnectionmanager.h \
- blackberrydeviceinformation.h \
- blackberrysshkeysgenerator.h \
- blackberryprocessparser.h \
- blackberrysigningpasswordsdialog.h \
- bardescriptoreditorpackageinformationwidget.h \
- bardescriptoreditorauthorinformationwidget.h \
- bardescriptoreditorentrypointwidget.h \
- bardescriptoreditorgeneralwidget.h \
- bardescriptoreditorpermissionswidget.h \
- bardescriptoreditorenvironmentwidget.h \
- bardescriptoreditorassetswidget.h \
- bardescriptoreditorabstractpanelwidget.h \
- blackberrysigningutils.h \
qnxdevicetester.h \
- blackberryconfigurationmanager.h \
- blackberrydevicelistdetector.h \
- blackberrylogprocessrunner.h \
- blackberryinstallwizardpages.h \
- blackberryinstallwizard.h \
qnxdeviceprocesssignaloperation.h \
qnxdeviceprocesslist.h \
qnxtoolchain.h \
slog2inforunner.h \
- blackberrydebugtokenpinsdialog.h \
- blackberrycheckdevicestatusstep.h \
- blackberrycheckdevicestatusstepfactory.h \
- blackberrycheckdevicestatusstepconfigwidget.h \
qnxattachdebugsupport.h \
qnxattachdebugdialog.h \
- blackberrysetuppage.h \
- blackberrysetupwidget.h \
- blackberryruntimeconfiguration.h \
- blackberryapilevelconfiguration.h \
- blackberrypotentialkit.h \
- bardescriptorfilenode.h \
- bardescriptorfilenodemanager.h \
qnxconfiguration.h \
- qnxbaseconfiguration.h \
qnxsettingswidget.h \
qnxconfigurationmanager.h \
qnxsettingspage.h \
@@ -222,38 +72,9 @@ HEADERS += qnxplugin.h\
qnxdeployqtlibrariesdialog.h
FORMS += \
- blackberrydeviceconfigurationwizardsetuppage.ui \
- blackberryrunconfigurationwidget.ui \
- blackberrydeployconfigurationwidget.ui \
- blackberrydeviceconfigurationwidget.ui \
- qnxbaseqtconfigwidget.ui \
- blackberryndksettingswidget.ui \
- blackberrykeyswidget.ui \
- blackberryimportcertificatedialog.ui \
- blackberrycreatecertificatedialog.ui \
- blackberrydebugtokenrequestdialog.ui \
- blackberrycreatepackagestepconfigwidget.ui \
- blackberrysigningpasswordsdialog.ui \
- bardescriptoreditorpackageinformationwidget.ui \
- bardescriptoreditorauthorinformationwidget.ui \
- bardescriptoreditorentrypointwidget.ui \
- bardescriptoreditorgeneralwidget.ui \
- bardescriptoreditorpermissionswidget.ui \
- bardescriptoreditorenvironmentwidget.ui \
- bardescriptoreditorassetswidget.ui \
- blackberrydeviceconfigurationwizardconfigpage.ui \
- blackberrydeviceconfigurationwizardquerypage.ui \
- blackberryinstallwizardtargetpage.ui \
- blackberryinstallwizardndkpage.ui \
- blackberryinstallwizardprocesspage.ui \
- blackberryinstallwizardoptionpage.ui \
- blackberrydebugtokenpinsdialog.ui \
- blackberrycheckdevicestatusstepconfigwidget.ui \
qnxsettingswidget.ui \
qnxdeployqtlibrariesdialog.ui
-include(./cascadesimport/cascadesimport.pri)
-
QT += gui-private
DEFINES += QNX_ZIP_FILE_SUPPORT
diff --git a/src/plugins/qnx/qnx.qbs b/src/plugins/qnx/qnx.qbs
index e32ec93b4f..3e3791166d 100644
--- a/src/plugins/qnx/qnx.qbs
+++ b/src/plugins/qnx/qnx.qbs
@@ -15,200 +15,22 @@ QtcPlugin {
Depends { name: "QtSupport" }
Depends { name: "QmakeProjectManager" }
Depends { name: "RemoteLinux" }
- Depends { name: "TextEditor" }
files: [
- "bardescriptordocument.cpp",
- "bardescriptordocument.h",
- "bardescriptoreditor.cpp",
- "bardescriptoreditor.h",
- "bardescriptoreditorabstractpanelwidget.cpp",
- "bardescriptoreditorabstractpanelwidget.h",
- "bardescriptoreditorassetswidget.cpp",
- "bardescriptoreditorassetswidget.h",
- "bardescriptoreditorassetswidget.ui",
- "bardescriptoreditorauthorinformationwidget.cpp",
- "bardescriptoreditorauthorinformationwidget.h",
- "bardescriptoreditorauthorinformationwidget.ui",
- "bardescriptoreditorentrypointwidget.cpp",
- "bardescriptoreditorentrypointwidget.h",
- "bardescriptoreditorentrypointwidget.ui",
- "bardescriptoreditorenvironmentwidget.cpp",
- "bardescriptoreditorenvironmentwidget.h",
- "bardescriptoreditorenvironmentwidget.ui",
- "bardescriptoreditorfactory.cpp",
- "bardescriptoreditorfactory.h",
- "bardescriptoreditorgeneralwidget.cpp",
- "bardescriptoreditorgeneralwidget.h",
- "bardescriptoreditorgeneralwidget.ui",
- "bardescriptoreditorpackageinformationwidget.cpp",
- "bardescriptoreditorpackageinformationwidget.h",
- "bardescriptoreditorpackageinformationwidget.ui",
- "bardescriptoreditorpermissionswidget.cpp",
- "bardescriptoreditorpermissionswidget.h",
- "bardescriptoreditorpermissionswidget.ui",
- "bardescriptoreditorwidget.cpp",
- "bardescriptoreditorwidget.h",
- "bardescriptorfilenode.cpp",
- "bardescriptorfilenode.h",
- "bardescriptorfilenodemanager.cpp",
- "bardescriptorfilenodemanager.h",
- "bardescriptorpermissionsmodel.cpp",
- "bardescriptorpermissionsmodel.h",
- "blackberryabstractdeploystep.cpp",
- "blackberryabstractdeploystep.h",
- "blackberryapplicationrunner.cpp",
- "blackberryapplicationrunner.h",
- "blackberrycheckdevicestatusstep.cpp",
- "blackberrycheckdevicestatusstep.h",
- "blackberrycheckdevicestatusstepconfigwidget.cpp",
- "blackberrycheckdevicestatusstepconfigwidget.h",
- "blackberrycheckdevicestatusstepconfigwidget.ui",
- "blackberrycheckdevicestatusstepfactory.cpp",
- "blackberrycheckdevicestatusstepfactory.h",
- "blackberryconfigurationmanager.cpp",
- "blackberryconfigurationmanager.h",
- "blackberrycreatepackagestep.cpp",
- "blackberrycreatepackagestep.h",
- "blackberrycreatepackagestepconfigwidget.cpp",
- "blackberrycreatepackagestepconfigwidget.h",
- "blackberrycreatepackagestepconfigwidget.ui",
- "blackberrycreatepackagestepfactory.cpp",
- "blackberrycreatepackagestepfactory.h",
- "blackberrydebugsupport.cpp",
- "blackberrydebugsupport.h",
- "blackberrydeployconfiguration.cpp",
- "blackberrydeployconfiguration.h",
- "blackberrydeployconfigurationfactory.cpp",
- "blackberrydeployconfigurationfactory.h",
- "blackberrydeployconfigurationwidget.cpp",
- "blackberrydeployconfigurationwidget.h",
- "blackberrydeployconfigurationwidget.ui",
- "blackberrydeployinformation.cpp",
- "blackberrydeployinformation.h",
"qnxdeployqtlibrariesdialog.cpp",
"qnxdeployqtlibrariesdialog.h",
"qnxdeployqtlibrariesdialog.ui",
- "blackberrydeploystep.cpp",
- "blackberrydeploystep.h",
- "blackberrydeploystepconfigwidget.cpp",
- "blackberrydeploystepconfigwidget.h",
- "blackberrydeploystepfactory.cpp",
- "blackberrydeploystepfactory.h",
- "blackberrydebugtokenreader.cpp",
- "blackberrydebugtokenreader.h",
- "blackberrydeviceconfiguration.cpp",
- "blackberrydeviceconfiguration.h",
- "blackberrydeviceinformation.cpp",
- "blackberrydeviceinformation.h",
- "blackberrydeviceconfigurationfactory.cpp",
- "blackberrydeviceconfigurationfactory.h",
- "blackberrydeviceconfigurationwidget.cpp",
- "blackberrydeviceconfigurationwidget.h",
- "blackberrydeviceconfigurationwidget.ui",
- "blackberrydeviceconfigurationwizard.cpp",
- "blackberrydeviceconfigurationwizard.h",
- "blackberrydeviceconfigurationwizardconfigpage.ui",
- "blackberrydeviceconfigurationwizardpages.cpp",
- "blackberrydeviceconfigurationwizardpages.h",
- "blackberrydeviceconfigurationwizardquerypage.ui",
- "blackberrydeviceconfigurationwizardsetuppage.ui",
- "blackberrydeviceconnection.cpp",
- "blackberrydeviceconnection.h",
- "blackberrydeviceconnectionmanager.cpp",
- "blackberrydeviceconnectionmanager.h",
- "blackberrydevicelistdetector.cpp",
- "blackberrydevicelistdetector.h",
- "blackberryinstallwizard.cpp",
- "blackberryinstallwizard.h",
- "blackberryinstallwizardndkpage.ui",
- "blackberryinstallwizardoptionpage.ui",
- "blackberryinstallwizardpages.cpp",
- "blackberryinstallwizardpages.h",
- "blackberryinstallwizardprocesspage.ui",
- "blackberryinstallwizardtargetpage.ui",
- "blackberrylogprocessrunner.cpp",
- "blackberrylogprocessrunner.h",
- "blackberryqtversion.cpp",
- "blackberryqtversion.h",
- "blackberryqtversionfactory.cpp",
- "blackberryqtversionfactory.h",
- "blackberrypotentialkit.cpp",
- "blackberrypotentialkit.h",
- "blackberryprocessparser.cpp",
- "blackberryprocessparser.h",
- "blackberryrunconfiguration.cpp",
- "blackberryrunconfiguration.h",
- "blackberryrunconfigurationfactory.cpp",
- "blackberryrunconfigurationfactory.h",
- "blackberryrunconfigurationwidget.cpp",
- "blackberryrunconfigurationwidget.h",
- "blackberryrunconfigurationwidget.ui",
- "blackberryruncontrol.cpp",
- "blackberryruncontrol.h",
- "blackberryruncontrolfactory.cpp",
- "blackberryruncontrolfactory.h",
- "blackberrysetuppage.cpp",
- "blackberrysetuppage.h",
- "blackberrysetupwidget.cpp",
- "blackberrysetupwidget.h",
- "blackberrysigningpasswordsdialog.h",
- "blackberrysigningpasswordsdialog.cpp",
- "blackberrysigningpasswordsdialog.ui",
- "blackberryndksettingswidget.cpp",
- "blackberryndksettingswidget.h",
- "blackberryndksettingswidget.ui",
- "blackberryndksettingspage.cpp",
- "blackberryndksettingspage.h",
- "blackberryapilevelconfiguration.cpp",
- "blackberryapilevelconfiguration.h",
- "blackberryruntimeconfiguration.cpp",
- "blackberryruntimeconfiguration.h",
- "blackberrycertificate.cpp",
- "blackberrycertificate.h",
- "blackberrykeyspage.cpp",
- "blackberrykeyspage.h",
- "blackberrykeyswidget.cpp",
- "blackberrykeyswidget.h",
- "blackberrykeyswidget.ui",
- "blackberryimportcertificatedialog.cpp",
- "blackberryimportcertificatedialog.h",
- "blackberryimportcertificatedialog.ui",
- "blackberrycreatecertificatedialog.cpp",
- "blackberrycreatecertificatedialog.h",
- "blackberrycreatecertificatedialog.ui",
- "blackberrydebugtokenpinsdialog.cpp",
- "blackberrydebugtokenpinsdialog.h",
- "blackberrydebugtokenpinsdialog.ui",
- "blackberrydebugtokenrequester.cpp",
- "blackberrydebugtokenrequester.h",
- "blackberrydebugtokenrequestdialog.cpp",
- "blackberrydebugtokenrequestdialog.h",
- "blackberrydebugtokenrequestdialog.ui",
- "blackberrydebugtokenuploader.cpp",
- "blackberrydebugtokenuploader.h",
- "blackberryndkprocess.cpp",
- "blackberryndkprocess.h",
- "blackberrysshkeysgenerator.cpp",
- "blackberrysshkeysgenerator.h",
- "blackberrysigningutils.cpp",
- "blackberrysigningutils.h",
"pathchooserdelegate.cpp",
"pathchooserdelegate.h",
"qnxtoolchain.cpp",
"qnxtoolchain.h",
"qnx.qrc",
- "qnxabstractqtversion.cpp",
- "qnxabstractqtversion.h",
"qnxattachdebugsupport.cpp",
"qnxattachdebugsupport.h",
"qnxattachdebugdialog.cpp",
"qnxattachdebugdialog.h",
- "qnxbaseconfiguration.cpp",
- "qnxbaseconfiguration.h",
"qnxbaseqtconfigwidget.cpp",
"qnxbaseqtconfigwidget.h",
- "qnxbaseqtconfigwidget.ui",
"qnxconstants.h",
"qnxconfiguration.cpp",
"qnxconfiguration.h",
@@ -265,31 +87,5 @@ QtcPlugin {
"qnxutils.h",
"slog2inforunner.cpp",
"slog2inforunner.h",
- "images/target-small.png",
- "images/target.png",
]
-
- Group {
- name: "CascadesImport"
- prefix: "cascadesimport/"
- files: [
- "cascadesimport.qrc",
- "srcprojectwizardpage.ui",
- "cascadesimportwizard.cpp",
- "srcprojectwizardpage.cpp",
- "fileconverter.cpp",
- "bardescriptorconverter.cpp",
- "projectfileconverter.cpp",
- "importlogconverter.cpp",
- "importlog.cpp",
- "cascadesimportwizard.h",
- "srcprojectwizardpage.h",
- "fileconverter.h",
- "bardescriptorconverter.h",
- "projectfileconverter.h",
- "importlogconverter.h",
- "importlog.h",
- ]
- }
-
}
diff --git a/src/plugins/qnx/qnx.qrc b/src/plugins/qnx/qnx.qrc
index 4f87659716..97a16398cc 100644
--- a/src/plugins/qnx/qnx.qrc
+++ b/src/plugins/qnx/qnx.qrc
@@ -1,9 +1,5 @@
<RCC>
<qresource prefix="/qnx">
- <file>images/target-small.png</file>
- <file>images/target.png</file>
- <file>images/ok.png</file>
<file>images/qnx-target.png</file>
- <file>Qnx.mimetypes.xml</file>
</qresource>
</RCC>
diff --git a/src/plugins/qnx/qnx_dependencies.pri b/src/plugins/qnx/qnx_dependencies.pri
index 7bc06be9c0..8e94a8dc69 100644
--- a/src/plugins/qnx/qnx_dependencies.pri
+++ b/src/plugins/qnx/qnx_dependencies.pri
@@ -11,5 +11,4 @@ QTC_PLUGIN_DEPENDS += \
projectexplorer \
qmakeprojectmanager \
qtsupport \
- remotelinux \
- texteditor
+ remotelinux
diff --git a/src/plugins/qnx/qnxabstractqtversion.cpp b/src/plugins/qnx/qnxabstractqtversion.cpp
deleted file mode 100644
index 2134cf24d7..0000000000
--- a/src/plugins/qnx/qnxabstractqtversion.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "qnxabstractqtversion.h"
-#include "qnxbaseqtconfigwidget.h"
-
-#include "qnxutils.h"
-
-#include <utils/environment.h>
-#include <utils/hostosinfo.h>
-
-#include <QDir>
-
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-QnxAbstractQtVersion::QnxAbstractQtVersion()
- : QtSupport::BaseQtVersion()
- , m_arch(UnknownArch)
-{
-}
-
-QnxAbstractQtVersion::QnxAbstractQtVersion(QnxArchitecture arch, const Utils::FileName &path, bool isAutoDetected, const QString &autoDetectionSource)
- : QtSupport::BaseQtVersion(path, isAutoDetected, autoDetectionSource)
- , m_arch(arch)
-{
-}
-
-QnxArchitecture QnxAbstractQtVersion::architecture() const
-{
- return m_arch;
-}
-
-QString QnxAbstractQtVersion::archString() const
-{
- switch (m_arch) {
- case X86:
- return QLatin1String("x86");
- case ArmLeV7:
- return QLatin1String("ARMle-v7");
- case UnknownArch:
- return QString();
- }
- return QString();
-}
-
-QVariantMap QnxAbstractQtVersion::toMap() const
-{
- QVariantMap result = BaseQtVersion::toMap();
- result.insert(QLatin1String("SDKPath"), sdkPath());
- result.insert(QLatin1String("Arch"), m_arch);
- return result;
-}
-
-void QnxAbstractQtVersion::fromMap(const QVariantMap &map)
-{
- BaseQtVersion::fromMap(map);
- setSdkPath(QDir::fromNativeSeparators(map.value(QLatin1String("SDKPath")).toString()));
- m_arch = static_cast<QnxArchitecture>(map.value(QLatin1String("Arch"), UnknownArch).toInt());
-}
-
-QList<ProjectExplorer::Abi> QnxAbstractQtVersion::detectQtAbis() const
-{
- ensureMkSpecParsed();
- return qtAbisFromLibrary(qtCorePaths(versionInfo(), qtVersionString()));
-}
-
-void QnxAbstractQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const
-{
- QtSupport::BaseQtVersion::addToEnvironment(k, env);
- updateEnvironment();
- env.modify(m_qnxEnv);
-
- env.prependOrSetLibrarySearchPath(versionInfo().value(QLatin1String("QT_INSTALL_LIBS")));
-}
-
-Utils::Environment QnxAbstractQtVersion::qmakeRunEnvironment() const
-{
- if (!sdkPath().isEmpty())
- updateEnvironment();
-
- Utils::Environment env = Utils::Environment::systemEnvironment();
- env.modify(m_qnxEnv);
-
- return env;
-}
-
-QString QnxAbstractQtVersion::sdkPath() const
-{
- return m_sdkPath;
-}
-
-void QnxAbstractQtVersion::setSdkPath(const QString &sdkPath)
-{
- if (m_sdkPath == sdkPath)
- return;
-
- m_sdkPath = sdkPath;
- m_environmentUpToDate = false;
-}
-
-void QnxAbstractQtVersion::updateEnvironment() const
-{
- if (!m_environmentUpToDate) {
- m_qnxEnv = environment();
- m_environmentUpToDate = true;
- }
-}
-
-QString QnxAbstractQtVersion::qnxHost() const
-{
- if (!m_environmentUpToDate)
- updateEnvironment();
-
- foreach (const Utils::EnvironmentItem &item, m_qnxEnv) {
- if (item.name == QLatin1String(Constants::QNX_HOST_KEY))
- return item.value;
- }
-
- return QString();
-}
-
-QString QnxAbstractQtVersion::qnxTarget() const
-{
- if (!m_environmentUpToDate)
- updateEnvironment();
-
- foreach (const Utils::EnvironmentItem &item, m_qnxEnv) {
- if (item.name == QLatin1String(Constants::QNX_TARGET_KEY))
- return item.value;
- }
-
- return QString();
-}
-
-QtSupport::QtConfigWidget *QnxAbstractQtVersion::createConfigurationWidget() const
-{
- return new QnxBaseQtConfigWidget(const_cast<QnxAbstractQtVersion *>(this));
-}
-
-bool QnxAbstractQtVersion::isValid() const
-{
- return QtSupport::BaseQtVersion::isValid() && !sdkPath().isEmpty();
-}
-
-QString QnxAbstractQtVersion::invalidReason() const
-{
- if (sdkPath().isEmpty())
- return tr("No SDK path set");
- return QtSupport::BaseQtVersion::invalidReason();
-}
-
diff --git a/src/plugins/qnx/qnxabstractqtversion.h b/src/plugins/qnx/qnxabstractqtversion.h
deleted file mode 100644
index 21d66af323..0000000000
--- a/src/plugins/qnx/qnxabstractqtversion.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2012 - 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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNX_INTERNAL_QNXABSTRACTQTVERSION_H
-#define QNX_INTERNAL_QNXABSTRACTQTVERSION_H
-
-#include "qnxconstants.h"
-
-#include <qtsupport/baseqtversion.h>
-
-#include <utils/environment.h>
-
-#include <QCoreApplication>
-
-namespace Qnx {
-namespace Internal {
-
-class QnxAbstractQtVersion : public QtSupport::BaseQtVersion
-{
- friend class QnxBaseQtConfigWidget;
- Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxAbstractQtVersion)
-public:
- QnxAbstractQtVersion();
- QnxAbstractQtVersion(QnxArchitecture arch, const Utils::FileName &path,
- bool isAutoDetected = false,
- const QString &autoDetectionSource = QString());
-
- QString qnxHost() const;
- QString qnxTarget() const;
-
- QnxArchitecture architecture() const;
- QString archString() const;
-
- QVariantMap toMap() const;
- void fromMap(const QVariantMap &map);
-
- QList<ProjectExplorer::Abi> detectQtAbis() const;
-
- void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const;
- Utils::Environment qmakeRunEnvironment() const;
-
- QtSupport::QtConfigWidget *createConfigurationWidget() const;
-
- bool isValid() const;
- QString invalidReason() const;
-
- virtual QString sdkDescription() const = 0;
-
-protected:
- QString sdkPath() const;
- void setSdkPath(const QString &sdkPath);
-
-private:
- void updateEnvironment() const;
- virtual QList<Utils::EnvironmentItem> environment() const = 0;
-
- QnxArchitecture m_arch;
- QString m_sdkPath;
-
- mutable bool m_environmentUpToDate;
- mutable QList<Utils::EnvironmentItem> m_qnxEnv;
-};
-
-} // namespace Internal
-} // namespace Qnx
-
-#endif // QNX_INTERNAL_QNXABSTRACTQTVERSION_H
diff --git a/src/plugins/qnx/qnxbaseconfiguration.cpp b/src/plugins/qnx/qnxbaseconfiguration.cpp
deleted file mode 100644
index 0744d7ae59..0000000000
--- a/src/plugins/qnx/qnxbaseconfiguration.cpp
+++ /dev/null
@@ -1,227 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "qnxbaseconfiguration.h"
-#include "qnxutils.h"
-#include "qnxtoolchain.h"
-
-#include <projectexplorer/toolchain.h>
-#include <projectexplorer/toolchainmanager.h>
-
-#include <debugger/debuggerkitinformation.h>
-#include <debugger/debuggeritem.h>
-
-#include <coreplugin/icore.h>
-
-#include <QVariantMap>
-#include <QFileInfo>
-#include <QMessageBox>
-
-namespace Qnx {
-namespace Internal {
-
-const QLatin1String QNXEnvFileKey("EnvFile");
-const QLatin1String QNXVersionKey("QNXVersion");
-// For backward compatibility
-const QLatin1String NDKEnvFileKey("NDKEnvFile");
-
-
-using namespace Utils;
-using namespace ProjectExplorer;
-
-QnxBaseConfiguration::QnxBaseConfiguration()
-{
-}
-
-QnxBaseConfiguration::QnxBaseConfiguration(const FileName &envFile)
-{
- ctor(envFile);
-}
-
-QnxBaseConfiguration::QnxBaseConfiguration(const QVariantMap &data)
-{
- QString envFilePath = data.value(QNXEnvFileKey).toString();
- if (envFilePath.isEmpty())
- envFilePath = data.value(NDKEnvFileKey).toString();
-
- m_version = QnxVersionNumber(data.value(QNXVersionKey).toString());
- ctor(FileName::fromString(envFilePath));
-}
-
-QnxBaseConfiguration::~QnxBaseConfiguration()
-{
-}
-
-FileName QnxBaseConfiguration::envFile() const
-{
- return m_envFile;
-}
-
-FileName QnxBaseConfiguration::qnxTarget() const
-{
- return m_qnxTarget;
-}
-
-FileName QnxBaseConfiguration::qnxHost() const
-{
- return m_qnxHost;
-}
-
-FileName QnxBaseConfiguration::qccCompilerPath() const
-{
- return m_qccCompiler;
-}
-
-FileName QnxBaseConfiguration::armDebuggerPath() const
-{
- return m_armlev7Debugger;
-}
-
-FileName QnxBaseConfiguration::x86DebuggerPath() const
-{
- return m_x86Debugger;
-}
-
-QList<EnvironmentItem> QnxBaseConfiguration::qnxEnv() const
-{
- return m_qnxEnv;
-}
-
-QnxVersionNumber QnxBaseConfiguration::version() const
-{
- return m_version;
-}
-
-QVariantMap QnxBaseConfiguration::toMap() const
-{
- QVariantMap data;
- data.insert(QLatin1String(QNXEnvFileKey), m_envFile.toString());
- data.insert(QLatin1String(QNXVersionKey), m_version.toString());
- return data;
-}
-
-bool QnxBaseConfiguration::isValid() const
-{
- return !m_qccCompiler.isEmpty()
- && !m_armlev7Debugger.isEmpty()
- && !m_x86Debugger.isEmpty();
-}
-
-void QnxBaseConfiguration::ctor(const FileName &envScript)
-{
- if (envScript.isEmpty())
- return;
-
-#if !defined(WITH_TESTS)
- QTC_ASSERT(envScript.exists(), return);
-#endif
- m_envFile = envScript;
- m_qnxEnv = QnxUtils::qnxEnvironmentFromEnvFile(m_envFile.toString());
- foreach (const EnvironmentItem &item, m_qnxEnv) {
- if (item.name == QLatin1String("QNX_TARGET"))
- m_qnxTarget = FileName::fromString(item.value);
-
- else if (item.name == QLatin1String("QNX_HOST"))
- m_qnxHost = FileName::fromString(item.value);
- }
-
- FileName qccPath = FileName::fromString(HostOsInfo::withExecutableSuffix(
- m_qnxHost.toString() + QLatin1String("/usr/bin/qcc")));
- FileName armlev7GdbPath = FileName::fromString(HostOsInfo::withExecutableSuffix(
- m_qnxHost.toString() + QLatin1String("/usr/bin/ntoarm-gdb")));
- if (!armlev7GdbPath.exists()) {
- armlev7GdbPath = FileName::fromString(HostOsInfo::withExecutableSuffix(
- m_qnxHost.toString() + QLatin1String("/usr/bin/ntoarmv7-gdb")));
- }
-
- FileName x86GdbPath = FileName::fromString(HostOsInfo::withExecutableSuffix(
- m_qnxHost.toString() + QLatin1String("/usr/bin/ntox86-gdb")));
-
- if (qccPath.exists())
- m_qccCompiler = qccPath;
-
- if (armlev7GdbPath.exists())
- m_armlev7Debugger = armlev7GdbPath;
-
- if (x86GdbPath.exists())
- m_x86Debugger = x86GdbPath;
-}
-
-QVariant QnxBaseConfiguration::createDebuggerItem(QnxArchitecture arch,
- const QString &displayName)
-{
- FileName command = (arch == X86) ? x86DebuggerPath() : armDebuggerPath();
- Debugger::DebuggerItem debugger;
- debugger.setCommand(command);
- debugger.setEngineType(Debugger::GdbEngineType);
- debugger.setAbi(Abi(arch == Qnx::ArmLeV7 ? Abi::ArmArchitecture : Abi::X86Architecture,
- Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32));
- debugger.setAutoDetected(true);
- debugger.setUnexpandedDisplayName(displayName);
- return Debugger::DebuggerItemManager::registerDebugger(debugger);
-}
-
-QnxToolChain *QnxBaseConfiguration::createToolChain(QnxArchitecture arch,
- const QString &displayName,
- const QString &ndkPath)
-{
- QnxToolChain *toolChain = new QnxToolChain(ToolChain::AutoDetection);
- toolChain->resetToolChain(m_qccCompiler);
- toolChain->setTargetAbi(Abi((arch == Qnx::ArmLeV7) ? Abi::ArmArchitecture : Abi::X86Architecture,
- Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32));
- toolChain->setDisplayName(displayName);
- toolChain->setNdkPath(ndkPath);
- ToolChainManager::registerToolChain(toolChain);
- return toolChain;
-}
-
-QStringList QnxBaseConfiguration::validationErrors() const
-{
- QStringList errorStrings;
- if (m_qccCompiler.isEmpty())
- errorStrings << tr("- No GCC compiler found.");
-
- if (m_armlev7Debugger.isEmpty())
- errorStrings << tr("- No GDB debugger found for armvle7.");
-
- if (m_x86Debugger.isEmpty())
- errorStrings << tr("- No GDB debugger found for x86.");
-
- return errorStrings;
-}
-
-void QnxBaseConfiguration::setVersion(const QnxVersionNumber &version)
-{
- m_version = version;
-}
-
-}
-}
diff --git a/src/plugins/qnx/qnxbaseconfiguration.h b/src/plugins/qnx/qnxbaseconfiguration.h
deleted file mode 100644
index 3aec2ddc2c..0000000000
--- a/src/plugins/qnx/qnxbaseconfiguration.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 BlackBerry Limited. All rights reserved.
-**
-** Contact: BlackBerry (qt@blackberry.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 The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/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 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef QNXBASECONFIGURATION_H
-#define QNXBASECONFIGURATION_H
-
-#include "qnxconstants.h"
-#include "qnxutils.h"
-#include "qnxversionnumber.h"
-
-#include <utils/fileutils.h>
-#include <utils/environment.h>
-
-#include <projectexplorer/abi.h>
-
-#include <debugger/debuggeritemmanager.h>
-
-#include <qvariant.h>
-
-namespace Qnx {
-namespace Internal {
-
-class QnxToolChain;
-
-class QnxBaseConfiguration
-{
- Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxBaseConfiguration)
-
-public:
- QnxBaseConfiguration();
- QnxBaseConfiguration(const Utils::FileName &envFile);
- QnxBaseConfiguration(const QVariantMap &data);
- virtual ~QnxBaseConfiguration();
- Utils::FileName envFile() const;
- Utils::FileName qnxTarget() const;
- Utils::FileName qnxHost() const;
- Utils::FileName qccCompilerPath() const;
- Utils::FileName armDebuggerPath() const;
- Utils::FileName x86DebuggerPath() const;
- QList<Utils::EnvironmentItem> qnxEnv() const;
- QnxVersionNumber version() const;
- QVariantMap toMap() const;
-
- virtual bool isValid() const;
- virtual bool isActive() const = 0;
-
- virtual bool activate() = 0;
- virtual void deactivate() = 0;
-
-protected:
- QVariant createDebuggerItem(Qnx::QnxArchitecture arch,
- const QString &displayName);
- QnxToolChain* createToolChain(Qnx::QnxArchitecture arch,
- const QString &displayName,
- const QString &ndkPath);
-
- virtual QStringList validationErrors() const;
- void setVersion(const QnxVersionNumber& version);
-private:
- Utils::FileName m_envFile;
- Utils::FileName m_qnxTarget;
- Utils::FileName m_qnxHost;
- Utils::FileName m_qccCompiler;
- Utils::FileName m_armlev7Debugger;
- Utils::FileName m_x86Debugger;
- QList<Utils::EnvironmentItem> m_qnxEnv;
- QnxVersionNumber m_version;
-
- void ctor(const Utils::FileName &envFile);
-
-};
-
-}
-}
-
-#endif // QNXBASECONFIGURATION_H
diff --git a/src/plugins/qnx/qnxbaseqtconfigwidget.cpp b/src/plugins/qnx/qnxbaseqtconfigwidget.cpp
index 66c79e84ed..b53d9ed8c2 100644
--- a/src/plugins/qnx/qnxbaseqtconfigwidget.cpp
+++ b/src/plugins/qnx/qnxbaseqtconfigwidget.cpp
@@ -31,38 +31,33 @@
****************************************************************************/
#include "qnxbaseqtconfigwidget.h"
-#include "ui_qnxbaseqtconfigwidget.h"
-#include "qnxabstractqtversion.h"
+#include "qnxqtversion.h"
#include <utils/pathchooser.h>
+#include <utils/qtcassert.h>
#include <QDir>
-#include <QFormLayout>
+#include <QHBoxLayout>
-using namespace Qnx;
-using namespace Qnx::Internal;
+namespace Qnx {
+namespace Internal {
-QnxBaseQtConfigWidget::QnxBaseQtConfigWidget(QnxAbstractQtVersion *version)
- : QtSupport::QtConfigWidget()
- , m_version(version)
+QnxBaseQtConfigWidget::QnxBaseQtConfigWidget(QnxQtVersion *version) :
+ m_version(version),
+ m_sdkPathChooser(new Utils::PathChooser)
{
- m_ui = new Ui::QnxBaseQtConfigWidget;
- m_ui->setupUi(this);
+ QTC_ASSERT(version, return);
- m_ui->sdkLabel->setText(version->sdkDescription());
+ QHBoxLayout *layout = new QHBoxLayout(this);
+ layout->addWidget(m_sdkPathChooser);
- m_ui->sdkPath->setExpectedKind(Utils::PathChooser::ExistingDirectory);
- m_ui->sdkPath->setHistoryCompleter(QLatin1String("Qnx.Sdk.History"));
- m_ui->sdkPath->setPath(version->sdkPath());
+ m_sdkPathChooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
+ m_sdkPathChooser->setHistoryCompleter(QLatin1String("Qnx.Sdk.History"));
+ m_sdkPathChooser->setPath(version->sdkPath());
- connect(m_ui->sdkPath, SIGNAL(changed(QString)), this, SLOT(updateSdkPath(QString)));
-}
-
-QnxBaseQtConfigWidget::~QnxBaseQtConfigWidget()
-{
- delete m_ui;
- m_ui = 0;
+ connect(m_sdkPathChooser, &Utils::PathChooser::changed,
+ this, &QnxBaseQtConfigWidget::updateSdkPath);
}
void QnxBaseQtConfigWidget::updateSdkPath(const QString &path)
@@ -70,3 +65,6 @@ void QnxBaseQtConfigWidget::updateSdkPath(const QString &path)
m_version->setSdkPath(path);
emit changed();
}
+
+} // namespace Internal
+} // namespace Qnx
diff --git a/src/plugins/qnx/qnxbaseqtconfigwidget.h b/src/plugins/qnx/qnxbaseqtconfigwidget.h
index c01ec71b96..6db1c75771 100644
--- a/src/plugins/qnx/qnxbaseqtconfigwidget.h
+++ b/src/plugins/qnx/qnxbaseqtconfigwidget.h
@@ -35,26 +35,26 @@
#include <qtsupport/qtconfigwidget.h>
+namespace Utils { class PathChooser; }
+
namespace Qnx {
namespace Internal {
-namespace Ui { class QnxBaseQtConfigWidget; }
-class QnxAbstractQtVersion;
+class QnxQtVersion;
class QnxBaseQtConfigWidget : public QtSupport::QtConfigWidget
{
Q_OBJECT
+
public:
- explicit QnxBaseQtConfigWidget(QnxAbstractQtVersion *version);
- ~QnxBaseQtConfigWidget();
+ explicit QnxBaseQtConfigWidget(QnxQtVersion *version);
private slots:
void updateSdkPath(const QString &path);
private:
- QnxAbstractQtVersion *m_version;
-
- Ui::QnxBaseQtConfigWidget *m_ui;
+ QnxQtVersion *m_version;
+ Utils::PathChooser *m_sdkPathChooser;
};
} // namespace Internal
diff --git a/src/plugins/qnx/qnxbaseqtconfigwidget.ui b/src/plugins/qnx/qnxbaseqtconfigwidget.ui
deleted file mode 100644
index 8b00c1e0d3..0000000000
--- a/src/plugins/qnx/qnxbaseqtconfigwidget.ui
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qnx::Internal::QnxBaseQtConfigWidget</class>
- <widget class="QWidget" name="Qnx::Internal::QnxBaseQtConfigWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>778</width>
- <height>23</height>
- </rect>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="1">
- <widget class="Utils::PathChooser" name="sdkPath" native="true"/>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="sdkLabel">
- <property name="text">
- <string>SDK:</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>Utils::PathChooser</class>
- <extends>QWidget</extends>
- <header location="global">utils/pathchooser.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qnx/qnxconfiguration.cpp b/src/plugins/qnx/qnxconfiguration.cpp
index 775db6b15d..e8f1aaa4e2 100644
--- a/src/plugins/qnx/qnxconfiguration.cpp
+++ b/src/plugins/qnx/qnxconfiguration.cpp
@@ -36,7 +36,10 @@
#include "debugger/debuggeritem.h"
+#include <coreplugin/icore.h>
+
#include <projectexplorer/toolchainmanager.h>
+#include <projectexplorer/toolchain.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/kitmanager.h>
@@ -46,6 +49,7 @@
#include <qmakeprojectmanager/qmakekitinformation.h>
+#include <debugger/debuggeritem.h>
#include <debugger/debuggeritemmanager.h>
#include <debugger/debuggerkitinformation.h>
@@ -61,18 +65,88 @@ using namespace Debugger;
namespace Qnx {
namespace Internal {
+
+const QLatin1String QNXEnvFileKey("EnvFile");
+const QLatin1String QNXVersionKey("QNXVersion");
+// For backward compatibility
+const QLatin1String NDKEnvFileKey("NDKEnvFile");
+
+QnxConfiguration::QnxConfiguration()
+{ }
+
QnxConfiguration::QnxConfiguration(const FileName &sdpEnvFile)
- : QnxBaseConfiguration(sdpEnvFile)
{
+ setDefaultConfiguration(sdpEnvFile);
readInformation();
}
QnxConfiguration::QnxConfiguration(const QVariantMap &data)
- : QnxBaseConfiguration(data)
{
+ QString envFilePath = data.value(QNXEnvFileKey).toString();
+ if (envFilePath.isEmpty())
+ envFilePath = data.value(NDKEnvFileKey).toString();
+
+ m_version = QnxVersionNumber(data.value(QNXVersionKey).toString());
+
+ setDefaultConfiguration(FileName::fromString(envFilePath));
readInformation();
}
+FileName QnxConfiguration::envFile() const
+{
+ return m_envFile;
+}
+
+FileName QnxConfiguration::qnxTarget() const
+{
+ return m_qnxTarget;
+}
+
+FileName QnxConfiguration::qnxHost() const
+{
+ return m_qnxHost;
+}
+
+FileName QnxConfiguration::qccCompilerPath() const
+{
+ return m_qccCompiler;
+}
+
+FileName QnxConfiguration::armDebuggerPath() const
+{
+ return m_armlev7Debugger;
+}
+
+FileName QnxConfiguration::x86DebuggerPath() const
+{
+ return m_x86Debugger;
+}
+
+QList<EnvironmentItem> QnxConfiguration::qnxEnv() const
+{
+ return m_qnxEnv;
+}
+
+QnxVersionNumber QnxConfiguration::version() const
+{
+ return m_version;
+}
+
+QVariantMap QnxConfiguration::toMap() const
+{
+ QVariantMap data;
+ data.insert(QLatin1String(QNXEnvFileKey), m_envFile.toString());
+ data.insert(QLatin1String(QNXVersionKey), m_version.toString());
+ return data;
+}
+
+bool QnxConfiguration::isValid() const
+{
+ return !m_qccCompiler.isEmpty()
+ && !m_armlev7Debugger.isEmpty()
+ && !m_x86Debugger.isEmpty();
+}
+
QString QnxConfiguration::displayName() const
{
return m_configName;
@@ -84,33 +158,45 @@ bool QnxConfiguration::activate()
return true;
if (!isValid()) {
- QString errorMessage = tr("The following errors occurred while activating the QNX configuration:");
+ QString errorMessage
+ = QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "The following errors occurred while activating the QNX configuration:");
foreach (const QString &error, validationErrors())
errorMessage += QLatin1String("\n") + error;
- QMessageBox::warning(Core::ICore::mainWindow(), tr("Cannot Set Up QNX Configuration"),
+ QMessageBox::warning(Core::ICore::mainWindow(),
+ QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "Cannot Set Up QNX Configuration"),
errorMessage, QMessageBox::Ok);
return false;
}
// Create and register toolchain
QnxToolChain *armTc = createToolChain(ArmLeV7,
- tr("QCC for %1 (armv7)").arg(displayName()),
+ QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "QCC for %1 (armv7)").arg(displayName()),
sdpPath().toString());
QnxToolChain *x86Tc = createToolChain(X86,
- tr("QCC for %1 (x86)").arg(displayName()),
+ QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "QCC for %1 (x86)").arg(displayName()),
sdpPath().toString());
// Create and register debuggers
QVariant armDebuggerId = createDebuggerItem(ArmLeV7,
- tr("Debugger for %1 (armv7)").arg(displayName()));
+ QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "Debugger for %1 (armv7)").arg(displayName()));
QVariant x86DebuggerId = createDebuggerItem(X86,
- tr("Debugger for %1 (x86)").arg(displayName()));
+ QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "Debugger for %1 (x86)").arg(displayName()));
// Create and register kits
- createKit(ArmLeV7, armTc, armDebuggerId, tr("Kit for %1 (armv7)").arg(displayName()));
- createKit(X86, x86Tc, x86DebuggerId, tr("Kit for %1 (x86)").arg(displayName()));
+ createKit(ArmLeV7, armTc, armDebuggerId,
+ QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "Kit for %1 (armv7)").arg(displayName()));
+ createKit(X86, x86Tc, x86DebuggerId,
+ QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "Kit for %1 (x86)").arg(displayName()));
return true;
}
@@ -137,7 +223,7 @@ void QnxConfiguration::deactivate()
foreach (Kit *kit, KitManager::kits()) {
if (kit->isAutoDetected()
- && DeviceTypeKitInformation::deviceTypeId(kit) == Constants::QNX_BB_OS_TYPE
+ && DeviceTypeKitInformation::deviceTypeId(kit) == Constants::QNX_QNX_OS_TYPE
&& toolChainsToRemove.contains(ToolChainKitInformation::toolChain(kit)))
KitManager::deregisterKit(kit);
}
@@ -146,24 +232,21 @@ void QnxConfiguration::deactivate()
ToolChainManager::deregisterToolChain(tc);
foreach (DebuggerItem debuggerItem, debuggersToRemove)
- DebuggerItemManager::
- deregisterDebugger(debuggerItem.id());
+ DebuggerItemManager::deregisterDebugger(debuggerItem.id());
}
bool QnxConfiguration::isActive() const
{
bool hasToolChain = false;
bool hasDebugger = false;
- foreach (ToolChain *tc,
- ToolChainManager::toolChains()) {
+ foreach (ToolChain *tc, ToolChainManager::toolChains()) {
if (tc->compilerCommand() == qccCompilerPath()) {
hasToolChain = true;
break;
}
}
- foreach (DebuggerItem debuggerItem,
- DebuggerItemManager::debuggers()) {
+ foreach (DebuggerItem debuggerItem, DebuggerItemManager::debuggers()) {
if (debuggerItem.command() == armDebuggerPath() ||
debuggerItem.command() == x86DebuggerPath()) {
hasDebugger = true;
@@ -200,6 +283,32 @@ QnxQtVersion* QnxConfiguration::qnxQtVersion(QnxArchitecture arch) const
return 0;
}
+QVariant QnxConfiguration::createDebuggerItem(QnxArchitecture arch, const QString &displayName)
+{
+ FileName command = (arch == X86) ? x86DebuggerPath() : armDebuggerPath();
+ Debugger::DebuggerItem debugger;
+ debugger.setCommand(command);
+ debugger.setEngineType(Debugger::GdbEngineType);
+ debugger.setAbi(Abi(arch == Qnx::ArmLeV7 ? Abi::ArmArchitecture : Abi::X86Architecture,
+ Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32));
+ debugger.setAutoDetected(true);
+ debugger.setUnexpandedDisplayName(displayName);
+ return Debugger::DebuggerItemManager::registerDebugger(debugger);
+}
+
+QnxToolChain *QnxConfiguration::createToolChain(QnxArchitecture arch, const QString &displayName,
+ const QString &ndkPath)
+{
+ QnxToolChain *toolChain = new QnxToolChain(ToolChain::AutoDetection);
+ toolChain->resetToolChain(m_qccCompiler);
+ toolChain->setTargetAbi(Abi((arch == Qnx::ArmLeV7) ? Abi::ArmArchitecture : Abi::X86Architecture,
+ Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32));
+ toolChain->setDisplayName(displayName);
+ toolChain->setNdkPath(ndkPath);
+ ToolChainManager::registerToolChain(toolChain);
+ return toolChain;
+}
+
Kit *QnxConfiguration::createKit(QnxArchitecture arch,
QnxToolChain *toolChain,
const QVariant &debuggerItemId,
@@ -247,6 +356,29 @@ Kit *QnxConfiguration::createKit(QnxArchitecture arch,
return kit;
}
+QStringList QnxConfiguration::validationErrors() const
+{
+ QStringList errorStrings;
+ if (m_qccCompiler.isEmpty())
+ errorStrings << QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "- No GCC compiler found.");
+
+ if (m_armlev7Debugger.isEmpty())
+ errorStrings << QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "- No GDB debugger found for armvle7.");
+
+ if (m_x86Debugger.isEmpty())
+ errorStrings << QCoreApplication::translate("Qnx::Internal::QnxConfiguration",
+ "- No GDB debugger found for x86.");
+
+ return errorStrings;
+}
+
+void QnxConfiguration::setVersion(const QnxVersionNumber &version)
+{
+ m_version = version;
+}
+
void QnxConfiguration::readInformation()
{
QString qConfigPath = sdpPath().toString() + QLatin1String("/.qnx/qconfig");
@@ -261,5 +393,40 @@ void QnxConfiguration::readInformation()
setVersion(QnxVersionNumber(installInfo.version));
}
+void QnxConfiguration::setDefaultConfiguration(const Utils::FileName &envScript)
+{
+ QTC_ASSERT(!envScript.isEmpty(), return);
+ m_envFile = envScript;
+ m_qnxEnv = QnxUtils::qnxEnvironmentFromEnvFile(m_envFile.toString());
+ foreach (const EnvironmentItem &item, m_qnxEnv) {
+ if (item.name == QLatin1String("QNX_TARGET"))
+ m_qnxTarget = FileName::fromString(item.value);
+
+ else if (item.name == QLatin1String("QNX_HOST"))
+ m_qnxHost = FileName::fromString(item.value);
+ }
+
+ FileName qccPath = FileName::fromString(HostOsInfo::withExecutableSuffix(
+ m_qnxHost.toString() + QLatin1String("/usr/bin/qcc")));
+ FileName armlev7GdbPath = FileName::fromString(HostOsInfo::withExecutableSuffix(
+ m_qnxHost.toString() + QLatin1String("/usr/bin/ntoarm-gdb")));
+ if (!armlev7GdbPath.exists()) {
+ armlev7GdbPath = FileName::fromString(HostOsInfo::withExecutableSuffix(
+ m_qnxHost.toString() + QLatin1String("/usr/bin/ntoarmv7-gdb")));
+ }
+
+ FileName x86GdbPath = FileName::fromString(HostOsInfo::withExecutableSuffix(
+ m_qnxHost.toString() + QLatin1String("/usr/bin/ntox86-gdb")));
+
+ if (qccPath.exists())
+ m_qccCompiler = qccPath;
+
+ if (armlev7GdbPath.exists())
+ m_armlev7Debugger = armlev7GdbPath;
+
+ if (x86GdbPath.exists())
+ m_x86Debugger = x86GdbPath;
}
-}
+
+} // namespace Internal
+} // namespace Qnx
diff --git a/src/plugins/qnx/qnxconfiguration.h b/src/plugins/qnx/qnxconfiguration.h
index 28c252aded..61f152c30c 100644
--- a/src/plugins/qnx/qnxconfiguration.h
+++ b/src/plugins/qnx/qnxconfiguration.h
@@ -32,21 +32,46 @@
#ifndef QNXCONFIGURATION_H
#define QNXCONFIGURATION_H
-#include "qnxbaseconfiguration.h"
+#include "qnxconstants.h"
+#include "qnxutils.h"
#include "qnxversionnumber.h"
+#include <utils/fileutils.h>
+#include <utils/environment.h>
+
+#include <projectexplorer/abi.h>
+
+#include <debugger/debuggeritemmanager.h>
+
+#include <QVariant>
+
namespace ProjectExplorer { class Kit; }
namespace Qnx {
namespace Internal {
+
+class QnxToolChain;
class QnxQtVersion;
-class QnxConfiguration : public QnxBaseConfiguration
-{
- Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxConfiguration)
+class QnxConfiguration
+{
public:
+ QnxConfiguration();
QnxConfiguration(const Utils::FileName &sdpEnvFile);
QnxConfiguration(const QVariantMap &data);
+
+ Utils::FileName envFile() const;
+ Utils::FileName qnxTarget() const;
+ Utils::FileName qnxHost() const;
+ Utils::FileName qccCompilerPath() const;
+ Utils::FileName armDebuggerPath() const;
+ Utils::FileName x86DebuggerPath() const;
+ QList<Utils::EnvironmentItem> qnxEnv() const;
+ QnxVersionNumber version() const;
+ QVariantMap toMap() const;
+
+ bool isValid() const;
+
QString displayName() const;
bool activate();
void deactivate();
@@ -56,15 +81,35 @@ public:
QnxQtVersion* qnxQtVersion(QnxArchitecture arch) const;
private:
- QString m_configName;
+ QVariant createDebuggerItem(Qnx::QnxArchitecture arch,
+ const QString &displayName);
+ QnxToolChain* createToolChain(Qnx::QnxArchitecture arch,
+ const QString &displayName,
+ const QString &ndkPath);
ProjectExplorer::Kit *createKit(QnxArchitecture arch,
QnxToolChain *toolChain,
const QVariant &debuggerItemId,
const QString &displayName);
+ QStringList validationErrors() const;
+
+ void setVersion(const QnxVersionNumber& version);
+
void readInformation();
+ void setDefaultConfiguration(const Utils::FileName &envScript);
+
+ QString m_configName;
+
+ Utils::FileName m_envFile;
+ Utils::FileName m_qnxTarget;
+ Utils::FileName m_qnxHost;
+ Utils::FileName m_qccCompiler;
+ Utils::FileName m_armlev7Debugger;
+ Utils::FileName m_x86Debugger;
+ QList<Utils::EnvironmentItem> m_qnxEnv;
+ QnxVersionNumber m_version;
};
} // Internal
diff --git a/src/plugins/qnx/qnxconstants.h b/src/plugins/qnx/qnxconstants.h
index d448808be3..32f1ec3f87 100644
--- a/src/plugins/qnx/qnxconstants.h
+++ b/src/plugins/qnx/qnxconstants.h
@@ -45,99 +45,35 @@ enum QnxArchitecture {
namespace Constants {
-const int QNX_BB_QT_FACTORY_PRIO = 60;
-const int QNX_QNX_QT_FACTORY_PRIO = 50;
-
const char QNX_TARGET_KEY[] = "QNX_TARGET";
const char QNX_HOST_KEY[] = "QNX_HOST";
-const char QNX_BB_QT[] = "Qt4ProjectManager.QtVersion.QNX.BlackBerry";
const char QNX_QNX_QT[] = "Qt4ProjectManager.QtVersion.QNX.QNX";
-const char QNX_BB_FEATURE[] = "QtSupport.Wizards.FeatureBlackBerry";
const char QNX_QNX_FEATURE[] = "QtSupport.Wizards.FeatureQNX";
-const char QNX_BB_X86_TARGET_ID[] = "Qt4ProjectManager.Target.QNX.BBX86Target";
-const char QNX_BB_ARMLEV7_TARGET_ID[] = "Qt4ProjectManager.Target.QNX.BBArmLeV7Target";
-const char QNX_QNX_X86_TARGET_ID[] = "Qt4ProjectManager.Target.QNX.QNXX86Target";
-const char QNX_QNX_ARMLEV7_TARGET_ID[] = "Qt4ProjectManager.Target.QNX.QNXArmLeV7Target";
-
-const char QNX_BB_DEPLOYCONFIGURATION_ID[] = "Qt4ProjectManager.QNX.BBDeployConfiguration";
-const char QNX_QNX_DEPLOYCONFIGURATION_ID[] = "Qt4ProjectManager.QNX.QNXDeployConfiguration";
+const char QNX_QNX_DEPLOYCONFIGURATION_ID[] = "Qt4ProjectManager.QNX.QNXDeployConfiguration";
-const char QNX_BB_RUNCONFIGURATION_PREFIX[] = "Qt4ProjectManager.QNX.BBRunConfiguration.";
const char QNX_QNX_RUNCONFIGURATION_PREFIX[] = "Qt4ProjectManager.QNX.QNXRunConfiguration.";
-const char QNX_CREATE_PACKAGE_BS_ID[] = "Qt4ProjectManager.QnxCreatePackageBuildStep";
-const char QNX_DEPLOY_PACKAGE_BS_ID[] = "Qt4ProjectManager.QnxDeployPackageBuildStep";
-const char QNX_CHECK_DEVICE_STATUS_BS_ID[] = "Qt4ProjectManager.QnxCheckDeviceStatusBuildStep";
-
-const char QNX_PROFILEPATH_KEY[] = "Qt4ProjectManager.QnxRunConfiguration.ProFilePath";
-
-const char QNX_BB_OS_TYPE[] = "BBOsType";
const char QNX_QNX_OS_TYPE[] = "QnxOsType";
-const char QNX_DEBUG_TOKEN_KEY[] = "debugToken";
-
-const char QNX_BLACKBERRY_CASCADES_WIZARD_ID[] = "Q.QnxBlackBerryCascadesApp";
-const char QNX_BAR_DESCRIPTOR_WIZARD_ID[] = "Q.QnxBlackBerryBarDescriptor";
-const char QNX_BLACKBERRY_QTQUICK_APP_WIZARD_ID[] = "Q.QnxBlackBerryQQApp";
-const char QNX_BLACKBERRY_QTQUICK2_APP_WIZARD_ID[] = "Q.QnxBlackBerryQQ2App";
-const char QNX_BLACKBERRY_GUI_APP_WIZARD_ID[] = "Q.QnxBlackBerryGuiApp";
-const char QNX_BLACKBERRY_SETUP_WIZARD_ID[] = "Q.QnxBlackBerrySetupWizardId";
-
const char QNX_QNX_PLATFORM_NAME[] = "QNX";
-const char QNX_BB_PLATFORM_NAME[] = "BlackBerry";
const char QNX_DEBUG_EXECUTABLE[] = "pdebug";
const char QNX_TOOLCHAIN_ID[] = "Qnx.QccToolChain";
-// BlackBerry settings constants
-const char QNX_BB_CATEGORY[] = "XF.BlackBerry";
+// QNX settings constants
const char QNX_CATEGORY[] = "XF.Qnx";
-const char QNX_BB_CATEGORY_TR[] = QT_TRANSLATE_NOOP("BlackBerry", "BlackBerry");
const char QNX_CATEGORY_TR[] = QT_TRANSLATE_NOOP("QNX", "QNX");
-const char QNX_BB_CATEGORY_ICON[] = ":/qnx/images/target.png";
const char QNX_CATEGORY_ICON[] = ":/qnx/images/qnx-target.png";
-const char QNX_BB_SETUP_ID[] = "ZA.BlackBerry Setup";
-const char QNX_BB_NDK_SETTINGS_ID[] = "ZZ.BlackBerry NDK Configuration";
const char QNX_SETTINGS_ID[] = "ZZ.Qnx Configuration";
-const char QNX_BB_SIGNING_ID[] = "ZZ.BlackBerry Signing Infrastructure Configuration";
-
-const char QNX_BAR_DESCRIPTOR_MIME_TYPE[] = "application/vnd.rim.qnx.bar_descriptor";
-const char QNX_BAR_DESCRIPTOR_EDITOR_ID[] = "Qnx.BarDescriptorEditor";
-const char QNX_BAR_DESCRIPTOR_EDITOR_CONTEXT[] = "Qnx.BarDescriptorEditor";
-
-const char QNX_TASK_CATEGORY_BARDESCRIPTOR[] = "Task.Category.BarDescriptor";
-const char QNX_KEY_AUTHOR[] = "author";
-const char QNX_KEY_PATH[] = "path";
-const char QNX_KEY_ACTIVE[] = "active";
-
-const char QNX_BLACKBERRY_DEPLOY_CMD[] = "blackberry-deploy";
-
-const char QNX_BLACKBERRY_CASCADESIMPORTER_VERSION[] = "0.0.1";
-
-const char QNX_BLACKBERRY_CONFIGS_FILENAME[] = "bbndkconfigurations.xml";
const char QNX_CONFIGS_FILENAME[] = "qnxconfigurations.xml";
const char QNX_DEBUGGING_GROUP[] = "Debugger.Group.Qnx";
-const char QNX_BLACKBERRY_DEFAULT_DEPLOY_QT_BASEPATH[] = "/accounts/devuser/";
-
-const char QNX_OK_ICON[] = ":/qnx/images/ok.png";
-
-const char QNX_BLACKBERRY_SETUP_URL[] = "http://wiki.qt.io/Qt_Creator_with_BlackBerry_10";
-const char QNX_LEGACY_KEYS_URL[] = "https://developer.blackberry.com/native/documentation/core"
- "/com.qnx.doc.ide.userguide/topic/signing_and_publishing.html";
-const char QNX_REGISTER_KEYS_URL[] = "https://www.blackberry.com/SignedKeys/codesigning.html";
-
-const char QNX_BB_KEY_CONFIGURATION_TYPE[] = "BBConfigurationType";
-
-const char QNX_BB_APILEVEL_TYPE[] = "BBApiLevel";
-const char QNX_BB_RUNTIME_TYPE[] = "BBRuntime";
-
} // namespace Constants
} // namespace Qnx
diff --git a/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp b/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp
index 49a252d315..ba327d2085 100644
--- a/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp
+++ b/src/plugins/qnx/qnxdeployqtlibrariesdialog.cpp
@@ -33,7 +33,6 @@
#include "qnxdeployqtlibrariesdialog.h"
#include "ui_qnxdeployqtlibrariesdialog.h"
-#include "blackberryqtversion.h"
#include "qnxqtversion.h"
#include <projectexplorer/deployablefile.h>
@@ -45,39 +44,32 @@
#include <QDir>
#include <QMessageBox>
-using namespace Qnx;
-using namespace Qnx::Internal;
-
-QnxDeployQtLibrariesDialog::QnxDeployQtLibrariesDialog(
- const ProjectExplorer::IDevice::ConstPtr &device, Target target, QWidget *parent)
- : QDialog(parent)
- , m_ui(new Ui::QnxDeployQtLibrariesDialog)
- , m_device(device)
- , m_progressCount(0)
- , m_state(Inactive)
- , m_target(target)
+using namespace QtSupport;
+
+namespace Qnx {
+namespace Internal {
+
+QnxDeployQtLibrariesDialog::QnxDeployQtLibrariesDialog(const ProjectExplorer::IDevice::ConstPtr &device,
+ QWidget *parent) :
+ QDialog(parent),
+ m_ui(new Ui::QnxDeployQtLibrariesDialog),
+ m_device(device),
+ m_progressCount(0),
+ m_state(Inactive)
{
m_ui->setupUi(this);
- QList<QtSupport::BaseQtVersion*> qtVersions = QtSupport::QtVersionManager::validVersions();
- foreach (QtSupport::BaseQtVersion *qtVersion, qtVersions) {
- QnxAbstractQtVersion *qnxQt;
- if (m_target == BB10)
- qnxQt = dynamic_cast<BlackBerryQtVersion *>(qtVersion);
- else
- qnxQt = dynamic_cast<QnxQtVersion *>(qtVersion);
-
+ QList<BaseQtVersion*> qtVersions = QtVersionManager::validVersions();
+ foreach (BaseQtVersion *qtVersion, qtVersions) {
+ QnxQtVersion *qnxQt = dynamic_cast<QnxQtVersion *>(qtVersion);
if (!qnxQt)
continue;
m_ui->qtLibraryCombo->addItem(qnxQt->displayName(), qnxQt->uniqueId());
-
}
- m_ui->basePathLabel->setText(m_target == BB10 ?
- QLatin1String(Constants::QNX_BLACKBERRY_DEFAULT_DEPLOY_QT_BASEPATH) :
- QString());
- m_ui->remoteDirectory->setText(m_target == BB10 ? QLatin1String("qt") : QLatin1String("/qt"));
+ m_ui->basePathLabel->setText(QString());
+ m_ui->remoteDirectory->setText(QLatin1String("/qt"));
m_uploadService = new RemoteLinux::GenericDirectUploadService(this);
m_uploadService->setDevice(m_device);
@@ -237,11 +229,7 @@ QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles()
m_ui->qtLibraryCombo->itemData(m_ui->qtLibraryCombo->currentIndex()).toInt();
- QnxAbstractQtVersion *qtVersion;
- if (m_target == BB10)
- qtVersion = dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtVersionManager::version(qtVersionId));
- else
- qtVersion = dynamic_cast<QnxQtVersion *>(QtSupport::QtVersionManager::version(qtVersionId));
+ QnxQtVersion *qtVersion = dynamic_cast<QnxQtVersion *>(QtVersionManager::version(qtVersionId));
QTC_ASSERT(qtVersion, return result);
@@ -298,11 +286,7 @@ QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles(
QString QnxDeployQtLibrariesDialog::fullRemoteDirectory() const
{
- QString basePath;
- if (m_target == BB10)
- basePath = QLatin1String(Constants::QNX_BLACKBERRY_DEFAULT_DEPLOY_QT_BASEPATH);
-
- return basePath + m_ui->remoteDirectory->text();
+ return m_ui->remoteDirectory->text();
}
void QnxDeployQtLibrariesDialog::checkRemoteDirectoryExistance()
@@ -329,3 +313,6 @@ void QnxDeployQtLibrariesDialog::removeRemoteDirectory()
const QByteArray cmd = "rm -rf " + fullRemoteDirectory().toLatin1();
m_processRunner->run(cmd, m_device->sshParameters());
}
+
+} // namespace Internal
+} // namespace Qnx
diff --git a/src/plugins/qnx/qnxdeployqtlibrariesdialog.h b/src/plugins/qnx/qnxdeployqtlibrariesdialog.h
index 10d41613ea..38f8f01592 100644
--- a/src/plugins/qnx/qnxdeployqtlibrariesdialog.h
+++ b/src/plugins/qnx/qnxdeployqtlibrariesdialog.h
@@ -65,14 +65,8 @@ public:
Uploading
};
- enum Target {
- BB10,
- QNX
- };
-
explicit QnxDeployQtLibrariesDialog(const ProjectExplorer::IDevice::ConstPtr &device,
- Target target = QNX,
- QWidget *parent = 0);
+ QWidget *parent = 0);
~QnxDeployQtLibrariesDialog();
int execAndDeploy(int qtVersionId, const QString &remoteDirectory);
@@ -109,10 +103,8 @@ private:
int m_progressCount;
State m_state;
- Target m_target;
};
-
} // namespace Internal
} // namespace Qnx
#endif // QNX_INTERNAL_QNXDEPLOYQTLIBRARIESDIALOG_H
diff --git a/src/plugins/qnx/qnxdeviceconfiguration.cpp b/src/plugins/qnx/qnxdeviceconfiguration.cpp
index 2b518dd8fe..06998bc801 100644
--- a/src/plugins/qnx/qnxdeviceconfiguration.cpp
+++ b/src/plugins/qnx/qnxdeviceconfiguration.cpp
@@ -263,7 +263,7 @@ void QnxDeviceConfiguration::executeAction(Core::Id actionId, QWidget *parent)
const QnxDeviceConfiguration::ConstPtr device =
sharedFromThis().staticCast<const QnxDeviceConfiguration>();
if (actionId == Core::Id(DeployQtLibrariesActionId)) {
- QnxDeployQtLibrariesDialog dialog(device, QnxDeployQtLibrariesDialog::QNX, parent);
+ QnxDeployQtLibrariesDialog dialog(device, parent);
dialog.exec();
} else {
RemoteLinux::LinuxDevice::executeAction(actionId, parent);
diff --git a/src/plugins/qnx/qnxdeviceprocesssignaloperation.cpp b/src/plugins/qnx/qnxdeviceprocesssignaloperation.cpp
index 795bd94c2e..ab3524a225 100644
--- a/src/plugins/qnx/qnxdeviceprocesssignaloperation.cpp
+++ b/src/plugins/qnx/qnxdeviceprocesssignaloperation.cpp
@@ -62,30 +62,3 @@ QString QnxDeviceProcessSignalOperation::interruptProcessByNameCommandLine(
{
return signalProcessByNameQnxCommandLine(filePath, 2);
}
-
-
-BlackBerryDeviceProcessSignalOperation::BlackBerryDeviceProcessSignalOperation(
- const QSsh::SshConnectionParameters &sshParameters)
- : RemoteLinux::RemoteLinuxSignalOperation(sshParameters)
-{
-}
-
-static QString signalProcessByNameBlackBerryCommandLine(const QString &filePath, int sig)
-{
- QString executable = filePath;
- return QString::fromLatin1("for PID in $(pidin -F \"%a %A\" | grep \"%1\" | awk '/%1/ {print $1}'); "
- "do "
- "kill -%2 $PID; "
- "done").arg(executable.replace(QLatin1String("/"), QLatin1String("\\/"))).arg(sig);
-}
-
-QString BlackBerryDeviceProcessSignalOperation::killProcessByNameCommandLine(const QString &filePath) const
-{
- return QString::fromLatin1("%1; %2").arg(signalProcessByNameBlackBerryCommandLine(filePath, 15),
- signalProcessByNameBlackBerryCommandLine(filePath, 9));
-}
-
-QString BlackBerryDeviceProcessSignalOperation::interruptProcessByNameCommandLine(const QString &filePath) const
-{
- return signalProcessByNameBlackBerryCommandLine(filePath, 2);
-}
diff --git a/src/plugins/qnx/qnxdeviceprocesssignaloperation.h b/src/plugins/qnx/qnxdeviceprocesssignaloperation.h
index c72fc6d2eb..99b6432497 100644
--- a/src/plugins/qnx/qnxdeviceprocesssignaloperation.h
+++ b/src/plugins/qnx/qnxdeviceprocesssignaloperation.h
@@ -51,19 +51,6 @@ private:
friend class QnxDeviceConfiguration;
};
-class BlackBerryDeviceProcessSignalOperation : public RemoteLinux::RemoteLinuxSignalOperation
-{
- Q_OBJECT
-protected:
- explicit BlackBerryDeviceProcessSignalOperation(const QSsh::SshConnectionParameters &sshParameters);
-
-private:
- QString killProcessByNameCommandLine(const QString &filePath) const;
- QString interruptProcessByNameCommandLine(const QString &filePath) const;
-
- friend class BlackBerryDeviceConfiguration;
-};
-
} // namespace Internal
} // namespace Qnx
diff --git a/src/plugins/qnx/qnxplugin.cpp b/src/plugins/qnx/qnxplugin.cpp
index 8d499e7f55..d920785f40 100644
--- a/src/plugins/qnx/qnxplugin.cpp
+++ b/src/plugins/qnx/qnxplugin.cpp
@@ -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
diff --git a/src/plugins/qnx/qnxplugin.h b/src/plugins/qnx/qnxplugin.h
index 69825e5222..b666a57bec 100644
--- a/src/plugins/qnx/qnxplugin.h
+++ b/src/plugins/qnx/qnxplugin.h
@@ -49,7 +49,6 @@ class QnxPlugin : public ExtensionSystem::IPlugin
public:
QnxPlugin();
- ~QnxPlugin();
bool initialize(const QStringList &arguments, QString *errorString);
void extensionsInitialized();
@@ -57,16 +56,6 @@ public:
private slots:
void updateDebuggerActions();
-#ifdef WITH_TESTS
- void testBarDescriptorDocumentSetValue_data();
- void testBarDescriptorDocumentSetValue();
-
- void testBarDescriptorDocumentSetBannerComment_data();
- void testBarDescriptorDocumentSetBannerComment();
-
- void testConfigurationManager_data();
- void testConfigurationManager();
-#endif
private:
QAction *m_debugSeparator;
diff --git a/src/plugins/qnx/qnxqtversion.cpp b/src/plugins/qnx/qnxqtversion.cpp
index a90424dc6c..16c2563da1 100644
--- a/src/plugins/qnx/qnxqtversion.cpp
+++ b/src/plugins/qnx/qnxqtversion.cpp
@@ -32,25 +32,30 @@
#include "qnxqtversion.h"
+#include "qnxbaseqtconfigwidget.h"
#include "qnxconstants.h"
-
#include "qnxutils.h"
#include <coreplugin/featureprovider.h>
+#include <qtsupport/qtsupportconstants.h>
+#include <utils/environment.h>
#include <utils/hostosinfo.h>
-#include <qtsupport/qtsupportconstants.h>
+#include <QDir>
-using namespace Qnx;
-using namespace Qnx::Internal;
+namespace Qnx {
+namespace Internal {
-QnxQtVersion::QnxQtVersion()
- : QnxAbstractQtVersion()
-{
-}
+static char SDK_PATH_KEY[] = "SDKPath";
+static char ARCH_KEY[] = "Arch";
+
+QnxQtVersion::QnxQtVersion() : m_arch(UnknownArch)
+{ }
-QnxQtVersion::QnxQtVersion(QnxArchitecture arch, const Utils::FileName &path, bool isAutoDetected, const QString &autoDetectionSource)
- : QnxAbstractQtVersion(arch, path, isAutoDetected, autoDetectionSource)
+QnxQtVersion::QnxQtVersion(QnxArchitecture arch, const Utils::FileName &path, bool isAutoDetected,
+ const QString &autoDetectionSource) :
+ QtSupport::BaseQtVersion(path, isAutoDetected, autoDetectionSource),
+ m_arch(arch)
{
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
}
@@ -60,10 +65,6 @@ QnxQtVersion *QnxQtVersion::clone() const
return new QnxQtVersion(*this);
}
-QnxQtVersion::~QnxQtVersion()
-{
-}
-
QString QnxQtVersion::type() const
{
return QLatin1String(Constants::QNX_QNX_QT);
@@ -72,12 +73,12 @@ QString QnxQtVersion::type() const
QString QnxQtVersion::description() const
{
//: Qt Version is meant for QNX
- return tr("QNX %1").arg(archString());
+ return QCoreApplication::translate("Qnx::Internal::QnxQtVersion", "QNX %1").arg(archString());
}
Core::FeatureSet QnxQtVersion::availableFeatures() const
{
- Core::FeatureSet features = QnxAbstractQtVersion::availableFeatures();
+ Core::FeatureSet features = QtSupport::BaseQtVersion::availableFeatures();
features |= Core::FeatureSet(Constants::QNX_QNX_FEATURE);
features.remove(Core::Feature(QtSupport::Constants::FEATURE_QT_CONSOLE));
features.remove(Core::Feature(QtSupport::Constants::FEATURE_QT_WEBKIT));
@@ -91,15 +92,137 @@ QString QnxQtVersion::platformName() const
QString QnxQtVersion::platformDisplayName() const
{
- return tr("QNX");
+ return QCoreApplication::translate("Qnx::Internal::QnxQtVersion", "QNX");
+}
+
+QString QnxQtVersion::qnxHost() const
+{
+ if (!m_environmentUpToDate)
+ updateEnvironment();
+
+ foreach (const Utils::EnvironmentItem &item, m_qnxEnv) {
+ if (item.name == QLatin1String(Constants::QNX_HOST_KEY))
+ return item.value;
+ }
+
+ return QString();
+}
+
+QString QnxQtVersion::qnxTarget() const
+{
+ if (!m_environmentUpToDate)
+ updateEnvironment();
+
+ foreach (const Utils::EnvironmentItem &item, m_qnxEnv) {
+ if (item.name == QLatin1String(Constants::QNX_TARGET_KEY))
+ return item.value;
+ }
+
+ return QString();
+}
+
+QnxArchitecture QnxQtVersion::architecture() const
+{
+ return m_arch;
+}
+
+QString QnxQtVersion::archString() const
+{
+ switch (m_arch) {
+ case X86:
+ return QLatin1String("x86");
+ case ArmLeV7:
+ return QLatin1String("ARMle-v7");
+ case UnknownArch:
+ return QString();
+ }
+ return QString();
+}
+
+QVariantMap QnxQtVersion::toMap() const
+{
+ QVariantMap result = BaseQtVersion::toMap();
+ result.insert(QLatin1String(SDK_PATH_KEY), sdkPath());
+ result.insert(QLatin1String(ARCH_KEY), m_arch);
+ return result;
+}
+
+void QnxQtVersion::fromMap(const QVariantMap &map)
+{
+ BaseQtVersion::fromMap(map);
+ setSdkPath(QDir::fromNativeSeparators(map.value(QLatin1String(SDK_PATH_KEY)).toString()));
+ m_arch = static_cast<QnxArchitecture>(map.value(QLatin1String(ARCH_KEY), UnknownArch).toInt());
+}
+
+QList<ProjectExplorer::Abi> QnxQtVersion::detectQtAbis() const
+{
+ ensureMkSpecParsed();
+ return qtAbisFromLibrary(qtCorePaths(versionInfo(), qtVersionString()));
+}
+
+void QnxQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const
+{
+ QtSupport::BaseQtVersion::addToEnvironment(k, env);
+ updateEnvironment();
+ env.modify(m_qnxEnv);
+
+ env.prependOrSetLibrarySearchPath(versionInfo().value(QLatin1String("QT_INSTALL_LIBS")));
+}
+
+Utils::Environment QnxQtVersion::qmakeRunEnvironment() const
+{
+ if (!sdkPath().isEmpty())
+ updateEnvironment();
+
+ Utils::Environment env = Utils::Environment::systemEnvironment();
+ env.modify(m_qnxEnv);
+
+ return env;
+}
+
+QtSupport::QtConfigWidget *QnxQtVersion::createConfigurationWidget() const
+{
+ return new QnxBaseQtConfigWidget(const_cast<QnxQtVersion *>(this));
+}
+
+bool QnxQtVersion::isValid() const
+{
+ return QtSupport::BaseQtVersion::isValid() && !sdkPath().isEmpty();
}
-QString QnxQtVersion::sdkDescription() const
+QString QnxQtVersion::invalidReason() const
{
- return tr("QNX Software Development Platform:");
+ if (sdkPath().isEmpty())
+ return QCoreApplication::translate("Qnx::Internal::QnxQtVersion", "No SDK path was set up");
+ return QtSupport::BaseQtVersion::invalidReason();
+}
+
+QString QnxQtVersion::sdkPath() const
+{
+ return m_sdkPath;
+}
+
+void QnxQtVersion::setSdkPath(const QString &sdkPath)
+{
+ if (m_sdkPath == sdkPath)
+ return;
+
+ m_sdkPath = sdkPath;
+ m_environmentUpToDate = false;
+}
+
+void QnxQtVersion::updateEnvironment() const
+{
+ if (!m_environmentUpToDate) {
+ m_qnxEnv = environment();
+ m_environmentUpToDate = true;
+ }
}
QList<Utils::EnvironmentItem> QnxQtVersion::environment() const
{
return QnxUtils::qnxEnvironment(sdkPath());
}
+
+} // namespace Internal
+} // namespace Qnx
diff --git a/src/plugins/qnx/qnxqtversion.h b/src/plugins/qnx/qnxqtversion.h
index 9e1bf702dc..13decd0d0b 100644
--- a/src/plugins/qnx/qnxqtversion.h
+++ b/src/plugins/qnx/qnxqtversion.h
@@ -34,34 +34,64 @@
#define QNX_INTERNAL_QNXQTVERSION_H
#include "qnxconstants.h"
-#include "qnxabstractqtversion.h"
+#include "qnxqtversion.h"
+
+#include <qtsupport/baseqtversion.h>
+
+#include <utils/environment.h>
namespace Qnx {
namespace Internal {
-class QnxQtVersion : public QnxAbstractQtVersion
+class QnxQtVersion : public QtSupport::BaseQtVersion
{
- Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxQtVersion)
public:
QnxQtVersion();
QnxQtVersion(QnxArchitecture arch, const Utils::FileName &path,
bool isAutoDetected = false,
const QString &autoDetectionSource = QString());
- QnxQtVersion *clone() const;
- ~QnxQtVersion();
+ QnxQtVersion *clone() const override;
+
+ QString type() const override;
+
+ QString description() const override;
+
+ Core::FeatureSet availableFeatures() const override;
+ QString platformName() const override;
+ QString platformDisplayName() const override;
+
+ QString qnxHost() const;
+ QString qnxTarget() const;
- QString type() const;
+ QnxArchitecture architecture() const;
+ QString archString() const;
- QString description() const;
+ QVariantMap toMap() const override;
+ void fromMap(const QVariantMap &map) override;
- Core::FeatureSet availableFeatures() const;
- QString platformName() const;
- QString platformDisplayName() const;
+ QList<ProjectExplorer::Abi> detectQtAbis() const override;
- QString sdkDescription() const;
+ void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const override;
+ Utils::Environment qmakeRunEnvironment() const override;
+
+ QtSupport::QtConfigWidget *createConfigurationWidget() const override;
+
+ bool isValid() const;
+ QString invalidReason() const;
+
+ QString sdkPath() const;
+ void setSdkPath(const QString &sdkPath);
private:
+ void updateEnvironment() const;
+
QList<Utils::EnvironmentItem> environment() const;
+
+ QnxArchitecture m_arch;
+ QString m_sdkPath;
+
+ mutable bool m_environmentUpToDate;
+ mutable QList<Utils::EnvironmentItem> m_qnxEnv;
};
} // namespace Internal
diff --git a/src/plugins/qnx/qnxqtversionfactory.cpp b/src/plugins/qnx/qnxqtversionfactory.cpp
index e1a90441ef..da9e0a1bb6 100644
--- a/src/plugins/qnx/qnxqtversionfactory.cpp
+++ b/src/plugins/qnx/qnxqtversionfactory.cpp
@@ -68,7 +68,7 @@ QtSupport::BaseQtVersion *QnxQtVersionFactory::restore(const QString &type, cons
int QnxQtVersionFactory::priority() const
{
- return Constants::QNX_QNX_QT_FACTORY_PRIO;
+ return 50;
}
QtSupport::BaseQtVersion *QnxQtVersionFactory::create(const Utils::FileName &qmakePath,
diff --git a/src/plugins/qnx/qnxsettingswidget.cpp b/src/plugins/qnx/qnxsettingswidget.cpp
index 7b04b20e04..f37ab39cde 100644
--- a/src/plugins/qnx/qnxsettingswidget.cpp
+++ b/src/plugins/qnx/qnxsettingswidget.cpp
@@ -149,7 +149,7 @@ void QnxSettingsWidget::updateInformation()
m_ui->generateKitsCheckBox->setChecked(config ? config->isActive() : false);
// update information
- m_ui->configName->setText(config? config->displayName() : QString());
+ m_ui->configName->setText(config ? config->displayName() : QString());
m_ui->configVersion->setText(config ? config->version().toString() : QString());
m_ui->configHost->setText(config ? config->qnxHost().toString() : QString());
m_ui->configTarget->setText(config ? config->qnxTarget().toString() : QString());
@@ -187,8 +187,7 @@ void QnxSettingsWidget::setConfigState(QnxConfiguration *config,
}
foreach (const ConfigState &configState, m_changedConfigs) {
- if (configState.config == config
- && configState.state == stateToRemove)
+ if (configState.config == config && configState.state == stateToRemove)
m_changedConfigs.removeAll(configState);
}
@@ -218,5 +217,5 @@ void QnxSettingsWidget::applyChanges()
m_changedConfigs.clear();
}
-}
-}
+} // namespace Internal
+} // namespace Qnx
diff --git a/src/plugins/qnx/qnxtoolchain.cpp b/src/plugins/qnx/qnxtoolchain.cpp
index e21b9b0829..6d59cea7b4 100644
--- a/src/plugins/qnx/qnxtoolchain.cpp
+++ b/src/plugins/qnx/qnxtoolchain.cpp
@@ -34,9 +34,6 @@
#include "qnxconstants.h"
#include "qnxutils.h"
-#include "blackberryconfigurationmanager.h"
-#include "blackberryapilevelconfiguration.h"
-
#include <utils/pathchooser.h>
#include <QFormLayout>
@@ -88,14 +85,6 @@ ToolChainConfigWidget *QnxToolChain::configurationWidget()
void QnxToolChain::addToEnvironment(Utils::Environment &env) const
{
- foreach (BlackBerryApiLevelConfiguration *config,
- BlackBerryConfigurationManager::instance()->apiLevels()) {
- if (config->qccCompilerPath() == compilerCommand()) {
- setQnxEnvironment(env, config->qnxEnv());
- break;
- }
- }
-
if (env.value(QLatin1String("QNX_HOST")).isEmpty()
|| env.value(QLatin1String("QNX_TARGET")).isEmpty())
setQnxEnvironment(env, QnxUtils::qnxEnvironment(m_ndkPath));
@@ -109,9 +98,6 @@ QList<Utils::FileName> QnxToolChain::suggestedMkspecList() const
mkspecList << Utils::FileName::fromLatin1("qnx-armv7le-qcc");
mkspecList << Utils::FileName::fromLatin1("qnx-armle-v7-qcc");
mkspecList << Utils::FileName::fromLatin1("qnx-x86-qcc");
- mkspecList << Utils::FileName::fromLatin1("blackberry-armv7le-qcc");
- mkspecList << Utils::FileName::fromLatin1("blackberry-armle-v7-qcc");
- mkspecList << Utils::FileName::fromLatin1("blackberry-x86-qcc");
return mkspecList;
}
diff --git a/src/plugins/qnx/qnxutils.cpp b/src/plugins/qnx/qnxutils.cpp
index 3472f8ec95..b61afe2825 100644
--- a/src/plugins/qnx/qnxutils.cpp
+++ b/src/plugins/qnx/qnxutils.cpp
@@ -31,7 +31,7 @@
****************************************************************************/
#include "qnxutils.h"
-#include "qnxabstractqtversion.h"
+#include "qnxqtversion.h"
#include <utils/hostosinfo.h>
#include <utils/synchronousprocess.h>
@@ -68,7 +68,7 @@ QnxArchitecture QnxUtils::cpudirToArch(const QString &cpuDir)
return UnknownArch;
}
-QStringList QnxUtils::searchPaths(QnxAbstractQtVersion *qtVersion)
+QStringList QnxUtils::searchPaths(QnxQtVersion *qtVersion)
{
const QDir pluginDir(qtVersion->versionInfo().value(QLatin1String("QT_INSTALL_PLUGINS")));
const QStringList pluginSubDirs = pluginDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
diff --git a/src/plugins/qnx/qnxutils.h b/src/plugins/qnx/qnxutils.h
index 6fe75425a8..3284208187 100644
--- a/src/plugins/qnx/qnxutils.h
+++ b/src/plugins/qnx/qnxutils.h
@@ -45,7 +45,7 @@
namespace Qnx {
namespace Internal {
-class QnxAbstractQtVersion;
+class QnxQtVersion;
class ConfigInstallInformation
{
@@ -66,7 +66,7 @@ class QnxUtils
public:
static QString addQuotes(const QString &string);
static Qnx::QnxArchitecture cpudirToArch(const QString &cpuDir);
- static QStringList searchPaths(QnxAbstractQtVersion *qtVersion);
+ static QStringList searchPaths(Qnx::Internal::QnxQtVersion *qtVersion);
static QList<Utils::EnvironmentItem> qnxEnvironmentFromEnvFile(const QString &fileName);
static bool isValidNdkPath(const QString & ndkPath);
static QString envFilePath(const QString & ndkPath, const QString& targetVersion = QString());
diff --git a/src/tools/sdktool/README.txt b/src/tools/sdktool/README.txt
index 9e21e73cbb..a8e9a75f6d 100644
--- a/src/tools/sdktool/README.txt
+++ b/src/tools/sdktool/README.txt
@@ -99,7 +99,6 @@ Tricky parts:
* Qt4ProjectManager.QtVersion.Desktop for a desktop Qt
* RemoteLinux.EmbeddedLinuxQt for an embedded linux Qt
* Qt4ProjectManager.QtVersion.Maemo for an Maemo Qt
- * Qt4ProjectManager.QtVersion.QNX.BlackBerry for Qt on BlackBerry
* Qt4ProjectManager.QtVersion.QNX.QNX for Qt on QNX
* Qt4ProjectManager.QtVersion.Simulator for Qt running in the Qt simulator
* Qt4ProjectManager.QtVersion.WinCE for Qt on WinCE
@@ -126,7 +125,6 @@ Tricky parts:
Currently these are (Qt Creator 2.6):
* Android.Device.Type for Android devices
* Desktop for code running on the local desktop
- * BBOsType for BlackBerry devices
* HarmattanOsType for N9/N950 devices based on Harmattan
* Maemo5OsType for N900 devices based on Maemo