summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@nokia.com>2012-08-22 13:27:25 +0200
committerAlessandro Portale <alessandro.portale@nokia.com>2012-08-22 13:42:42 +0200
commitae23d50576ac076aeb22a3d56abdb5e2c1d9b327 (patch)
treec3849a2481be618e6635e27e80e7263d687480e2
parentc107b10bae60abc483793ec1da55266b77630fcb (diff)
downloadqt-creator-ae23d50576ac076aeb22a3d56abdb5e2c1d9b327.tar.gz
Removal of Symbian support
Qt Creator's support for Symbian was at its peak in version 2.4.x. Nobody really verified it in Qt Creator 2.5 or 2.6. It is most likely rotten. Let's remove it! Also, the Symbian support code was spread throughout the whole Qt Creator code base. The plugin interfaces evolved in the meantime and target platforms like Android or QNX have 99% of their code in separate plugins. In case anyone wants to revive Symbian support in Qt Creator, please create a plugin for it. Change-Id: I56a758a3e2fd5b8c64d9aeb8f63d8e916c4883be Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
-rw-r--r--README2
-rw-r--r--doc/examples/batterystatus/BatteryStatus.pro16
-rw-r--r--doc/examples/batterystatus/qml/BatteryStatus/MainPage.qml80
-rw-r--r--doc/examples/batterystatus/qml/BatteryStatus/main.qml71
-rw-r--r--doc/examples/transitions/Transitions.pro15
-rw-r--r--doc/images/qmldesigner-new-project-symbian-options.pngbin6508 -> 0 bytes
-rw-r--r--doc/images/qtcreator-mobile-project-symbian-options.pngbin12107 -> 0 bytes
-rw-r--r--doc/images/qtcreator-publishing-wizard-symbian.pngbin24371 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qt4-qtversions-win-symbian.pngbin30001 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qt4-symbian-add-target.pngbin11012 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qt4-symbian-device-connected.pngbin2045 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qt4-symbian-device-notconnected.pngbin2791 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qt4-symbian-runsettings.pngbin11120 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qt4-symbian-select-symbian-device.pngbin25627 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qt4-symbian-signing.pngbin6645 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qt4-symbian-target-added.pngbin4710 -> 0 bytes
-rw-r--r--doc/images/qtcreator-qt4-symbian-target-tabs.pngbin3242 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-add-buildconfiguration.pngbin12463 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-add-run-in-emulator.pngbin8932 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-add-runconfiguration.pngbin8632 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-change-buildconfiguration.pngbin6656 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-change-run-in-emulator.pngbin3148 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-change-runconfiguration.pngbin3596 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-components-example-simulated.pngbin20536 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-components-example-ui.pngbin64961 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-components-example.pngbin5035 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-details-runconfiguration.pngbin13051 -> 0 bytes
-rw-r--r--doc/images/qtcreator-symbian-run-settings.pngbin19022 -> 0 bytes
-rw-r--r--doc/src/debugger/creator-debugger-setup.qdoc9
-rw-r--r--doc/src/debugger/creator-debugger.qdoc11
-rw-r--r--doc/src/debugger/qtquick-debugging.qdoc3
-rw-r--r--doc/src/howto/qtcreator-faq.qdoc4
-rw-r--r--doc/src/linux-mobile/creator-deployment-madde.qdoc2
-rw-r--r--doc/src/linux-mobile/creator-publish-ovi-maemo.qdoc2
-rw-r--r--doc/src/linux-mobile/maemodev.qdoc6
-rw-r--r--doc/src/linux-mobile/meegodev.qdoc4
-rw-r--r--doc/src/overview/creator-deployment-overview.qdoc9
-rw-r--r--doc/src/overview/creator-deployment-ovi.qdoc9
-rw-r--r--doc/src/overview/creator-issues.qdoc21
-rw-r--r--doc/src/overview/creator-mobile-targets.qdoc9
-rw-r--r--doc/src/overview/creator-target-platforms.qdocinc6
-rw-r--r--doc/src/projects/creator-projects-build-run-tutorial.qdoc16
-rw-r--r--doc/src/projects/creator-projects-building.qdoc4
-rw-r--r--doc/src/projects/creator-projects-creating.qdoc16
-rw-r--r--doc/src/projects/creator-projects-libraries.qdoc3
-rw-r--r--doc/src/projects/creator-projects-qt-versions.qdoc1
-rw-r--r--doc/src/projects/creator-projects-running.qdoc4
-rw-r--r--doc/src/projects/creator-projects-settings-build.qdoc2
-rw-r--r--doc/src/projects/creator-projects-settings-run.qdoc1
-rw-r--r--doc/src/projects/creator-projects-tool-chains.qdoc23
-rw-r--r--doc/src/qnx/creator-developing-qnx.qdoc2
-rw-r--r--doc/src/qtcreator.qdoc4
-rw-r--r--doc/src/qtquick/qtquick-app-tutorial.qdoc1
-rw-r--r--doc/src/qtquick/qtquick-creating.qdoc26
-rw-r--r--doc/src/qtquick/qtquick-designer.qdoc5
-rw-r--r--doc/src/symbian/creator-deployment-symbian.qdoc370
-rw-r--r--doc/src/symbian/creator-faq-debug-output-symbian.qdocinc13
-rw-r--r--doc/src/symbian/creator-projects-building-symbian.qdocinc25
-rw-r--r--doc/src/symbian/creator-projects-qt-versions-symbian.qdocinc22
-rw-r--r--doc/src/symbian/creator-projects-running-symbian.qdocinc96
-rw-r--r--doc/src/symbian/creator-projects-settings-run-symbian.qdocinc31
-rw-r--r--doc/src/symbian/creator-publish-ovi-symbian.qdoc99
-rw-r--r--doc/src/symbian/qtquick-components-symbian.qdoc229
-rw-r--r--doc/src/symbian/symbiandev.qdoc310
-rw-r--r--doc/src/widgets/qtdesigner-app-tutorial.qdoc1
-rw-r--r--lib/qtcreator/qtcomponents/custom/components.pro10
-rw-r--r--qtcreator.qbp1
-rw-r--r--share/qtcreator/dumper/qttypes.py33
-rw-r--r--share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri15
-rw-r--r--share/qtcreator/qml/qmlobserver/qml.pri6
-rw-r--r--share/qtcreator/templates/html5app/app.pro14
-rw-r--r--share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp15
-rw-r--r--share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.h2
-rw-r--r--share/qtcreator/templates/html5app/html5applicationviewer/touchnavigation/webtouchnavigation.cpp2
-rw-r--r--share/qtcreator/templates/mobileapp/app.pro14
-rw-r--r--share/qtcreator/templates/mobileapp/mainwindow.cpp13
-rw-r--r--share/qtcreator/templates/mobileapp/mainwindow.h2
-rw-r--r--share/qtcreator/templates/qtquickapp/app.pro18
-rw-r--r--share/qtcreator/templates/qtquickapp/qml/app/qtquick10/main.qml1
-rw-r--r--share/qtcreator/templates/qtquickapp/qml/app/symbian11/MainPage.qml12
-rw-r--r--share/qtcreator/templates/qtquickapp/qml/app/symbian11/main.qml18
-rw-r--r--share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp13
-rw-r--r--share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.h2
-rw-r--r--share/qtcreator/templates/shared/deployment.pri7
-rw-r--r--share/qtcreator/templates/shared/symbianicon.svg93
-rw-r--r--share/qtcreator/templates/wizards/qml-extension/project.pro4
-rw-r--r--share/share.qbs12
-rw-r--r--src/libs/3rdparty/cplusplus/Control.cpp11
-rw-r--r--src/libs/libs.pro1
-rw-r--r--src/libs/qmldebug/qmldebug.pri2
-rw-r--r--src/libs/qmldebug/qmldebug.pro1
-rw-r--r--src/libs/qmldebug/qmldebug.qbs2
-rw-r--r--src/libs/qmldebug/qmldebugclient.cpp37
-rw-r--r--src/libs/qmldebug/qmldebugclient.h1
-rw-r--r--src/libs/qtcomponents/styleitem/qdeclarativefolderlistmodel.cpp7
-rw-r--r--src/libs/symbianutils/symbianutils.pri2
-rw-r--r--src/libs/symbianutils/symbianutils.pro5
-rw-r--r--src/libs/symbianutils/symbianutils.qbs69
-rw-r--r--src/libs/utils/fileinprojectfinder.cpp1
-rw-r--r--src/plugins/debugger/README38
-rw-r--r--src/plugins/debugger/debugger.qbs5
-rw-r--r--src/plugins/debugger/debugger_dependencies.pri1
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp10
-rw-r--r--src/plugins/debugger/debuggerstartparameters.h9
-rw-r--r--src/plugins/debugger/gdb/classicgdbengine.cpp4
-rw-r--r--src/plugins/debugger/gdb/codagdbadapter.cpp1652
-rw-r--r--src/plugins/debugger/gdb/codagdbadapter.h204
-rw-r--r--src/plugins/debugger/gdb/gdb.pri8
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp39
-rw-r--r--src/plugins/debugger/gdb/gdbengine.h5
-rw-r--r--src/plugins/debugger/gdb/pythongdbengine.cpp5
-rw-r--r--src/plugins/debugger/gdb/remotegdbserveradapter.cpp3
-rw-r--r--src/plugins/debugger/gdb/symbian.cpp677
-rw-r--r--src/plugins/debugger/gdb/symbian.h226
-rw-r--r--src/plugins/debugger/qml/qmladapter.cpp13
-rw-r--r--src/plugins/debugger/qml/qmladapter.h1
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp15
-rw-r--r--src/plugins/debugger/watchutils.cpp5
-rw-r--r--src/plugins/debugger/watchutils.h1
-rw-r--r--src/plugins/projectexplorer/abi.cpp25
-rw-r--r--src/plugins/projectexplorer/abi.h5
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp8
-rw-r--r--src/plugins/projectexplorer/images/Simulator.png (renamed from src/plugins/projectexplorer/images/SymbianEmulator.png)bin1483 -> 1483 bytes
-rw-r--r--src/plugins/projectexplorer/images/SymbianDevice.pngbin1031 -> 0 bytes
-rw-r--r--src/plugins/projectexplorer/projectexplorer.qbs3
-rw-r--r--src/plugins/projectexplorer/projectexplorer.qrc3
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.cpp136
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp33
-rw-r--r--src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h5
-rw-r--r--src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.cpp358
-rw-r--r--src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.h59
-rw-r--r--src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.pri6
-rw-r--r--src/plugins/qmldesigner/config.pri2
-rw-r--r--src/plugins/qmldesigner/customstyleplugin/customstyleplugin.pri1
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp2
-rw-r--r--src/plugins/qmldesigner/desktopplugin/desktopplugin.pri1
-rw-r--r--src/plugins/qmldesigner/extrasplugin/extrasplugin.pri1
-rw-r--r--src/plugins/qmldesigner/meegoplugin/meegoplugin.pri1
-rw-r--r--src/plugins/qmldesigner/qmldesigner.pro2
-rw-r--r--src/plugins/qmldesigner/qmldesignerplugin.pro1
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/Untitled-2.pngbin3144 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/busyindicator.pngbin4089 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/busyindicator16.pngbin3594 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/busyindicatora.pngbin3546 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/busyindicatora16.pngbin3385 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/button.pngbin3537 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/button16.pngbin3250 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/buttoncolumn.pngbin3264 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/buttoncolumn16.pngbin3166 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/buttonrow.pngbin3247 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/buttonrow16.pngbin3174 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/checkbox.pngbin3612 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/checkbox16.pngbin3334 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/choicelist.pngbin3870 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/choicelist16.pngbin3494 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/item-icon.pngbin396 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/item-icon16.pngbin312 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/listview-icon.pngbin380 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/listview-icon16.pngbin330 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/progressbar.pngbin2971 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/progressbar16.pngbin3004 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/radiobutton.pngbin3849 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/radiobutton16.pngbin3439 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/slider.pngbin3576 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/slider16.pngbin3266 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/sliderh.pngbin3578 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/sliderh16.pngbin3285 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/statusbar.pngbin485 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/statusbar16.pngbin361 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/switchbutton.pngbin3236 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/switchbutton16.pngbin534 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/tabbar.pngbin385 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/tabbar16.pngbin264 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/tabbutton.pngbin3270 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/tabbutton16.pngbin3108 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/textarea.pngbin3644 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/textarea16.pngbin3309 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/textfield.pngbin3617 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/textfield16.pngbin3265 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/toolbar.pngbin339 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/toolbar16.pngbin255 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/window.pngbin396 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/images/window16.pngbin312 -> 0 bytes
-rw-r--r--src/plugins/qmldesigner/symbianplugin/source/SymbianListView.qml53
-rw-r--r--src/plugins/qmldesigner/symbianplugin/source/ToolBar.qml15
-rw-r--r--src/plugins/qmldesigner/symbianplugin/symbian.metainfo108
-rw-r--r--src/plugins/qmldesigner/symbianplugin/symbianplugin.cpp55
-rw-r--r--src/plugins/qmldesigner/symbianplugin/symbianplugin.h53
-rw-r--r--src/plugins/qmldesigner/symbianplugin/symbianplugin.pri17
-rw-r--r--src/plugins/qmldesigner/symbianplugin/symbianplugin.pro4
-rw-r--r--src/plugins/qmldesigner/symbianplugin/symbianplugin.qrc47
-rw-r--r--src/plugins/qmljseditor/qmlfilewizard.cpp3
-rw-r--r--src/plugins/qmljstools/qmljsplugindumper.cpp1
-rw-r--r--src/plugins/qmlprofiler/codaqmlprofilerrunner.cpp85
-rw-r--r--src/plugins/qmlprofiler/codaqmlprofilerrunner.h69
-rw-r--r--src/plugins/qmlprofiler/qmlprofiler.pro2
-rw-r--r--src/plugins/qmlprofiler/qmlprofiler.qbs4
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp9
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerengine.cpp6
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp29
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/addlibrarywizard.h3
-rw-r--r--src/plugins/qt4projectmanager/librarydetailscontroller.cpp24
-rw-r--r--src/plugins/qt4projectmanager/librarydetailswidget.ui10
-rw-r--r--src/plugins/qt4projectmanager/profilekeywords.cpp17
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp6
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/abldparser.cpp234
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/abldparser.h62
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/certificatepathchooser.cpp60
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/certificatepathchooser.h52
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp438
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/codaruncontrol.h132
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp233
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h90
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.cpp97
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.h62
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/qt-s60-todo.txt19
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/qt-s60.pri78
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp254
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/rvctparser.h61
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp581
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h179
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.cpp59
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.h58
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.ui31
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.cpp295
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.h111
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.cpp132
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.h71
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp973
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h212
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.ui192
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp448
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h148
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp203
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h101
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp745
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deploystep.h213
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicedebugruncontrol.cpp247
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicedebugruncontrol.h83
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp410
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h132
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp108
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h70
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60manager.cpp220
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60manager.h76
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp552
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publisherovi.h231
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp180
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.h82
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.ui118
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.cpp113
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.h71
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.ui31
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.cpp311
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.h80
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.ui535
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.cpp91
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.h53
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingwizardovi.cpp70
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingwizardovi.h63
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp242
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.h96
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60runcontrolfactory.cpp76
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60runcontrolfactory.h62
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60symbiancertificate.cpp841
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60symbiancertificate.h74
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp251
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/sbsv2parser.h73
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianidevice.cpp252
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianidevice.h100
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianideviceconfigwidget.cpp624
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianideviceconfigwidget.h127
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianidevicefactory.cpp84
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianidevicefactory.h60
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp330
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h104
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.cpp88
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.h55
-rw-r--r--src/plugins/qt4projectmanager/qt4buildconfiguration.cpp19
-rw-r--r--src/plugins/qt4projectmanager/qt4buildconfiguration.h5
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.cpp63
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.h2
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanager.pro2
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanager.qbs80
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri1
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanagerplugin.h6
-rw-r--r--src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp58
-rw-r--r--src/plugins/qt4projectmanager/wizards/abstractmobileapp.h15
-rw-r--r--src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp42
-rw-r--r--src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h4
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizard.cpp16
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp3
-rw-r--r--src/plugins/qt4projectmanager/wizards/html5appwizard.cpp4
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp34
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizarddialog.h1
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp71
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h22
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobileappwizardsymbianoptionspage.ui126
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp73
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.h29
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.cpp26
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.h4
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.ui97
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtquickapp.cpp10
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtquickapp.h1
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp17
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtquickappwizard.h5
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp5
-rw-r--r--src/plugins/qtsupport/baseqtversion.h2
-rw-r--r--src/plugins/qtsupport/debugginghelperbuildtask.cpp10
-rw-r--r--src/plugins/qtsupport/qtoptionspage.cpp13
-rw-r--r--src/plugins/qtsupport/qtsupportconstants.h4
-rw-r--r--src/plugins/qtsupport/qtversionfactory.cpp11
-rw-r--r--src/plugins/qtsupport/qtversionfactory.h1
-rw-r--r--src/plugins/qtsupport/qtversionmanager.cpp63
-rw-r--r--src/plugins/valgrind/valgrind.qbs1
-rw-r--r--src/shared/json/json_global.h2
-rw-r--r--src/shared/proparser/spec_post.prf7
-rw-r--r--src/shared/symbianutils/callback.h149
-rw-r--r--src/shared/symbianutils/codadevice.cpp1479
-rw-r--r--src/shared/symbianutils/codadevice.h432
-rw-r--r--src/shared/symbianutils/codamessage.cpp592
-rw-r--r--src/shared/symbianutils/codamessage.h327
-rw-r--r--src/shared/symbianutils/codautils.cpp591
-rw-r--r--src/shared/symbianutils/codautils.h158
-rw-r--r--src/shared/symbianutils/codautils_p.h51
-rw-r--r--src/shared/symbianutils/symbiandevicemanager.cpp804
-rw-r--r--src/shared/symbianutils/symbiandevicemanager.h208
-rw-r--r--src/shared/symbianutils/symbianutils.pri42
-rw-r--r--src/shared/symbianutils/symbianutils_global.h44
-rw-r--r--src/shared/symbianutils/virtualserialdevice.cpp78
-rw-r--r--src/shared/symbianutils/virtualserialdevice.h115
-rw-r--r--src/shared/symbianutils/virtualserialdevice_posix.cpp338
-rw-r--r--src/shared/symbianutils/virtualserialdevice_win.cpp362
-rw-r--r--tests/auto/debugger/dumpers.pro1
-rw-r--r--tests/auto/qttest.pri7
-rw-r--r--tests/manual/appwizards/helpers.cpp2
-rw-r--r--tests/manual/debugger/simple/simple_test_app.cpp3
-rw-r--r--tests/system/settings/windows/Nokia/qtcreator/qtversion.xml33
-rw-r--r--tests/system/shared/classes.py18
-rw-r--r--tests/system/shared/project.py6
-rw-r--r--tests/system/shared/utils.py2
-rw-r--r--tests/system/suite_general/tst_openqt_creator/testdata/projecttree_creator.tsv90
-rw-r--r--tests/tools/codaclient/codaclient.pro15
-rw-r--r--tests/tools/codaclient/codaclientapplication.cpp608
-rw-r--r--tests/tools/codaclient/codaclientapplication.h108
-rw-r--r--tests/tools/codaclient/main.cpp56
-rw-r--r--tests/tools/tools.pro3
351 files changed, 150 insertions, 27847 deletions
diff --git a/README b/README
index ab87f7d9ec..f3422a9869 100644
--- a/README
+++ b/README
@@ -17,7 +17,7 @@ Compiling Qt Creator
Prerequisites:
* Qt 4.7.4
* On Windows:
- - ActiveState Active Perl (version 5.8.9 for Symbian development)
+ - ActiveState Active Perl
- MinGW 4.4 or later, Visual Studio 2008 or later
- jom
The Qt SDK provides you with most of the required software.
diff --git a/doc/examples/batterystatus/BatteryStatus.pro b/doc/examples/batterystatus/BatteryStatus.pro
index afe41bf7b8..90fb201047 100644
--- a/doc/examples/batterystatus/BatteryStatus.pro
+++ b/doc/examples/batterystatus/BatteryStatus.pro
@@ -6,30 +6,14 @@ DEPLOYMENTFOLDERS = folder_01
# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
-symbian:TARGET.UID3 = 0xE54A5459
-
-# Smart Installer package's UID
-# This UID is from the protected range and therefore the package will
-# fail to install if self-signed. By default qmake uses the unprotected
-# range value if unprotected UID is defined for the application and
-# 0x2002CCCF value if protected UID is given to the application
-#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
-
-# Allow network access on Symbian
-symbian:TARGET.CAPABILITY += NetworkServices
-
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
CONFIG += mobility
MOBILITY += systeminfo
-# Add dependency to symbian components
-CONFIG += qtquickcomponents
-
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
include(qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()
-
diff --git a/doc/examples/batterystatus/qml/BatteryStatus/MainPage.qml b/doc/examples/batterystatus/qml/BatteryStatus/MainPage.qml
deleted file mode 100644
index de05a14b59..0000000000
--- a/doc/examples/batterystatus/qml/BatteryStatus/MainPage.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-/***************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of Qt Creator.
-**
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-****************************************************************************/
-//! [3]
-import QtQuick 1.1
-import com.nokia.symbian 1.1
-//! [3]
-
-//! [4]
-import QtMobility.systeminfo 1.2
-//! [4]
-
-//! [0]
-Page {
- id: mainPage
-
- DeviceInfo {
- id: deviceinfo
- monitorBatteryLevelChanges: true
- }
-//! [0]
-
-//! [1]
- Text {
- id: text1
- x: 0
- color: platformStyle.colorNormalLight
- text: qsTr("Battery status: %1%").arg(progressbar1.value)
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- font.pixelSize: 20
- }
-//! [1]
-
-//! [2]
- ProgressBar {
- id: progressbar1
- anchors.horizontalCenter: text1.horizontalCenter
- anchors.top: text1.bottom
- anchors.topMargin: 20
- minimumValue: 0
- maximumValue: 100
- value: deviceinfo.batteryLevel
- }
-//! [2]
-}
diff --git a/doc/examples/batterystatus/qml/BatteryStatus/main.qml b/doc/examples/batterystatus/qml/BatteryStatus/main.qml
deleted file mode 100644
index 1307b29f8e..0000000000
--- a/doc/examples/batterystatus/qml/BatteryStatus/main.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/***************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of Qt Creator.
-**
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import com.nokia.symbian 1.0
-
-Window {
- id: window
-
- StatusBar {
- id: statusBar
- anchors.top: window.top
- }
-
- PageStack {
- id: pageStack
- anchors { left: parent.left; right: parent.right; top: statusBar.bottom; bottom: toolBar.top }
- }
-
- ToolBar {
- id: toolBar
- anchors.bottom: window.bottom
- tools: ToolBarLayout {
- id: toolBarLayout
- ToolButton {
- flat: true
- iconSource: "toolbar-back"
- onClicked: pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
- }
- }
- }
-
- Component.onCompleted: {
- pageStack.push(Qt.resolvedUrl("MainPage.qml"))
- }
-}
diff --git a/doc/examples/transitions/Transitions.pro b/doc/examples/transitions/Transitions.pro
index b86619177b..2fb4d91e25 100644
--- a/doc/examples/transitions/Transitions.pro
+++ b/doc/examples/transitions/Transitions.pro
@@ -6,26 +6,11 @@ DEPLOYMENTFOLDERS = folder_01
# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
-symbian:TARGET.UID3 = 0xE506784B
-
-# Smart Installer package's UID
-# This UID is from the protected range and therefore the package will
-# fail to install if self-signed. By default qmake uses the unprotected
-# range value if unprotected UID is defined for the application and
-# 0x2002CCCF value if protected UID is given to the application
-#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
-
-# Allow network access on Symbian
-symbian:TARGET.CAPABILITY += NetworkServices
-
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
# MOBILITY +=
-# Add dependency to symbian components
-# CONFIG += qtquickcomponents
-
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
diff --git a/doc/images/qmldesigner-new-project-symbian-options.png b/doc/images/qmldesigner-new-project-symbian-options.png
deleted file mode 100644
index ad10ff5640..0000000000
--- a/doc/images/qmldesigner-new-project-symbian-options.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-mobile-project-symbian-options.png b/doc/images/qtcreator-mobile-project-symbian-options.png
deleted file mode 100644
index d789f23c46..0000000000
--- a/doc/images/qtcreator-mobile-project-symbian-options.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-publishing-wizard-symbian.png b/doc/images/qtcreator-publishing-wizard-symbian.png
deleted file mode 100644
index af6fce5b56..0000000000
--- a/doc/images/qtcreator-publishing-wizard-symbian.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qt4-qtversions-win-symbian.png b/doc/images/qtcreator-qt4-qtversions-win-symbian.png
deleted file mode 100644
index 5df8003eaf..0000000000
--- a/doc/images/qtcreator-qt4-qtversions-win-symbian.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qt4-symbian-add-target.png b/doc/images/qtcreator-qt4-symbian-add-target.png
deleted file mode 100644
index 399ece6e6e..0000000000
--- a/doc/images/qtcreator-qt4-symbian-add-target.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qt4-symbian-device-connected.png b/doc/images/qtcreator-qt4-symbian-device-connected.png
deleted file mode 100644
index 5d570517cc..0000000000
--- a/doc/images/qtcreator-qt4-symbian-device-connected.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qt4-symbian-device-notconnected.png b/doc/images/qtcreator-qt4-symbian-device-notconnected.png
deleted file mode 100644
index 3ee7224ca1..0000000000
--- a/doc/images/qtcreator-qt4-symbian-device-notconnected.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qt4-symbian-runsettings.png b/doc/images/qtcreator-qt4-symbian-runsettings.png
deleted file mode 100644
index d5def2c417..0000000000
--- a/doc/images/qtcreator-qt4-symbian-runsettings.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qt4-symbian-select-symbian-device.png b/doc/images/qtcreator-qt4-symbian-select-symbian-device.png
deleted file mode 100644
index 77e0ffecdf..0000000000
--- a/doc/images/qtcreator-qt4-symbian-select-symbian-device.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qt4-symbian-signing.png b/doc/images/qtcreator-qt4-symbian-signing.png
deleted file mode 100644
index e43cd4deea..0000000000
--- a/doc/images/qtcreator-qt4-symbian-signing.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qt4-symbian-target-added.png b/doc/images/qtcreator-qt4-symbian-target-added.png
deleted file mode 100644
index 7b4ab8167e..0000000000
--- a/doc/images/qtcreator-qt4-symbian-target-added.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-qt4-symbian-target-tabs.png b/doc/images/qtcreator-qt4-symbian-target-tabs.png
deleted file mode 100644
index 5f1bbeea3d..0000000000
--- a/doc/images/qtcreator-qt4-symbian-target-tabs.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-add-buildconfiguration.png b/doc/images/qtcreator-symbian-add-buildconfiguration.png
deleted file mode 100644
index 44d295d2d5..0000000000
--- a/doc/images/qtcreator-symbian-add-buildconfiguration.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-add-run-in-emulator.png b/doc/images/qtcreator-symbian-add-run-in-emulator.png
deleted file mode 100644
index 51f3921650..0000000000
--- a/doc/images/qtcreator-symbian-add-run-in-emulator.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-add-runconfiguration.png b/doc/images/qtcreator-symbian-add-runconfiguration.png
deleted file mode 100644
index 1dc94616fc..0000000000
--- a/doc/images/qtcreator-symbian-add-runconfiguration.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-change-buildconfiguration.png b/doc/images/qtcreator-symbian-change-buildconfiguration.png
deleted file mode 100644
index 509adc375f..0000000000
--- a/doc/images/qtcreator-symbian-change-buildconfiguration.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-change-run-in-emulator.png b/doc/images/qtcreator-symbian-change-run-in-emulator.png
deleted file mode 100644
index c53ea80e81..0000000000
--- a/doc/images/qtcreator-symbian-change-run-in-emulator.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-change-runconfiguration.png b/doc/images/qtcreator-symbian-change-runconfiguration.png
deleted file mode 100644
index 8a090c3298..0000000000
--- a/doc/images/qtcreator-symbian-change-runconfiguration.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-components-example-simulated.png b/doc/images/qtcreator-symbian-components-example-simulated.png
deleted file mode 100644
index 1633a52d59..0000000000
--- a/doc/images/qtcreator-symbian-components-example-simulated.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-components-example-ui.png b/doc/images/qtcreator-symbian-components-example-ui.png
deleted file mode 100644
index 510966a194..0000000000
--- a/doc/images/qtcreator-symbian-components-example-ui.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-components-example.png b/doc/images/qtcreator-symbian-components-example.png
deleted file mode 100644
index 411204a990..0000000000
--- a/doc/images/qtcreator-symbian-components-example.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-details-runconfiguration.png b/doc/images/qtcreator-symbian-details-runconfiguration.png
deleted file mode 100644
index 959bf110be..0000000000
--- a/doc/images/qtcreator-symbian-details-runconfiguration.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qtcreator-symbian-run-settings.png b/doc/images/qtcreator-symbian-run-settings.png
deleted file mode 100644
index 3daefc707a..0000000000
--- a/doc/images/qtcreator-symbian-run-settings.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/debugger/creator-debugger-setup.qdoc b/doc/src/debugger/creator-debugger-setup.qdoc
index 993d2e7d79..0509010073 100644
--- a/doc/src/debugger/creator-debugger-setup.qdoc
+++ b/doc/src/debugger/creator-debugger-setup.qdoc
@@ -136,10 +136,6 @@
\o Microsoft Visual C++ Compiler
\o Debugging Tools for Windows/CDB
\row
- \o Symbian
- \o GCC
- \o GDB
- \row
\o Maemo, MeeGo
\o GCC
\o GDB
@@ -174,11 +170,6 @@
\o RemoteGdbAdapter interacts with the GDB server running on Linux.
- \o CodaGdbAdapter interacts with Symbian devices. The GDB protocol and
- the GDB serial protocol are used between GDB and the adapter. The
- target communication framework (TCF) protocol is used between the
- adapter and the CODA debugging agent running on the device.
-
\endlist
\endomit
diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc
index ded5d604e6..9386f794d2 100644
--- a/doc/src/debugger/creator-debugger.qdoc
+++ b/doc/src/debugger/creator-debugger.qdoc
@@ -242,7 +242,7 @@
remote machine and a counterpart running on the host side.
The probe is either integrated into the running process (e.g. for QML
debugging) or runs a separate process (e.g. when using GDB server
- on embedded Linux, or TRK/CODA on Symbian). The host side typically
+ on embedded Linux). The host side typically
consists of \QC itself, often with the help of an external process, such as
\if defined(qcmanual)
GDB or CDB.
@@ -846,10 +846,6 @@
\o There is no Python-enabled GDB for Mac OS. Mac OS continues
injection with C++ based debugging helpers.
- \o On the Symbian platform, an on-device debugging agent restricts the
- communication between GDB and the device. Therefore, extracting
- QObject properties, for example, is not possible.
-
\o There is no GDB to communicate with MSVC compiled applications on
Windows. So information can be displayed nicely only in a limited
fashion by using a cdb extension DLL.
@@ -1052,10 +1048,7 @@
\o \gui{putCallItem(self, name, value, func, *args)} -
Uses GDB to call the function \c func on the value specified by
- \a {value} and output the resulting item. This function is
- not available when debugging core dumps and it is not available
- on the Symbian platform due to restrictions imposed by the on-device
- debugging agent.
+ \a {value} and output the resulting item.
\o \gui{putItem(self, value)} - The "master function", handling
basic types, references, pointers and enums directly, iterates
diff --git a/doc/src/debugger/qtquick-debugging.qdoc b/doc/src/debugger/qtquick-debugging.qdoc
index f162d87468..6acdbed000 100644
--- a/doc/src/debugger/qtquick-debugging.qdoc
+++ b/doc/src/debugger/qtquick-debugging.qdoc
@@ -36,8 +36,7 @@
Qt 4.8, or later.
To debug Qt Quick applications running on devices, you must install
- Qt 4.7.4, or later, libraries on devices. To debug applications on Symbian
- devices, you must install also QML Viewer on them.
+ Qt 4.7.4, or later, libraries on devices.
For an example of how to debug Qt Quick Projects, see
\l{Debugging a Qt Quick Example Application}.
diff --git a/doc/src/howto/qtcreator-faq.qdoc b/doc/src/howto/qtcreator-faq.qdoc
index 7666644177..bcb0fe5d45 100644
--- a/doc/src/howto/qtcreator-faq.qdoc
+++ b/doc/src/howto/qtcreator-faq.qdoc
@@ -231,10 +231,6 @@
\l{http://technet.microsoft.com/en-us/sysinternals/bb896647}{DebugView for Windows}
to display output from GUI applications.
- \if defined(qcmanual)
- \input symbian/creator-faq-debug-output-symbian.qdocinc
- \endif
-
\section1 Questions about New Features
\bold {Will a requested feature be implemented?}
diff --git a/doc/src/linux-mobile/creator-deployment-madde.qdoc b/doc/src/linux-mobile/creator-deployment-madde.qdoc
index fd3dc628f2..08ab88c6ac 100644
--- a/doc/src/linux-mobile/creator-deployment-madde.qdoc
+++ b/doc/src/linux-mobile/creator-deployment-madde.qdoc
@@ -25,7 +25,7 @@
/*!
\contentspage index.html
- \previouspage creator-deployment-symbian.html
+ \previouspage creator-deployment.html
\page creator-deployment-maemo.html
\nextpage creator-deployment-qnx.html
diff --git a/doc/src/linux-mobile/creator-publish-ovi-maemo.qdoc b/doc/src/linux-mobile/creator-publish-ovi-maemo.qdoc
index 8ebd7b224e..44904771f1 100644
--- a/doc/src/linux-mobile/creator-publish-ovi-maemo.qdoc
+++ b/doc/src/linux-mobile/creator-publish-ovi-maemo.qdoc
@@ -25,7 +25,7 @@
/*!
\contentspage index.html
- \previouspage creator-publish-ovi-symbian.html
+ \previouspage creator-publish-ovi.html
\page creator-publish-ovi-maemo.html
\nextpage creator-publish-ovi-meego.html
diff --git a/doc/src/linux-mobile/maemodev.qdoc b/doc/src/linux-mobile/maemodev.qdoc
index 8d904623cd..e54f58c6d4 100644
--- a/doc/src/linux-mobile/maemodev.qdoc
+++ b/doc/src/linux-mobile/maemodev.qdoc
@@ -26,11 +26,7 @@
\previouspage creator-developing-meego.html
\endif
\page creator-developing-maemo.html
- \if defined(qcmanual)
- \nextpage creator-developing-symbian.html
- \else
- \nextpage smartinstaller.html
- \endif
+ \nextpage creator-developing-qnx.html
\title Connecting Maemo Devices
diff --git a/doc/src/linux-mobile/meegodev.qdoc b/doc/src/linux-mobile/meegodev.qdoc
index eecca10476..9e0d7c3c5a 100644
--- a/doc/src/linux-mobile/meegodev.qdoc
+++ b/doc/src/linux-mobile/meegodev.qdoc
@@ -20,11 +20,7 @@
/*!
\contentspage index.html
- \if defined(qcmanual)
\previouspage creator-connecting-mobile.html
- \else
- \previouspage creator-developing-symbian.html
- \endif
\page creator-developing-meego.html
\if defined(qcmanual)
\nextpage creator-developing-generic-linux.html
diff --git a/doc/src/overview/creator-deployment-overview.qdoc b/doc/src/overview/creator-deployment-overview.qdoc
index 94bbc19866..400f3413da 100644
--- a/doc/src/overview/creator-deployment-overview.qdoc
+++ b/doc/src/overview/creator-deployment-overview.qdoc
@@ -27,7 +27,7 @@
\contentspage index.html
\previouspage creator-running-targets.html
\page creator-deployment.html
- \nextpage creator-deployment-symbian.html
+ \nextpage creator-deployment-maemo.html
\title Deploying to Mobile Devices
@@ -38,13 +38,6 @@
\list
- \o \l{Deploying Applications to Symbian Devices}
-
- When you deploy the application for the \gui{Symbian Device} target,
- \QC automatically generates a Symbian installation system (SIS) file
- in the project folder and copies it to the connected device. You can
- sign the SIS file and wrap it in a Nokia Smart Installer for Symbian
- package. You can test and debug the application on the device.
\o \l{Deploying Applications to Linux-Based Devices}
When you deploy the application on a Linux-based device target, such
diff --git a/doc/src/overview/creator-deployment-ovi.qdoc b/doc/src/overview/creator-deployment-ovi.qdoc
index 951a048288..b697b0eb65 100644
--- a/doc/src/overview/creator-deployment-ovi.qdoc
+++ b/doc/src/overview/creator-deployment-ovi.qdoc
@@ -27,7 +27,7 @@
\contentspage index.html
\previouspage creator-running-valgrind-remotely.html
\page creator-publish-ovi.html
- \nextpage creator-publish-ovi-symbian.html
+ \nextpage creator-publish-ovi-maemo.html
\title Publishing
@@ -45,13 +45,6 @@
\list
- \o \l{Publishing Qt Content for Symbian Devices}
-
- The \gui {Publish Qt Symbian Applications to Nokia Store}
- wizard ensures that your application can be published to Nokia
- Store by verifying that the the application UID, vendor name,
- and the capabilities used meet the Nokia Publish criteria.
-
\o \l{Publishing Qt Content for MeeGo Harmattan Devices}
\QC generates installation packages that you can publish to
diff --git a/doc/src/overview/creator-issues.qdoc b/doc/src/overview/creator-issues.qdoc
index 3a0a99b8d6..ade3e75302 100644
--- a/doc/src/overview/creator-issues.qdoc
+++ b/doc/src/overview/creator-issues.qdoc
@@ -122,27 +122,6 @@
\list
- \o Debugging large applications on Symbian devices using the Symbian^3
- operating system might not work, because the on-device debugging
- agent might not be able to access memory when the operating system
- starts paging. This causes breakpoint handling and symbol resolution
- to fail. For more information, see
- \l{https://bugreports.qt-project.org/browse/QTCREATORBUG-2158}
- {QTCREATORBUG-2158}.
-
- As a workaround, add the following section to the application .pro
- file to disable paging:
-
- \code
- debug {
- MMP_RULES -= PAGED
- MMP_RULES *= UNPAGED
- }
- \endcode
-
- \note You must completely clean and rebuild the project for the
- setting to take effect.
-
\o When debugging executables created by the GNU Compiler version 4.5.0
(all platforms), some data types will not be displayed in the
\gui{Locals and Expressions} view due to missing debug information.
diff --git a/doc/src/overview/creator-mobile-targets.qdoc b/doc/src/overview/creator-mobile-targets.qdoc
index 3b5e3313bf..315dd31f3b 100644
--- a/doc/src/overview/creator-mobile-targets.qdoc
+++ b/doc/src/overview/creator-mobile-targets.qdoc
@@ -65,15 +65,6 @@
Developer) to create the device-side end point for USB and WLAN
connections.
- \o \l{Connecting Symbian Devices}
-
- You can run Qt applications on Symbian devices if the software
- that Qt applications require (typically Qt, Qt Mobility, QtWebkit,
- and Open C) is installed on the device. On Symbian Anna and later
- devices, some version of Qt is pre-installed.
- Install and launch the CODA on-device debugging agent on the
- devices and connect the devices to the development PC.
-
\o \l{Connecting QNX Devices}
You can connect QNX devices to the development PC to deploy, run and
diff --git a/doc/src/overview/creator-target-platforms.qdocinc b/doc/src/overview/creator-target-platforms.qdocinc
index 403bc29e95..28bf37cfdd 100644
--- a/doc/src/overview/creator-target-platforms.qdocinc
+++ b/doc/src/overview/creator-target-platforms.qdocinc
@@ -14,8 +14,6 @@
\o Generic remote Linux
- \o Symbian
-
\o QNX
\o Android
@@ -35,7 +33,6 @@
\o Maemo 5
\o MeeGo Harmattan
\o Generic Remote Linux
- \o Symbian
\o QNX
\o Android
@@ -46,7 +43,6 @@
\o Yes
\o Yes
\o Yes
- \o Yes
\o Yes (see \l{Running on QNX Devices} for limitations)
\o Yes
@@ -57,7 +53,6 @@
\o Yes
\o Yes
\o Yes
- \o Yes (by using Remote Compiler for building)
\o Yes
\o Yes
\row
@@ -67,7 +62,6 @@
\o Yes
\o Yes
\o Yes
- \o Yes (by using Remote Compiler for building)
\o Yes
\o Yes
\endtable
diff --git a/doc/src/projects/creator-projects-build-run-tutorial.qdoc b/doc/src/projects/creator-projects-build-run-tutorial.qdoc
index 0871e0db8c..cf7ad4379b 100644
--- a/doc/src/projects/creator-projects-build-run-tutorial.qdoc
+++ b/doc/src/projects/creator-projects-build-run-tutorial.qdoc
@@ -55,9 +55,8 @@
\list 1
\o Select at least \QS and one of the mobile
- \l{glossary-development-target}{targets} (1), Symbian
- Device, Maemo 5, or MeeGo Harmattan, depending on the device
- you develop for.
+ \l{glossary-development-target}{targets} (1), Maemo 5 or
+ MeeGo Harmattan, depending on the device you develop for.
\o Select \gui {Configure Project} (2).
@@ -87,17 +86,6 @@
can also simulate various mobile functions and create your own
scripts.
- \if defined(qcmanual)
- \o To test the application on a Symbian device, check that the required
- Qt libraries and a debugging agent are installed on the device. For
- more information, see \l{Connecting Symbian Devices}.
-
- \o Click the \gui {Target Selector} and select \gui {Symbian Device}.
-
- \o Click \gui Run to build the application and run it on the Symbian
- device.
- \endif
-
\endlist
*/
diff --git a/doc/src/projects/creator-projects-building.qdoc b/doc/src/projects/creator-projects-building.qdoc
index 18aadfc729..440fea2007 100644
--- a/doc/src/projects/creator-projects-building.qdoc
+++ b/doc/src/projects/creator-projects-building.qdoc
@@ -56,8 +56,4 @@
For more information on the options you have, see
\l{Specifying Build Settings}.
- \if defined(qcmanual)
- \input symbian/creator-projects-building-symbian.qdocinc
- \endif
-
*/
diff --git a/doc/src/projects/creator-projects-creating.qdoc b/doc/src/projects/creator-projects-creating.qdoc
index 8e68bcf8c4..1f8a371499 100644
--- a/doc/src/projects/creator-projects-creating.qdoc
+++ b/doc/src/projects/creator-projects-creating.qdoc
@@ -68,15 +68,6 @@
use \QC as a code editor and to fully control the steps and commands used to
build the project.
- \if defined(qcmanual)
- To develop applications for Symbian devices, you use qmake and the local
- Symbian compiler (on Windows) or qmake and a compilation service at
- Nokia Developer (on Linux and Mac OS) to build the applications for the
- Symbian devices target. The interface to the compilation service,
- Remote Compiler, is installed as a part of the \QSDK. For more information,
- see \l{Building with Remote Compiler}.
- \endif
-
You can install mobile device \l{glossary-development-target}{targets}
as part of the \QSDK. The build and run settings for the
installed targets are set up automatically. However, you might need to
@@ -129,13 +120,6 @@
interfaces with a custom look and feel and QML and C++ code to
implement the application logic
- \o Qt Quick Application for Symbian
-
- Use Qt Quick Components for Symbian to design a user interface
- with the platform look and feel. Select this template to develop
- for Symbian devices that support Qt 4.7.4 or later and have the
- Qt Quick Components installed
-
\o Qt Quick Application for MeeGo Harmattan
Use Qt Quick Components for MeeGo Harmattan to design a user
diff --git a/doc/src/projects/creator-projects-libraries.qdoc b/doc/src/projects/creator-projects-libraries.qdoc
index 777fefe028..630b6e9546 100644
--- a/doc/src/projects/creator-projects-libraries.qdoc
+++ b/doc/src/projects/creator-projects-libraries.qdoc
@@ -127,7 +127,6 @@
\code
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../../projects/mylib/release/ -lmylib
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../../projects/mylib/debug/ -lmylib
- else:symbian: LIBS += -lmylib
else:unix: LIBS += -L$$OUT_PWD/../../../projects/mylib/ -lmylib
INCLUDEPATH += $$PWD/../../../projects/mylib
@@ -135,7 +134,7 @@
win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../../projects/mylib/release/mylib.lib
else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../../projects/mylib/debug/mylib.lib
- else:unix:!symbian: PRE_TARGETDEPS += $$OUT_PWD/../../../projects/mylib/libmylib.a
+ else:unix: PRE_TARGETDEPS += $$OUT_PWD/../../../projects/mylib/libmylib.a
\endcode
\endlist
diff --git a/doc/src/projects/creator-projects-qt-versions.qdoc b/doc/src/projects/creator-projects-qt-versions.qdoc
index 89fff7b689..b9a31b8be5 100644
--- a/doc/src/projects/creator-projects-qt-versions.qdoc
+++ b/doc/src/projects/creator-projects-qt-versions.qdoc
@@ -73,7 +73,6 @@
\endlist
\if defined(qcmanual)
- \input symbian/creator-projects-qt-versions-symbian.qdocinc
\input qnx/creator-projects-qt-version-qnx.qdocinc
\endif
diff --git a/doc/src/projects/creator-projects-running.qdoc b/doc/src/projects/creator-projects-running.qdoc
index fe691ce7eb..69c678d4d6 100644
--- a/doc/src/projects/creator-projects-running.qdoc
+++ b/doc/src/projects/creator-projects-running.qdoc
@@ -37,8 +37,7 @@
To run executable files without deploying them first, deselect the
\gui {Tools > Options > Project > Always deploy project before running it}
- option. This allows you to test SIS files that you receive from Nokia
- Publish or Symbian Signed after you have them signed, for example.
+ option.
For more information on the options you have, see
\l{Specifying Run Settings}.
@@ -52,7 +51,6 @@
\if defined(qcmanual)
\input linux-mobile/creator-projects-running-madde.qdocinc
\input linux-mobile/creator-projects-running-generic-linux.qdocinc
- \input symbian/creator-projects-running-symbian.qdocinc
\input qnx/creator-projects-running-qnx.qdocinc
\endif
diff --git a/doc/src/projects/creator-projects-settings-build.qdoc b/doc/src/projects/creator-projects-settings-build.qdoc
index 279f5f675d..293e7f0021 100644
--- a/doc/src/projects/creator-projects-settings-build.qdoc
+++ b/doc/src/projects/creator-projects-settings-build.qdoc
@@ -68,8 +68,6 @@
\o MeeGo Harmattan
- \o Symbian Devices
-
\endlist
\section1 Starting External Processes
diff --git a/doc/src/projects/creator-projects-settings-run.qdoc b/doc/src/projects/creator-projects-settings-run.qdoc
index f399018661..38f32faefd 100644
--- a/doc/src/projects/creator-projects-settings-run.qdoc
+++ b/doc/src/projects/creator-projects-settings-run.qdoc
@@ -50,7 +50,6 @@
\input projects/creator-projects-settings-run-desktop.qdocinc
\input projects/creator-projects-settings-run-analyze.qdocinc
\input projects/creator-projects-settings-run-debug.qdocinc
- \input symbian/creator-projects-settings-run-symbian.qdocinc
\input linux-mobile/creator-projects-settings-run-linux.qdocinc
\input qnx/creator-projects-settings-run-qnx.qdocinc
\input android/creator-projects-settings-run-android.qdocinc
diff --git a/doc/src/projects/creator-projects-tool-chains.qdoc b/doc/src/projects/creator-projects-tool-chains.qdoc
index b1d4bd3b24..040625fe99 100644
--- a/doc/src/projects/creator-projects-tool-chains.qdoc
+++ b/doc/src/projects/creator-projects-tool-chains.qdoc
@@ -54,23 +54,10 @@
\o Clang is a C, C++, Objective C, and Objective C++ front-end for the
LLVM compiler for Windows, Linux, and Mac OS X.
-
- \o GCCE (GNU Compiler Collection for Embedded) is an ARM-based
- compiler used in Symbian OS 9 and distributed together with \QSDK.
-
- \if defined(qcmanual)
- \o RVCT is an ARM-based compiler for building applications for Symbian
- devices (requires a license).
-
- \o WINSCW is a compiler for building applications that can be run or
- debugged on the Symbian Emulator. It is distributed together with
- Symbian SDKs (but not with the \QSDK).
- \endif
-
\endlist
- To build an application using GCC, MinGW, GCCE, or Clang, specify the paths
- to the directories where the compiler is located and select
+ To build an application using GCC, MinGW, or Clang, specify the paths
+ to the directories where the compiler and debugger are located and select
the application binary interface (ABI) version from the list of available
versions. You can also create a custom ABI definition.
@@ -100,12 +87,6 @@
The other settings to specify depend on the tool chain.
- \if defined(qcmanual)
- \o For RVCT, select the ARM version to use in the \gui {ARM version}
- field. RVCT 2.2 is supported on Symbian Anna and earlier. RVCT 4.0 b902
- or later is required for Symbian Belle.
- \endif
-
\endlist
\section2 Troubleshooting MinGW Compilation Errors
diff --git a/doc/src/qnx/creator-developing-qnx.qdoc b/doc/src/qnx/creator-developing-qnx.qdoc
index acb142a8d5..cae139766f 100644
--- a/doc/src/qnx/creator-developing-qnx.qdoc
+++ b/doc/src/qnx/creator-developing-qnx.qdoc
@@ -20,7 +20,7 @@
/*!
\contentspage index.html
- \previouspage creator-developing-symbian.html
+ \previouspage creator-developing-maemo.html
\page creator-developing-qnx.html
\nextpage creator-developing-android.html
diff --git a/doc/src/qtcreator.qdoc b/doc/src/qtcreator.qdoc
index 1271d9a80e..7d5d079678 100644
--- a/doc/src/qtcreator.qdoc
+++ b/doc/src/qtcreator.qdoc
@@ -107,7 +107,6 @@
\o \list
\o \bold {\l{Publishing}}
\list
- \o \l{Publishing Qt Content for Symbian Devices}
\o \l{Publishing Qt Content for MeeGo Harmattan Devices}
\o \l{Publishing Qt Content for Maemo Devices}
\o \l{Publishing Maemo Applications to Extras-devel}
@@ -237,7 +236,6 @@
\o \l{Running on Multiple Targets}
\o \l{Deploying to Mobile Devices}
\list
- \o \l{Deploying Applications to Symbian Devices}
\o \l{Deploying Applications to Linux-Based Devices}
\o \l{Deploying Applications to QNX Devices}
\o \l{Deploying Applications to Android Devices}
@@ -247,7 +245,6 @@
\o \l{Connecting MeeGo Harmattan Devices}
\o \l{Connecting Embedded Linux Devices}
\o \l{Connecting Maemo Devices}
- \o \l{Connecting Symbian Devices}
\o \l{Connecting QNX Devices}
\o \l{Connecting Android Devices}
\endlist
@@ -282,7 +279,6 @@
\endlist
\o \l{Publishing}
\list
- \o \l{Publishing Qt Content for Symbian Devices}
\o \l{Publishing Qt Content for Maemo Devices}
\o \l{Publishing Qt Content for MeeGo Harmattan Devices}
\o \l{Publishing Maemo Applications to Extras-devel}
diff --git a/doc/src/qtquick/qtquick-app-tutorial.qdoc b/doc/src/qtquick/qtquick-app-tutorial.qdoc
index 288d5db380..1d42f87773 100644
--- a/doc/src/qtquick/qtquick-app-tutorial.qdoc
+++ b/doc/src/qtquick/qtquick-app-tutorial.qdoc
@@ -27,7 +27,6 @@
\contentspage index.html
\previouspage creator-tutorials.html
\page creator-qml-application.html
- \nextpage creator-qml-components-example.html
\title Creating a Qt Quick Application
diff --git a/doc/src/qtquick/qtquick-creating.qdoc b/doc/src/qtquick/qtquick-creating.qdoc
index 2784e643b3..025b38787f 100644
--- a/doc/src/qtquick/qtquick-creating.qdoc
+++ b/doc/src/qtquick/qtquick-creating.qdoc
@@ -73,7 +73,7 @@
application wizards import Qt Quick 1.1, and therefore, you can use them
without changes if you target only platforms that run Qt 4.7.4 (such as
MeeGo or the desktop). If you also target platforms that run Qt 4.7.3
- (such as Maemo and S60 5th Edition), you must change the import statement to
+ (such as Maemo), you must change the import statement to
import Qt Quick 1.0.
\endif
@@ -137,9 +137,7 @@
\note We recommend that you use the \gui {Qt Quick Application for
MeeGo Harmattan} template when you develop for MeeGo Harmattan
- devices and the \gui {Qt Quick Application for Symbian} template
- when you develop for Symbian devices that support Qt 4.7.4, or
- later.
+ devices.
The \gui{Introduction and Project Location} dialog opens.
@@ -174,25 +172,11 @@
application behaves when the orientation of the device display
rotates between portrait and landscape, and then click \gui Next.
- \note This dialog opens only if you select \gui Maemo5 or
- \gui {Symbian Device} target in the \gui {Target Setup} dialog. On
+ \note This dialog opens only if you select \gui Maemo5
+ target in the \gui {Target Setup} dialog. On
Harmattan, the Qt Quick Components for MeeGo provide native-looking
rotation.
- The \gui {Symbian Specific} dialog opens.
-
- \image qmldesigner-new-project-symbian-options.png "Symbian Specific dialog"
-
- \o In the \gui {Application icon (.svg)} field, select an application
- icon for the \gui {Symbian Device} target, or use the default icon.
-
- \o In the \gui {Target UID3} field, specify the \l{Application UID}, or
- use the default UID.
-
- \note \QC generates a UID for testing the application on a device.
- You need to change the UID when you deliver the application for
- public use.
-
\o Click \gui Next.
The \gui {Harmattan Specific} dialog opens.
@@ -217,7 +201,7 @@
\endlist
\QC creates the necessary boilerplate files. Some of the files are
- specific to the Symbian, Maemo, or MeeGo Harmattan platform.
+ specific to the Maemo or MeeGo Harmattan platform.
\section1 Importing QML Applications
diff --git a/doc/src/qtquick/qtquick-designer.qdoc b/doc/src/qtquick/qtquick-designer.qdoc
index 62c5e6a48f..fee3c191c5 100644
--- a/doc/src/qtquick/qtquick-designer.qdoc
+++ b/doc/src/qtquick/qtquick-designer.qdoc
@@ -151,11 +151,6 @@
\list
- \if defined(qcmanual)
- \o \c {import com.nokia.symbian 1.0} for Symbian (Qt 4.7)
- \o \c {import com.nokia.symbian 1.1} for Symbian (Qt 4.8)
- \endif
-
\o \c {import com.nokia.meego 1.0} for MeeGo
\endlist
diff --git a/doc/src/symbian/creator-deployment-symbian.qdoc b/doc/src/symbian/creator-deployment-symbian.qdoc
deleted file mode 100644
index 02cf34cfc5..0000000000
--- a/doc/src/symbian/creator-deployment-symbian.qdoc
+++ /dev/null
@@ -1,370 +0,0 @@
-/****************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** 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 index.html
- \previouspage creator-deployment.html
- \page creator-deployment-symbian.html
- \nextpage creator-deployment-maemo.html
-
- \title Deploying Applications to Symbian Devices
-
- This section describes how to create installation packages that meet the
- requirements for installing applications to Symbian devices.
-
- \section1 Creating SIS Files
-
- When you deploy the application for the \gui{Symbian Device} target, \QC
- automatically generates a Symbian installation system (SIS) file
- in the project folder. You can deliver the installation file to users for
- installation on Symbian devices.
-
- The name of the installation file is displayed in the \gui {Installation file}
- field in the \gui {Run Settings}. In the \gui {Installation drive} field, select the drive on the device
- to install the application to. To suppress notifications on the device during the
- installation, select the \gui {Silent installation} check box. If the silent
- installation fails, \QC attempts installation again, this time displaying
- notifications and error messages.
-
- To create a SIS package without copying it to the device (for example, to submit it
- to \e {Application Signing Services for Nokia Store} or \e {Symbian Signed}),
- create a deploy configuration that contains only the
- \gui {Create SIS Package} step.
-
- \image qtcreator-run-settings-create.png "Create SIS Package step"
-
-
- \section1 Signing SIS Files
-
- Only installation files signed with a certificate and private key are
- allowed to be installed onto Symbian devices. By default, \QC
- self-signs the installation file. This self-signing allows you to install
- the application on a mobile device but places limits on what you can do
- with the installation file, including:
- \list
- \o Self-signed applications cannot access the more sensitive
- \l{Capabilities and Signing}{capabilities} of the mobile device.
- \o Security warnings will be displayed when you install the self-signed
- application on a mobile device.
- \o Self-signed applications cannot be published to Nokia
- Store.
- \endlist
-
- To get around these limitations, you need to go through the Symbian Signed
- or Application Signing Services for Nokia Store. The Symbian Signed organisation
- manages a public key
- infrastructure to provide public authentication of the information in the
- application signing certificates. Their security partner can validate your
- certificate and give you a Publisher ID. Then, when you sign an
- application, other people can be confident that the information in your
- certificate is correct and that the application does actually come from you.
-
- Application Signing Services for Nokia Store is a variant of the Symbian
- Signed certification provided by Nokia
- Publish. It is limited to the Basic and System capability sets
- (Express Signing). Participants can submit an unsigned SIS file to Nokia
- Publish for signing. For more information about how
- to participate, see
- \l {http://www.developer.nokia.com/Community/Wiki/Guide_to_Publishing_Qt_Applications_to_the_Ovi_Store}{Guide to Publishing Qt Applications to the Nokia Store}.
-
- There are also options that do not require you to get a Publisher ID. For
- more detail about how the Symbian Signed process works, see
- \l{https://www.symbiansigned.com}{Symbian Signed}.
-
- When you have your own certificate and private key, you can specify them in
- the \gui{Create SIS Package} step in the \gui {Run Settings}.
-
- \image qtcreator-qt4-symbian-signing.png
-
-
- If your private key is protected by a passphrase, \QC asks you for the
- passphrase when the package is signed and offers to store it. However, storing
- passphrases in \QC presents a security risk. To make \QC forget
- all saved passphrases, click \gui {Reset Passphrases}.
-
- \section2 Capabilities and Signing
-
- Capabilities allow the Symbian platform to control access by applications to
- the functionality provided by the platform APIs. Access to capabilities is
- determined by the device configuration and how the application has been signed.
-
- Symbian Signed offers the following signing options depending on the
- capabilities that the application accesses:
-
- \list
-
- \o \bold{Express signed} for applications that access only user and system
- capabilities.
-
- \o \bold{Certified signed} for applications that access also restricted or
- device manufacturer capabilities.
-
- \note You need to request the rights to access device manufacturer
- capabilities from the manufacturer.
-
- \endlist
-
- For more information about how to choose the appropriate signing option and
- how you can check which capabilities you need, see
- \l{https://www.symbiansigned.com}{Symbian Signed}
- and
- \l{http://doc.qt.nokia.com/4.7/platform-notes-symbian.html#required-capabilities}{Required Capabilities for Qt Applications}.
-
- For more information on how to define capabilities for a project, see
- \l{http://doc.qt.nokia.com/4.7/qmake-platform-notes.html#capabilities}{Capabilities}.
-
- \note In Qt 4.7.1 and later, if you select the \gui {Self-signed certificate}
- option, the SIS generation process checks that the package can be self-signed.
- If problems are found, it attempts to fix the package. If fixes cannot be made,
- a message appears in the \gui {Compile Output} view.
-
- The following modifications can be made:
-
- \list
-
- \o Package UID is changed to an UID from the unprotected range (if it was
- from the protected range).
-
- \o Vendor ID is set to zero on all binaries included in the package file.
-
- \o All restricted and device manufacturer capabilities are removed from all
- libraries included in the package file.
-
- \endlist
-
- The application UID or capabilities used in executables (.exe) cannot be changed,
- because that would break the application. If the executables use protected UIDs
- or restricted or device manufacturer capabilities, signing fails and an error
- message appears in the \gui {Compile Output} view.
-
- \section1 Creating Smart Installer for Symbian Packages
-
- You can run Qt applications on Symbian devices if the software that Qt
- applications require (typically Qt, Qt Mobility, QtWebkit, and Open C) is
- installed on the device. On Symbian^3 and later devices, some version of Qt
- is pre-installed. On earlier devices, you must install the modules that Qt
- applications require. Nokia Smart Installer for Symbian makes it easier
- for users to install Qt applications to Symbian phones by checking whether the device contains
- the necessary software and by installing the missing pieces.
-
- For this to work, the Nokia Smart Installer must be packaged with the Qt application. The
- application SIS file must first be Symbian Signed or signed by the Application
- Signing Services for Nokia Store. The capabilities used in the applications
- determine, which signing option must be selected. The wrapper package must be signed using
- either the same option or a more extensive option than the application SIS.
-
- \note If you use the Application Signing Services for Nokia Store, you can submit an unsigned
- wrapper package to Nokia Publish. For more information, see
- \l{Publishing Qt Content for Symbian Devices}.
-
- You can either install the Nokia Smart Installer for Symbian as part of
- the \QSDK, or download and install it from the
- \l{http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian}{Nokia Smart Installer for Symbian}
- wiki.
-
- To package Nokia Smart Installer with the application, select the \gui {Create Smart Installer
- package} check box. This ensures that up-to-date and appropriate versions of Qt and its
- dependencies are installed on devices. Further, it reduces the file size of the application you
- publish, because you do not have to deliver the required libraries.
-
- Nokia has reserved the following UIDs to be used with Nokia Smart Installer for Symbian:
-
- \list
-
- \o 0xA000D7CE for self-signed applications
- \o 0x2002CCCF for Nokia Store or Symbian Signed packages
-
- \endlist
-
- \section2 Creating Self-signed Smart Installer Packages
-
- To create a self-signed Nokia Smart Installer for Symbian wrapped .sis file,
- you must use an UID from the unprotected UID range, provided by Symbian Signed
- and the wrapper package UID value 0xA000D7CE. If you used the \QC project
- wizard to create the project, this wrapper package UID is used by default.
-
- \list 1
-
- \o Make sure that the source directory is clean. For example, if you use Git,
- enter the following command:
-
- \c {git clean -dfx}
-
- \o Click \gui Projects to edit the \gui {Build Settings} for the
- \gui {Symbian Device} target.
-
- \o Select the \gui Release configuration.
-
- \o Open the \gui {Run Settings}.
-
- \o In the \gui {Create SIS Package} step, select \gui {Self-signed certificate}.
-
- \o In the \gui {Deploy SIS Package} step, click \gui {Remove Item} (1) to
- skip the step of copying the SIS file to a device. The SIS file is created
- in the project folder.
-
- \image qtcreator-remove-deploy-step.png "Removing deploy steps"
-
- \o To package Nokia Smart Installer for Symbian with the application, select
- the \gui {Create Smart Installer package} check box.
-
- \o Edit the project .pro file to use the correct UIDs for the application and
- the wrapper package, as illustrated by the following code snippet:
-
- \code
- symbian {
- TARGET.UID3 = 0xE4DE5D27
- DEPLOYMENT.installer_header=0xA000D7CE
-
- vendorinfo = \
- "%{\"CustomVendor-EN\"}" \
- ":\"CustomVendor\""
-
- my_deployment.pkg_prerules = vendorinfo
- DEPLOYMENT += my_deployment
- }
- \endcode
-
- \o Choose \gui {Build > Run Project}.
-
- \endlist
-
- \QC automatically generates a wrapper package in the project folder.
-
- \section2 Creating Symbian Signed Smart Installer Packages
-
- If the application uses functions that require advanced capabilities (AllFiles,
- DRM, TCB, CommDD, DiskAdmin, NetworkControl, MultimediaDD), you must use the
- standard Symbian Signed process to have the application Symbian Signed. Depending
- on the capabilities used, you may use either the Express Signed or the Certified
- Signed path, or the manufacturer-specific channel (for AllFiles, DRM, and TCB).
-
- \list 1
-
- \o Make sure that the source directory is clean. For example, if you use Git,
- enter the following command:
-
- \c {git clean -dfx}
-
- \o Click \gui Projects to edit the \gui {Build Settings} for the
- \gui {Symbian Device} target.
-
- \o Select the \gui Release configuration.
-
- \o Open the \gui {Run Settings}.
-
- \o In the \gui {Create SIS Package} step, specify the developer certificate
- and key in the \gui {Custom certificate} and \gui {Key file} fields.
-
- \o In the \gui {Deploy SIS Package} step, click \gui {Remove Item} to
- skip the step of copying the SIS file to a device. The SIS file is created
- in the project folder.
-
- \o Edit the project .pro file to use the correct UIDs and vendor information
- for the application, as illustrated by the following code snippet:
-
- \code
- symbian {
- TARGET.UID3 = 0x2000D7D1
- DEPLOYMENT.installer_header=0x2002CCCF
-
- vendorinfo = \
- "%{\"CustomVendor-EN\"}" \
- ":\"CustomVendor\""
-
- my_deployment.pkg_prerules = vendorinfo
- DEPLOYMENT += my_deployment
- }
- \endcode
-
- \o Choose \gui {Build > Run Project}.
-
- \o Submit the created .sis file to Symbian Signed for certification.
-
- \note Ensure that your application complies with the Symbian Signed
- Test Criteria before submitting the file for certification. Also, if the file is
- intended for Nokia Store publishing, verify that the application complies with Nokia
- Store publishing requirements.
-
- \o After receiving the .sis file from Symbian Signed, copy it over the old
- application.sis.
-
- \note The instructions below assume that you have installed \QSDK.
-
- \o To package Nokia Smart Installer for Symbian with the application, choose
- \gui {Start > Qt SDK > Symbian > Qt for Symbian Command Prompt}
- to open the Qt command line environment.
-
- \o Change to the project directory. For example:
-
- \c{cd C:\Sources\Application}
-
- \o To create a Smart Installer wrapper package, enter the following
- command:
-
- \c {C:\Sources\Application> make ok_installer_sis QT_SIS_CERTIFICATE=publisherid.cer QT_SIS_KEY=publisherid.key}
-
- \o Submit the created wrapped .sis file, application_installer.sis, to
- Symbian Signed. Express Signed is a suitable signing option for the wrapper
- package. The capabilities used in the application do not play a role here,
- because the wrapper package is already signed.
-
- \endlist
-
- \QC automatically generates a wrapper package in the project folder.
-
- \note Ensure that your application complies with the requirements before submitting
- the file to Nokia Store.
-
- For more information about the qmake DEPLOYMENT variable, see
- \l{http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#deployment}{qmake Variable Reference}.
-
- For more information about the Nokia Smart Installer, see the
- \l{http://doc.qt.nokia.com/smart-installer/index.html}{Nokia Smart Installer for Symbian Manual}.
-
- Note: Nokia Smart Installer for Symbian is only available on Windows.
-
- \section1 Application UID
-
- A UID is a globally unique identifier that is used to
- uniquely identify, for example, an object or file type. In Symbian development,
- objects are identified by compound identifiers that are constructed from three
- UIDs, namely UID1, UID2, and UID3. UID1 and UID2 specify the category of an
- object, whereas UID3 identifies a particular object, such as an application.
-
- When you create a \gui {Mobile Qt Application}, \QC adds a UID3 suitable for
- development and debugging automatically to the application .pro file. However, to
- distribute your application and get it Symbian Signed, you must apply for a UID
- from Symbian Signed, which manages the allocation of UIDs. You can request UIDs either one
- at a time or as preallocated blocks on the \l{https://www.symbiansigned.com/app/page}{Symbian Signed}
- web site.
-
- If you use the Nokia Signed process, Nokia Publisher Support allocates the UID for you.
-
- Replace the testing UID with the distribution UID in the .pro file before you
- build the final installation package. For more information, see
- \l{http://doc.qt.nokia.com/4.7/qmake-platform-notes.html#unique-identifiers}{Unique Identifiers}.
-
-*/
diff --git a/doc/src/symbian/creator-faq-debug-output-symbian.qdocinc b/doc/src/symbian/creator-faq-debug-output-symbian.qdocinc
deleted file mode 100644
index 5289b90e12..0000000000
--- a/doc/src/symbian/creator-faq-debug-output-symbian.qdocinc
+++ /dev/null
@@ -1,13 +0,0 @@
- \bold {On Symbian OS}: \c qDebug() and related functions use the native
- \c RDebug::Print functionality.
-
- When you use the Symbian emulator on Windows, the output is redirected to
- standard debug output. To view it, you can use a Windows debug output
- viewer, such as the DebugView for Windows.
-
- On devices, the \c RDebug output is intercepted by \e CODA or \e {App TRK}
- and then propagated to \QC, which displays it in the
- \gui {Application Output} pane.
-
- Symbian OS provides no support for differentiating between standard output
- and error output.
diff --git a/doc/src/symbian/creator-projects-building-symbian.qdocinc b/doc/src/symbian/creator-projects-building-symbian.qdocinc
deleted file mode 100644
index b8b2f7cb8f..0000000000
--- a/doc/src/symbian/creator-projects-building-symbian.qdocinc
+++ /dev/null
@@ -1,25 +0,0 @@
- \section1 Building for Symbian
-
- The tool chain for building applications locally on the development PC for
- the \gui {Symbian Device} target is only supported on Windows.
- If you develop on Linux or Mac OS, you must use the Remote Compiler
- interface to a compilation service at Nokia Developer. For more information,
- see \l{Building with Remote Compiler}.
-
- \section2 Troubleshooting Build Issues
-
- If you cannot build the application for a Symbian device, check that:
-
- \list
-
- \o You selected the Symbian Device target to build the application.
-
- \o You selected the correct Qt version to build the application.
- For more information, see \l{Selecting Qt for Symbian Versions}.
-
- \endlist
-
- \section1 Building for Symbian Emulator
-
- \QC does not create release configurations for the \gui {Symbian Emulator}
- target, because Symbian Emulator supports only debug builds.
diff --git a/doc/src/symbian/creator-projects-qt-versions-symbian.qdocinc b/doc/src/symbian/creator-projects-qt-versions-symbian.qdocinc
deleted file mode 100644
index 5abc29f3bf..0000000000
--- a/doc/src/symbian/creator-projects-qt-versions-symbian.qdocinc
+++ /dev/null
@@ -1,22 +0,0 @@
- \section2 Setting Up Qt for Symbian Versions
-
- If you install Qt for Symbian as a part of \QSDK, it is automatically
- detected by \QC. If you install other Symbian SDKs and register them
- with devices.exe, \QC automatically detects the Qt version.
- The \gui {S60 SDK} field displays the path to the directory where
- the Symbian SDK is located.
-
- If the selected Qt version was built using the SBSv2 build system, that
- is available for Symbian OS 9.5 based SDKs, \QC builds your projects
- using this build system. The \gui {SBS v2 directory} field displays the
- path to the directory where the SBS executable (for
- example, sbs.bat on Windows) is located.
-
- To view Qt for Symbian version settings, select \gui {Tools > Options >
- Build & Run > Qt Versions}.
-
- \image qtcreator-qt4-qtversions-win-symbian.png
-
- For more information about how to add tool chains for using the GCCE and
- WINSCW compilers, see \l{Adding Tool Chains}.
-
diff --git a/doc/src/symbian/creator-projects-running-symbian.qdocinc b/doc/src/symbian/creator-projects-running-symbian.qdocinc
deleted file mode 100644
index 4765866e42..0000000000
--- a/doc/src/symbian/creator-projects-running-symbian.qdocinc
+++ /dev/null
@@ -1,96 +0,0 @@
- \section1 Running on Symbian
-
- \list 1
-
- \o Build and run the application for \l{Running on Qt Simulator}
- {\QS}.
-
- \o If no problems are found, build and run the application for a
- device.
-
- \o To test functionality that uses Symbian APIs, you can build and
- run the application for Symbian Emulator.
-
- \endlist
-
- \section2 Running on a Device
-
- \list 1
-
- \o Install the required software on the device. For more information,
- see \l{Connecting Symbian Devices}.
-
- \o Connect the device to the development PC through a USB cable.
- The target selector displays a green check mark when a device is
- connected.
-
- \image qtcreator-qt4-symbian-device-connected.png
-
- The tool tip of the target selector shows more details about the
- actual device that will be used when you run your application.
-
- \o Start the CODA debugging agent on the device.
-
- \note If you use CODA over an USB connection, it starts up
- automatically when you connect the device to the development PC.
-
- \o Click the \gui Run button.
-
- \endlist
-
- You can connect several devices to your development PC simultaneously.
- In the details of the run configuration for the \gui{Symbian Device} target,
- select the device to run your application on.
-
- When your application is ready for delivery to users, specify run settings
- for creating the final SIS installation packages. For more information,
- see \l{Creating SIS Files}.
-
- If you cannot run the application on a device, check that:
-
- \list
-
- \o The Nokia USB drivers that come with \e{PC Suite} or \e{Ovi Suite}
- have been installed on the development PC.
-
- \o The device is connected through USB cable in \e{PC Suite} mode.
-
- \o The CODA debugging agent is installed on the device and it is
- running with the status \e connected.
-
- \note If you use the CODA debugging agent over WLAN, you must enter
- the WLAN address and port number in \QC, separated by a colon (:).
- For example: 192.167.0.100:1534
-
- \o The device is detected and selected in the \gui {Run Settings}.
-
- \endlist
-
- If this does not help to solve your problem, search the
- qt-creator@trolltech.com mailing list archives or provide feedback to us via
- the methods described on the
- \l{http://developer.qt.nokia.com/wiki/Category:Tools::QtCreator}
- {\QC Development Wiki}.
-
- \section2 Running on Symbian Emulator
-
- Select the \gui{Symbian Emulator} target as the active one, and build and
- run your project.
-
- If you cannot run the application in the emulator, check that:
-
- \list
-
- \o You selected the \gui{Symbian Emulator} target for your application.
-
- \o If you cannot select \gui {Symbian Emulator} as target, check that
- Carbide.c++ is installed correctly and that the path to the
- Carbide.c++ installation directory is specified for the WINSCW tool
- chain in the \gui{Compiler path} field in \gui {Tools > Options >
- Tool Chains}.
-
- \o If the emulator process cannot be started, try closing \QC and
- starting the application directly from your file manager. Having
- done this, \QC should be able to run your projects in the emulator.
-
- \endlist
diff --git a/doc/src/symbian/creator-projects-settings-run-symbian.qdocinc b/doc/src/symbian/creator-projects-settings-run-symbian.qdocinc
deleted file mode 100644
index 676b3b38e0..0000000000
--- a/doc/src/symbian/creator-projects-settings-run-symbian.qdocinc
+++ /dev/null
@@ -1,31 +0,0 @@
- \section2 Specifying Run Settings for Symbian Devices
-
- \QC automatically detects Symbian devices that are connected to the
- development PC with a USB cable. If only one device is detected, the
- application is deployed to it and run on it. If multiple devices are
- connected to the PC, make sure that the correct device is selected in the
- \gui {Symbian Device} run settings for your project.
-
- You can also pass command line arguments to your application on the device.
- Press the \gui{Device info button} to get more information about the
- selected device, such as the CPU type and the running debugging agent
- version.
-
- \image qtcreator-symbian-run-settings.png "Run settings for Symbian devices"
-
- To use the CODA debugging agent over a WLAN connection, enter the WLAN
- address of the device and the port number to use, separated by a colon (:),
- in the \gui WLAN field. For example: 192.167.0.100:1534
-
- When you deploy the application for the \gui{Symbian Device} target, \QC
- generates a Symbian installation system (SIS) file in the project folder
- and copies it to the device that is connected to the development PC. If no
- device is connected, you must remove the \gui {Deploy SIS Package} step
- to create the package. Click \gui {Remove Item} (1) to skip the step.
-
- \image qtcreator-remove-deploy-step.png "Removing deploy steps"
-
- When you are ready to publish the application to Nokia Store or some other
- channel, you must make sure that the SIS file meets the requirements for
- publishing and installing applications on Symbian devices. For more
- information, see \l{Deploying Applications to Symbian Devices}.
diff --git a/doc/src/symbian/creator-publish-ovi-symbian.qdoc b/doc/src/symbian/creator-publish-ovi-symbian.qdoc
deleted file mode 100644
index b95b739323..0000000000
--- a/doc/src/symbian/creator-publish-ovi-symbian.qdoc
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** 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 index.html
- \previouspage creator-publish-ovi.html
- \page creator-publish-ovi-symbian.html
- \nextpage creator-publish-ovi-maemo.html
-
- \title Publishing Qt Content for Symbian Devices
-
- The \gui {Publish Qt Symbian Applications to Nokia Store} wizard allows you
- to check that your application can be published to Nokia Store. It checks
- that the application UID, vendor name, and the capabilities used meet the
- \l{http://support.publish.nokia.com/?p=64}{Nokia Publish criteria}.
-
- You can use the
- \l{http://www.developer.nokia.com/Distribute/Packaging_and_signing.xhtml}
- {Application Signing Services for Nokia Store} to get your application
- Express Signed for free by Nokia. Submit an unsigned SIS file (with the
- \l{Application UID}{application UID} that you receive from Nokia Publisher
- Support) to the \l{https://publish.ovi.com/login}{Nokia Publish tool}.
-
- If you use Symbian Signed UIDs or the application uses functions that
- require advanced \l{Capabilities and Signing}{capabilities}, you must use
- the standard Symbian Signed process to have the application Symbian Signed
- (using the Certified Signed path or the manufacturer-specific channel).
- For more information, see \l{Deploying Applications to Symbian Devices}.
-
- To use the publishing wizard:
-
- \list 1
-
- \o Select \gui Projects to select the Qt version to build the
- application. For more information, see
- \l{Selecting Qt for Symbian Versions}.
-
- \o Select the \gui {Symbian Device} build target for your project.
-
- \o Choose \gui {Build > Publish Project}.
-
- \o Select \gui {Publish Qt Symbian Applications to Nokia Store}, and then
- select \gui {Start Wizard}.
-
- \o Select the Qt version and device type to build against and click
- \gui Next. We recommend that you select a release configuration.
-
- \o The wizard checks the information in the project file against the
- Nokia Publish criteria and indicates possible problems. You can fix
- some of the problems in the wizard.
-
- \image qtcreator-publishing-wizard-symbian.png "Project File Checks dialog"
-
- \o Select \gui Commit to save changes and create the .sis file. The
- .sis file is packaged with Nokia Smart Installer for Symbian.
-
- \o Choose \gui {Open Containing Folder} to open the folder where the
- .sis file was created.
-
- \o Submit the created .sis file to Nokia Publish as a Qt Content item.
-
- \endlist
-
- \note After you change the application UID, you must use the developer
- certificate-key pair that you receive from Nokia Publisher Support for testing
- the application on devices. The following error message is displayed on the
- device if you use UIDs from the trusted range (0x2xxxxxxx) in a self-signed
- application: \gui {Unable to install a trusted application from a trusted
- supplier.} For more
- information, see \l{http://www.developer.nokia.com/Community/Wiki/UID}{UID}.
-
- If you try to use more capabilites than the certificate permits, the
- following error message is displayed on the device: \gui {Requested
- application access not granted.} For example, if you try to install a
- self-signed application that uses a system capability.
-
-*/
diff --git a/doc/src/symbian/qtquick-components-symbian.qdoc b/doc/src/symbian/qtquick-components-symbian.qdoc
deleted file mode 100644
index cfc52be2bc..0000000000
--- a/doc/src/symbian/qtquick-components-symbian.qdoc
+++ /dev/null
@@ -1,229 +0,0 @@
-/****************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** 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 index.html
- \previouspage creator-qml-application.html
- \page creator-qml-components-example.html
- \nextpage creator-writing-program.html
-
- \title Using Qt Quick Components
-
- \note To complete this tutorial, you must install the Qt Quick Components
- for Symbian and the Symbian Anna target as part of the \QSDK. In addition,
- you must install the Qt Quick Components on the test device.
-
- This tutorial describes how to use \QC to create a small Qt
- application, Battery Status, that uses the System Information
- Mobility API to fetch battery information from the device.
-
- \image qtcreator-symbian-components-example.png "Mobile example"
-
- The user interface for the application is designed using Qt Quick Components
- for Symbian. This enforces a platform look and feel for Symbian Anna devices.
-
- \section1 Creating the Project
-
- \list 1
-
- \o Select \gui{File > New File or Project > Applications > Qt Quick
- Application for Symbian > Choose}.
-
- \o In the \gui{Name} field, type \bold {BatteryStatus}.
-
- \o In the \gui {Create in} field, enter the path for the project files.
- For example, \c {C:\Qt\examples}, and then click \gui{Next}.
-
- \o Select \gui {Symbian Device} and \gui {\QS} targets, and
- then click \gui{Next}.
-
- \note Targets are listed if you installed the appropriate
- development environment, for example, as part of the \QSDK. You can
- add targets later in the \gui Projects mode.
-
- \o Select \gui Next in the following dialogs to use the default
- settings.
-
- \note \QC contains a default program icon and generates an
- \l{Application UID}, for testing the application on a device. You
- only need to change the icon and UID if you deliver the application
- for public use.
-
- \o Review the project settings, and click \gui{Finish} to create the
- project.
-
- \endlist
-
- \QC generates the necessary files that contain boiler plate code. The
- wizard creates an application that uses
- \l{http://doc.qt.nokia.com/qt-components-symbian/qt-components-pages-and-navigation-overview.html}
- {page-based application navigation}.
-
- Modify the files as described in the following sections.
-
- \section1 Declaring the Qt Mobility API
-
- To use the Qt Mobility APIs or develop applications for Symbian devices,
- you must modify the .pro file to declare the Qt Mobility APIs that you use.
-
- This example uses the System Info API, so you must declare it, as
- illustrated by the following code snippet:
-
- \code
-
- CONFIG += mobility
- MOBILITY = systeminfo
-
- \endcode
-
- Each Mobility API has its corresponding value that you have to add
- as a value of MOBILITY to use the API. For a list of the APIs and the
- corresponding values that you can assign to MOBILITY, see the
- \l {http://doc.qt.nokia.com/qtmobility/quickstart.html}{Quickstart Example}.
-
- \section1 Adding Import Statements
-
- The wizard adds the import statements for Qt Quick and the Qt Quick
- Components for Symbian to the MainPage.qml file:
-
- \snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 3
-
- To use the Qt Mobility APIs, you must add the import statements for the
- Qt Mobility APIs that you use. This example uses the System Info API, so you
- must import it, as illustrated by the following code snippet:
-
- \snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 4
-
- Use the values as you can assign to MOBILITY also to construct import
- statements.
-
- \section1 Creating the Main View
-
- Qt Creator generates a default QML file that you can modify to create the
- main view of the application. It displays a progress bar and a text label
- that indicate the battery status.
-
- \list 1
-
- \o Click \gui Design to open MainPage.qml in \QMLD.
-
- \o In the \gui Navigator pane, select the \gui Text element to edit its
- properties in the \gui Properties pane.
-
- \o In the \gui Text field, change the text from \bold {Hello World!}
- to \gui {Battery status: 1%}.
-
- \o In the \gui Library view, \gui Items tab, select the
- \gui ProgressBar element, drag and drop it to the canvas, and edit
- its properties.
-
- \image qtcreator-symbian-components-example-ui.png "Qt Quick Components for Symbian"
-
- \list 1
-
- \o Click \gui {Layout}, and then click the top anchor button.
-
- \o In the \gui Target field, select \gui text1, to anchor the
- progress bar to the bottom of the text field.
-
- \o In the \gui Margin field, select 20.
-
- \o Click the horizontal anchor button, and select \gui text1 in
- the \gui Target field to anchor the progress bar
- horizontally to the text field.
-
- \o To check that the application can be built and run, select
- \gui {\QS} as the target and click the
- \inlineimage qtcreator-run.png
- button.
-
- \endlist
-
- \endlist
-
- \section1 Fetching Battery Status
-
- To fetch the battery status, open MainPage.qml in the code editor and add
- some code to it:
-
- \list 1
-
- \o Add an invisible
- \l{http://doc.qt.nokia.com/qtmobility/qml-deviceinfo.html}
- {DeviceInfo element} that sets the
- \l{http://doc.qt.nokia.com/qtmobility/qml-deviceinfo.html}
- {monitorBatteryLevelChanges} property to true. It uses the
- \c monitorBatteryLevelChanges signal to keep up with changes in the
- battery level.
-
- \snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 0
-
- \o Set an expression as the value of the text property of the Text
- element to display the battery level as a percentage:
-
- \snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 1
-
- \o Set values for the ProgressBar element to display the battery level
- on the progress bar:
-
- \snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 2
-
- \endlist
-
-
- \section1 Compiling and Running Your Program
-
- Now that you have all the necessary code, select \gui {\QS}
- as the target and click the
- \inlineimage qtcreator-run.png
- button to build your program and run it in \QS.
-
- In \QS, run the runOutOfBattery.qs example script to see the value
- change in the Battery Status application. Select \gui {Scripting > examples
- > runOutOfBattery.qs > Run Selected Script}.
-
- \image qtcreator-symbian-components-example-simulated.png "Mobile example in Qt Simulator"
-
- \section1 Testing on a Symbian Device
-
- You also need to test the application on real devices. Before you can
- start testing on Symbian devices, you must connect them to the development
- PC by using a USB cable and install the necessary software on them.
-
- \list 1
-
- \o Install Qt libraries, Qt mobile libraries, Qt Quick components for
- Symbian, and a debugging agent on the device. For more information,
- see \l{Connecting Symbian Devices}.
-
- \o Start the CODA debugging agent on the device.
-
- \o Click the \gui {Target Selector} and select \gui {Symbian Device}.
-
- \o Click \gui Run to build the application for the Symbian device.
-
- \endlist
-
-*/
diff --git a/doc/src/symbian/symbiandev.qdoc b/doc/src/symbian/symbiandev.qdoc
deleted file mode 100644
index ee0c639419..0000000000
--- a/doc/src/symbian/symbiandev.qdoc
+++ /dev/null
@@ -1,310 +0,0 @@
-/****************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** 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 index.html
- \if defined(qcmanual)
- \previouspage creator-developing-maemo.html
- \else
- \previouspage sdk-gs.html
- \endif
- \page creator-developing-symbian.html
- \if defined(qcmanual)
- \nextpage creator-developing-qnx.html
- \else
- \nextpage creator-developing-meego.html
- \endif
-
- \title Connecting Symbian Devices
-
- When you install \QSDK, the build and run settings for Symbian devices
- are set up automatically in \QC. You only need to install and launch
- the \l{Using On-device Debugging Agents}{CODA on-device debugging agent}
- on the devices and connect the devices to the development PC.
-
- Make sure that \l{http://www.nokia.com/ovisuite}{Ovi Suite} or
- \l{http://www.nokia.com/pcsuite}{PC Suite} is installed on the development PC.
- Connect the device to the development PC with an USB cable in
- Ovi Suite or PC Suite Mode. This setting is in the device USB settings.
- If you have not previously used the device with Ovi Suite
- or PC Suite, all the necessary drivers are installed automatically.
- This takes approximately one minute.
-
- You can run Qt applications on Symbian devices if the software that Qt
- applications require (typically Qt, Qt Mobility, QtWebkit, and Open C) is
- installed on the device. On Symbian Anna and later devices, some version of Qt
- is pre-installed. For more information, see
- \l{http://developer.qt.nokia.com/wiki/Support_for_Symbian#4ebe3e7733f9c23c76ac25559fc814a1}
- {Device Configurations}.
-
- To deploy applications to earlier devices, you can package
- the application with Nokia Smart Installer for Symbian to automatically
- install the modules that Qt applications require. For more information about
- which Qt modules are supported on-demand for different Symbian device
- models, see
- \l{http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian}
- {Nokia Smart Installer for Symbian}.
-
- The tool chain for building applications locally on the development PC for
- the \gui {Symbian Device} target is only supported on Windows.
- If you develop on Linux or Mac OS, you must use the Remote Compiler
- interface to a compilation service at Nokia Developer. You can install
- Remote Compiler as part of the \QSDK. For more information, see
- \if defined(qcmanual)
- \l{Building with Remote Compiler}.
- \else
- \l{http://doc.qt.nokia.com/qtcreator/creator-remote-compiler.html}
- {Building with Remote Compiler}.
- \endif
-
-
- For more information about developing applications for the Symbian
- platform, select \gui {Help > Index} and look for \gui {Platform Notes},
- or see
- \l{http://doc.qt.nokia.com/4.8/platform-notes-symbian.html}
- {Platform Notes - Symbian}.
-
- \section1 Using On-device Debugging Agents
-
- To run and debug applications on Symbian devices from \QC, you must
- install the CODA on-device debugging agent on the device.
-
- Support for the App TRK on-device debugging agent has been removed from
- \QC 2.3. Only CODA is supported Qt SDK 1.1.3 onward. It offers the following
- benefits:
-
- \list
-
- \o Extensive error information
-
- \o Debugging over WLAN
-
- \o Extensive information about the device
-
- \endlist
-
- \note CODA does not support debugging over a Bluetooth connection.
-
- \section2 Installing Debugging Agents
-
- The CODA installation package is delivered together with \QSDK. You can
- find it in the \QSDK installation folder in the
- \c{\Symbian\sis\<target>\CODA} folder. On Windows, you can use \gui Start
- menu commands to install CODA on Symbian devices.
-
- \section1 Setting Up Qt Creator
-
- When you run \QC after installing the Symbian SDK and Qt for
- Symbian, the installed SDKs and their corresponding Qt versions are
- automatically detected. For each detected Symbian SDK with Qt, a special entry
- is made in the Qt version management settings in \gui{Tools} >
- \gui{Options} > \gui{Build & Run} > \gui{Qt Versions}.
-
- If you manually add a Qt version for Symbian, you must
- also manually specify the Symbian SDK to use for this version.
-
- For more information about adding Qt versions and tool chains, see
- \if defined(qcmanual)
- \l{Setting Up Qt for Symbian Versions} and \l{Adding Tool Chains}.
- \else
- \l{http://doc.qt.nokia.com/qtcreator/creator-project-qmake.html#setting-up-qt-for-symbian-versions}
- {Setting Up Qt for Symbian Versions} and
- \l{http://doc.qt.nokia.com/qtcreator/creator-tool-chains.html}
- {Adding Tool Chains}.
- \endif
-
-
- \section1 Building and Running Applications
-
- You can test your application on a device by building and running
- it from \QC for the \gui {Symbian Device} target.
-
- \list 1
-
- \o Connect the device to the development PC through a USB cable.
- The target selector displays a green check mark when a
- device is connected.
-
- \image qtcreator-qt4-symbian-device-connected.png
-
- The tool tip of the target selector shows more details about the actual
- device that will be used when you run your application.
-
- \o Start the CODA debugging agent on the device.
-
- \o Select \gui Options to select USB as connection type.
-
- \o Click \gui Projects to edit the \gui {Build Settings} for the
- \gui {Symbian Device} target. Select the Qt version to use for building
- the application. For more information, see
- \l{Selecting Qt for Symbian Versions}.
-
- \o Click the \gui Run button in \QC.
-
- \endlist
-
- \section2 Selecting Qt for Symbian Versions
-
- When you select the Qt for Symbian version to build the application with, consider
- which version provides the application with the widest support on different
- Symbian platforms. The binary compatibility promise of Qt and Symbian means
- that applications that are built against Qt 4.6.3 also run on Qt 4.7.3.
- Similarly, applications that are supported on S60 5th Edition are also
- supported
- on Symbian Anna and Belle. However, dependencies, such as Qt Quick or Qt Mobility API
- versions might restrict the choice of Qt versions that you have.
-
- If you use Qt Quick in the application, you can use \gui {S60 5th Edition
- Qt 4.7.3} to build it. The application is supported on both S60 5th Edition
- and Symbian Anna and Belle devices. However, if you only target Symbian
- Anna and Belle, you can use the state of art Qt in the \gui {Symbian Anna
- Qt 4.7.4} target to build the application. This allows you to re-use the
- application for MeeGo Harmattan devices.
-
- If you want to use the native Symbian Belle APIs and make sure that the
- application created for earlier Symbian platforms work on Belle as well,
- use \gui {Symbian Belle Qt 4.7.4} to build them. You cannot run such
- applications on Symbian Anna or earlier Symbian platforms.
-
- \note The \QSDK only contains the latest tool chains available for
- developing applications for a particular Symbian platform. The Qt 4.6.3 for
- Symbian and Qt 4.7.3 for Symbian^3 and Symbian Anna targets have been
- removed from \QSDK 1.1.4. To develop for those targets, use \QSDK 1.1.2.
-
- If you use native Symbian APIs, you must check that they are available on
- the target devices. For more information about the API differences between
- Symbian platforms, see the \bold {Symbian
- Reference Documentation for Qt}, which is delivered together with \QSDK
- and which you can view in the \gui Help mode.
-
- You can use a set of ready-made UI components called Qt Quick Components
- for Symbian that enforce a Nokia UI look and feel. \QSDK updates the Qt
- Quick Components to version 1.1 that contains usability and other
- improvements. All devices that support Qt Quick Components for Symbian
- support version 1.1.
-
- The following table summarizes the supported configurations for each Qt
- version available in \QC build settings:
-
- \table
- \header
- \o Qt Version
- \o Qt Quick
- \o Qt Quick Components
- \o Qt Mobility Version
- \o Native Symbian C++ APIs
- \o Qt OpenGL Support
- \row
- \o S60 5th Edition Qt 4.7.3 (online installer only)
- \o 1.0
- \o No
- \o 1.1.3
- \o No
- \o No
- \row
- \o Symbian Anna Qt 4.7.4
- \o 1.1
- \o 1.1
- \o 1.2
- \o Yes (Symbian Anna APIs)
- \o Yes
- \row
- \o Symbian Belle Qt 4.7.4 (online installer only)
- \o 1.1
- \o 1.1
- \o 1.2
- \o Yes (Symbian Belle APIs)
- \o Yes
- \endtable
-
- \section2 Developing Applications Using Qt 4.6.3 or Qt 4.7.3 for Symbian
-
- S60 3rd Edition devices support only Qt 4.6.3, not Qt 4.7 or later. Further,
- support for the App TRK on-device debugging agent has been removed from
- \QC 2.3. Only CODA is supported from Qt SDK 1.1.3 onward, and CODA does not
- support S60 3rd Edition. Therefore, you can no longer run and debug
- applications from \QC on S60 3rd Edition devices.
-
- The tool chains for developing applications using Qt 4.6.3 for Symbian
- and Qt 4.7.3 for Symbian^ 3 and Symbian Anna have been removed from \QSDK
- 1.1.4. To develop such applications,
- \l{http://qt.nokia.com/downloads/downloads}
- {download and use \QSDK version 1.1.2} instead. It contains Qt 4.6.3 for
- Symbian and Qt 4.7.4 for Symbian support for Symbian devices with
- the Application TRK debug agent.
-
- \note Problems may arise if you install multiple instances of Qt SDK on the
- same development PC using the same user account. Use separate user accounts
- to install them or install them on separate development PCs.
-
- \note Do not update \QSDK 1.1.2 with the \QSDK update tool, because
- the updater removes App TRK support.
-
- In general, if you use only Qt 4.6 APIs in the application, you
- can use \gui {S60 5th Edition Qt 4.6.3} to build it. The application is
- supported on both S60 5th Edition and later devices.
-
- The following table summarizes the supported configurations for each Qt
- version available in \QC build settings if you installed \QSDK 1.1.2.
-
- \table
- \header
- \o Qt Version
- \o Qt Quick
- \o Qt Quick Components
- \o Qt Mobility Version
- \o Native Symbian C++ APIs
- \o Qt OpenGL Support
- \row
- \o Qt 4.6.3 for Symbian^1 (S60 5th Edition)
- \o No
- \o No
- \o 1.0.2
- \o No
- \o No
- \row
- \o Qt 4.6.3 for Symbian^3
- \o No
- \o No
- \o 1.0.2
- \o Yes (Symbian^3 APIs)
- \o No
- \row
- \o Qt 4.7.3 for Symbian^3 and Symbian Anna
- \o 1.0
- \o 1.0
- \o 1.1.3
- \o Yes (Symbian Anna APIs)
- \o Yes
- \endtable
-
- \section1 Advanced Development with Symbian SDK
-
- For normal Qt application development, \QSDK provides all you need even if
- the application needs native Symbian OS API access.
-
- However, for more advanced Symbian application development, Nokia provides
- the \l{http://www.developer.nokia.com/carbide_cpp}{Carbide C++ IDE} and
- \l{http://www.developer.nokia.com/Resources/Tools_and_downloads/Other/Symbian_SDKs/}
- {Symbian C++ SDKs}. You can use them also for Qt application development.
- For example, these SDKs provide Symbian device emulators that are built
- mostly from the software that the actual devices are running. Therefore,
- they provide much closer emulation of the device than \QS.
-
-*/
diff --git a/doc/src/widgets/qtdesigner-app-tutorial.qdoc b/doc/src/widgets/qtdesigner-app-tutorial.qdoc
index 5923b4d6ea..0b81e01509 100644
--- a/doc/src/widgets/qtdesigner-app-tutorial.qdoc
+++ b/doc/src/widgets/qtdesigner-app-tutorial.qdoc
@@ -25,7 +25,6 @@
/*!
\contentspage index.html
- \previouspage creator-qml-components-example.html
\page creator-writing-program.html
\nextpage creator-project-managing.html
diff --git a/lib/qtcreator/qtcomponents/custom/components.pro b/lib/qtcreator/qtcomponents/custom/components.pro
index 15e7873b8d..0b08d23b92 100644
--- a/lib/qtcreator/qtcomponents/custom/components.pro
+++ b/lib/qtcreator/qtcomponents/custom/components.pro
@@ -1,11 +1,7 @@
TEMPLATE = subdirs # XXX: Avoid call the linker
TARGETPATH = Qt/labs/components/custom
-symbian {
- INSTALL_IMPORTS = /resource/qt/imports
-} else {
- INSTALL_IMPORTS = $$[QT_INSTALL_IMPORTS]
-}
+INSTALL_IMPORTS = $$[QT_INSTALL_IMPORTS]
QML_FILES = \
qmldir \
@@ -43,7 +39,3 @@ lessThan(QT_MAJOR_VERSION, 5):qmldirs.sources = $$QML_DIRS
qmldirs.path = $$INSTALL_IMPORTS/$$TARGETPATH
INSTALLS += qmlfiles qmldirs
-
-symbian {
- DEPLOYMENT += qmlfiles qmldirs
-}
diff --git a/qtcreator.qbp b/qtcreator.qbp
index 2994372c5f..e4f88980ca 100644
--- a/qtcreator.qbp
+++ b/qtcreator.qbp
@@ -22,7 +22,6 @@ Project {
"src/libs/qmljs/qmljs.qbs",
"src/libs/qmldebug/qmldebug.qbs",
"src/libs/qtcomponents/styleitem/styleitem.qbs",
- "src/libs/symbianutils/symbianutils.qbs",
"src/libs/ssh/ssh.qbs",
"src/libs/utils/process_stub.qbs",
"src/libs/utils/process_ctrlc_stub.qbs",
diff --git a/share/qtcreator/dumper/qttypes.py b/share/qtcreator/dumper/qttypes.py
index 363bce08c7..e68011950c 100644
--- a/share/qtcreator/dumper/qttypes.py
+++ b/share/qtcreator/dumper/qttypes.py
@@ -2213,39 +2213,6 @@ def qdump__boost__posix_time__time_duration(d, item):
#######################################################################
#
-# Symbian
-#
-#######################################################################
-
-def encodeSymbianString(base, size):
- s = ""
- for i in xrange(size):
- val = int(base[i])
- if val == 9:
- s += "5c007400" # \t
- else:
- s += "%02x%02x" % (val % 256, val / 256)
- return s
-
-def qdump__TBuf(d, value):
- size = value["iLength"] & 0xffff
- base = value["iBuf"]
- max = numericTemplateArgument(value.type, 0)
- check(0 <= size and size <= max)
- d.putNumChild(0)
- d.putValue(encodeSymbianString(base, size), Hex4EncodedLittleEndian)
-
-def qdump__TLitC(d, value):
- size = value["iTypeLength"] & 0xffff
- base = value["iBuf"]
- max = numericTemplateArgument(value.type, 0)
- check(0 <= size and size <= max)
- d.putNumChild(0)
- d.putValue(encodeSymbianString(base, size), Hex4EncodedLittleEndian)
-
-
-#######################################################################
-#
# SSE
#
#######################################################################
diff --git a/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri b/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri
index c23c46bab2..820267165f 100644
--- a/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri
+++ b/share/qtcreator/qml/qmljsdebugger/qmljsdebugger-lib.pri
@@ -4,20 +4,11 @@
QT += declarative script
INCLUDEPATH += $$PWD/include
-symbian {
- LIBNAME = QmlJSDebugger.lib
+windows:CONFIG(debug, debug|release) {
+ LIBNAME = QmlJSDebuggerd
} else {
- windows:CONFIG(debug, debug|release) {
- LIBNAME = QmlJSDebuggerd
- } else {
- LIBNAME = QmlJSDebugger
- }
+ LIBNAME = QmlJSDebugger
}
LIBS += -L$$PWD -l$$LIBNAME
-symbian {
- # Work around bug in gcce toolchain (QTCREATORBUG-5589)
- LIBS += -lusrt2_2.lib
-}
-
DEFINES += QMLJSDEBUGGER
diff --git a/share/qtcreator/qml/qmlobserver/qml.pri b/share/qtcreator/qml/qmlobserver/qml.pri
index 5db7678081..827a273249 100644
--- a/share/qtcreator/qml/qmlobserver/qml.pri
+++ b/share/qtcreator/qml/qmlobserver/qml.pri
@@ -19,11 +19,7 @@ SOURCES += $$PWD/qmlruntime.cpp \
RESOURCES = $$PWD/browser/browser.qrc \
$$PWD/startup/startup.qrc
-symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
- SOURCES += $$PWD/deviceorientation_symbian.cpp
- FORMS = $$PWD/recopts.ui \
- $$PWD/proxysettings.ui
-} else:maemo5 {
+maemo5 {
QT += dbus
HEADERS += $$PWD/texteditautoresizer_maemo5.h
SOURCES += $$PWD/deviceorientation_maemo5.cpp
diff --git a/share/qtcreator/templates/html5app/app.pro b/share/qtcreator/templates/html5app/app.pro
index e99033ed69..1d71206087 100644
--- a/share/qtcreator/templates/html5app/app.pro
+++ b/share/qtcreator/templates/html5app/app.pro
@@ -8,20 +8,6 @@ DEPLOYMENTFOLDERS = folder_01
# TOUCH_OPTIMIZED_NAVIGATION #
DEFINES += TOUCH_OPTIMIZED_NAVIGATION
-# TARGETUID3 #
-symbian:TARGET.UID3 = 0xE1111234
-
-# Allow network access on Symbian
-# NETWORKACCESS #
-symbian:TARGET.CAPABILITY += NetworkServices
-
-# Smart Installer package's UID
-# This UID is from the protected range and therefore the package will
-# fail to install if self-signed. By default qmake uses the unprotected
-# range value if unprotected UID is defined for the application and
-# 0x2002CCCF value if protected UID is given to the application
-#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
-
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
diff --git a/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp b/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp
index 4433669b6a..f594266c50 100644
--- a/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp
+++ b/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp
@@ -140,17 +140,6 @@ void Html5ApplicationViewer::loadUrl(const QUrl &url)
void Html5ApplicationViewer::setOrientation(ScreenOrientation orientation)
{
-#if defined(Q_OS_SYMBIAN)
- // If the version of Qt on the device is < 4.7.2, that attribute won't work
- if (orientation != ScreenOrientationAuto) {
- const QStringList v = QString::fromLatin1(qVersion()).split(QLatin1Char('.'));
- if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) {
- qWarning("Screen orientation locking only supported with Qt 4.7.2 and above");
- return;
- }
- }
-#endif // Q_OS_SYMBIAN
-
Qt::WidgetAttribute attribute;
switch (orientation) {
#if QT_VERSION < 0x040702
@@ -183,9 +172,7 @@ void Html5ApplicationViewer::setOrientation(ScreenOrientation orientation)
void Html5ApplicationViewer::showExpanded()
{
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
- showFullScreen();
-#elif defined(Q_WS_MAEMO_5)
+#if defined(Q_WS_MAEMO_5)
showMaximized();
#else
show();
diff --git a/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.h b/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.h
index 90b6fe632e..7bd8b72421 100644
--- a/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.h
+++ b/share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.h
@@ -31,7 +31,7 @@ public:
void loadFile(const QString &fileName);
void loadUrl(const QUrl &url);
- // Note that this will only have an effect on Symbian and Fremantle.
+ // Note that this will only have an effect on Fremantle.
void setOrientation(ScreenOrientation orientation);
void showExpanded();
diff --git a/share/qtcreator/templates/html5app/html5applicationviewer/touchnavigation/webtouchnavigation.cpp b/share/qtcreator/templates/html5app/html5applicationviewer/touchnavigation/webtouchnavigation.cpp
index b907203c92..e68681f571 100644
--- a/share/qtcreator/templates/html5app/html5applicationviewer/touchnavigation/webtouchnavigation.cpp
+++ b/share/qtcreator/templates/html5app/html5applicationviewer/touchnavigation/webtouchnavigation.cpp
@@ -70,7 +70,7 @@ QPoint closestElement(QObject *viewObject, QWebFrame *frame, WebTouchEvent &touc
}
// QtWebKit EditorClientQt already enables these input hints. Thus, this should only be
- // enabled if QtWebKit happens to be old. Qt::ImhNoPredictiveText is only enalbed for Symbian / Maemo on WebKit side.
+ // enabled if QtWebKit happens to be old. Qt::ImhNoPredictiveText is only enalbed for Maemo on WebKit side.
touchEvent.m_editable = true;
diff --git a/share/qtcreator/templates/mobileapp/app.pro b/share/qtcreator/templates/mobileapp/app.pro
index ecff9d5944..70795c7182 100644
--- a/share/qtcreator/templates/mobileapp/app.pro
+++ b/share/qtcreator/templates/mobileapp/app.pro
@@ -4,20 +4,6 @@
# dir1.source = mydir
DEPLOYMENTFOLDERS = # file1 dir1
-# TARGETUID3 #
-symbian:TARGET.UID3 = 0xE1111234
-
-# Smart Installer package's UID
-# This UID is from the protected range
-# and therefore the package will fail to install if self-signed
-# By default qmake uses the unprotected range value if unprotected UID is defined for the application
-# and 0x2002CCCF value if protected UID is given to the application
-#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
-
-# Allow network access on Symbian
-# NETWORKACCESS #
-symbian:TARGET.CAPABILITY += NetworkServices
-
# If your application uses the Qt Mobility libraries, uncomment
# the following lines and add the respective components to the
# MOBILITY variable.
diff --git a/share/qtcreator/templates/mobileapp/mainwindow.cpp b/share/qtcreator/templates/mobileapp/mainwindow.cpp
index 37e197f76e..238a05a8a6 100644
--- a/share/qtcreator/templates/mobileapp/mainwindow.cpp
+++ b/share/qtcreator/templates/mobileapp/mainwindow.cpp
@@ -16,17 +16,6 @@ MainWindow::~MainWindow()
void MainWindow::setOrientation(ScreenOrientation orientation)
{
-#if defined(Q_OS_SYMBIAN)
- // If the version of Qt on the device is < 4.7.2, that attribute won't work
- if (orientation != ScreenOrientationAuto) {
- const QStringList v = QString::fromLatin1(qVersion()).split(QLatin1Char('.'));
- if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) {
- qWarning("Screen orientation locking only supported with Qt 4.7.2 and above");
- return;
- }
- }
-#endif // Q_OS_SYMBIAN
-
Qt::WidgetAttribute attribute;
switch (orientation) {
#if QT_VERSION < 0x040702
@@ -59,7 +48,7 @@ void MainWindow::setOrientation(ScreenOrientation orientation)
void MainWindow::showExpanded()
{
-#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+#if defined(Q_WS_SIMULATOR)
showFullScreen();
#elif defined(Q_WS_MAEMO_5)
showMaximized();
diff --git a/share/qtcreator/templates/mobileapp/mainwindow.h b/share/qtcreator/templates/mobileapp/mainwindow.h
index 0c87ee0192..f254cc9690 100644
--- a/share/qtcreator/templates/mobileapp/mainwindow.h
+++ b/share/qtcreator/templates/mobileapp/mainwindow.h
@@ -20,7 +20,7 @@ public:
explicit MainWindow(QWidget *parent = 0);
virtual ~MainWindow();
- // Note that this will only have an effect on Symbian and Fremantle.
+ // Note that this will only have an effect on Fremantle.
void setOrientation(ScreenOrientation orientation);
void showExpanded();
diff --git a/share/qtcreator/templates/qtquickapp/app.pro b/share/qtcreator/templates/qtquickapp/app.pro
index 3aebf6ed96..9fe3c6fdcf 100644
--- a/share/qtcreator/templates/qtquickapp/app.pro
+++ b/share/qtcreator/templates/qtquickapp/app.pro
@@ -9,20 +9,6 @@ DEPLOYMENTFOLDERS = folder_01
# QML_IMPORT_PATH #
QML_IMPORT_PATH =
-# TARGETUID3 #
-symbian:TARGET.UID3 = 0xE1111234
-
-# Smart Installer package's UID
-# This UID is from the protected range and therefore the package will
-# fail to install if self-signed. By default qmake uses the unprotected
-# range value if unprotected UID is defined for the application and
-# 0x2002CCCF value if protected UID is given to the application
-#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
-
-# Allow network access on Symbian
-# NETWORKACCESS #
-symbian:TARGET.CAPABILITY += NetworkServices
-
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
@@ -32,10 +18,6 @@ symbian:TARGET.CAPABILITY += NetworkServices
# HARMATTAN_BOOSTABLE #
# CONFIG += qdeclarative-boostable
-# Add dependency to Symbian components
-# QTQUICKCOMPONENTS #
-# CONFIG += qt-components
-
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
diff --git a/share/qtcreator/templates/qtquickapp/qml/app/qtquick10/main.qml b/share/qtcreator/templates/qtquickapp/qml/app/qtquick10/main.qml
index 4e38ee8042..460a22fc2c 100644
--- a/share/qtcreator/templates/qtquickapp/qml/app/qtquick10/main.qml
+++ b/share/qtcreator/templates/qtquickapp/qml/app/qtquick10/main.qml
@@ -1,4 +1,3 @@
-// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
Rectangle {
diff --git a/share/qtcreator/templates/qtquickapp/qml/app/symbian11/MainPage.qml b/share/qtcreator/templates/qtquickapp/qml/app/symbian11/MainPage.qml
deleted file mode 100644
index 285ac34188..0000000000
--- a/share/qtcreator/templates/qtquickapp/qml/app/symbian11/MainPage.qml
+++ /dev/null
@@ -1,12 +0,0 @@
-import QtQuick 1.1
-import com.nokia.symbian 1.1
-
-Page {
- id: mainPage
- Text {
- anchors.centerIn: parent
- text: qsTr("Hello world!")
- color: platformStyle.colorNormalLight
- font.pixelSize: 20
- }
-}
diff --git a/share/qtcreator/templates/qtquickapp/qml/app/symbian11/main.qml b/share/qtcreator/templates/qtquickapp/qml/app/symbian11/main.qml
deleted file mode 100644
index 85a0994a53..0000000000
--- a/share/qtcreator/templates/qtquickapp/qml/app/symbian11/main.qml
+++ /dev/null
@@ -1,18 +0,0 @@
-import QtQuick 1.1
-import com.nokia.symbian 1.1
-
-PageStackWindow {
- id: window
- initialPage: MainPage {tools: toolBarLayout}
- showStatusBar: true
- showToolBar: true
-
- ToolBarLayout {
- id: toolBarLayout
- ToolButton {
- flat: true
- iconSource: "toolbar-back"
- onClicked: window.pageStack.depth <= 1 ? Qt.quit() : window.pageStack.pop()
- }
- }
-}
diff --git a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp
index a8a7ccb5ce..79c9fe0deb 100644
--- a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp
+++ b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp
@@ -117,17 +117,6 @@ void QmlApplicationViewer::addImportPath(const QString &path)
void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
{
#if QT_VERSION < 0x050000
-#if defined(Q_OS_SYMBIAN)
- // If the version of Qt on the device is < 4.7.2, that attribute won't work
- if (orientation != ScreenOrientationAuto) {
- const QStringList v = QString::fromLatin1(qVersion()).split(QLatin1Char('.'));
- if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) {
- qWarning("Screen orientation locking only supported with Qt 4.7.2 and above");
- return;
- }
- }
-#endif // Q_OS_SYMBIAN
-
Qt::WidgetAttribute attribute;
switch (orientation) {
#if QT_VERSION < 0x040702
@@ -163,7 +152,7 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
void QmlApplicationViewer::showExpanded()
{
-#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR)
+#if defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR)
showFullScreen();
#elif defined(Q_WS_MAEMO_5)
showMaximized();
diff --git a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.h b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.h
index a2accf0b34..183ff8bea6 100644
--- a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.h
+++ b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.h
@@ -31,7 +31,7 @@ public:
void setMainQmlFile(const QString &file);
void addImportPath(const QString &path);
- // Note that this will only have an effect on Symbian and Fremantle.
+ // Note that this will only have an effect on Fremantle.
void setOrientation(ScreenOrientation orientation);
void showExpanded();
diff --git a/share/qtcreator/templates/shared/deployment.pri b/share/qtcreator/templates/shared/deployment.pri
index 140e0605e5..fae66e07c0 100644
--- a/share/qtcreator/templates/shared/deployment.pri
+++ b/share/qtcreator/templates/shared/deployment.pri
@@ -1,5 +1,5 @@
# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Symbian and Maemo, aswell as copying
+# The code below handles deployment to Android and Maemo, aswell as copying
# of the application data to shadow build directories on desktop.
# It is recommended not to modify this file, since newer versions of Qt Creator
# may offer an updated version of it.
@@ -22,10 +22,7 @@ for(deploymentfolder, DEPLOYMENTFOLDERS) {
MAINPROFILEPWD = $$PWD
-symbian {
- isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg
- isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
-} else:android {
+android {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemfiles = $${item}.files
diff --git a/share/qtcreator/templates/shared/symbianicon.svg b/share/qtcreator/templates/shared/symbianicon.svg
deleted file mode 100644
index 566acfada0..0000000000
--- a/share/qtcreator/templates/shared/symbianicon.svg
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="44px"
- version="1.1"
- viewBox="0 0 44 44"
- width="44px"
- x="0px"
- y="0px"
- id="svg2"
- inkscape:version="0.47 r22583"
- sodipodi:docname="qt.svg">
- <metadata
- id="metadata18">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs16">
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 22 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="44 : 22 : 1"
- inkscape:persp3d-origin="22 : 14.666667 : 1"
- id="perspective2836" />
- </defs>
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1920"
- inkscape:window-height="1020"
- id="namedview14"
- showgrid="false"
- inkscape:zoom="21.454545"
- inkscape:cx="49.412871"
- inkscape:cy="21.894358"
- inkscape:window-x="-4"
- inkscape:window-y="-4"
- inkscape:window-maximized="1"
- inkscape:current-layer="g3" />
- <g
- transform="matrix(0.18308778,0,0,0.18308778,6.6100946,3.2385199)"
- id="g3">
- <path
- d="M 43.09,0.3586 C 40.94,0.0036 38.84,-0.0824 36.81,0.0776 31.968136,0.39505671 27.122677,0.73638425 22.28,1.0696 9.62,2.0816 0,12.4996 0,26.8896 l 0,169.7 14.19,13.2 28.87,-209.42 0.03,-0.011 z"
- style="fill:#006225"
- id="path5"
- sodipodi:nodetypes="cccccccc" />
- <path
- d="m 174.4,160 c 0,12.5 -7.75,24.07 -17.57,25.77 L 14.23,209.73 V 25.93 C 14.23,9.21 27.57,-2.27 43.12,0.3 l 131.3,21.52 v 138.2 z"
- style="fill:#80c342"
- id="path7" />
- <path
- d="m 154.9,80.96 -12.96,-0.598 0,0.278 6.945,0.32 6.016,0 z"
- style="fill:#006225"
- id="path11" />
- <path
- d="m 144.6,135.6 c 0.66,0.328 1.43,0.476 2.351,0.476 0.161,0 0.329,-0.004 0.497,-0.016 2.55,-0.148 5.32,-0.933 8.343,-2.308 h -6.015 c -1.821,0.832 -3.532,1.457 -5.176,1.848 z"
- style="fill:#006225"
- id="path13" />
- <path
- id="path17"
- style="fill:#ffffff"
- d="m 91.15,132.4 c 2.351,-6.051 3.511,-17.91 3.511,-35.62 0,-15.89 -1.148,-26.82 -3.484,-32.81 -2.336,-6.027 -5.832,-9.281 -10.52,-9.691 -0.359,-0.031 -0.714,-0.051 -1.058,-0.051 -4.34,0 -7.68,2.535 -10.01,7.625 -2.52,5.543 -3.793,17.04 -3.793,34.44 0,16.82 1.238,28.75 3.734,35.75 2.356,6.672 5.879,9.976 10.5,9.976 0.207,0 0.41,-0.008 0.621,-0.019 4.633,-0.293 8.121,-3.496 10.49,-9.602 m 17.98,3.75 c -4.117,9.707 -10.39,16.06 -18.99,19 0.867,4.449 2.176,7.441 3.922,9.019 1.351,1.211 3.433,1.821 6.222,1.821 0.805,0 1.668,-0.055 2.59,-0.157 v 13.12 l -5.961,0.782 c -1.758,0.23 -3.426,0.343 -5.004,0.343 -5.218,0 -9.445,-1.265 -12.62,-3.824 -4.207,-3.379 -7.308,-9.894 -9.297,-19.54 -9.136,-1.945 -16.26,-7.754 -21.19,-17.5 -5.004,-9.902 -7.551,-24.39 -7.551,-43.34 0,-20.43 3.484,-35.51 10.34,-45.07 5.789,-8.07 13.86,-12.04 24.02,-12.04 1.629,0 3.309,0.102 5.043,0.305 11.95,1.375 20.62,7.016 26.26,16.79 5.535,9.562 8.254,23.27 8.254,41.26 0,16.48 -2,29.45 -6.043,39.02 z M 130.4,45.91 l 11.52,1.238 0,20.21 12.96,0.914 0,12.68 -12.96,-0.598 0,46.33 c 0,4.032 0.445,6.625 1.34,7.789 0.8,1.067 2.046,1.594 3.71,1.594 0.161,0 0.329,-0.004 0.497,-0.016 2.55,-0.148 5.32,-0.933 8.343,-2.308 v 11.65 c -5.136,2.258 -10.18,3.598 -15.12,4.02 -0.718,0.055 -1.41,0.086 -2.078,0.086 -4.48,0 -7.906,-1.301 -10.25,-3.934 -2.73,-3.051 -4.09,-7.949 -4.09,-14.67 V 79.535 L 118.046,79.25 V 65.66 l 7.586,0.547 4.773,-20.3 z" />
- <path
- d="m 100.3,166 c 0.809,0 1.672,-0.055 2.59,-0.157 H 98.054 C 98.73,165.949 99.507,166 100.3,166 z"
- style="fill:#006225"
- id="path19" />
- <path
- id="path21"
- style="fill:#006225"
- d="m 84.85,63.98 c 2.336,5.997 3.484,16.92 3.484,32.81 0,17.7 -1.16,29.57 -3.512,35.62 -1.894,4.879 -4.527,7.902 -7.863,9.07 0.965,0.368 1.992,0.551 3.078,0.551 0.207,0 0.41,-0.008 0.621,-0.019 4.633,-0.293 8.121,-3.496 10.49,-9.602 2.351,-6.051 3.511,-17.91 3.511,-35.62 0,-15.89 -1.148,-26.82 -3.484,-32.81 -2.336,-6.027 -5.832,-9.281 -10.52,-9.691 -0.359,-0.031 -0.714,-0.051 -1.058,-0.051 -1.09,0 -2.117,0.16 -3.082,0.481 h -0.004 c 3.601,1.121 6.379,4.215 8.336,9.261 z m -2.344,114.3 c -0.113,-0.05 -0.227,-0.105 -0.336,-0.16 -0.012,-0.004 -0.023,-0.012 -0.035,-0.015 -0.102,-0.051 -0.207,-0.106 -0.309,-0.157 -0.019,-0.011 -0.039,-0.019 -0.058,-0.031 -0.09,-0.051 -0.184,-0.098 -0.278,-0.148 -0.027,-0.016 -0.054,-0.036 -0.086,-0.051 -0.082,-0.043 -0.164,-0.09 -0.242,-0.137 -0.039,-0.023 -0.078,-0.047 -0.113,-0.07 -0.07,-0.039 -0.145,-0.082 -0.215,-0.125 -0.047,-0.031 -0.094,-0.059 -0.14,-0.09 -0.059,-0.039 -0.118,-0.074 -0.176,-0.113 -0.059,-0.039 -0.114,-0.075 -0.168,-0.114 -0.051,-0.031 -0.102,-0.066 -0.149,-0.097 -0.066,-0.047 -0.132,-0.094 -0.195,-0.137 -0.039,-0.027 -0.078,-0.055 -0.113,-0.082 -0.078,-0.055 -0.153,-0.113 -0.231,-0.172 -0.023,-0.016 -0.05,-0.035 -0.078,-0.055 -0.098,-0.078 -0.199,-0.156 -0.297,-0.234 -4.207,-3.379 -7.308,-9.894 -9.297,-19.54 -9.136,-1.945 -16.26,-7.754 -21.19,-17.5 -5.004,-9.902 -7.551,-24.39 -7.551,-43.34 0,-20.43 3.484,-35.51 10.34,-45.07 5.789,-8.07 13.86,-12.04 24.02,-12.04 h -6.351 c -10.15,0.008 -18.22,3.977 -24,12.04 -6.855,9.563 -10.34,24.64 -10.34,45.07 0,18.95 2.547,33.44 7.551,43.34 4.934,9.75 12.05,15.56 21.19,17.5 1.989,9.641 5.09,16.16 9.297,19.54 3.176,2.559 7.403,3.824 12.62,3.824 0.098,0 0.199,0 0.297,-0.004 h 5.539 c -3.406,-0.05 -6.383,-0.66 -8.906,-1.828 L 82.498,178.28 z M 128.4,145.6 c -2.73,-3.051 -4.09,-7.949 -4.09,-14.67 V 79.57 l -6.226,-0.285 v -13.59 h -6.016 v 3.035 c 0.871,3.273 1.555,6.82 2.063,10.64 l 4.164,0.192 v 51.36 c 0,6.723 1.367,11.62 4.09,14.67 2.343,2.633 5.765,3.934 10.25,3.934 h 6.015 c -4.48,0 -7.906,-1.301 -10.25,-3.934 z m 2.043,-99.66 -6.016,0 -4.668,19.88 5.911,0.422 4.773,-20.3 z" />
- </g>
-</svg>
diff --git a/share/qtcreator/templates/wizards/qml-extension/project.pro b/share/qtcreator/templates/wizards/qml-extension/project.pro
index e7d60f3676..bf028c6a28 100644
--- a/share/qtcreator/templates/wizards/qml-extension/project.pro
+++ b/share/qtcreator/templates/wizards/qml-extension/project.pro
@@ -26,9 +26,7 @@ OTHER_FILES = qmldir
}
qmldir.files = qmldir
-symbian {
- TARGET.EPOCALLOWDLLDATA = 1
-} else:unix {
+unix {
maemo5 | !isEmpty(MEEGO_VERSION_MAJOR) {
installPath = /usr/lib/qt4/imports/$$replace(uri, \\., /)
} else {
diff --git a/share/share.qbs b/share/share.qbs
index f966cf2665..a7f811b174 100644
--- a/share/share.qbs
+++ b/share/share.qbs
@@ -226,7 +226,6 @@ Product {
"deviceorientation.h",
"deviceorientation_harmattan.cpp",
"deviceorientation_maemo5.cpp",
- "deviceorientation_symbian.cpp",
"loggerwidget.cpp",
"loggerwidget.h",
"main.cpp",
@@ -919,16 +918,6 @@ Product {
}
Group {
- qbs.installDir: "share/qtcreator/templates/qtquickapp/qml/app/symbian11"
- fileTags: ["install"]
- prefix: "qtcreator/templates/qtquickapp/qml/app/symbian11/"
- files: [
- "MainPage.qml",
- "main.qml",
- ]
- }
-
- Group {
qbs.installDir: "share/qtcreator/templates/qtquickapp/qmlapplicationviewer"
fileTags: ["install"]
prefix: "qtcreator/templates/qtquickapp/qmlapplicationviewer/"
@@ -949,7 +938,6 @@ Product {
"icon64.png",
"icon80.png",
"manifest.aegis",
- "symbianicon.svg",
]
}
diff --git a/src/libs/3rdparty/cplusplus/Control.cpp b/src/libs/3rdparty/cplusplus/Control.cpp
index 6864b8aaa4..96e744a6b2 100644
--- a/src/libs/3rdparty/cplusplus/Control.cpp
+++ b/src/libs/3rdparty/cplusplus/Control.cpp
@@ -173,16 +173,6 @@ public:
} // end of anonymous namespace
-#ifdef Q_OS_SYMBIAN
-//Symbian compiler has some difficulties to understand the templates.
-static void delete_array_entries(std::vector<Symbol *> vt)
-{
- std::vector<Symbol *>::iterator it;
- for (it = vt.begin(); it != vt.end(); ++it) {
- delete *it;
- }
-}
-#else
template <typename _Iterator>
static void delete_array_entries(_Iterator first, _Iterator last)
{
@@ -193,7 +183,6 @@ static void delete_array_entries(_Iterator first, _Iterator last)
template <typename _Array>
static void delete_array_entries(const _Array &a)
{ delete_array_entries(a.begin(), a.end()); }
-#endif
class Control::Data
{
diff --git a/src/libs/libs.pro b/src/libs/libs.pro
index b8a7e4e742..5eaf471585 100644
--- a/src/libs/libs.pro
+++ b/src/libs/libs.pro
@@ -9,7 +9,6 @@ SUBDIRS = \
utils \
utils/process_stub.pro \
languageutils \
- symbianutils \
cplusplus \
qmljs \
qmldebug \
diff --git a/src/libs/qmldebug/qmldebug.pri b/src/libs/qmldebug/qmldebug.pri
index d953e5e4c7..c2b270a356 100644
--- a/src/libs/qmldebug/qmldebug.pri
+++ b/src/libs/qmldebug/qmldebug.pri
@@ -1,3 +1 @@
-include(../symbianutils/symbianutils.pri)
-
LIBS *= -l$$qtLibraryName(QmlDebug)
diff --git a/src/libs/qmldebug/qmldebug.pro b/src/libs/qmldebug/qmldebug.pro
index 5356482713..26a1a40856 100644
--- a/src/libs/qmldebug/qmldebug.pro
+++ b/src/libs/qmldebug/qmldebug.pro
@@ -3,7 +3,6 @@ TARGET = QmlDebug
QT += network
include(../../qtcreatorlibrary.pri)
-include(../symbianutils/symbianutils.pri)
include(qmldebug-lib.pri)
OTHER_FILES += \
diff --git a/src/libs/qmldebug/qmldebug.qbs b/src/libs/qmldebug/qmldebug.qbs
index d3ee4bfa5e..45fb5ecfa9 100644
--- a/src/libs/qmldebug/qmldebug.qbs
+++ b/src/libs/qmldebug/qmldebug.qbs
@@ -14,7 +14,6 @@ QtcLibrary {
Depends { name: "cpp" }
Depends { name: "Qt"; submodules: ["gui", "network"] }
- Depends { name: "symbianutils" }
files: [
"baseenginedebugclient.cpp",
@@ -48,7 +47,6 @@ QtcLibrary {
ProductModule {
Depends { name: "cpp" }
- Depends { name: "symbianutils" }
cpp.includePaths: ["."]
}
}
diff --git a/src/libs/qmldebug/qmldebugclient.cpp b/src/libs/qmldebug/qmldebugclient.cpp
index bbe0fd9777..7f168eb8fa 100644
--- a/src/libs/qmldebug/qmldebugclient.cpp
+++ b/src/libs/qmldebug/qmldebugclient.cpp
@@ -34,7 +34,6 @@
#include <qdebug.h>
#include <qstringlist.h>
#include <qnetworkproxy.h>
-#include <symbiandevicemanager.h>
namespace QmlDebug {
@@ -60,7 +59,7 @@ public:
QmlDebugConnectionPrivate(QmlDebugConnection *c);
QmlDebugConnection *q;
QPacketProtocol *protocol;
- QIODevice *device; // Currently either a QTcpSocket or a SymbianUtils::OstChannel
+ QIODevice *device; // Currently a QTcpSocket
bool gotHello;
QHash <QString, float> serverPlugins;
@@ -295,18 +294,6 @@ QAbstractSocket::SocketState QmlDebugConnection::state() const
if (socket)
return socket->state();
- SymbianUtils::OstChannel *ost = qobject_cast<SymbianUtils::OstChannel*>(d->device);
- if (ost) {
- //TODO we need some handshaking here
- /*
- if (ost->hasReceivedData())
- return QAbstractSocket::ConnectedState;
- else if (ost->isOpen())
- return QAbstractSocket::ConnectingState;
- */
- if (ost->isOpen()) return QAbstractSocket::ConnectedState;
- }
-
return QAbstractSocket::UnconnectedState;
}
@@ -317,12 +304,6 @@ void QmlDebugConnection::flush()
socket->flush();
return;
}
-
- SymbianUtils::OstChannel *ost = qobject_cast<SymbianUtils::OstChannel*>(d->device);
- if (ost) {
- ost->flush();
- return;
- }
}
void QmlDebugConnection::connectToHost(const QString &hostName, quint16 port)
@@ -339,22 +320,6 @@ void QmlDebugConnection::connectToHost(const QString &hostName, quint16 port)
QIODevice::open(ReadWrite | Unbuffered);
}
-void QmlDebugConnection::connectToOst(const QString &port)
-{
- SymbianUtils::OstChannel *ost = SymbianUtils::SymbianDeviceManager::instance()->getOstChannel(port, KQmlOstProtocolId);
- if (ost) {
- ost->setParent(d);
- d->device = ost;
- d->connectDeviceSignals();
- d->gotHello = false;
- QIODevice::open(ReadWrite | Unbuffered);
- emit stateChanged(QAbstractSocket::ConnectedState);
- emit connected();
- } else {
- emit error(QAbstractSocket::HostNotFoundError);
- }
-}
-
void QmlDebugConnectionPrivate::connectDeviceSignals()
{
connect(device, SIGNAL(bytesWritten(qint64)), q, SIGNAL(bytesWritten(qint64)));
diff --git a/src/libs/qmldebug/qmldebugclient.h b/src/libs/qmldebug/qmldebugclient.h
index 156b53394f..743dbba3bf 100644
--- a/src/libs/qmldebug/qmldebugclient.h
+++ b/src/libs/qmldebug/qmldebugclient.h
@@ -45,7 +45,6 @@ public:
~QmlDebugConnection();
void connectToHost(const QString &hostName, quint16 port);
- void connectToOst(const QString &port);
qint64 bytesAvailable() const;
bool isConnected() const;
diff --git a/src/libs/qtcomponents/styleitem/qdeclarativefolderlistmodel.cpp b/src/libs/qtcomponents/styleitem/qdeclarativefolderlistmodel.cpp
index 494e06d1c3..58908f699d 100644
--- a/src/libs/qtcomponents/styleitem/qdeclarativefolderlistmodel.cpp
+++ b/src/libs/qtcomponents/styleitem/qdeclarativefolderlistmodel.cpp
@@ -233,12 +233,7 @@ QUrl QDeclarativeFolderListModel::parentFolder() const
QString localFile = d->folder.toLocalFile();
if (!localFile.isEmpty()) {
QDir dir(localFile);
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WIN)
- if (dir.isRoot())
- dir.setPath("");
- else
-#endif
- dir.cdUp();
+ dir.cdUp();
localFile = dir.path();
} else {
int pos = d->folder.path().lastIndexOf(QLatin1Char('/'));
diff --git a/src/libs/symbianutils/symbianutils.pri b/src/libs/symbianutils/symbianutils.pri
deleted file mode 100644
index e6b59799fd..0000000000
--- a/src/libs/symbianutils/symbianutils.pri
+++ /dev/null
@@ -1,2 +0,0 @@
-INCLUDEPATH *= $$PWD/../../shared/symbianutils $$PWD/../../shared/json
-LIBS *= -l$$qtLibraryName(symbianutils)
diff --git a/src/libs/symbianutils/symbianutils.pro b/src/libs/symbianutils/symbianutils.pro
deleted file mode 100644
index a9ab5d5c0f..0000000000
--- a/src/libs/symbianutils/symbianutils.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TEMPLATE = lib
-TARGET = symbianutils
-DEFINES += SYMBIANUTILS_BUILD_LIB JSON_BUILD_LIB
-include(../../qtcreatorlibrary.pri)
-include(../../shared/symbianutils/symbianutils.pri)
diff --git a/src/libs/symbianutils/symbianutils.qbs b/src/libs/symbianutils/symbianutils.qbs
deleted file mode 100644
index be98849bd8..0000000000
--- a/src/libs/symbianutils/symbianutils.qbs
+++ /dev/null
@@ -1,69 +0,0 @@
-import qbs.base 1.0
-import "../QtcLibrary.qbs" as QtcLibrary
-
-QtcLibrary {
- name: "symbianutils"
-
- cpp.includePaths: [
- ".",
- "..",
- "../../shared/symbianutils",
- "../../shared/json"
- ]
- cpp.defines: [
- "SYMBIANUTILS_BUILD_LIB",
- "JSON_BUILD_LIB",
- "JSON_INCLUDE_PRI",
- "JSON_BUILD_LIB",
- "HAS_SERIALPORT"
- ]
- cpp.optimization: "fast"
-
- Depends { name: "cpp" }
- Depends { name: "Qt.network" }
- Depends { name: "Utils" }
-
- Group {
- condition: qbs.targetOS == "linux" || qbs.targetOS == "mac"
- files: [
- "../../shared/symbianutils/virtualserialdevice_posix.cpp"
- ]
- }
-
- Group {
- condition: qbs.targetOS == "windows"
- files: [
- "../../shared/symbianutils/virtualserialdevice_win.cpp"
- ]
- }
-
- files: [
- "../../shared/symbianutils/callback.h",
- "../../shared/symbianutils/codadevice.cpp",
- "../../shared/symbianutils/codadevice.h",
- "../../shared/symbianutils/codamessage.cpp",
- "../../shared/symbianutils/codamessage.h",
- "../../shared/symbianutils/codautils.cpp",
- "../../shared/symbianutils/codautils.h",
- "../../shared/symbianutils/codautils_p.h",
- "../../shared/symbianutils/symbiandevicemanager.cpp",
- "../../shared/symbianutils/symbiandevicemanager.h",
- "../../shared/symbianutils/symbianutils_global.h",
- "../../shared/symbianutils/virtualserialdevice.cpp",
- "../../shared/symbianutils/virtualserialdevice.h",
- "../../shared/json/json_global.h",
- "../../shared/json/json.h",
- "../../shared/json/json.cpp"
- ]
-
- ProductModule {
- Depends { name: "cpp" }
- cpp.includePaths: [
- "../../shared/symbianutils",
- "../../shared/json",
- "."
- ]
- cpp.defines: "JSON_INCLUDE_PRI"
- }
-}
-
diff --git a/src/libs/utils/fileinprojectfinder.cpp b/src/libs/utils/fileinprojectfinder.cpp
index 7e69936542..703f5e7466 100644
--- a/src/libs/utils/fileinprojectfinder.cpp
+++ b/src/libs/utils/fileinprojectfinder.cpp
@@ -50,7 +50,6 @@ namespace Utils {
E.g. following file paths:
\list
\i C:/app-build-desktop/qml/app/main.qml (shadow build directory)
- \i C:/Private/e3026d63/qml/app/main.qml (Application data folder on Symbian device)
\i /Users/x/app-build-desktop/App.app/Contents/Resources/qml/App/main.qml (folder on Mac OS X)
\endlist
diff --git a/src/plugins/debugger/README b/src/plugins/debugger/README
index a3e17e0840..fb11f55a3a 100644
--- a/src/plugins/debugger/README
+++ b/src/plugins/debugger/README
@@ -7,8 +7,8 @@ DebuggerManager who is responsible for "doing the work".
The DebuggerManager creates all DebuggerEngines, and has zero or one
"current" Engine. Engines represent an interface to a "native" debugger.
-Right now there are engines for gdb (used for C++ on Linux, Mac, Windows/MinGW,
-Maemo and Symbian), for cdb (used for C++ on Windows/MSVC) and "script" (used
+Right now there are engines for gdb (used for C++ on Linux, Mac, Windows/MinGW
+and Maemo), for cdb (used for C++ on Windows/MSVC) and "script" (used
for JavaScript on all platforms).
The GdbEngine has different "Adapters" to cope with the variety of environments
@@ -28,13 +28,9 @@ for JavaScript on all platforms).
RemoteGdbAdapter is used to talk to gdbserver running on Linux.
- TrkGdbAdapter is used to talk to Symbian devices using the gdb protocol and
- the gdb serial protocol between gdb and the Adapter and the TRK protocol
- between the adapter and AppTRK running on the device.
-
Gdb comes in main two flavours: with or without Python. The Python version
is preferred, but it is not available on Mac and on older versions of Linux.
- On Windows, Symbian and Maemo we only support the Python version.
+ On Windows and Maemo we only support the Python version.
The non-Python versions use the compiled version of the debugging helpers,
that needs to be enabled in the Qt4 Versions dialog, the Python version use
@@ -50,24 +46,24 @@ for JavaScript on all platforms).
Per platform the situation for C++ debugging looks like:
[Helper loading strategy: /i - injected, /p - preload, /- not available]
- Symbian Maemo Linux Mac Windows
- MinGW MSVC
+ Maemo Linux Mac Windows
+ MinGW MSVC
-Engine: gdb gdb gdb gdb gdb cdb
+Engine: gdb gdb gdb gdb cdb
-Python: yes yes yes no no no (not/appl)
+Python: yes yes no no no (not/appl)
-Adapters: trk remote term term/i term/i term term/i
- plain plain/p plain/i plain plain/i
- attach attach/i attach/i attach attach/i
- remote attach/- remote/- remote
+Adapters: remote term term/i term/i term term/i
+ plain plain/p plain/i plain plain/i
+ attach attach/i attach/i attach attach/i
+ remote attach/- remote/- remote
Minimum
-supported FSF FSF FSF FSF Apple FSF -
-version: 7.1 7.1 7.1 6.8 1344 7.2
- (no python)
+supported FSF FSF FSF Apple FSF -
+version: 7.1 7.1 6.8 1344 7.2
+ (no python)
-Version FSF FSF FSF (XCode) FSF -
-in SDK: 7.2 7.1 7.2 7.2
- (no python)
+Version FSF FSF (XCode) FSF -
+in SDK: 7.1 7.2 7.2
+ (no python)
diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs
index 576a0e0df7..b0d9094436 100644
--- a/src/plugins/debugger/debugger.qbs
+++ b/src/plugins/debugger/debugger.qbs
@@ -13,7 +13,6 @@ QtcPlugin {
Depends { name: "ProjectExplorer" }
Depends { name: "TextEditor" }
Depends { name: "CPlusPlus" }
- Depends { name: "symbianutils" }
Depends { name: "QmlJS" }
Depends { name: "QmlDebug" }
Depends { name: "QtcSsh" }
@@ -163,8 +162,6 @@ QtcPlugin {
"gdb/abstractplaingdbadapter.cpp",
"gdb/abstractplaingdbadapter.h",
"gdb/attachgdbadapter.h",
- "gdb/codagdbadapter.cpp",
- "gdb/codagdbadapter.h",
"gdb/coregdbadapter.cpp",
"gdb/coregdbadapter.h",
"gdb/gdbengine.cpp",
@@ -182,8 +179,6 @@ QtcPlugin {
"gdb/remotegdbserveradapter.h",
"gdb/remoteplaingdbadapter.cpp",
"gdb/remoteplaingdbadapter.h",
- "gdb/symbian.cpp",
- "gdb/symbian.h",
"gdb/termgdbadapter.h",
"gdb/attachgdbadapter.cpp",
"gdb/classicgdbengine.cpp",
diff --git a/src/plugins/debugger/debugger_dependencies.pri b/src/plugins/debugger/debugger_dependencies.pri
index d6cb167106..732954b727 100644
--- a/src/plugins/debugger/debugger_dependencies.pri
+++ b/src/plugins/debugger/debugger_dependencies.pri
@@ -5,6 +5,5 @@ include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/texteditor/texteditor.pri)
include(../../libs/cplusplus/cplusplus.pri)
include(../../libs/utils/utils.pri)
-include(../../libs/symbianutils/symbianutils.pri)
include(../../libs/qmljs/qmljs.pri)
include(../../libs/ssh/ssh.pri)
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 21390100d1..8000bda8da 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -179,8 +179,8 @@
\brief Base class of a debugger engine.
Note: the Debugger process itself and any helper processes like
- gdbserver, the CODA client etc are referred to as 'Engine',
- whereas the debugged process is referred to as 'Inferior'.
+ gdbserver are referred to as 'Engine', whereas the debugged process
+ is referred to as 'Inferior'.
Transitions marked by '---' are done in the individual engines.
Transitions marked by '+-+' are done in the base DebuggerEngine.
@@ -2465,12 +2465,6 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
if (!sp.workingDirectory.isEmpty())
str << "Directory: " << QDir::toNativeSeparators(sp.workingDirectory)
<< '\n';
- if (sp.executableUid) {
- str << "UID: 0x";
- str.setIntegerBase(16);
- str << sp.executableUid << '\n';
- str.setIntegerBase(10);
- }
}
QString cmd = sp.debuggerCommand;
if (!cmd.isEmpty())
diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h
index 457e0bf272..74c7e2d559 100644
--- a/src/plugins/debugger/debuggerstartparameters.h
+++ b/src/plugins/debugger/debuggerstartparameters.h
@@ -71,9 +71,6 @@ public:
remoteSetupNeeded(false),
startMode(NoStartMode),
closeMode(KillAtClose),
- executableUid(0),
- communicationChannel(CommunicationChannelTcpIp),
- serverPort(0),
testReceiver(0),
testCallback(0),
testCase(0)
@@ -132,12 +129,6 @@ public:
DebuggerStartMode startMode;
DebuggerCloseMode closeMode;
- // For Symbian debugging.
- quint32 executableUid;
- CommunicationChannel communicationChannel;
- QString serverAddress;
- quint16 serverPort;
-
// For QNX debugging
QString remoteExecutable;
diff --git a/src/plugins/debugger/gdb/classicgdbengine.cpp b/src/plugins/debugger/gdb/classicgdbengine.cpp
index b775b6e815..bc227242aa 100644
--- a/src/plugins/debugger/gdb/classicgdbengine.cpp
+++ b/src/plugins/debugger/gdb/classicgdbengine.cpp
@@ -1118,8 +1118,8 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
m_debuggingHelperState = DebuggingHelperLoadTried;
// Do not use STRINGIFY for RTLD_NOW as we really want to expand that to a number.
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
- // We are using Python on Windows and Symbian.
+#if defined(Q_OS_WIN)
+ // We are using Python on Windows.
QTC_CHECK(false);
#elif defined(Q_OS_MAC)
QByteArray dlopenLib = startParameters().dumperLibrary.toLocal8Bit();
diff --git a/src/plugins/debugger/gdb/codagdbadapter.cpp b/src/plugins/debugger/gdb/codagdbadapter.cpp
deleted file mode 100644
index 47d479a24a..0000000000
--- a/src/plugins/debugger/gdb/codagdbadapter.cpp
+++ /dev/null
@@ -1,1652 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "codagdbadapter.h"
-
-#include "debuggerstartparameters.h"
-#include "codadevice.h"
-#include "codautils.h"
-#include "gdbmi.h"
-#include "hostutils.h"
-
-#include "symbiandevicemanager.h"
-
-#include "registerhandler.h"
-#include "threadshandler.h"
-#include "debuggercore.h"
-#include "debuggeractions.h"
-#include "debuggerstringutils.h"
-#include "watchutils.h"
-#ifndef STANDALONE_RUNNER
-#include "gdbengine.h"
-#endif
-
-#include <utils/qtcassert.h>
-#include <utils/savedaction.h>
-#include <utils/qtcprocess.h>
-
-#include <QTimer>
-#include <QDir>
-#include <QTcpServer>
-#include <QTcpSocket>
-
-#ifndef Q_OS_WIN
-# include <sys/types.h>
-# include <unistd.h>
-#endif
-
-#define CB(callback) \
- static_cast<GdbEngine::GdbCommandCallback>(&GdbCodaEngine::callback), \
- STRINGIFY(callback)
-
-enum { debug = 0 };
-
-/* Libraries we want to be notified about (pending introduction of a 'notify all'
- * setting in CODA, Bug #11842 */
-static const char *librariesC[] = {
-"pipelib.ldd", "rpipe.dll", "libc.dll",
-"libdl.dll", "libm.dll", "libpthread.dll",
-"libssl.dll", "libz.dll", "libzcore.dll", "libstdcpp.dll",
-"sqlite3.dll", "phonon_mmf.dll", "QtCore.dll", "QtXml.dll", "QtGui.dll",
-"QtNetwork.dll", "QtTest.dll", "QtSql.dll", "QtSvg.dll", "phonon.dll",
-"QtScript.dll", "QtXmlPatterns.dll", "QtMultimedia.dll", "qjpeg.dll",
-"qgif.dll", "qmng.dll", "qtiff.dll", "qico.dll", "qsvg.dll",
-"qcncodecs.dll", "qjpcodecs.dll","qtwcodecs.dll", "qkrcodecs.dll", "qsvgicon.dll",
-"qts60plugin_5_0.dll", "QtWebKit.dll"};
-
-namespace Debugger {
-namespace Internal {
-
-using namespace Symbian;
-using namespace Coda;
-
-static inline QString startMsg(const Coda::Session &session)
-{
- return GdbCodaEngine::tr("Process started, PID: 0x%1, thread id: 0x%2, "
- "code segment: 0x%3, data segment: 0x%4.")
- .arg(session.pid, 0, 16).arg(session.tid, 0, 16)
- .arg(session.codeseg, 0, 16).arg(session.dataseg, 0, 16);
-}
-
-/* -------------- CodaGdbAdapter:
- * Startup-sequence:
- * - startAdapter connects both sockets/devices
- * - In the CODA Locator Event, gdb is started and the engine is notified
- * that the adapter has started.
- * - Engine calls setupInferior(), which starts the process.
- * - Initial CODA module load suspended event is emitted (process is suspended).
- * In the event handler, gdb is connected to the remote target. In the
- * gdb answer to conntect remote, inferiorStartPrepared() is emitted.
- * - Engine sets up breakpoints,etc and calls inferiorStartPhase2(), which
- * resumes the suspended CODA process via gdb 'continue'.
- * Thread handling (30.06.2010):
- * CODA does not report thread creation/termination. So, if we receive
- * a stop in a different thread, we store an additional thread in snapshot.
- * When continuing in sendContinue(), we delete this thread, since we cannot
- * know whether it will exist at the next stop.
- * Also note that threads continue running in Symbian even if one crashes.
- * TODO: - Maybe thread reporting will be improved in CODA?
- * - Stop all threads once one stops?
- * - Breakpoints do not trigger in threads other than the main thread. */
-
-GdbCodaEngine:: GdbCodaEngine(const DebuggerStartParameters &startParameters)
- : GdbEngine(startParameters),
- m_running(false),
- m_stopReason(0),
- m_gdbAckMode(true),
- m_uid(0),
- m_verbose(0),
- m_firstResumableExeLoadedEvent(false),
- m_registerRequestPending(false),
- m_firstHelloEvent(true)
-{
- m_bufferedMemoryRead = true;
- // Disable buffering if gdb's dcache is used.
- m_bufferedMemoryRead = false;
-
- m_gdbServer = 0;
- m_gdbConnection = 0;
- m_snapshot.reset();
-#ifdef Q_OS_WIN
- const unsigned long portOffset = winGetCurrentProcessId() % 100;
-#else
- const uid_t portOffset = getuid();
-#endif
- m_gdbServerName = _("127.0.0.1:%1").arg(2222 + portOffset);
-
- setVerbose(debuggerCore()->boolSetting(VerboseLog) ? 1 : 0);
-
- connect(debuggerCore()->action(VerboseLog), SIGNAL(valueChanged(QVariant)),
- this, SLOT(setVerbose(QVariant)));
-}
-
-void GdbCodaEngine::setupDeviceSignals()
-{
- connect(m_codaDevice.data(), SIGNAL(error(QString)),
- this, SLOT(codaDeviceError(QString)));
- connect(m_codaDevice.data(), SIGNAL(logMessage(QString)),
- this, SLOT(codaLogMessage(QString)));
- connect(m_codaDevice.data(), SIGNAL(codaEvent(Coda::CodaEvent)),
- this, SLOT(codaEvent(Coda::CodaEvent)));
- connect(SymbianUtils::SymbianDeviceManager::instance(), SIGNAL(deviceRemoved(SymbianUtils::SymbianDevice)),
- this, SLOT(codaDeviceRemoved(SymbianUtils::SymbianDevice)));
-}
-
-GdbCodaEngine::~GdbCodaEngine()
-{
- if (m_codaDevice)
- SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaDevice);
-
- cleanup();
- logMessage(QLatin1String("Shutting down.\n"));
-}
-
-void GdbCodaEngine::setVerbose(const QVariant &value)
-{
- setVerbose(value.toInt());
-}
-
-void GdbCodaEngine::setVerbose(int verbose)
-{
- if (debug)
- qDebug("CodaGdbAdapter::setVerbose %d", verbose);
- m_verbose = verbose;
- if (m_codaDevice)
- m_codaDevice->setVerbose(m_verbose);
-}
-
-void GdbCodaEngine::codaLogMessage(const QString &msg)
-{
- logMessage(_("CODA ") + msg);
-}
-
-void GdbCodaEngine::setGdbServerName(const QString &name)
-{
- m_gdbServerName = name;
-}
-
-// Split a TCP address specification '<addr>[:<port>]'
-static QPair<QString, unsigned short> splitIpAddressSpec(const QString &addressSpec, unsigned short defaultPort = 0)
-{
- const int pos = addressSpec.indexOf(QLatin1Char(':'));
- if (pos == -1)
- return QPair<QString, unsigned short>(addressSpec, defaultPort);
- const QString address = addressSpec.left(pos);
- bool ok;
- const unsigned short port = addressSpec.mid(pos + 1).toUShort(&ok);
- if (!ok) {
- qWarning("Invalid IP address specification: '%s', defaulting to port %hu.", qPrintable(addressSpec), defaultPort);
- return QPair<QString, unsigned short>(addressSpec, defaultPort);
- }
- return QPair<QString, unsigned short>(address, port);
-}
-
-void GdbCodaEngine::handleCodaRunControlModuleLoadContextSuspendedEvent(const CodaRunControlModuleLoadContextSuspendedEvent &se)
-{
- m_snapshot.resetMemory();
- const ModuleLoadEventInfo &minfo = se.info();
- // Register in session, keep modules and libraries in sync.
- const QString moduleName = QString::fromUtf8(minfo.name);
- const bool isExe = moduleName.endsWith(_(".exe"), Qt::CaseInsensitive);
- // Add to shared library list
- if (!isExe) {
- if (minfo.loaded) {
- m_session.modules.push_back(moduleName);
- Coda::Library library;
- library.name = minfo.name;
- library.codeseg = minfo.codeAddress;
- library.dataseg = minfo.dataAddress;
- library.pid = RunControlContext::processIdFromTcdfId(se.id());
- m_session.libraries.push_back(library);
- // Load local symbol file into gdb provided there is one
- if (library.codeseg) {
- const QString localSymFileName =
- localSymFileForLibrary(library.name, m_symbolFileFolder);
- if (!localSymFileName.isEmpty()) {
- showMessage(msgLoadLocalSymFile(localSymFileName,
- library.name, library.codeseg), LogMisc);
- postCommand(symFileLoadCommand(
- localSymFileName, library.codeseg, library.dataseg));
- } // has local sym
- } // code seg
-
- } else {
- const int index = m_session.modules.indexOf(moduleName);
- if (index != -1) {
- m_session.modules.removeAt(index);
- m_session.libraries.removeAt(index);
- } else {
- // Might happen with preliminary version of CODA.
- qWarning("Received unload for module '%s' for which no load was received.",
- qPrintable(moduleName));
- }
-
- }
- }
- // Handle resume.
- if (se.info().requireResume) {
- // If it is the first, resumable load event (.exe), make
- // gdb connect to remote target and resume in setupInferior2(),
- if (isExe && m_firstResumableExeLoadedEvent) {
- m_firstResumableExeLoadedEvent = false;
- m_session.codeseg = minfo.codeAddress;
- m_session.dataseg = minfo.dataAddress;
- logMessage(startMsg(m_session), LogMisc);
-
- const QByteArray symbolFile = m_symbolFile.toLocal8Bit();
- if (symbolFile.isEmpty()) {
- logMessage(_("WARNING: No symbol file available."), LogError);
- } else {
- // Does not seem to be necessary anymore.
- // FIXME: Startup sequence can be streamlined now as we do not
- // have to wait for the CODA startup to learn the load address.
- //m_engine->postCommand("add-symbol-file \"" + symbolFile + "\" "
- // + QByteArray::number(m_session.codeseg));
- postCommand("symbol-file \"" + symbolFile + "\"");
- }
- foreach (const QByteArray &s, Symbian::gdbStartupSequence())
- postCommand(s);
- postCommand("target remote " + gdbServerName().toLatin1(),
- CB(handleTargetRemote));
- if (debug)
- qDebug() << "Initial module load suspended: " << m_session.toString();
- } else {
- // Consecutive module load suspended: (not observed yet): Just continue
- m_codaDevice->sendRunControlResumeCommand(CodaCallback(), se.id());
- }
- }
-}
-
-void GdbCodaEngine::handleTargetRemote(const GdbResponse &record)
-{
- QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
- if (record.resultClass == GdbResultDone) {
- handleInferiorPrepared();
- if (debug)
- qDebug() << "handleTargetRemote" << m_session.toString();
- } else {
- QString msg = tr("Connecting to CODA server adapter failed:\n")
- + QString::fromLocal8Bit(record.data.findChild("msg").data());
- notifyInferiorSetupFailed(msg);
- }
-}
-
-void GdbCodaEngine::codaDeviceRemoved(const SymbianUtils::SymbianDevice &dev)
-{
- const DebuggerStartParameters &parameters = startParameters();
- if (state() != DebuggerNotReady && !m_codaDevice.isNull() && parameters.remoteChannel == dev.portName()) {
- const QString message = QString::fromLatin1("Device '%1' has been disconnected.").arg(dev.friendlyName());
- logMessage(message);
- handleAdapterCrashed(message);
- cleanup();
- }
-}
-
-void GdbCodaEngine::codaEvent(const CodaEvent &e)
-{
- if (debug)
- qDebug() << e.toString() << m_session.toString() << m_snapshot.toString();
- logMessage(e.toString());
-
- switch (e.type()) {
- case CodaEvent::LocatorHello:
- if (state() == EngineSetupRequested && m_firstHelloEvent) {
- m_firstHelloEvent = false;
- m_codaDevice->sendLoggingAddListenerCommand(CodaCallback());
- QStringList gdbArgs;
- gdbArgs.append(_("--nx")); // Do not read .gdbinit file
- startGdb(gdbArgs); // Commands are only accepted after hello
- }
- break;
- case CodaEvent::RunControlModuleLoadSuspended: // A module was loaded
- handleCodaRunControlModuleLoadContextSuspendedEvent(
- static_cast<const CodaRunControlModuleLoadContextSuspendedEvent &>(e));
- break;
- case CodaEvent::RunControlContextAdded: // Thread/process added
- foreach (const RunControlContext &rc,
- static_cast<const CodaRunControlContextAddedEvent &>(e).contexts())
- if (rc.type() == RunControlContext::Thread)
- addThread(rc.threadId());
- break;
- case CodaEvent::RunControlContextRemoved: // Thread/process removed
- foreach (const QByteArray &id,
- static_cast<const CodaRunControlContextRemovedEvent &>(e).ids())
- switch (RunControlContext::typeFromCodaId(id)) {
- case RunControlContext::Thread:
- m_snapshot.removeThread(RunControlContext::threadIdFromTcdfId(id));
- break;
- case RunControlContext::Process:
- sendGdbServerMessage("W00", "Process exited");
- break;
- }
- break;
- case CodaEvent::RunControlSuspended: {
- // Thread suspended/stopped
- const CodaRunControlContextSuspendedEvent &se =
- static_cast<const CodaRunControlContextSuspendedEvent &>(e);
- const unsigned threadId = RunControlContext::threadIdFromTcdfId(se.id());
- const QString reason = QString::fromUtf8(se.reasonID());
- const QString message = QString::fromUtf8(se.message())
- .replace(_("\n"), _(", "));
- showMessage(_("Thread %1 stopped: '%2': %3").
- arg(threadId).arg(reason, message), LogMisc);
- // Stopped in a new thread: Add.
- m_snapshot.reset();
- m_session.tid = threadId;
- if (m_snapshot.indexOfThread(threadId) == -1)
- m_snapshot.addThread(threadId);
- m_snapshot.setThreadState(threadId, reason);
- // Update registers first, then report stopped.
- m_running = false;
- m_stopReason = reason.contains(_("exception"), Qt::CaseInsensitive)
- || reason.contains(_("panic"), Qt::CaseInsensitive) ?
- gdbServerSignalSegfault : gdbServerSignalTrap;
- m_codaDevice->sendRegistersGetMRangeCommand(
- CodaCallback(this, &GdbCodaEngine::handleAndReportReadRegistersAfterStop),
- currentThreadContextId(), 0,
- Symbian::RegisterCount);
- }
- break;
- case CodaEvent::LoggingWriteEvent: // TODO: Not tested yet.
- showMessage(e.toString() + QLatin1Char('\n'), AppOutput);
- break;
- default:
- break;
- }
-}
-
-void GdbCodaEngine::handleGdbStartFailed()
-{
- cleanup();
-}
-
-void GdbCodaEngine::codaDeviceError(const QString &errorString)
-{
- logMessage(errorString);
- if (state() == EngineSetupRequested) {
- handleAdapterStartFailed(errorString);
- } else {
- handleAdapterCrashed(errorString);
- }
-}
-
-void GdbCodaEngine::logMessage(const QString &msg, int channel)
-{
- if (m_verbose || channel != LogDebug)
- showMessage(msg, channel);
- if (debug)
- qDebug("%s", qPrintable(msg));
-}
-
-//
-// Gdb
-//
-void GdbCodaEngine::handleGdbConnection()
-{
- logMessage(QLatin1String("HANDLING GDB CONNECTION"));
- QTC_CHECK(m_gdbConnection == 0);
- m_gdbConnection = m_gdbServer->nextPendingConnection();
- QTC_ASSERT(m_gdbConnection, return);
- connect(m_gdbConnection, SIGNAL(disconnected()),
- m_gdbConnection, SLOT(deleteLater()));
- connect(m_gdbConnection, SIGNAL(readyRead()),
- SLOT(readGdbServerCommand()));
-}
-
-static inline QString msgGdbPacket(const QString &p)
-{
- return _("gdb: ") + p;
-}
-
-void GdbCodaEngine::readGdbServerCommand()
-{
- QTC_ASSERT(m_gdbConnection, return);
- QByteArray packet = m_gdbConnection->readAll();
- m_gdbReadBuffer.append(packet);
-
- logMessage(QLatin1String("gdb: -> ") + currentTime()
- + QLatin1Char(' ') + QString::fromLatin1(packet));
- if (packet != m_gdbReadBuffer)
- logMessage(_("buffer: ") + QString::fromLatin1(m_gdbReadBuffer));
-
- QByteArray &ba = m_gdbReadBuffer;
- while (ba.size()) {
- char code = ba.at(0);
- ba = ba.mid(1);
-
- if (code == '+') {
- //logMessage("ACK");
- continue;
- }
-
- if (code == '-') {
- logMessage(QLatin1String("NAK: Retransmission requested"), LogError);
- // This seems too harsh.
- //emit adapterCrashed("Communication problem encountered.");
- continue;
- }
-
- if (code == char(0x03)) {
- logMessage(QLatin1String("INTERRUPT RECEIVED"));
- interruptInferior();
- continue;
- }
-
- if (code != '$') {
- logMessage(QLatin1String("Broken package (2) ") + quoteUnprintableLatin1(ba)
- + QLatin1String(Coda::hexNumber(code)), LogError);
- continue;
- }
-
- int pos = ba.indexOf('#');
- if (pos == -1) {
- logMessage(QLatin1String("Invalid checksum format in ")
- + quoteUnprintableLatin1(ba), LogError);
- continue;
- }
-
- bool ok = false;
- uint checkSum = ba.mid(pos + 1, 2).toUInt(&ok, 16);
- if (!ok) {
- logMessage(QLatin1String("Invalid checksum format 2 in ")
- + quoteUnprintableLatin1(ba), LogError);
- return;
- }
-
- //logMessage(QString("Packet checksum: %1").arg(checkSum));
- Coda::byte sum = 0;
- for (int i = 0; i < pos; ++i)
- sum += ba.at(i);
-
- if (sum != checkSum) {
- logMessage(QString::fromLatin1("ERROR: Packet checksum wrong: %1 %2 in %3").
- arg(checkSum).arg(sum).arg(quoteUnprintableLatin1(ba)), LogError);
- }
-
- QByteArray cmd = ba.left(pos);
- ba.remove(0, pos + 3);
- handleGdbServerCommand(cmd);
- }
-}
-
-bool GdbCodaEngine::sendGdbServerPacket(const QByteArray &packet, bool doFlush)
-{
- if (!m_gdbConnection) {
- logMessage(_("Cannot write to gdb: No connection (%1)")
- .arg(_(packet)), LogError);
- return false;
- }
- if (m_gdbConnection->state() != QAbstractSocket::ConnectedState) {
- logMessage(_("Cannot write to gdb: Not connected (%1)")
- .arg(_(packet)), LogError);
- return false;
- }
- if (m_gdbConnection->write(packet) == -1) {
- logMessage(_("Cannot write to gdb: %1 (%2)")
- .arg(m_gdbConnection->errorString()).arg(_(packet)), LogError);
- return false;
- }
- if (doFlush)
- m_gdbConnection->flush();
- return true;
-}
-
-void GdbCodaEngine::sendGdbServerAck()
-{
- if (!m_gdbAckMode)
- return;
- logMessage(QLatin1String("gdb: <- +"));
- sendGdbServerPacket(QByteArray(1, '+'), false);
-}
-
-void GdbCodaEngine::sendGdbServerMessage(const QByteArray &msg, const QByteArray &logNote)
-{
- Coda::byte sum = 0;
- for (int i = 0; i != msg.size(); ++i)
- sum += msg.at(i);
-
- char checkSum[30];
- qsnprintf(checkSum, sizeof(checkSum) - 1, "%02x ", sum);
-
- //logMessage(QString("Packet checksum: %1").arg(sum));
-
- QByteArray packet;
- packet.append('$');
- packet.append(msg);
- packet.append('#');
- packet.append(checkSum);
- int pad = qMax(0, 24 - packet.size());
- logMessage(QLatin1String("gdb: <- ") + currentTime() + QLatin1Char(' ')
- + QString::fromLatin1(packet) + QString(pad, QLatin1Char(' '))
- + QLatin1String(logNote));
- sendGdbServerPacket(packet, true);
-}
-
-static QByteArray msgStepRangeReceived(unsigned from, unsigned to, bool over)
-{
- QByteArray rc = "Stepping range received for step ";
- rc += over ? "over" : "into";
- rc += " (0x";
- rc += QByteArray::number(from, 16);
- rc += " to 0x";
- rc += QByteArray::number(to, 16);
- rc += ')';
- return rc;
-}
-
-void GdbCodaEngine::handleGdbServerCommand(const QByteArray &cmd)
-{
- if (debug)
- qDebug("handleGdbServerCommand: %s", cmd.constData());
- // http://sourceware.org/gdb/current/onlinedocs/gdb_34.html
- if (0) {}
- else if (cmd == "!") {
- sendGdbServerAck();
- //sendGdbServerMessage("", "extended mode not enabled");
- sendGdbServerMessage("OK", "extended mode enabled");
- }
-
- else if (cmd.startsWith('?')) {
- logMessage(msgGdbPacket(_("Query halted")));
- // Indicate the reason the target halted.
- // The reply is the same as for step and continue.
- sendGdbServerAck();
- // The command below will trigger fetching a stack trace while
- // the process does not seem to be fully functional. Most notably
- // the PC points to a 0x9..., which is not in "our" range
- //sendGdbServerMessage("T05library:r;", "target halted (library load)");
- //sendGdbServerMessage("S05", "target halted (trap)");
- sendGdbServerMessage("S00", "target halted (trap)");
- //sendGdbServerMessage("O" + QByteArray("Starting...").toHex());
- }
-
- else if (cmd == "c") {
- logMessage(msgGdbPacket(_("Continue")));
- sendGdbServerAck();
- sendContinue();
- }
-
- else if (cmd.startsWith('C')) {
- logMessage(msgGdbPacket(_("Continue with signal")));
- // C sig[;addr] Continue with signal sig (hex signal number)
- //Reply: See section D.3 Stop Reply Packets, for the reply specifications.
- bool ok = false;
- const uint signalNumber = cmd.mid(1).toUInt(&ok, 16);
- //TODO: Meaning of the message is not clear.
- sendGdbServerAck();
- logMessage(_("Not implemented 'Continue with signal' %1: ").arg(signalNumber),
- LogWarning);
- sendGdbServerMessage('O' + QByteArray("Console output").toHex());
- sendGdbServerMessage("W81"); // "Process exited with result 1
- sendContinue();
- }
-
- else if (cmd.startsWith('D')) {
- sendGdbServerAck();
- sendGdbServerMessage("OK", "shutting down");
- }
-
- else if (cmd == "g") {
- // Read general registers.
- logMessage(msgGdbPacket(_("Read registers")));
- if (m_snapshot.registersValid(m_session.tid)) {
- sendGdbServerAck();
- reportRegisters();
- } else {
- sendGdbServerAck();
- if (m_codaDevice->registerNames().isEmpty()) {
- m_registerRequestPending = true;
- } else {
- sendRegistersGetMCommand();
- }
- }
- }
-
- else if (cmd == "gg") {
- // Force re-reading general registers for debugging purpose.
- sendGdbServerAck();
- m_snapshot.setRegistersValid(m_session.tid, false);
- sendRegistersGetMCommand();
- }
-
- else if (cmd.startsWith("salstep,")) {
- // Receive address range for current line for future use when stepping.
- sendGdbServerAck();
- m_snapshot.parseGdbStepRange(cmd, false);
- sendGdbServerMessage("", msgStepRangeReceived(m_snapshot.lineFromAddress,
- m_snapshot.lineToAddress, m_snapshot.stepOver));
- }
-
- else if (cmd.startsWith("salnext,")) {
- // Receive address range for current line for future use when stepping.
- sendGdbServerAck();
- m_snapshot.parseGdbStepRange(cmd, true);
- sendGdbServerMessage("", msgStepRangeReceived(m_snapshot.lineFromAddress,
- m_snapshot.lineToAddress, m_snapshot.stepOver));
- }
-
- else if (cmd.startsWith("Hc")) {
- sendGdbServerAck();
- gdbSetCurrentThread(cmd, "Set current thread for step & continue ");
- }
-
- else if (cmd.startsWith("Hg")) {
- sendGdbServerAck();
- gdbSetCurrentThread(cmd, "Set current thread ");
- }
-
- else if (cmd == "k" || cmd.startsWith("vKill")) {
- // Kill inferior process
- logMessage(msgGdbPacket(_("kill")));
- sendRunControlTerminateCommand();
- }
-
- else if (cmd.startsWith('m')) {
- logMessage(msgGdbPacket(_("Read memory")));
- // m addr,length
- sendGdbServerAck();
- const QPair<quint64, unsigned> addrLength = parseGdbReadMemoryRequest(cmd);
- if (addrLength.first && addrLength.second) {
- readMemory(addrLength.first, addrLength.second, m_bufferedMemoryRead);
- } else {
- sendGdbServerMessage("E20", "Error " + cmd);
- }
- }
-
- else if (cmd.startsWith('X')) { // Write memory
- const int dataPos = cmd.indexOf(':');
- if (dataPos == -1) {
- sendGdbServerMessage("E20", "Error (colon expected) " + cmd);
- return;
- }
- const QPair<quint64, unsigned> addrLength =
- parseGdbReadMemoryRequest(cmd.left(dataPos));
- if (addrLength.first == 0) {
- sendGdbServerMessage("E20", "Error (address = 0) " + cmd);
- return;
- }
- // Requests with len=0 are apparently used to probe writing.
- if (addrLength.second == 0) {
- sendGdbServerMessage("OK", "Probe memory write at 0x"
- + QByteArray::number(addrLength.first, 16));
- return;
- }
- // Data appear to be plain binary.
- const QByteArray data = cmd.mid(dataPos + 1);
- if (addrLength.second != unsigned(data.size())) {
- sendGdbServerMessage("E20", "Data length mismatch " + cmd);
- return;
- }
- logMessage(_("Writing %1 bytes from 0x%2: %3").
- arg(addrLength.second).arg(addrLength.first, 0, 16).
- arg(QString::fromLatin1(data.toHex())));
- m_codaDevice->sendMemorySetCommand(
- CodaCallback(this, &GdbCodaEngine::handleWriteMemory),
- m_codaProcessId, addrLength.first, data);
- }
-
- else if (cmd.startsWith('p')) {
- logMessage(msgGdbPacket(_("read register")));
- // 0xf == current instruction pointer?
- //sendGdbServerMessage("0000", "current IP");
- sendGdbServerAck();
- bool ok = false;
- const uint registerNumber = cmd.mid(1).toUInt(&ok, 16);
- const int threadIndex = m_snapshot.indexOfThread(m_session.tid);
- QTC_ASSERT(threadIndex != -1, return);
- const Symbian::Thread &thread = m_snapshot.threadInfo.at(threadIndex);
- if (thread.registerValid) {
- sendGdbServerMessage(thread.gdbReportSingleRegister(registerNumber),
- thread.gdbSingleRegisterLogMessage(registerNumber));
- } else {
- //qDebug() << "Fetching single register";
- m_codaDevice->sendRegistersGetMRangeCommand(
- CodaCallback(this, &GdbCodaEngine::handleAndReportReadRegister),
- currentThreadContextId(), registerNumber, 1);
- }
- }
-
- else if (cmd.startsWith('P')) {
- logMessage(msgGdbPacket(_("write register")));
- // $Pe=70f96678#d3
- sendGdbServerAck();
- const QPair<uint, uint> regnumValue = parseGdbWriteRegisterWriteRequest(cmd);
- // FIXME: Assume all goes well.
- m_snapshot.setRegisterValue(m_session.tid, regnumValue.first, regnumValue.second);
- logMessage(_("Setting register #%1 to 0x%2").arg(regnumValue.first)
- .arg(regnumValue.second, 0, 16));
- QByteArray registerValue;
- Coda::appendInt(&registerValue, Coda::BigEndian); // Registers are big endian
- m_codaDevice->sendRegistersSetCommand(
- CodaCallback(this, &GdbCodaEngine::handleWriteRegister),
- currentThreadContextId(), regnumValue.first, registerValue,
- QVariant(regnumValue.first));
- // Note that App CODA refuses to write registers 13 and 14
- }
-
- else if (cmd == "qAttached") {
- //$qAttached#8f
- // 1: attached to an existing process
- // 0: created a new process
- sendGdbServerAck();
- sendGdbServerMessage(QByteArray(1, '0'), "new process created");
- }
-
- else if (cmd.startsWith("qC")) {
- logMessage(msgGdbPacket(_("query thread id")));
- // Return the current thread ID
- //$qC#b4
- sendGdbServerAck();
- sendGdbServerMessage("QC" + QByteArray::number(m_session.tid, 16));
- }
-
- else if (cmd.startsWith("qSupported")) {
- //$qSupported#37
- //$qSupported:multiprocess+#c6
- //logMessage("Handling 'qSupported'");
- sendGdbServerAck();
- sendGdbServerMessage(Symbian::gdbQSupported);
- }
-
- // Tracepoint handling as of gdb 7.2 onwards.
- else if (cmd == "qTStatus") { // Tracepoints
- sendGdbServerAck();
- sendGdbServerMessage("T0;tnotrun:0", "No trace experiment running");
- }
- // Trace variables as of gdb 7.2 onwards.
- else if (cmd == "qTfV" || cmd == "qTsP" || cmd == "qTfP") {
- sendGdbServerAck();
- sendGdbServerMessage("l", "No trace points");
- }
-
- else if (cmd.startsWith("qThreadExtraInfo")) {
- // $qThreadExtraInfo,1f9#55
- sendGdbServerAck();
- sendGdbServerMessage(m_snapshot.gdbQThreadExtraInfo(cmd));
- }
-
- else if (cmd == "qfDllInfo") {
- // That's the _first_ query package.
- // Happens with gdb 6.4.50.20060226-cvs / CodeSourcery.
- // Never made it into FSF gdb that got qXfer:libraries:read instead.
- // http://sourceware.org/ml/gdb/2007-05/msg00038.html
- // Name=hexname,TextSeg=textaddr[,DataSeg=dataaddr]
- sendGdbServerAck();
- sendGdbServerMessage(m_session.gdbQsDllInfo(),
- "library information transfer finished");
- }
-
- else if (cmd == "qsDllInfo") {
- // That's a following query package.
- sendGdbServerAck();
- sendGdbServerMessage(QByteArray(1, 'l'),
- "library information transfer finished");
- }
-
- else if (cmd == "qPacketInfo") {
- // Happens with gdb 6.4.50.20060226-cvs / CodeSourcery.
- // Deprecated by qSupported?
- sendGdbServerAck();
- sendGdbServerMessage("", "FIXME: nothing?");
- }
-
- else if (cmd == "qOffsets") {
- sendGdbServerAck();
- QByteArray answer = "TextSeg=";
- answer.append(QByteArray::number(m_session.codeseg, 16));
- answer.append(";DataSeg=");
- answer.append(QByteArray::number(m_session.dataseg, 16));
- sendGdbServerMessage(answer);
- }
-
- else if (cmd == "qSymbol::") {
- if (m_verbose)
- logMessage(msgGdbPacket(_("notify can handle symbol lookup")));
- // Notify the target that GDB is prepared to serve symbol lookup requests.
- sendGdbServerAck();
- if (1)
- sendGdbServerMessage("OK", "no further symbols needed");
- else
- sendGdbServerMessage("qSymbol:" + QByteArray("_Z7E32Mainv").toHex(),
- "ask for more");
- }
-
- else if (cmd.startsWith("qXfer:features:read:target.xml:")) {
- // $qXfer:features:read:target.xml:0,7ca#46...Ack
- sendGdbServerAck();
- sendGdbServerMessage(Symbian::gdbArchitectureXml);
- }
-
- else if (cmd == "qfThreadInfo") {
- // That's the _first_ query package.
- sendGdbServerAck();
- sendGdbServerMessage(m_snapshot.gdbQsThreadInfo(),
- "thread information transferred");
- }
-
- else if (cmd == "qsThreadInfo") {
- // That's a following query package
- sendGdbServerAck();
- sendGdbServerMessage(QByteArray(1, 'l'),
- "thread information transfer finished");
- }
-
- else if (cmd.startsWith("qXfer:libraries:read")) {
- sendGdbServerAck();
- sendGdbServerMessage(m_session.gdbLibraryList(),
- "library information transferred");
- }
-
- else if (cmd == "QStartNoAckMode") {
- //$qSupported#37
- logMessage(QLatin1String("Handling 'QStartNoAckMode'"));
- sendGdbServerAck();
- sendGdbServerMessage("OK", "ack no-ack mode");
- m_gdbAckMode = false;
- }
-
- else if (cmd.startsWith("QPassSignals")) {
- // list of signals to pass directly to inferior
- // $QPassSignals:e;10;14;17;1a;1b;1c;21;24;25;4c;#8f
- // happens only if "QPassSignals+;" is qSupported
- sendGdbServerAck();
- // FIXME: use the parameters
- sendGdbServerMessage("OK", "passing signals accepted");
- }
-
- else if (cmd == "s" || cmd.startsWith("vCont;s")) {
- const uint pc = m_snapshot.registerValue(m_session.tid, RegisterPC);
- logMessage(msgGdbPacket(_("Step range from 0x%1").
- arg(pc, 0, 16)));
- sendGdbServerAck();
- m_running = true;
- sendStepRange();
- }
-
- else if (cmd.startsWith('T')) {
- // FIXME: Check whether thread is alive.
- sendGdbServerAck();
- sendGdbServerMessage("OK"); // pretend all is well
- }
-
- else if (cmd == "vCont?") {
- // Actions supported by the vCont packet.
- sendGdbServerAck();
- sendGdbServerMessage("vCont;c;C;s;S"); // we don't support vCont.
- }
-
- else if (cmd == "vCont;c") {
- // vCont[;action[:thread-id]]...'
- sendGdbServerAck();
- m_running = true;
- sendContinue();
- }
-
- else if (cmd.startsWith("Z0,") || cmd.startsWith("Z1,")) {
- // Insert breakpoint.
- sendGdbServerAck();
- logMessage(msgGdbPacket(_("Insert breakpoint")));
- // $Z0,786a4ccc,4#99
- const QPair<quint64, unsigned> addrLen = parseGdbSetBreakpointRequest(cmd);
- if (addrLen.first) {
- //qDebug() << "ADDR: " << hexNumber(addr) << " LEN: " << len;
- logMessage(_("Inserting breakpoint at 0x%1, %2")
- .arg(addrLen.first, 0, 16).arg(addrLen.second));
- // const QByteArray ba = trkBreakpointMessage(addr, len, len == 4);
- Coda::Breakpoint bp(addrLen.first);
- bp.size = addrLen.second;
- bp.setContextId(m_session.pid);
- // We use the automatic ids calculated from the location
- // address instead of the map in snapshot.
- m_codaDevice->sendBreakpointsAddCommand(
- CodaCallback(this, &GdbCodaEngine::handleAndReportSetBreakpoint),
- bp);
- } else {
- logMessage(_("MISPARSED BREAKPOINT '") + QLatin1String(cmd)
- + QLatin1String("'')") , LogError);
- }
- }
-
- else if (cmd.startsWith("z0,") || cmd.startsWith("z1,")) {
- // Remove breakpoint.
- sendGdbServerAck();
- logMessage(msgGdbPacket(_("Remove breakpoint")));
- // $z0,786a4ccc,4#99
- const int pos = cmd.lastIndexOf(',');
- const uint addr = cmd.mid(3, pos - 3).toUInt(0, 16);
- m_codaDevice->sendBreakpointsRemoveCommand(
- CodaCallback(this, &GdbCodaEngine::handleClearBreakpoint),
- Coda::Breakpoint::idFromLocation(addr));
- }
-
- else if (cmd.startsWith("qPart:") || cmd.startsWith("qXfer:")) {
- QByteArray data = cmd.mid(1 + cmd.indexOf(':'));
- // "qPart:auxv:read::0,147": Read OS auxiliary data, see info aux.
- bool handled = false;
- if (data.startsWith("auxv:read::")) {
- const int offsetPos = data.lastIndexOf(':') + 1;
- const int commaPos = data.lastIndexOf(',');
- if (commaPos != -1) {
- bool ok1 = false, ok2 = false;
- const int offset = data.mid(offsetPos, commaPos - offsetPos)
- .toUInt(&ok1, 16);
- const int length = data.mid(commaPos + 1).toUInt(&ok2, 16);
- if (ok1 && ok2) {
- const QString msg = _("Read of OS auxiliary "
- "vector (%1, %2) not implemented.").arg(offset).arg(length);
- logMessage(msgGdbPacket(msg), LogWarning);
- sendGdbServerMessage("E20", msg.toLatin1());
- handled = true;
- }
- }
- } // auxv read
-
- if (!handled) {
- const QString msg = _("FIXME unknown 'XFER'-request: ")
- + QString::fromLatin1(cmd);
- logMessage(msgGdbPacket(msg), LogWarning);
- sendGdbServerMessage("E20", msg.toLatin1());
- }
-
- } // qPart/qXfer
- else {
- logMessage(msgGdbPacket(_("FIXME unknown: ")
- + QString::fromLatin1(cmd)), LogWarning);
- }
-}
-
-void GdbCodaEngine::sendRunControlTerminateCommand()
-{
- // Requires id of main thread to terminate.
- // Note that calling 'Settings|set|removeExecutable' crashes CODA,
- // so, it is apparently not required.
- m_codaDevice->sendRunControlTerminateCommand(
- CodaCallback(this, &GdbCodaEngine::handleRunControlTerminate),
- mainThreadContextId());
-}
-
-void GdbCodaEngine::handleRunControlTerminate(const CodaCommandResult &)
-{
- QString msg = QString::fromLatin1("CODA disconnected");
- const bool emergencyShutdown = m_gdbProc.state() != QProcess::Running
- && state() != EngineShutdownOk;
- if (emergencyShutdown)
- msg += QString::fromLatin1(" (emergency shutdown)");
- logMessage(msg, LogMisc);
- if (emergencyShutdown) {
- cleanup();
- notifyAdapterShutdownOk();
- }
-}
-
-void GdbCodaEngine::gdbSetCurrentThread(const QByteArray &cmd, const char *why)
-{
- // Thread ID from Hg/Hc commands: '-1': All, '0': arbitrary, else hex thread id.
- const QByteArray id = cmd.mid(2);
- const int threadId = id == "-1" ? -1 : id.toInt(0, 16);
- const QByteArray message = QByteArray(why) + QByteArray::number(threadId);
- logMessage(msgGdbPacket(_(message)));
- // Set thread for subsequent operations (`m', `M', `g', `G', et.al.).
- // for 'other operations. 0 - any thread.
- //$Hg0#df
- m_session.tid = threadId <= 0 ? m_session.mainTid : uint(threadId);
- sendGdbServerMessage("OK", message);
-}
-
-void GdbCodaEngine::interruptInferior2()
-{
- m_codaDevice->sendRunControlSuspendCommand(CodaCallback(), m_codaProcessId);
-}
-
-void GdbCodaEngine::setupEngine()
-{
- m_snapshot.fullReset();
- m_session.reset();
- m_firstResumableExeLoadedEvent = true;
- m_codaProcessId.clear();
- m_firstHelloEvent = true;
-
- // Retrieve parameters.
- const DebuggerStartParameters &parameters = startParameters();
- m_remoteExecutable = parameters.executable;
- m_remoteArguments = Utils::QtcProcess::splitArgs(parameters.processArgs);
- m_symbolFile = parameters.symbolFileName;
- if (!m_symbolFile.isEmpty())
- m_symbolFileFolder = QFileInfo(m_symbolFile).absolutePath();
-
- QSharedPointer<QTcpSocket> codaSocket;
- if (parameters.communicationChannel ==
- DebuggerStartParameters::CommunicationChannelTcpIp) {
- m_codaDevice = QSharedPointer<CodaDevice>(new CodaDevice, &CodaDevice::deleteLater);
- setupDeviceSignals();
- codaSocket = QSharedPointer<QTcpSocket>(new QTcpSocket);
- m_codaDevice->setDevice(codaSocket);
- } else {
- m_codaDevice = SymbianUtils::SymbianDeviceManager::instance()
- ->getCodaDevice(parameters.remoteChannel);
-
- const bool ok = !m_codaDevice.isNull() && m_codaDevice->device()->isOpen();
- if (!ok) {
- const QString reason = m_codaDevice.isNull() ?
- tr("Could not obtain device.") :
- m_codaDevice->device()->errorString();
- const QString msg = QString::fromLatin1("Could not open serial device '%1': %2")
- .arg(parameters.remoteChannel, reason);
- logMessage(msg, LogError);
- handleAdapterStartFailed(msg);
- return;
- }
- setupDeviceSignals();
- m_codaDevice->setVerbose(m_verbose);
- }
-
- if (debug)
- qDebug() << parameters.processArgs;
-
- m_uid = parameters.executableUid;
- QString codaServerAddress = parameters.serverAddress;
- unsigned short codaServerPort = parameters.serverPort;
-
-// m_remoteArguments.clear(); FIXME: Should this be here?
-
- // Unixish gdbs accept only forward slashes
- m_symbolFile.replace(QLatin1Char('\\'), QLatin1Char('/'));
- // Start
- QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
- showMessage(_("TRYING TO START ADAPTER"));
- logMessage(_("### Starting CodaGdbAdapter"));
-
- QTC_ASSERT(m_gdbServer == 0, delete m_gdbServer);
- QTC_ASSERT(m_gdbConnection == 0, m_gdbConnection = 0);
- m_gdbServer = new QTcpServer(this);
-
- const QPair<QString, unsigned short> address = splitIpAddressSpec(m_gdbServerName);
- if (!m_gdbServer->listen(QHostAddress(address.first), address.second)) {
- QString msg = QString::fromLatin1("Unable to start the gdb server at %1: %2.")
- .arg(m_gdbServerName).arg(m_gdbServer->errorString());
- logMessage(msg, LogError);
- handleAdapterStartFailed(msg);
- return;
- }
-
- logMessage(QString::fromLatin1("Gdb server running on %1.\nLittle endian assumed.")
- .arg(m_gdbServerName));
-
- connect(m_gdbServer, SIGNAL(newConnection()),
- this, SLOT(handleGdbConnection()));
-
- if (parameters.communicationChannel ==
- DebuggerStartParameters::CommunicationChannelTcpIp) {
- logMessage(_("Connecting to CODA on %1:%2")
- .arg(codaServerAddress).arg(codaServerPort));
- codaSocket->connectToHost(codaServerAddress, codaServerPort);
- } else {
- m_codaDevice->sendSerialPing(false);
- }
-}
-
-void GdbCodaEngine::setupInferior()
-{
- QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
-
- // Compile additional libraries.
- QStringList libraries;
- const unsigned libraryCount = sizeof(librariesC)/sizeof(char *);
- for (unsigned i = 0; i < libraryCount; ++i)
- libraries.push_back(QString::fromLatin1(librariesC[i]));
-
- m_codaDevice->sendProcessStartCommand(
- CodaCallback(this, &GdbCodaEngine::handleCreateProcess),
- m_remoteExecutable, m_uid, m_remoteArguments,
- QString(), true, libraries);
-}
-
-void GdbCodaEngine::addThread(unsigned id)
-{
- showMessage(QString::fromLatin1("Thread %1 reported").arg(id), LogMisc);
- // Make thread known, register as main if it is the first one.
- if (m_snapshot.indexOfThread(id) == -1) {
- m_snapshot.addThread(id);
- if (m_session.tid == 0) {
- m_session.tid = id;
- if (m_session.mainTid == 0)
- m_session.mainTid = id;
- }
- // We cannot retrieve register values unless the registers of that
- // thread have been retrieved (CODA oddity).
- const QByteArray contextId = RunControlContext::codaId(m_session.pid, id);
- m_codaDevice->sendRegistersGetChildrenCommand(
- CodaCallback(this, &GdbCodaEngine::handleRegisterChildren),
- contextId, QVariant(contextId));
- }
-}
-
-void GdbCodaEngine::handleCreateProcess(const CodaCommandResult &result)
-{
- if (debug)
- qDebug() << "ProcessCreated: " << result.toString();
- if (!result) {
- const QString errorMessage = result.errorString();
- logMessage(_("Failed to start process: %1").arg(errorMessage), LogError);
- notifyInferiorSetupFailed(result.errorString());
- return;
- }
- QTC_ASSERT(!result.values.isEmpty(), return);
-
- RunControlContext ctx;
- ctx.parse(result.values.front());
- logMessage(ctx.toString());
-
- m_session.pid = ctx.processId();
- m_codaProcessId = RunControlContext::codaId(m_session.pid);
- if (const unsigned threadId = ctx.threadId())
- addThread(threadId);
- // See ModuleLoadSuspendedEvent for the rest.
- m_session.codeseg = 0;
- m_session.dataseg = 0;
-}
-
-void GdbCodaEngine::runEngine()
-{
- QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
- notifyEngineRunAndInferiorStopOk();
- // Trigger the initial "continue" manually.
- continueInferiorInternal();
-}
-
-//
-// AbstractGdbAdapter interface implementation
-//
-
-void GdbCodaEngine::write(const QByteArray &data)
-{
- // Write magic packets directly to TRK.
- if (data.startsWith("@#")) {
- QByteArray data1 = data.mid(2);
- if (data1.endsWith(char(10)))
- data1.chop(1);
- if (data1.endsWith(char(13)))
- data1.chop(1);
- if (data1.endsWith(' '))
- data1.chop(1);
- bool ok;
- const uint addr = data1.toUInt(&ok, 0);
- logMessage(_("Direct step (@#) 0x%1: not implemented").arg(addr, 0, 16),
- LogError);
- // directStep(addr);
- return;
- }
- if (data.startsWith("@$")) {
- QByteArray ba = QByteArray::fromHex(data.mid(2));
- qDebug() << "Writing: " << quoteUnprintableLatin1(ba);
- // if (ba.size() >= 1)
- // sendMessage(ba.at(0), TrkCB(handleDirectTrk), ba.mid(1));
- return;
- }
- if (data.startsWith("@@")) {
- logMessage(_("Direct write (@@): not implemented"), LogError);
- return;
- }
- m_gdbProc.write(data);
-}
-
-void GdbCodaEngine::cleanup()
-{
- delete m_gdbServer;
- m_gdbServer = 0;
- if (m_codaDevice) {
- // Ensure process is stopped after being suspended.
- // This cannot be used when the object is deleted
- // as the responce will return to a not existing object
- sendRunControlTerminateCommand();
- disconnect(m_codaDevice.data(), 0, this, 0);
- SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaDevice);
- }
-}
-
-void GdbCodaEngine::shutdownEngine()
-{
- if (m_gdbProc.state() == QProcess::Running) {
- cleanup();
- notifyAdapterShutdownOk();
- } else {
- // Something is wrong, gdb crashed. Kill debuggee (see handleDeleteProcess2)
- if (m_codaDevice && m_codaDevice->device()->isOpen()) {
- logMessage(QLatin1String("Emergency shutdown of CODA"), LogError);
- sendRunControlTerminateCommand();
- }
- }
-}
-
-void GdbCodaEngine::codaReloadRegisters()
-{
- // Take advantage of direct access to cached register values.
- m_snapshot.syncRegisters(m_session.tid, registerHandler());
-}
-
-void GdbCodaEngine::codaReloadThreads()
-{
- m_snapshot.syncThreads(threadsHandler());
-}
-
-void GdbCodaEngine::handleWriteRegister(const CodaCommandResult &result)
-{
- const int registerNumber = result.cookie.toInt();
- if (result) {
- sendGdbServerMessage("OK");
- } else {
- logMessage(_("ERROR writing register #%1: %2")
- .arg(registerNumber).arg(result.errorString()), LogError);
- sendGdbServerMessage("E01");
- }
-}
-
-void GdbCodaEngine::sendRegistersGetMCommand()
-{
- // Send off a register command, which requires the names to be present.
- QTC_ASSERT(!m_codaDevice->registerNames().isEmpty(), return);
-
- m_codaDevice->sendRegistersGetMRangeCommand(
- CodaCallback(this, &GdbCodaEngine::handleAndReportReadRegisters),
- currentThreadContextId(), 0,
- Symbian::RegisterCount);
-}
-
-void GdbCodaEngine::reportRegisters()
-{
- const int threadIndex = m_snapshot.indexOfThread(m_session.tid);
- QTC_ASSERT(threadIndex != -1, return);
- const Symbian::Thread &thread = m_snapshot.threadInfo.at(threadIndex);
- sendGdbServerMessage(thread.gdbReportRegisters(),
- thread.gdbRegisterLogMessage(m_verbose));
-}
-
-void GdbCodaEngine::handleRegisterChildren(const CodaCommandResult &result)
-{
- QTC_ASSERT(m_codaDevice, return);
- const QByteArray contextId = result.cookie.toByteArray();
- if (!result) {
- logMessage(QLatin1String("Error retrieving register children of ")
- + result.cookie.toString() + QLatin1String(": ")
- + result.errorString(), LogError);
- return;
- }
- // Parse out registers.
- // If this is a single 'pid.tid.rGPR' parent entry, recurse to get the actual
- // registers, ('pid.tid.rGPR.R0'..). At least 'pid.tid.rGPR' must have been
- // retrieved to be able to access the register contents.
- QVector<QByteArray> registerNames = CodaDevice::parseRegisterGetChildren(result);
- if (registerNames.size() == 1) {
- m_codaDevice->sendRegistersGetChildrenCommand(
- CodaCallback(this, &GdbCodaEngine::handleRegisterChildren),
- registerNames.front(), result.cookie);
- return;
- }
- // First thread: Set base names in device.
- if (!m_codaDevice->registerNames().isEmpty())
- return;
- // Make sure we get all registers
- const int registerCount = registerNames.size();
- if (registerCount != Symbian::RegisterCount) {
- logMessage(_("Invalid number of registers received, expected %1, got %2").
- arg(Symbian::RegisterCount).arg(registerCount), LogError);
- return;
- }
- // Set up register names (strip thread context "pid.tid"+'.')
- QString msg = _("Retrieved %1 register names: ").arg(registerCount);
- const int contextLength = contextId.size() + 1;
- for (int i = 0; i < registerCount; i++) {
- registerNames[i].remove(0, contextLength);
- if (i)
- msg += QLatin1Char(',');
- msg += QString::fromLatin1(registerNames[i]);
- }
- logMessage(msg);
- m_codaDevice->setRegisterNames(registerNames);
- if (m_registerRequestPending) { // Request already pending?
- logMessage(_("Resuming registers request after receiving register names..."));
- sendRegistersGetMCommand();
- }
-}
-
-void GdbCodaEngine::handleReadRegisters(const CodaCommandResult &result)
-{
- // Check for errors.
- if (!result) {
- logMessage(QLatin1String("ERROR: ") + result.errorString(), LogError);
- return;
- }
- if (result.values.isEmpty() || result.values.front().type() != Json::JsonValue::String) {
- logMessage(_("Format error in register message: ") + result.toString(),
- LogError);
- return;
- }
-
- unsigned i = result.cookie.toUInt();
- // TODO: When reading 8-byte floating-point registers is supported, thread
- // registers won't be an array of uints.
- uint *registers = m_snapshot.registers(m_session.tid);
- QTC_ASSERT(registers, return);
-
- QByteArray bigEndianRaw = QByteArray::fromBase64(result.values.front().data());
- // TODO: When reading 8-byte floating-point registers is supported, will
- // need to know the list of registers and lengths of each register.
- for (int j = 0; j < bigEndianRaw.size(); j += 4) {
- registers[i++] = ((bigEndianRaw.at(j ) & 0xff) << 24) +
- ((bigEndianRaw.at(j + 1) & 0xff) << 16) +
- ((bigEndianRaw.at(j + 2) & 0xff) << 8) +
- (bigEndianRaw.at(j + 3) & 0xff);
- }
-
- m_snapshot.setRegistersValid(m_session.tid, true);
- if (debug)
- qDebug() << "handleReadRegisters: " << m_snapshot.toString();
-}
-
-void GdbCodaEngine::handleAndReportReadRegisters(const CodaCommandResult &result)
-{
- handleReadRegisters(result);
- reportRegisters();
-}
-
-void GdbCodaEngine::handleAndReportReadRegister(const CodaCommandResult &result)
-{
- handleReadRegisters(result);
- const uint registerNumber = result.cookie.toUInt();
- const int threadIndex = m_snapshot.indexOfThread(m_session.tid);
- QTC_ASSERT(threadIndex != -1, return);
- const Symbian::Thread &thread = m_snapshot.threadInfo.at(threadIndex);
- sendGdbServerMessage(thread.gdbReportSingleRegister(registerNumber),
- thread.gdbSingleRegisterLogMessage(registerNumber));
-}
-
-QByteArray GdbCodaEngine::stopMessage() const
-{
- QByteArray logMsg = "Stopped with registers in thread 0x";
- logMsg += QByteArray::number(m_session.tid, 16);
- if (m_session.tid == m_session.mainTid)
- logMsg += " [main]";
- const int idx = m_snapshot.indexOfThread(m_session.tid);
- if (idx == -1)
- return logMsg;
- const Symbian::Thread &thread = m_snapshot.threadInfo.at(idx);
- logMsg += ", at 0x";
- logMsg += QByteArray::number(thread.registers[Symbian::RegisterPC], 16);
- logMsg += ", (loaded at 0x";
- logMsg += QByteArray::number(m_session.codeseg, 16);
- logMsg += ", offset 0x";
- logMsg += QByteArray::number(thread.registers[Symbian::RegisterPC] - m_session.codeseg, 16);
- logMsg += "), Register contents: ";
- logMsg += thread.registerContentsLogMessage();
- return logMsg;
-}
-
-void GdbCodaEngine::handleAndReportReadRegistersAfterStop(const CodaCommandResult &result)
-{
- handleReadRegisters(result);
- handleReadRegisters(result);
- const bool reportThread = m_session.tid != m_session.mainTid;
- sendGdbServerMessage(m_snapshot.gdbStopMessage(m_session.tid,
- m_stopReason, reportThread), stopMessage());
-}
-
-void GdbCodaEngine::handleAndReportSetBreakpoint(const CodaCommandResult &result)
-{
- if (result) {
- sendGdbServerMessage("OK");
- } else {
- logMessage(_("Error setting breakpoint: ") + result.errorString(), LogError);
- sendGdbServerMessage("E21");
- }
-}
-
-void GdbCodaEngine::handleClearBreakpoint(const CodaCommandResult &result)
-{
- logMessage(QLatin1String("CLEAR BREAKPOINT "));
- if (!result)
- logMessage(QLatin1String("Error clearing breakpoint: ") +
- result.errorString(), LogError);
- sendGdbServerMessage("OK");
-}
-
-void GdbCodaEngine::readMemory(uint addr, uint len, bool buffered)
-{
- Q_ASSERT(len < (2 << 16));
-
- // We try to get medium-sized chunks of data from the device
- if (m_verbose > 2)
- logMessage(_("readMemory %1 bytes from 0x%2 blocksize=%3")
- .arg(len).arg(addr, 0, 16).arg(MemoryChunkSize));
-
- m_snapshot.wantedMemory = MemoryRange(addr, addr + len);
- tryAnswerGdbMemoryRequest(buffered);
-}
-
-static QString msgMemoryReadError(uint addr, uint len = 0)
-{
- const QString lenS = len ? QString::number(len) : _("<unknown>");
- return _("Memory read error at: 0x%1 %2").arg(addr, 0, 16).arg(lenS);
-}
-
-void GdbCodaEngine::sendMemoryGetCommand(const MemoryRange &range, bool buffered)
-{
- const QVariant cookie = QVariant::fromValue(range);
- const CodaCallback cb = buffered ?
- CodaCallback(this, &GdbCodaEngine::handleReadMemoryBuffered) :
- CodaCallback(this, &GdbCodaEngine::handleReadMemoryUnbuffered);
- m_codaDevice->sendMemoryGetCommand(cb, currentThreadContextId(), range.from, range.size(), cookie);
-}
-
-void GdbCodaEngine::handleReadMemoryBuffered(const CodaCommandResult &result)
-{
- QTC_ASSERT(qVariantCanConvert<MemoryRange>(result.cookie), return);
-
- const QByteArray memory = CodaDevice::parseMemoryGet(result);
- const MemoryRange range = result.cookie.value<MemoryRange>();
-
- const bool error = !result;
- const bool insufficient = unsigned(memory.size()) != range.size();
- if (error || insufficient) {
- QString msg = error ?
- _("Error reading memory: %1").arg(result.errorString()) :
- _("Error reading memory (got %1 of %2): %3")
- .arg(memory.size()).arg(range.size())
- .arg(msgMemoryReadError(range.from, range.size()));
- msg += QString::fromLatin1("\n(Retrying unbuffered...)");
- logMessage(msg, LogError);
- // FIXME: This does not handle large requests properly.
- sendMemoryGetCommand(range, false);
- return;
- }
-
- m_snapshot.insertMemory(range, memory);
- tryAnswerGdbMemoryRequest(true);
-}
-
-void GdbCodaEngine::handleReadMemoryUnbuffered(const CodaCommandResult &result)
-{
- QTC_ASSERT(qVariantCanConvert<MemoryRange>(result.cookie), return);
-
- const QByteArray memory = CodaDevice::parseMemoryGet(result);
- const MemoryRange range = result.cookie.value<MemoryRange>();
-
- const bool error = !result;
- const bool insufficient = unsigned(memory.size()) != range.size();
- if (error || insufficient) {
- QString msg = error ?
- _("Error reading memory: %1").arg(result.errorString()) :
- _("Error reading memory (got %1 of %2): %3")
- .arg(memory.size()).arg(range.size())
- .arg(msgMemoryReadError(range.from, range.size()));
- logMessage(msg, LogError);
- sendGdbServerMessage(QByteArray("E20"),
- msgMemoryReadError(32, range.from).toLatin1());
- return;
- }
- m_snapshot.insertMemory(range, memory);
- tryAnswerGdbMemoryRequest(false);
-}
-
-void GdbCodaEngine::tryAnswerGdbMemoryRequest(bool buffered)
-{
- //logMessage("TRYING TO ANSWER MEMORY REQUEST ");
- MemoryRange wanted = m_snapshot.wantedMemory;
- MemoryRange needed = m_snapshot.wantedMemory;
- MEMORY_DEBUG("WANTED: " << wanted);
- Snapshot::Memory::const_iterator it = m_snapshot.memory.begin();
- Snapshot::Memory::const_iterator et = m_snapshot.memory.end();
- for ( ; it != et; ++it) {
- MEMORY_DEBUG(" NEEDED STEP: " << needed);
- needed -= it.key();
- }
- MEMORY_DEBUG("NEEDED FINAL: " << needed);
-
- if (needed.to == 0) {
- // FIXME: need to combine chunks first.
-
- // All fine. Send package to gdb.
- it = m_snapshot.memory.begin();
- et = m_snapshot.memory.end();
- for ( ; it != et; ++it) {
- if (it.key().from <= wanted.from && wanted.to <= it.key().to) {
- int offset = wanted.from - it.key().from;
- int len = wanted.to - wanted.from;
- QByteArray ba = it.value().mid(offset, len);
- sendGdbServerMessage(ba.toHex(), m_snapshot.memoryReadLogMessage
- (wanted.from, m_session.tid, m_verbose, ba));
- return;
- }
- }
- // Happens when chunks are not combined
- QTC_CHECK(false);
- showMessage(QLatin1String("CHUNKS NOT COMBINED"));
-# ifdef MEMORY_DEBUG
- qDebug() << "CHUNKS NOT COMBINED";
- it = m_snapshot.memory.begin();
- et = m_snapshot.memory.end();
- for ( ; it != et; ++it)
- qDebug() << Coda::hexNumber(it.key().from) << Coda::hexNumber(it.key().to);
- qDebug() << "WANTED" << wanted.from << wanted.to;
-# endif
- sendGdbServerMessage("E22", "");
- return;
- }
-
- MEMORY_DEBUG("NEEDED AND UNSATISFIED: " << needed);
- if (buffered) {
- uint blockaddr = (needed.from / MemoryChunkSize) * MemoryChunkSize;
- logMessage(_("Requesting buffered memory %1 bytes from 0x%2")
- .arg(MemoryChunkSize).arg(blockaddr, 0, 16));
- MemoryRange range(blockaddr, blockaddr + MemoryChunkSize);
- MEMORY_DEBUG(" FETCH BUFFERED MEMORY : " << range);
- sendMemoryGetCommand(range, true);
- } else { // Unbuffered, direct requests
- int len = needed.to - needed.from;
- logMessage(_("Requesting unbuffered memory %1 bytes from 0x%2")
- .arg(len).arg(needed.from, 0, 16));
- sendMemoryGetCommand(needed, false);
- MEMORY_DEBUG(" FETCH UNBUFFERED MEMORY : " << needed);
- }
-}
-
-void GdbCodaEngine::handleWriteMemory(const CodaCommandResult &result)
-{
- if (result) {
- sendGdbServerMessage("OK", "Write memory");
- } else {
- logMessage(_("Error writing memory: ") + result.errorString(), LogError);
- sendGdbServerMessage("E21");
- }
-}
-
-QByteArray GdbCodaEngine::mainThreadContextId() const
-{
- return RunControlContext::codaId(m_session.pid, m_session.mainTid);
-}
-
-QByteArray GdbCodaEngine::currentThreadContextId() const
-{
- return RunControlContext::codaId(m_session.pid, m_session.tid);
-}
-
-void GdbCodaEngine::sendContinue()
-{
- // Remove all but main thread as we do not know whether they will exist
- // at the next stop.
- if (m_snapshot.threadInfo.size() > 1)
- m_snapshot.threadInfo.remove(1, m_snapshot.threadInfo.size() - 1);
- m_codaDevice->sendRunControlResumeCommand(CodaCallback(), m_codaProcessId);
-}
-
-void GdbCodaEngine::sendStepRange()
-{
- uint from = m_snapshot.lineFromAddress;
- uint to = m_snapshot.lineToAddress;
- const uint pc = m_snapshot.registerValue(m_session.tid, RegisterPC);
- if (from <= pc && pc <= to) {
- const QString msg = _("Step in 0x%1 .. 0x%2 instead of 0x%3...").
- arg(from, 0, 16).arg(to, 0, 16).arg(pc, 0, 16);
- showMessage(msg);
- } else {
- from = pc;
- to = pc;
- }
- // TODO: Step range does not seem to work yet?
- const RunControlResumeMode mode = (from == to && to == pc) ?
- (m_snapshot.stepOver ? RM_STEP_OVER : RM_STEP_INTO) :
- (m_snapshot.stepOver ? RM_STEP_OVER_RANGE : RM_STEP_INTO_RANGE);
-
- logMessage(_("Stepping from 0x%1 to 0x%2 (current PC=0x%3), mode %4").
- arg(from, 0, 16).arg(to, 0, 16).arg(pc).arg(int(mode)));
- m_codaDevice->sendRunControlResumeCommand(
- CodaCallback(this, &GdbCodaEngine::handleStep),
- currentThreadContextId(),
- mode, 1, from, to);
-}
-
-void GdbCodaEngine::handleStep(const CodaCommandResult &result)
-{
- if (!result) { // Try fallback with Continue.
- logMessage(QString::fromLatin1("Error while stepping: %1 (fallback to 'continue')").
- arg(result.errorString()), LogWarning);
- sendContinue();
- // Doing nothing as below does not work as gdb seems to insist on
- // making some progress through a 'step'.
- //sendMessage(0x12,
- // TrkCB(handleAndReportReadRegistersAfterStop),
- // trkReadRegistersMessage());
- return;
- }
- // The gdb server response is triggered later by the Stop Reply packet.
- logMessage(QLatin1String("STEP FINISHED ") + currentTime());
-}
-
-} // namespace Internal
-} // namespace Debugger
diff --git a/src/plugins/debugger/gdb/codagdbadapter.h b/src/plugins/debugger/gdb/codagdbadapter.h
deleted file mode 100644
index d4e6d2df0a..0000000000
--- a/src/plugins/debugger/gdb/codagdbadapter.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef DEBUGGER_CODAGDBADAPTER_H
-#define DEBUGGER_CODAGDBADAPTER_H
-
-#include "gdbengine.h"
-#include "localgdbprocess.h"
-#include "callback.h"
-#include "codautils.h"
-#include "symbian.h"
-
-#include <QPointer>
-#include <QSharedPointer>
-#include <QStringList>
-#include <QHash>
-
-QT_BEGIN_NAMESPACE
-class QTcpServer;
-class QTcpSocket;
-class QIODevice;
-QT_END_NAMESPACE
-
-namespace Coda {
- struct CodaCommandResult;
- class CodaDevice;
- class CodaEvent;
- class CodaRunControlModuleLoadContextSuspendedEvent;
-}
-
-namespace SymbianUtils {
-class SymbianDevice;
-}
-
-namespace Debugger {
-namespace Internal {
-
-struct MemoryRange;
-struct GdbResult;
-
-///////////////////////////////////////////////////////////////////////
-//
-// CodaGdbAdapter
-//
-///////////////////////////////////////////////////////////////////////
-
-class GdbCodaEngine : public GdbEngine
-{
- Q_OBJECT
-
-public:
- typedef Coda::Callback<const GdbResult &> GdbResultCallback;
- typedef Coda::Callback<const Coda::CodaCommandResult &> CodaCallback;
- typedef Coda::Callback<const GdbResponse &> GdbCallback;
-
- explicit GdbCodaEngine(const DebuggerStartParameters &startParameters);
- ~GdbCodaEngine();
-
- void setGdbServerName(const QString &name);
- QString gdbServerName() const { return m_gdbServerName; }
-
- Q_SLOT void setVerbose(const QVariant &value);
- void setVerbose(int verbose);
- void setBufferedMemoryRead(bool b) { m_bufferedMemoryRead = b; }
-
- void codaReloadRegisters();
- void codaReloadThreads();
-
-signals:
- void output(const QString &msg);
-
-public:
- //
- // Implementation of GdbProcessBase
- //
- void start(const QString &program, const QStringList &args,
- QIODevice::OpenMode mode = QIODevice::ReadWrite);
- void write(const QByteArray &data);
- bool isCodaAdapter() const { return true; }
-
- virtual DumperHandling dumperHandling() const { return DumperNotAvailable; }
-
-private:
- void setupDeviceSignals();
- void setupEngine();
- void handleGdbStartFailed();
- void setupInferior();
- void runEngine();
- void interruptInferior2();
- void shutdownEngine();
- void sendRunControlTerminateCommand();
- void handleRunControlTerminate(const Coda::CodaCommandResult &);
- void sendRegistersGetMCommand();
- void handleWriteRegister(const Coda::CodaCommandResult &result);
- void reportRegisters();
- void handleReadRegisters(const Coda::CodaCommandResult &result);
- void handleRegisterChildren(const Coda::CodaCommandResult &result);
- void handleAndReportReadRegisters(const Coda::CodaCommandResult &result);
- void handleAndReportReadRegister(const Coda::CodaCommandResult &result);
- void handleAndReportReadRegistersAfterStop(const Coda::CodaCommandResult &result);
- QByteArray stopMessage() const;
- void handleAndReportSetBreakpoint(const Coda::CodaCommandResult &result);
- void handleClearBreakpoint(const Coda::CodaCommandResult &result);
- void readMemory(uint addr, uint len, bool buffered);
- void handleReadMemoryBuffered(const Coda::CodaCommandResult &result);
- void handleReadMemoryUnbuffered(const Coda::CodaCommandResult &result);
- void handleWriteMemory(const Coda::CodaCommandResult &result);
- void tryAnswerGdbMemoryRequest(bool buffered);
- inline void sendMemoryGetCommand(const MemoryRange &range, bool buffered);
- void addThread(unsigned id);
- inline QByteArray mainThreadContextId() const;
- inline QByteArray currentThreadContextId() const;
-
- AbstractGdbProcess *gdbProc() { return &m_gdbProc; }
-
- void cleanup();
-
- void handleTargetRemote(const GdbResponse &response);
-
- QString m_gdbServerName; // 127.0.0.1:(2222+uid)
- bool m_running;
- int m_stopReason;
-
- QSharedPointer<Coda::CodaDevice> m_codaDevice;
-
- //
- // Gdb
- //
- Q_SLOT void handleGdbConnection();
- Q_SLOT void readGdbServerCommand();
- Q_SLOT void codaDeviceError(const QString &);
- Q_SLOT void codaDeviceRemoved(const SymbianUtils::SymbianDevice &dev);
- Q_SLOT void codaEvent(const Coda::CodaEvent &knownEvent);
- void handleCodaRunControlModuleLoadContextSuspendedEvent(const Coda::CodaRunControlModuleLoadContextSuspendedEvent &e);
- inline void sendContinue();
- void sendStepRange();
- void handleStep(const Coda::CodaCommandResult &result);
- void handleCreateProcess(const Coda::CodaCommandResult &result);
-
- void readGdbResponse();
- void handleGdbServerCommand(const QByteArray &cmd);
- void sendGdbServerMessage(const QByteArray &msg,
- const QByteArray &logNote = QByteArray());
- void sendGdbServerAck();
- bool sendGdbServerPacket(const QByteArray &packet, bool doFlush);
- void gdbSetCurrentThread(const QByteArray &cmd, const char *why);
-
- void logMessage(const QString &msg, int channel = LogDebug); // triggers output() if m_verbose
- Q_SLOT void codaLogMessage(const QString &msg);
-
- QPointer<QTcpServer> m_gdbServer;
- QPointer<QTcpSocket> m_gdbConnection;
- QByteArray m_gdbReadBuffer;
- bool m_gdbAckMode;
-
- // Debuggee state
- Coda::Session m_session; // global-ish data (process id, target information)
- Symbian::Snapshot m_snapshot; // local-ish data (memory and registers)
- QString m_remoteExecutable;
- unsigned m_uid;
- QStringList m_remoteArguments;
- QString m_symbolFile;
- QString m_symbolFileFolder;
- int m_verbose;
- bool m_bufferedMemoryRead;
- bool m_firstResumableExeLoadedEvent;
- // gdb wants registers, but we don't have the names yet. Continue in handler for names
- bool m_registerRequestPending;
- QByteArray m_codaProcessId;
- LocalGdbProcess m_gdbProc;
- bool m_firstHelloEvent;
-};
-
-} // namespace Internal
-} // namespace Debugger
-
-#endif // DEBUGGER_CODAGDBADAPTER_H
diff --git a/src/plugins/debugger/gdb/gdb.pri b/src/plugins/debugger/gdb/gdb.pri
index 3f13fb280b..b371e63e73 100644
--- a/src/plugins/debugger/gdb/gdb.pri
+++ b/src/plugins/debugger/gdb/gdb.pri
@@ -7,14 +7,12 @@ HEADERS += \
$$PWD/localplaingdbadapter.h \
$$PWD/termgdbadapter.h \
$$PWD/remotegdbserveradapter.h \
- $$PWD/codagdbadapter.h \
$$PWD/abstractgdbprocess.h \
$$PWD/localgdbprocess.h \
$$PWD/remotegdbprocess.h \
$$PWD/remoteplaingdbadapter.h \
$$PWD/abstractplaingdbadapter.h \
- $$PWD/startgdbserverdialog.h \
- $$PWD/symbian.h
+ $$PWD/startgdbserverdialog.h
SOURCES += \
$$PWD/gdbmi.cpp \
@@ -27,13 +25,11 @@ SOURCES += \
$$PWD/localplaingdbadapter.cpp \
$$PWD/termgdbadapter.cpp \
$$PWD/remotegdbserveradapter.cpp \
- $$PWD/codagdbadapter.cpp \
$$PWD/abstractgdbprocess.cpp \
$$PWD/localgdbprocess.cpp \
$$PWD/remotegdbprocess.cpp \
$$PWD/remoteplaingdbadapter.cpp \
$$PWD/abstractplaingdbadapter.cpp \
- $$PWD/startgdbserverdialog.cpp \
- $$PWD/symbian.cpp
+ $$PWD/startgdbserverdialog.cpp
RESOURCES += $$PWD/gdb.qrc
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 70dfd05ac7..46ac9ed4d0 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -42,7 +42,6 @@
#include "termgdbadapter.h"
#include "remotegdbserveradapter.h"
#include "remoteplaingdbadapter.h"
-#include "codagdbadapter.h"
#include "debuggeractions.h"
#include "debuggerconstants.h"
@@ -1756,9 +1755,7 @@ void GdbEngine::handleStop2()
reloadStack(false); // Will trigger register reload.
if (supportsThreads()) {
- if (isCodaAdapter()) {
- codaReloadThreads();
- } else if (m_isMacGdb || m_gdbVersion < 70100) {
+ if (m_isMacGdb || m_gdbVersion < 70100) {
postCommand("-thread-list-ids", Discardable, CB(handleThreadListIds));
} else {
// This is only available in gdb 7.1+.
@@ -2161,8 +2158,6 @@ void GdbEngine::executeStep()
setTokenBarrier();
notifyInferiorRunRequested();
showStatusMessage(tr("Step requested..."), 5000);
- if (isCodaAdapter() && stackHandler()->stackSize() > 0)
- postCommand("sal step,0x" + QByteArray::number(stackHandler()->topAddress(), 16));
if (isReverseDebugging()) {
postCommand("reverse-step", RunRequest, CB(handleExecuteStep));
} else {
@@ -2236,8 +2231,6 @@ void GdbEngine::executeNext()
setTokenBarrier();
notifyInferiorRunRequested();
showStatusMessage(tr("Step next requested..."), 5000);
- if (isCodaAdapter() && stackHandler()->stackSize() > 0)
- postCommand("sal next,0x" + QByteArray::number(stackHandler()->topAddress(), 16));
if (isReverseDebugging()) {
postCommand("reverse-next", RunRequest, CB(handleExecuteNext));
} else {
@@ -3132,8 +3125,6 @@ void GdbEngine::insertBreakpoint(BreakpointModelId id)
cmd = "-break-insert -a -f ";
} else if (m_isMacGdb) {
cmd = "-break-insert -l -1 -f ";
- } else if (isCodaAdapter()) {
- cmd = "-break-insert -h -f ";
} else if (m_gdbVersion >= 70000) {
int spec = handler->threadSpec(id);
cmd = "-break-insert ";
@@ -3521,7 +3512,7 @@ void GdbEngine::reloadStack(bool forceGotoLocation)
PENDING_DEBUG("RELOAD STACK");
QByteArray cmd = "-stack-list-frames";
int stackDepth = debuggerCore()->action(MaximalStackDepth)->value().toInt();
- if (stackDepth && !isCodaAdapter())
+ if (stackDepth)
cmd += " 0 " + QByteArray::number(stackDepth);
postCommand(cmd, Discardable, CB(handleStackListFrames),
QVariant::fromValue<StackCookie>(StackCookie(false, forceGotoLocation)));
@@ -3760,17 +3751,10 @@ void GdbEngine::reloadRegisters()
if (!m_registerNamesListed) {
postCommand("-data-list-register-names", CB(handleRegisterListNames));
m_registerNamesListed = true;
- // FIXME: Maybe better completely re-do this logic in CODA adapter.
- if (isCodaAdapter())
- return;
}
- if (isCodaAdapter()) {
- codaReloadRegisters();
- } else {
- postCommand("-data-list-register-values r",
- Discardable, CB(handleRegisterListValues));
- }
+ postCommand("-data-list-register-values r",
+ Discardable, CB(handleRegisterListValues));
}
void GdbEngine::setRegisterValue(int nr, const QString &value)
@@ -3793,9 +3777,6 @@ void GdbEngine::handleRegisterListNames(const GdbResponse &response)
registers.append(Register(item.data()));
registerHandler()->setRegisters(registers);
-
- if (isCodaAdapter())
- codaReloadRegisters();
}
void GdbEngine::handleRegisterListValues(const GdbResponse &response)
@@ -4199,10 +4180,6 @@ WatchData GdbEngine::localVariable(const GdbMi &item,
// pass through the insertData() machinery.
if (isIntOrFloatType(data.type) || isPointerType(data.type))
setWatchDataValue(data, item);
- if (isSymbianIntType(data.type)) {
- setWatchDataValue(data, item);
- data.setHasChildren(false);
- }
}
if (!watchHandler()->isExpandedIName(data.iname))
@@ -5310,11 +5287,6 @@ void GdbEngine::write(const QByteArray &data)
gdbProc()->write(data);
}
-bool GdbEngine::isCodaAdapter() const
-{
- return false;
-}
-
bool GdbEngine::prepareCommand()
{
#ifdef Q_OS_WIN
@@ -5385,9 +5357,6 @@ void GdbEngine::interruptLocalInferior(qint64 pid)
DebuggerEngine *createGdbEngine(const DebuggerStartParameters &sp)
{
- if (sp.toolChainAbi.os() == Abi::SymbianOS)
- return new GdbCodaEngine(sp);
-
switch (sp.startMode) {
case AttachCore:
return new GdbCoreEngine(sp);
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index 0a4599ec36..18adc7fc17 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -728,11 +728,6 @@ protected:
virtual AbstractGdbProcess *gdbProc() = 0;
virtual DumperHandling dumperHandling() const = 0;
- // CODA specific stuff
- virtual bool isCodaAdapter() const;
- virtual void codaReloadRegisters() {}
- virtual void codaReloadThreads() {}
-
protected:
bool prepareCommand();
void interruptLocalInferior(qint64 pid);
diff --git a/src/plugins/debugger/gdb/pythongdbengine.cpp b/src/plugins/debugger/gdb/pythongdbengine.cpp
index e052ca9c73..df6da0ad1f 100644
--- a/src/plugins/debugger/gdb/pythongdbengine.cpp
+++ b/src/plugins/debugger/gdb/pythongdbengine.cpp
@@ -199,10 +199,7 @@ void GdbEngine::updateAllPython()
postCommand("-stack-list-frames", CB(handleStackListFrames),
QVariant::fromValue<StackCookie>(StackCookie(false, true)));
stackHandler()->setCurrentIndex(0);
- if (isCodaAdapter())
- codaReloadThreads();
- else
- postCommand("-thread-info", CB(handleThreadInfo), 0);
+ postCommand("-thread-info", CB(handleThreadInfo), 0);
reloadRegisters();
updateLocals();
}
diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
index bae3168c84..6b1058961c 100644
--- a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
+++ b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
@@ -74,8 +74,7 @@ GdbEngine::DumperHandling GdbRemoteServerEngine::dumperHandling() const
{
using namespace ProjectExplorer;
const Abi abi = startParameters().toolChainAbi;
- if (abi.os() == Abi::SymbianOS
- || abi.os() == Abi::WindowsOS
+ if (abi.os() == Abi::WindowsOS
|| abi.binaryFormat() == Abi::ElfFormat)
return DumperLoadedByGdb;
return DumperLoadedByGdbPreload;
diff --git a/src/plugins/debugger/gdb/symbian.cpp b/src/plugins/debugger/gdb/symbian.cpp
deleted file mode 100644
index 914df17066..0000000000
--- a/src/plugins/debugger/gdb/symbian.cpp
+++ /dev/null
@@ -1,677 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "symbian.h"
-#include "registerhandler.h"
-#include "threadshandler.h"
-#include <codautils.h>
-
-#include <utils/qtcassert.h>
-
-#include <QDebug>
-#include <QTextStream>
-#include <QFileInfo>
-
-namespace Debugger {
-namespace Internal {
-
-///////////////////////////////////////////////////////////////////////////
-//
-// MemoryRange
-//
-///////////////////////////////////////////////////////////////////////////
-
-MemoryRange::MemoryRange(uint f, uint t)
- : from(f), to(t)
-{
- QTC_ASSERT(f <= t, qDebug() << "F: " << f << " T: " << t);
-}
-
-bool MemoryRange::intersects(const MemoryRange &other) const
-{
- Q_UNUSED(other);
- QTC_CHECK(false);
- return false; // FIXME
-}
-
-void MemoryRange::operator-=(const MemoryRange &other)
-{
- if (from == 0 && to == 0)
- return;
- MEMORY_DEBUG(" SUB: " << *this << " - " << other);
- if (other.from <= from && to <= other.to) {
- from = to = 0;
- return;
- }
- if (other.from <= from && other.to <= to) {
- from = qMax(from, other.to);
- return;
- }
- if (from <= other.from && to <= other.to) {
- to = qMin(other.from, to);
- return;
- }
- // This would split the range.
- QTC_ASSERT(false, qDebug() << "Memory::operator-() not handled for: "
- << *this << " - " << other);
-}
-
-QDebug operator<<(QDebug d, const MemoryRange &range)
-{
- return d << QString::fromLatin1("[%1,%2] (size %3) ")
- .arg(range.from, 0, 16).arg(range.to, 0, 16).arg(range.size());
-}
-
-namespace Symbian {
-
-static const char *registerNames[KnownRegisters] =
-{
- "A1", "A2", "A3", "A4",
- 0, 0, 0, 0,
- 0, 0, 0, "AP",
- "IP", "SP", "LR", "PC",
- "PSTrk", 0, 0, 0,
- 0, 0, 0, 0,
- 0, "PSGdb"
-};
-
-const char *registerName(int i)
-{
- return registerNames[i];
-}
-
-QByteArray dumpRegister(uint n, uint value)
-{
- QByteArray ba;
- ba += ' ';
- if (n < KnownRegisters && registerNames[n]) {
- ba += registerNames[n];
- } else {
- ba += '#';
- ba += QByteArray::number(n);
- }
- ba += '=';
- ba += Coda::hexxNumber(value);
- return ba;
-}
-
-///////////////////////////////////////////////////////////////////////////
-//
-// Thread
-//
-///////////////////////////////////////////////////////////////////////////
-
-Thread::Thread(unsigned theId) : id(theId)
-{
- resetRegisters();
-}
-
-void Thread::resetRegisters()
-{
- qFill(registers, registers + RegisterCount, uint(0));
- registerValid = false;
-}
-
-QByteArray Thread::gdbReportRegisters() const
-{
- QByteArray ba;
- for (int i = 0; i < 16; ++i) {
- const uint reg = Coda::swapEndian(registers[i]);
- ba += Coda::hexNumber(reg, 8);
- }
- return ba;
-}
-
-QByteArray Thread::registerContentsLogMessage() const
-{
- QByteArray logMsg;
- for (int i = 0; i < RegisterCount; ++i) {
- logMsg += dumpRegister(i, registers[i]);
- logMsg += ' ';
- }
- return logMsg;
-}
-
-QByteArray Thread::gdbRegisterLogMessage(bool verbose) const
-{
- QByteArray logMsg = "Register contents: (Thread 0x";
- logMsg += QByteArray::number(id, 16);
- logMsg += " ) ";
- if (verbose)
- logMsg += registerContentsLogMessage();
- return logMsg;
-}
-
-QByteArray Thread::gdbReportSingleRegister(unsigned i) const
-{
- if (i == RegisterPSGdb)
- i = RegisterPSCoda;
- if (i >= RegisterCount)
- return QByteArray("0000"); // Unknown
- QByteArray ba;
- appendInt(&ba, registers[i], Coda::LittleEndian);
- return ba.toHex();
-}
-
-QByteArray Thread::gdbSingleRegisterLogMessage(unsigned i) const
-{
- if (i == RegisterPSGdb)
- i = RegisterPSCoda;
- if (i >= RegisterCount)
- return QByteArray("Read single unknown register #") + QByteArray::number(i);
- QByteArray logMsg = "Read Register ";
- logMsg += dumpRegister(i, registers[i]);
- return logMsg;
-}
-
-///////////////////////////////////////////////////////////////////////////
-//
-// Snapshot
-//
-///////////////////////////////////////////////////////////////////////////
-
-Snapshot::Snapshot()
-{
- reset();
- threadInfo.reserve(10);
-}
-
-void Snapshot::reset()
-{
- MEMORY_DEBUG("RESET SNAPSHOT MEMORY INITIALLY: " << memory.size() << " BLOCK LEFT");
- for (Memory::Iterator it = memory.begin(); it != memory.end(); ) {
- MEMORY_DEBUG("EXAMINING " << it.key());
- it = memory.erase(it);
- }
- MEMORY_DEBUG("RESET SNAPSHOT MEMORY FINALLY: " << memory.size() << " BLOCK LEFT");
-
- const int threadCount = threadInfo.size();
- for (int i =0; i < threadCount; i++) {
- threadInfo[i].resetRegisters();
- threadInfo[i].state.clear();
- }
-
- wantedMemory = MemoryRange();
- lineFromAddress = 0;
- lineToAddress = 0;
-}
-
-void Snapshot::resetMemory()
-{
- memory.clear();
- reset();
-}
-
-void Snapshot::fullReset()
-{
- threadInfo.clear();
- resetMemory();
-}
-
-void Snapshot::insertMemory(const MemoryRange &range, const QByteArray &ba)
-{
- QTC_ASSERT(range.size() == uint(ba.size()),
- qDebug() << "RANGE: " << range << " BA SIZE: " << ba.size(); return);
-
- MEMORY_DEBUG("INSERT: " << range);
- // Try to combine with existing chunk.
- Snapshot::Memory::iterator it = memory.begin();
- Snapshot::Memory::iterator et = memory.end();
- for ( ; it != et; ++it) {
- if (range.from == it.key().to) {
- MEMORY_DEBUG("COMBINING " << it.key() << " AND " << range);
- QByteArray data = *it;
- data.append(ba);
- const MemoryRange res(it.key().from, range.to);
- memory.remove(it.key());
- MEMORY_DEBUG(" TO(1) " << res);
- insertMemory(res, data);
- return;
- }
- if (it.key().from == range.to) {
- MEMORY_DEBUG("COMBINING " << range << " AND " << it.key());
- QByteArray data = ba;
- data.append(*it);
- const MemoryRange res(range.from, it.key().to);
- memory.remove(it.key());
- MEMORY_DEBUG(" TO(2) " << res);
- insertMemory(res, data);
- return;
- }
- }
-
- // Not combinable, add chunk.
- memory.insert(range, ba);
-}
-
-QString Snapshot::toString() const
-{
- typedef QMap<MemoryRange, QByteArray>::const_iterator MemCacheConstIt;
- QString rc;
- QTextStream str(&rc);
- foreach(const Thread &thread, threadInfo) {
- str << " Thread " << thread.id << ' ' << thread.state
- << " Register valid " << thread.registerValid << ' ';
- if (thread.registerValid) {
- for (int i = 0; i < RegisterCount; i++) {
- if (i)
- str << ", ";
- str << " R" << i << "=0x";
- str.setIntegerBase(16);
- str << thread.registers[i];
- str.setIntegerBase(10);
- }
- }
- }
- str << '\n';
- // For next step.
- if (!memory.isEmpty()) {
- str.setIntegerBase(16);
- str << "Memory:\n";
- const MemCacheConstIt mcend = memory.constEnd();
- for (MemCacheConstIt it = memory.constBegin(); it != mcend; ++it)
- str << " 0x" << it.key().from << " - 0x" << it.key().to << '\n';
- }
- return rc;
-}
-
-void Snapshot::addThread(uint id)
-{
- if (!id || id == uint(-1)) {
- qWarning("Cowardly refusing to add thread %d", id);
- return;
- }
-
- const int index = indexOfThread(id);
- if (index == -1) {
- threadInfo.push_back(Thread(id));
- } else {
- threadInfo[index].resetRegisters();
- qWarning("Attempt to re-add existing thread %d", id);
- }
-}
-
-void Snapshot::removeThread(uint id)
-{
- const int index = indexOfThread(id);
- if (index != -1) {
- threadInfo.remove(index);
- } else {
- qWarning("Attempt to remove non-existing thread %d", id);
- }
-}
-
-int Snapshot::indexOfThread(uint id) const
-{
- const int count = threadInfo.size();
- for (int i = 0; i < count; i++)
- if (threadInfo.at(i).id == id)
- return i;
- return -1;
-}
-
-uint *Snapshot::registers(uint threadId)
-{
- const int index = indexOfThread(threadId);
- QTC_ASSERT(index != -1, { qWarning("No such thread %d", threadId); return 0; } );
- return threadInfo[index].registers;
-}
-
-const uint *Snapshot::registers(uint threadId) const
-{
- const int index = indexOfThread(threadId);
- QTC_ASSERT(index != -1, return 0; );
- return threadInfo.at(index).registers;
-}
-
-uint Snapshot::registerValue(uint threadId, uint index)
-{
- if (const uint *regs = registers(threadId))
- return regs[index];
- return 0;
-}
-
-void Snapshot::setRegisterValue(uint threadId, uint index, uint value)
-{
- uint *regs = registers(threadId);
- QTC_ASSERT(regs, return; );
- regs[index] = value;
-}
-
-bool Snapshot::registersValid(uint threadId) const
-{
- const int index = indexOfThread(threadId);
- return index != -1 ? threadInfo.at(index).registerValid : false;
-}
-
-void Snapshot::setRegistersValid(uint threadId, bool e)
-{
- const int index = indexOfThread(threadId);
- QTC_ASSERT(index != -1, return; );
- threadInfo[index].registerValid = e;
-}
-
-void Snapshot::setThreadState(uint threadId, const QString &state)
-{
- const int index = indexOfThread(threadId);
- QTC_ASSERT(index != -1, return; );
- threadInfo[index].state = state;
-}
-
-QByteArray Snapshot::gdbQsThreadInfo() const
-{
- // FIXME: Limit packet length by using qsThreadInfo packages ('m', ..'l')
- QByteArray response(1, 'l');
- const int count = threadInfo.size();
- for (int i = 0; i < count; i++) {
- if (i)
- response += ',';
- response += Coda::hexNumber(threadInfo.at(i).id);
- }
- return response;
-}
-
-// $qThreadExtraInfo,1f9#55
-QByteArray Snapshot::gdbQThreadExtraInfo(const QByteArray &cmd) const
-{
- const int pos = cmd.indexOf(',');
- if (pos != 1) {
- const uint threadId = cmd.mid(pos + 1).toUInt(0, 16);
- const int threadIndex = indexOfThread(threadId);
- if (threadIndex != -1 && !threadInfo.at(threadIndex).state.isEmpty())
- return threadInfo.at(threadIndex).state.toAscii().toHex();
- }
- return QByteArray("Nothing special").toHex();
-}
-
-static void gdbAppendRegister(QByteArray *ba, uint regno, uint value)
-{
- ba->append(Coda::hexNumber(regno, 2));
- ba->append(':');
- ba->append(Coda::hexNumber(Coda::swapEndian(value), 8));
- ba->append(';');
-}
-
-QByteArray Snapshot::gdbStopMessage(uint threadId, int signalNumber, bool reportThreadId) const
-{
- QByteArray ba = ('T' + Coda::hexNumber(signalNumber, 2));
- if (reportThreadId) {
- ba += "thread:";
- ba += Coda::hexNumber(threadId, 3);
- ba += ';';
- }
- const int threadIndex = indexOfThread(threadId);
- QTC_ASSERT(threadIndex != -1, return QByteArray(); );
- const Thread &thread = threadInfo.at(threadIndex);
- for (int i = 0; i < 16; ++i)
- gdbAppendRegister(&ba, i, thread.registers[i]);
- // FIXME: those are not understood by gdb 6.4
- //for (int i = 16; i < 25; ++i)
- // appendRegister(&ba, i, 0x0);
- gdbAppendRegister(&ba, RegisterPSGdb, thread.registers[RegisterPSCoda]);
- return ba;
-}
-
-// Format log message for memory access with some smartness about registers
-QByteArray Snapshot::memoryReadLogMessage(uint addr, uint threadId, bool verbose, const QByteArray &ba) const
-{
- QByteArray logMsg = "memory contents";
- const uint *regs = registers(threadId);
- if (verbose && regs) {
- logMsg += " addr: " + Coda::hexxNumber(addr);
- // indicate dereferencing of registers
- if (ba.size() == 4) {
- if (addr == regs[RegisterPC]) {
- logMsg += "[PC]";
- } else if (addr == regs[RegisterPSCoda]) {
- logMsg += "[PSTrk]";
- } else if (addr == regs[RegisterSP]) {
- logMsg += "[SP]";
- } else if (addr == regs[RegisterLR]) {
- logMsg += "[LR]";
- } else if (addr > regs[RegisterSP] &&
- (addr - regs[RegisterSP]) < 10240) {
- logMsg += "[SP+"; // Stack area ...stack seems to be top-down
- logMsg += QByteArray::number(addr - regs[RegisterSP]);
- logMsg += ']';
- }
- }
- logMsg += " length ";
- logMsg += QByteArray::number(ba.size());
- logMsg += " :";
- logMsg += Coda::stringFromArray(ba, ba.size()).toAscii();
- }
- return logMsg;
-}
-
-void Snapshot::syncRegisters(uint threadId, RegisterHandler *handler) const
-{
- // Take advantage of direct access to cached register values.
- const int threadIndex = indexOfThread(threadId);
- QTC_ASSERT(threadIndex != -1, return ;);
- const Thread &thread = threadInfo.at(threadIndex);
- QTC_ASSERT(thread.registerValid, return ;);
-
- Registers debuggerRegisters = handler->registers();
- QTC_ASSERT(debuggerRegisters.size() >= RegisterPSGdb,
- qDebug() << "HAVE: " << debuggerRegisters.size(); return);
-
- for (int i = 0; i < RegisterCount; ++i) {
- const int gdbIndex = i == RegisterPSCoda ? int(RegisterPSGdb) : i;
- Register &reg = debuggerRegisters[gdbIndex];
- reg.value = Coda::hexxNumber(thread.registers[i]);
- }
- handler->setAndMarkRegisters(debuggerRegisters);
-}
-
-void Snapshot::parseGdbStepRange(const QByteArray &cmd, bool so)
-{
- const int pos = cmd.indexOf(',', 8);
- lineFromAddress = cmd.mid(8, pos - 8).toUInt(0, 16);
- lineToAddress = cmd.mid(pos + 1).toUInt(0, 16);
- stepOver = so;
-}
-
-void Snapshot::syncThreads(ThreadsHandler *handler) const
-{
- // Take advantage of direct access to cached register values.
- Threads threads;
- const unsigned count = threadInfo.size();
- for (unsigned t = 0; t < count; ++t) {
- ThreadData thread(t + 1); // Fake gdb thread ids starting from 1
- thread.targetId = QString::number(threadInfo.at(t).id);
- thread.state = threadInfo.at(t).state;
- threads.append(thread);
- }
- handler->setThreads(threads);
-}
-
-// Answer to gdb's 'qSupported' query:
-// Increase buffer size for qXfer::libraries XML response
-const char *gdbQSupported =
- "PacketSize=20000;"
- "QPassSignals+;"
- "QStartNoAckMode+;"
- "qXfer:libraries:read+;"
- // "qXfer:auxv:read+;"
- "qXfer:features:read+;"
- "qRelocInsn-"; // Relocate instructions for trace (gdb 7.2+): Not supported.
-
-// Answer to gdb "qXfer:features:read:target.xml:" request
-// "l<target><architecture>symbianelf</architecture></target>"
-// "l<target><architecture>arm-none-symbianelf</architecture></target>"
-
-const char *gdbArchitectureXml = "l<target><architecture>arm</architecture></target>";
-
-QVector<QByteArray> gdbStartupSequence()
-{
- QVector<QByteArray> s;
- s.reserve(10);
- s.push_back(QByteArray("set breakpoint always-inserted on"));
- s.push_back(QByteArray("set breakpoint auto-hw on"));
- s.push_back(QByteArray("set trust-readonly-sections on")); // No difference?
- s.push_back(QByteArray("set displaced-stepping on")); // No difference?
- s.push_back(QByteArray("set mem inaccessible-by-default"));
- s.push_back(QByteArray("mem 0x00400000 0x70000000 cache"));
- s.push_back(QByteArray("mem 0x70000000 0x80000000 cache ro"));
- // FIXME: replace with stack-cache for newer gdb?
- s.push_back(QByteArray("set remotecache on")); // "info dcache" to check
- return s;
-}
-
-// Local symbol file handling
-
-enum { symDebug = 0 };
-
-// Build complete file name of a local sym file from DLL
-// 'QtCore.dll' to 'c:\\foo\QtCore.dll.sym'.
-
-static inline QString symFileName(const QString &folder,
- const QString &libName)
-{
- QString fileName = folder;
- fileName.append(QLatin1Char('/'));
- fileName.append(libName);
- fileName.append(QLatin1String(".sym"));
- return fileName;
-}
-
-// Look up in local symbol file matching remote library loaded in
-// cache pointed to by environmentname or in standard location
-// (next to application.sym file).
-QString localSymFileForLibrary(const QByteArray &libName,
- // urel/udeb: exe directory
- const QString &standardSymDirectory)
-{
- // Check
- const QByteArray envSymFileCacheDirectory = qgetenv("QTC_SYMBIAN_SYMBOLFILE_CACHE");
- if (envSymFileCacheDirectory.isEmpty() && standardSymDirectory.isEmpty())
- return QString();
- // Base name
- int lastSlashPos = libName.lastIndexOf('/');
- if (lastSlashPos == -1)
- lastSlashPos = libName.lastIndexOf('\\');
- const QString libBaseName = QString::fromLatin1(lastSlashPos != - 1 ? libName.mid(lastSlashPos + 1) : libName);
- // Check environment variable
- if (!envSymFileCacheDirectory.isEmpty()) {
- const QFileInfo envFi(symFileName(QString::fromLatin1(envSymFileCacheDirectory), libBaseName));
- if (symDebug)
- qDebug("SYM-ENV: %s exists %d\n", qPrintable(envFi.absoluteFilePath()), envFi.isFile());
- if (envFi.isFile())
- return envFi.absoluteFilePath();
- }
- // Check standard location
- if (!standardSymDirectory.isEmpty()) {
- const QFileInfo standardFi(symFileName(standardSymDirectory, libBaseName));
- if (symDebug)
- qDebug("SYM-STANDARD: %s exists %d\n", qPrintable(standardFi.absoluteFilePath()), standardFi.isFile());
- if (standardFi.isFile())
- return standardFi.absoluteFilePath();
- }
- return QString();
-}
-
-// Return a load command for a local symbol file for a library with address.
-QByteArray symFileLoadCommand(const QString &symFileNameIn,
- quint64 code, quint64 data)
-{
- QByteArray symFileName = symFileNameIn.toLatin1();
- symFileName.replace('\\', '/'); // gdb wants forward slashes
- QByteArray command = "add-symbol-file \"";
- command += symFileName;
- command += "\" 0x";
- command += QByteArray::number(code, 16);
- if (data) {
- command += " -s .data 0x";
- command += QByteArray::number(data, 16);
- }
- return command;
-}
-
-QString msgLoadLocalSymFile(const QString &symFileName,
- const QByteArray &libName, quint64 code)
-{
- return QString::fromLatin1("Loading symbol file '%1' for '%2' at 0x%3").
- arg(symFileName, QString::fromLatin1(libName)).
- arg(code, 0, 16);
-}
-
-} // namespace Symbian
-
-// Generic gdb server helpers: Read address/length off a memory
-// command like 'm845,455','X845,455:'
-QPair<quint64, unsigned> parseGdbReadMemoryRequest(const QByteArray &cmd)
-{
- QPair<quint64, unsigned> rc(0, 0);
- const int pos = cmd.indexOf(',');
- if (pos == -1)
- return rc;
- bool ok;
- rc.first = cmd.mid(1, pos - 1).toULongLong(&ok, 16);
- if (!ok)
- return rc;
- const int colonPos = cmd.indexOf(':');
- if (colonPos == -1)
- rc.second = cmd.mid(pos + 1).toUInt(&ok, 16);
- else
- rc.second = cmd.mid(pos + 1, colonPos - pos - 1 ).toUInt(&ok, 16);
- if (!ok)
- rc.first = 0;
- return rc;
-}
-
-// Generic gdb server helpers: Parse 'register write' ('P') request
-// return register number/value
-QPair<uint, uint> parseGdbWriteRegisterWriteRequest(const QByteArray &cmd)
-{
- const int pos = cmd.indexOf('=');
- const QByteArray regName = cmd.mid(1, pos - 1);
- const QByteArray valueName = cmd.mid(pos + 1);
- bool ok = false;
- const uint registerNumber = regName.toUInt(&ok, 16);
- const uint value = Coda::swapEndian(valueName.toUInt(&ok, 16));
- return QPair<uint, uint>(registerNumber, value);
-}
-
-// Generic gdb server helpers: Parse 'set breakpoint' ('Z0') request
-// return address/length
-QPair<quint64, unsigned> parseGdbSetBreakpointRequest(const QByteArray &cmd)
-{
- // $Z0,786a4ccc,4#99
- const int pos = cmd.lastIndexOf(',');
- bool ok1 = false;
- bool ok2 = false;
- const quint64 addr = cmd.mid(3, pos - 3).toULongLong(&ok1, 16);
- const uint len = cmd.mid(pos + 1).toUInt(&ok2, 16);
- return ok1 && ok2 ? QPair<quint64, unsigned>(addr, len) : QPair<quint64, unsigned>(0, 0);
-}
-
-} // namespace Internal
-} // namespace Debugger
diff --git a/src/plugins/debugger/gdb/symbian.h b/src/plugins/debugger/gdb/symbian.h
deleted file mode 100644
index 76489a418f..0000000000
--- a/src/plugins/debugger/gdb/symbian.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SYMBIANUTILS_H
-#define SYMBIANUTILS_H
-
-#include <QMap>
-#include <QByteArray>
-#include <QString>
-#include <QMetaType>
-#include <QVector>
-#include <QPair>
-
-QT_BEGIN_NAMESPACE
-class QDebug;
-QT_END_NAMESPACE
-
-//#define DEBUG_MEMORY 1
-#if DEBUG_MEMORY
-# define MEMORY_DEBUG(s) qDebug() << s
-#else
-# define MEMORY_DEBUG(s)
-#endif
-#define MEMORY_DEBUGX(s) qDebug() << s
-
-namespace Debugger {
-namespace Internal {
-class RegisterHandler;
-class ThreadsHandler;
-struct GdbResult {
- QByteArray data;
-};
-
-struct MemoryRange
-{
- MemoryRange() : from(0), to(0) {}
- MemoryRange(uint f, uint t);
- void operator-=(const MemoryRange &other);
- bool intersects(const MemoryRange &other) const;
- quint64 hash() const { return (quint64(from) << 32) + to; }
- bool operator==(const MemoryRange &other) const { return hash() == other.hash(); }
- bool operator<(const MemoryRange &other) const { return hash() < other.hash(); }
- uint size() const { return to - from; }
-
- uint from; // Inclusive.
- uint to; // Exclusive.
-};
-
-QDebug operator<<(QDebug d, const MemoryRange &range);
-
-// Signals to be passed to gdb server as stop reason (2 digit hex)
-enum GdbServerStopReason {
- gdbServerSignalTrap = 5, // Trap/Breakpoint, etc.
- gdbServerSignalSegfault = 11 // Segfault
-};
-
-namespace Symbian {
-
-enum CodeMode
-{
- ArmMode = 0,
- ThumbMode
-};
-
-enum TargetConstants
-{
- RegisterCount = 17,
- RegisterSP = 13, // Stack Pointer
- RegisterLR = 14, // Return address
- RegisterPC = 15, // Program counter
- RegisterPSGdb = 25, // gdb's view of the world
- RegisterPSCoda = 16, // CODA's view of the world
-
- MemoryChunkSize = 256
-};
-
-enum { KnownRegisters = RegisterPSGdb + 1};
-
-const char *registerName(int i);
-QByteArray dumpRegister(uint n, uint value);
-
-inline bool isReadOnly(const MemoryRange &mr)
-{
- return mr.from >= 0x70000000 && mr.to < 0x80000000;
-}
-
-// Snapshot thread with cached registers
-struct Thread {
- explicit Thread(unsigned id = 0);
-
- void resetRegisters();
- // Gdb helpers for reporting values
- QByteArray gdbReportRegisters() const;
- QByteArray registerContentsLogMessage() const;
- QByteArray gdbRegisterLogMessage(bool verbose) const;
- QByteArray gdbReportSingleRegister(unsigned i) const;
- QByteArray gdbSingleRegisterLogMessage(unsigned i) const;
-
- uint id;
- uint registers[RegisterCount];
- bool registerValid;
- QString state; // Stop reason, for qsThreadExtraInfo
-};
-
-struct Snapshot
-{
- Snapshot();
-
- void reset(); // Leaves read-only memory cache and threads alive.
- void resetMemory(); // Completely clears memory, leaves threads alive.
- void fullReset(); // Clear everything.
- void insertMemory(const MemoryRange &range, const QByteArray &ba);
- QString toString() const;
-
- // Helpers to format gdb query packets
- QByteArray gdbQsThreadInfo() const;
- QByteArray gdbQThreadExtraInfo(const QByteArray &cmd) const;
- // Format a gdb T05 stop message with thread and register set
- QByteArray gdbStopMessage(uint threadId, int signalNumber, bool reportThreadId) const;
- // Format a log message for memory access with some smartness about registers
- QByteArray memoryReadLogMessage(uint addr, uint threadId, bool verbose, const QByteArray &ba) const;
- // Gdb command parse helpers: 'salnext'
- void parseGdbStepRange(const QByteArray &cmd, bool stepOver);
-
- void addThread(uint threadId);
- void removeThread(uint threadId);
- int indexOfThread(uint threadId) const;
- // Access registers by thread
- const uint *registers(uint threadId) const;
- uint *registers(uint threadId);
- uint registerValue(uint threadId, uint index);
- void setRegisterValue(uint threadId, uint index, uint value);
- bool registersValid(uint threadId) const;
- void setRegistersValid(uint threadId, bool e);
- void setThreadState(uint threadId, const QString&);
-
- // Debugger view helpers: Synchronize registers of thread with register handler.
- void syncRegisters(uint threadId, RegisterHandler *handler) const;
- // Debugger view helpers: Synchronize threads with threads handler.
- void syncThreads(ThreadsHandler *handler) const;
-
- QVector<Thread> threadInfo;
-
- typedef QMap<MemoryRange, QByteArray> Memory;
- Memory memory;
-
- // Current state.
- MemoryRange wantedMemory;
-
- // For next step.
- uint lineFromAddress;
- uint lineToAddress;
- bool stepOver;
-};
-
-struct Breakpoint
-{
- Breakpoint(uint offset_ = 0)
- {
- number = 0;
- offset = offset_;
- mode = ArmMode;
- }
- uint offset;
- ushort number;
- CodeMode mode;
-};
-
-// Gdb helpers
-extern const char *gdbQSupported;
-extern const char *gdbArchitectureXml;
-
-QVector<QByteArray> gdbStartupSequence();
-
-// Look up in symbol file matching library name in local cache
-QString localSymFileForLibrary(const QByteArray &libName,
- const QString &standardSymDirectory = QString());
-// Return a load command for a local symbol file for a library
-QByteArray symFileLoadCommand(const QString &symFileName, quint64 code,
- quint64 data = 0);
-// Utility message
-QString msgLoadLocalSymFile(const QString &symFileName,
- const QByteArray &libName, quint64 code);
-
-} // namespace Symbian
-
-// Generic gdb server helpers: read 'm','X' commands.
-QPair<quint64, unsigned> parseGdbReadMemoryRequest(const QByteArray &cmd);
-// Parse 'register write' ('P') request, return register number/value
-QPair<uint, uint> parseGdbWriteRegisterWriteRequest(const QByteArray &cmd);
-// Parse 'set breakpoint' ('Z0') request, return address/length
-QPair<quint64, unsigned> parseGdbSetBreakpointRequest(const QByteArray &cmd);
-
-} // namespace Internal
-} // namespace Debugger
-
-Q_DECLARE_METATYPE(Debugger::Internal::MemoryRange)
-
-#endif // SYMBIANUTILS_H
diff --git a/src/plugins/debugger/qml/qmladapter.cpp b/src/plugins/debugger/qml/qmladapter.cpp
index 7c72e468dc..05da501875 100644
--- a/src/plugins/debugger/qml/qmladapter.cpp
+++ b/src/plugins/debugger/qml/qmladapter.cpp
@@ -91,19 +91,6 @@ void QmlAdapter::beginConnectionTcp(const QString &address, quint16 port)
m_connectionTimer.start();
}
-void QmlAdapter::beginConnectionOst(const QString &channel)
-{
- if (m_engine.isNull()
- || (m_conn && m_conn->state() != QAbstractSocket::UnconnectedState))
- return;
-
- showConnectionStatusMessage(tr("Connecting to debug server on %1").arg(channel));
- m_conn->connectToOst(channel);
-
- //A timeout to check the connection state
- m_connectionTimer.start();
-}
-
void QmlAdapter::closeConnection()
{
if (m_connectionTimer.isActive()) {
diff --git a/src/plugins/debugger/qml/qmladapter.h b/src/plugins/debugger/qml/qmladapter.h
index 7ed0a385b3..e8ab370acc 100644
--- a/src/plugins/debugger/qml/qmladapter.h
+++ b/src/plugins/debugger/qml/qmladapter.h
@@ -63,7 +63,6 @@ public:
virtual ~QmlAdapter();
void beginConnectionTcp(const QString &address, quint16 port);
- void beginConnectionOst(const QString &port);
void closeConnection();
QmlDebug::QmlDebugConnection *connection() const;
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 0e8c5f3c5b..9fb7e8167d 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -419,8 +419,6 @@ void QmlEngine::beginConnection(quint16 port)
QTC_ASSERT(state() == EngineRunRequested, return);
if (port > 0) {
- QTC_CHECK(startParameters().communicationChannel
- == DebuggerStartParameters::CommunicationChannelTcpIp);
QTC_ASSERT(startParameters().connParams.port == 0
|| startParameters().connParams.port == port,
qWarning() << "Port " << port << "from application output does not match"
@@ -428,16 +426,9 @@ void QmlEngine::beginConnection(quint16 port)
m_adapter.beginConnectionTcp(startParameters().qmlServerAddress, port);
return;
}
- if (startParameters().communicationChannel
- == DebuggerStartParameters::CommunicationChannelTcpIp) {
- // no port from application output, use the one from start parameters ...
- m_adapter.beginConnectionTcp(startParameters().qmlServerAddress,
- startParameters().qmlServerPort);
- } else {
- QTC_CHECK(startParameters().communicationChannel
- == DebuggerStartParameters::CommunicationChannelUsb);
- m_adapter.beginConnectionOst(startParameters().remoteChannel);
- }
+ // no port from application output, use the one from start parameters ...
+ m_adapter.beginConnectionTcp(startParameters().qmlServerAddress,
+ startParameters().qmlServerPort);
}
void QmlEngine::connectionStartupFailed()
diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp
index de26258c3d..2e2fb33457 100644
--- a/src/plugins/debugger/watchutils.cpp
+++ b/src/plugins/debugger/watchutils.cpp
@@ -514,11 +514,6 @@ QByteArray gdbQuoteTypes(const QByteArray &type)
return result;
}
-bool isSymbianIntType(const QByteArray &type)
-{
- return type == "TInt" || type == "TBool";
-}
-
// Utilities to decode string data returned by the dumper helpers.
QString quoteUnprintableLatin1(const QByteArray &ba)
diff --git a/src/plugins/debugger/watchutils.h b/src/plugins/debugger/watchutils.h
index 28ff1767a9..ced524a88a 100644
--- a/src/plugins/debugger/watchutils.h
+++ b/src/plugins/debugger/watchutils.h
@@ -96,7 +96,6 @@ QByteArray gdbQuoteTypes(const QByteArray &type);
bool isFloatType(const QByteArray &type);
bool isIntOrFloatType(const QByteArray &type);
bool isIntType(const QByteArray &type);
-bool isSymbianIntType(const QByteArray &type);
QString formatToolTipAddress(quint64 a);
diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp
index 3590c0addd..2cd816a912 100644
--- a/src/plugins/projectexplorer/abi.cpp
+++ b/src/plugins/projectexplorer/abi.cpp
@@ -265,10 +265,6 @@ static QList<Abi> abiOf(const QByteArray &data)
result.append(macAbiForCpu(type));
pos += 20;
}
- } else if (data.size() >= 20
- && getUint8(data, 16) == 'E' && getUint8(data, 17) == 'P'
- && getUint8(data, 18) == 'O' && getUint8(data, 19) == 'C') {
- result.append(Abi(Abi::ArmArchitecture, Abi::SymbianOS, Abi::SymbianDeviceFlavor, Abi::ElfFormat, 32));
} else if (data.size() >= 64){
// Windows PE: values are LE (except for a few exceptions which we will not use here).
@@ -312,10 +308,6 @@ Abi::Abi(const Architecture &a, const OS &o,
if (m_osFlavor < GenericMacFlavor || m_osFlavor > GenericMacFlavor)
m_osFlavor = UnknownFlavor;
break;
- case ProjectExplorer::Abi::SymbianOS:
- if (m_osFlavor < SymbianDeviceFlavor || m_osFlavor > SymbianEmulatorFlavor)
- m_osFlavor = UnknownFlavor;
- break;
case ProjectExplorer::Abi::UnixOS:
if (m_osFlavor < GenericUnixFlavor || m_osFlavor > GenericUnixFlavor)
m_osFlavor = UnknownFlavor;
@@ -360,8 +352,6 @@ Abi::Abi(const QString &abiString) :
m_os = BsdOS;
else if (abiParts.at(1) == QLatin1String("macos"))
m_os = MacOS;
- else if (abiParts.at(1) == QLatin1String("symbian"))
- m_os = SymbianOS;
else if (abiParts.at(1) == QLatin1String("unix"))
m_os = UnixOS;
else if (abiParts.at(1) == QLatin1String("windows"))
@@ -390,10 +380,6 @@ Abi::Abi(const QString &abiString) :
m_osFlavor = HarmattanLinuxFlavor;
else if (abiParts.at(2) == QLatin1String("generic") && m_os == MacOS)
m_osFlavor = GenericMacFlavor;
- else if (abiParts.at(2) == QLatin1String("device") && m_os == SymbianOS)
- m_osFlavor = SymbianDeviceFlavor;
- else if (abiParts.at(2) == QLatin1String("emulator") && m_os == SymbianOS)
- m_osFlavor = SymbianEmulatorFlavor;
else if (abiParts.at(2) == QLatin1String("generic") && m_os == UnixOS)
m_osFlavor = GenericUnixFlavor;
else if (abiParts.at(2) == QLatin1String("solaris") && m_os == UnixOS)
@@ -541,8 +527,6 @@ QString Abi::toString(const OS &o)
return QLatin1String("bsd");
case MacOS:
return QLatin1String("macos");
- case SymbianOS:
- return QLatin1String("symbian");
case UnixOS:
return QLatin1String("unix");
case WindowsOS:
@@ -572,10 +556,6 @@ QString Abi::toString(const OSFlavor &of)
return QLatin1String("harmattan");
case ProjectExplorer::Abi::GenericMacFlavor:
return QLatin1String("generic");
- case ProjectExplorer::Abi::SymbianDeviceFlavor:
- return QLatin1String("device");
- case ProjectExplorer::Abi::SymbianEmulatorFlavor:
- return QLatin1String("emulator");
case ProjectExplorer::Abi::GenericUnixFlavor:
return QLatin1String("generic");
case ProjectExplorer::Abi::SolarisUnixFlavor:
@@ -633,8 +613,6 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
<< AndroidLinuxFlavor;;
case MacOS:
return result << GenericMacFlavor;
- case SymbianOS:
- return result << SymbianDeviceFlavor << SymbianEmulatorFlavor;
case UnixOS:
return result << GenericUnixFlavor << SolarisUnixFlavor;
case WindowsOS:
@@ -813,9 +791,6 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiOfBinary_data()
<< QString::fromLatin1("ppc-macos-generic-mach_o-32bit")
<< QString::fromLatin1("x86-macos-generic-mach_o-64bit"));
- QTest::newRow("dynamic QtCore: symbian")
- << QString::fromLatin1("%1/dynamic/symbian.dll").arg(prefix)
- << (QStringList() << QString::fromLatin1("arm-symbian-device-elf-32bit"));
QTest::newRow("dynamic QtCore: win msvc2012 64bit")
<< QString::fromLatin1("/tmp/win-msvc2012-64bit.dll").arg(prefix)
<< (QStringList() << QString::fromLatin1("x86-windows-msvc2012-pe-64bit"));
diff --git a/src/plugins/projectexplorer/abi.h b/src/plugins/projectexplorer/abi.h
index 09c594389c..eddce19e58 100644
--- a/src/plugins/projectexplorer/abi.h
+++ b/src/plugins/projectexplorer/abi.h
@@ -60,7 +60,6 @@ public:
BsdOS,
LinuxOS,
MacOS,
- SymbianOS,
UnixOS,
WindowsOS,
UnknownOS
@@ -81,10 +80,6 @@ public:
// Mac
GenericMacFlavor,
- // Symbian
- SymbianDeviceFlavor,
- SymbianEmulatorFlavor,
-
// Unix
GenericUnixFlavor,
SolarisUnixFlavor,
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index a9a4937462..cdae6badcd 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -246,11 +246,6 @@ static QList<Abi> guessGccAbi(const QString &m)
if (flavor == Abi::UnknownFlavor)
flavor = Abi::FreeBsdFlavor;
format = Abi::ElfFormat;
- } else if (p == QLatin1String("symbianelf")) {
- os = Abi::SymbianOS;
- flavor = Abi::SymbianDeviceFlavor;
- format = Abi::ElfFormat;
- width = 32;
} else if (p == QLatin1String("mingw32") || p == QLatin1String("win32") || p == QLatin1String("mingw32msvc")) {
arch = Abi::X86Architecture;
os = Abi::WindowsOS;
@@ -1136,9 +1131,6 @@ void ProjectExplorerPlugin::testGccAbiGuessing_data()
<< QString::fromLatin1("86_64 x86_64 GNU/Linux")
<< (QStringList() << QLatin1String("x86-linux-generic-elf-64bit")
<< QLatin1String("x86-linux-generic-elf-32bit"));
- QTest::newRow("Symbian 1")
- << QString::fromLatin1("arm-none-symbianelf")
- << (QStringList() << QLatin1String("arm-symbian-device-elf-32bit"));
QTest::newRow("FreeBSD 1")
<< QString::fromLatin1("i386-portbld-freebsd9.0")
<< (QStringList() << QLatin1String("x86-bsd-freebsd-elf-32bit"));
diff --git a/src/plugins/projectexplorer/images/SymbianEmulator.png b/src/plugins/projectexplorer/images/Simulator.png
index 447054bac8..447054bac8 100644
--- a/src/plugins/projectexplorer/images/SymbianEmulator.png
+++ b/src/plugins/projectexplorer/images/Simulator.png
Binary files differ
diff --git a/src/plugins/projectexplorer/images/SymbianDevice.png b/src/plugins/projectexplorer/images/SymbianDevice.png
deleted file mode 100644
index 8281bf527b..0000000000
--- a/src/plugins/projectexplorer/images/SymbianDevice.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs
index c98494b2a2..b111138461 100644
--- a/src/plugins/projectexplorer/projectexplorer.qbs
+++ b/src/plugins/projectexplorer/projectexplorer.qbs
@@ -241,8 +241,7 @@ QtcPlugin {
"images/MaemoDevice.png",
"images/ProjectDependencies.png",
"images/RunSettings.png",
- "images/SymbianDevice.png",
- "images/SymbianEmulator.png",
+ "images/Simulator.png",
"images/build.png",
"images/build_32.png",
"images/build_small.png",
diff --git a/src/plugins/projectexplorer/projectexplorer.qrc b/src/plugins/projectexplorer/projectexplorer.qrc
index b639e5f16a..b36371d106 100644
--- a/src/plugins/projectexplorer/projectexplorer.qrc
+++ b/src/plugins/projectexplorer/projectexplorer.qrc
@@ -27,8 +27,7 @@
<file>images/EditorSettings.png</file>
<file>images/ProjectDependencies.png</file>
<file>images/MaemoDevice.png</file>
- <file>images/SymbianDevice.png</file>
- <file>images/SymbianEmulator.png</file>
+ <file>images/Simulator.png</file>
<file>images/DeviceConnected.png</file>
<file>images/DeviceDisconnected.png</file>
<file>images/DeviceReadyToUse.png</file>
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index 4dbf42e64f..9468e9aedb 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -1417,14 +1417,6 @@ QVariantMap Version1Handler::update(Project *project, const QVariantMap &map)
QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
"Desktop",
"Qt4 Desktop target display name"))
- << TargetDescription(QString::fromLatin1("Qt4ProjectManager.Target.S60EmulatorTarget"),
- QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
- "Symbian Emulator",
- "Qt4 Symbian Emulator target display name"))
- << TargetDescription(QString::fromLatin1("Qt4ProjectManager.Target.S60DeviceTarget"),
- QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
- "Symbian Device",
- "Qt4 Symbian Device target display name"))
<< TargetDescription(QString::fromLatin1("Qt4ProjectManager.Target.MaemoEmulatorTarget"),
QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
"Maemo Emulator",
@@ -1559,69 +1551,7 @@ QVariantMap Version3Handler::update(Project *, const QVariantMap &map)
continue;
}
const QVariantMap &originalTarget = it.value().toMap();
- // check for symbian device target
- if (originalTarget.value(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"))
- != QLatin1String("Qt4ProjectManager.Target.S60DeviceTarget")) {
- result.insert(targetKey, originalTarget);
- continue;
- }
- QVariantMap newTarget;
- // first iteration: search run configurations, get signing info, remove old signing keys
- QString customKeyPath;
- QString customSignaturePath;
- int signingMode = 0; // SelfSign
- QMapIterator<QString, QVariant> targetIt(originalTarget);
- while (targetIt.hasNext()) {
- targetIt.next();
- const QString &key = targetIt.key();
- if (key.startsWith(QLatin1String("ProjectExplorer.Target.BuildConfiguration."))) {
- // build configurations are handled in second iteration
- continue;
- }
- if (!key.startsWith(QLatin1String("ProjectExplorer.Target.RunConfiguration."))) {
- newTarget.insert(key, targetIt.value());
- continue;
- }
- QVariantMap runConfig = targetIt.value().toMap();
- if (runConfig.value(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"))
- != QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration")) {
- newTarget.insert(key, runConfig);
- continue;
- }
- // get signing info
- customKeyPath = runConfig.value(QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration.CustomKeyPath")).toString();
- customSignaturePath = runConfig.value(QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration.CustomSignaturePath")).toString();
- signingMode = runConfig.value(QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration.SigningMode")).toInt();
- // remove old signing keys
- runConfig.remove(QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration.CustomKeyPath"));
- runConfig.remove(QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration.CustomSignaturePath"));
- runConfig.remove(QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration.SigningMode"));
- newTarget.insert(key, runConfig);
- }
-
- // second iteration: add new signing build step
- targetIt.toFront();
- while (targetIt.hasNext()) {
- targetIt.next();
- const QString &key = targetIt.key();
- if (!key.startsWith(QLatin1String("ProjectExplorer.Target.BuildConfiguration."))) {
- // everything except build configs already handled
- continue;
- }
- QVariantMap buildConfig = targetIt.value().toMap();
- int stepCount = buildConfig.value(QLatin1String("ProjectExplorer.BuildConfiguration.BuildStepsCount")).toInt();
- QVariantMap signBuildStep;
- signBuildStep.insert(QLatin1String("ProjectExplorer.ProjectConfiguration.DisplayName"), QLatin1String("Create SIS package"));
- signBuildStep.insert(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"), QLatin1String("Qt4ProjectManager.S60SignBuildStep"));
- signBuildStep.insert(QLatin1String("Qt4ProjectManager.MakeStep.Clean"), false);
- signBuildStep.insert(QLatin1String("Qt4ProjectManager.S60CreatePackageStep.Certificate"), customSignaturePath);
- signBuildStep.insert(QLatin1String("Qt4ProjectManager.S60CreatePackageStep.Keyfile"), customKeyPath);
- signBuildStep.insert(QLatin1String("Qt4ProjectManager.S60CreatePackageStep.SignMode"), signingMode);
- buildConfig.insert(QString::fromLatin1("ProjectExplorer.BuildConfiguration.BuildStep.%1").arg(stepCount), signBuildStep);
- buildConfig.insert(QLatin1String("ProjectExplorer.BuildConfiguration.BuildStepsCount"), stepCount + 1);
- newTarget.insert(key, buildConfig);
- }
- result.insert(targetKey, newTarget);
+ result.insert(targetKey, originalTarget);
}
return result;
}
@@ -1645,10 +1575,8 @@ QVariantMap Version4Handler::update(Project *, const QVariantMap &map)
continue;
}
const QVariantMap &originalTarget = it.value().toMap();
- // check for symbian and maemo device target
+ // check for maemo device target
if (originalTarget.value(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"))
- != QLatin1String("Qt4ProjectManager.Target.S60DeviceTarget")
- && originalTarget.value(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"))
!= QLatin1String("Qt4ProjectManager.Target.MaemoDeviceTarget"))
{
result.insert(globalKey, originalTarget);
@@ -1742,10 +1670,8 @@ QVariantMap Version5Handler::update(Project *, const QVariantMap &map)
continue;
}
const QVariantMap &originalTarget = it.value().toMap();
- // check for symbian and maemo device target
+ // check for maemo device target
if (originalTarget.value(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"))
- != QLatin1String("Qt4ProjectManager.Target.S60DeviceTarget")
- && originalTarget.value(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"))
!= QLatin1String("Qt4ProjectManager.Target.MaemoDeviceTarget")) {
result.insert(globalKey, originalTarget);
continue;
@@ -1818,8 +1744,6 @@ QVariantMap Version6Handler::update(Project *, const QVariantMap &map)
if (targetKey == QLatin1String("ProjectExplorer.ProjectConfiguration.Id")) {
if (targetIt.value().toString() == QLatin1String("Qt4ProjectManager.Target.MaemoDeviceTarget"))
deploymentName = QCoreApplication::translate("ProjectExplorer::UserFileHandler", "Deploy to Maemo device");
- else if (targetIt.value().toString() == QLatin1String("Qt4ProjectManager.Target.S60DeviceTarget"))
- deploymentName = QCoreApplication::translate("ProjectExplorer::UserFileHandler", "Deploy to Symbian device");
}
if (!targetKey.startsWith(QLatin1String("ProjectExplorer.Target.BuildConfiguration."))) {
@@ -1910,45 +1834,7 @@ QVariantMap Version7Handler::update(Project *, const QVariantMap &map)
continue;
}
const QVariantMap &originalTarget = it.value().toMap();
- // check for symbian device target
- if (originalTarget.value(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"))
- != QLatin1String("Qt4ProjectManager.Target.S60DeviceTarget") ) {
- result.insert(globalKey, originalTarget);
- continue;
- }
-
- QVariantMap newTarget;
- QMapIterator<QString, QVariant> targetIt(originalTarget);
- while (targetIt.hasNext()) {
- targetIt.next();
- const QString &targetKey = targetIt.key();
- if (targetKey.startsWith(QLatin1String("ProjectExplorer.Target.RunConfiguration."))) {
- QVariantMap newRunConfiguration;
- const QVariantMap &originalRc = targetIt.value().toMap();
-
- QMapIterator<QString, QVariant> rcIt(originalRc);
- while (rcIt.hasNext()) {
- rcIt.next();
- const QString &rcKey = rcIt.key();
- // remove installation related data from RunConfiguration
- if (rcKey.startsWith(QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration.InstallationDriveLetter"))) {
- continue;
- }
- if (rcKey.startsWith(QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration.SerialPortName"))) {
- continue;
- }
- if (rcKey.startsWith(QLatin1String("Qt4ProjectManager.S60DeviceRunConfiguration.SilentInstall"))) {
- continue;
- }
- newRunConfiguration.insert(rcKey, rcIt.value());
- }
- newTarget.insert(targetKey, newRunConfiguration);
- } else {
- newTarget.insert(targetKey, targetIt.value());
- continue;
- }
- }
- result.insert(globalKey, newTarget);
+ result.insert(globalKey, originalTarget);
}
return result;
}
@@ -2445,12 +2331,8 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
} else if (oldTargetId == QLatin1String("Qt4ProjectManager.Target.MeegoDeviceTarget")) {
tmpProfile->setIconPath(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("MeegoOsType"));
- } else if (oldTargetId == QLatin1String("Qt4ProjectManager.Target.S60DeviceTarget")) {
- tmpProfile->setIconPath(QLatin1String(":/projectexplorer/images/SymbianDevice.png"));
- tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Qt4ProjectManager.SymbianDevice"));
- tmpProfile->setValue(Core::Id("PE.Profile.Device"), QString::fromLatin1("Symbian Device"));
} else if (oldTargetId == QLatin1String("Qt4ProjectManager.Target.QtSimulatorTarget")) {
- tmpProfile->setIconPath(QLatin1String(":/projectexplorer/images/SymbianEmulator.png"));
+ tmpProfile->setIconPath(QLatin1String(":/projectexplorer/images/Simulator.png"));
tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Desktop"));
} else {
tmpProfile->setIconPath(QLatin1String(":///DESKTOP///"));
@@ -2493,12 +2375,8 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
const QVariantMap &dc = deployIt.value();
// Device
QString devId = dc.value(QLatin1String("Qt4ProjectManager.MaemoRunConfiguration.DeviceId")).toString();
- if (devId.isEmpty()) {
- if (oldTargetId == QLatin1String("Qt4ProjectManager.Target.S60DeviceTarget"))
- devId = QByteArray("Symbian Device");
- else
- devId = QByteArray("Desktop Device");
- }
+ if (devId.isEmpty())
+ devId = QByteArray("Desktop Device");
if (!devId.isEmpty() && !DeviceManager::instance()->find(Core::Id(devId))) // We do not know that device
devId.clear();
tmpProfile->setValue(Core::Id("PE.Profile.Device"), devId);
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
index e39240df30..f088b25e6e 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp
@@ -266,8 +266,6 @@ void ItemLibraryWidget::updateImports()
foreach (const Import &import, d->model->imports())
if (import.isLibraryImport())
imports << import.url();
- if (imports.contains("com.nokia.symbian", Qt::CaseInsensitive))
- filter = Symbian;
if (imports.contains("com.nokia.meego", Qt::CaseInsensitive))
filter = Meego;
}
@@ -290,23 +288,16 @@ QList<QToolButton *> ItemLibraryWidget::createToolBarWidgets()
QAction * basicQtAction = new QAction(menu);
basicQtAction->setCheckable(true);
basicQtAction->setText("Basic Qt Quick only");
- QAction * symbianAction = new QAction(menu);
- symbianAction->setCheckable(true);
- symbianAction->setText("Symbian Components");
QAction * meegoAction= new QAction(menu);
meegoAction->setCheckable(true);
meegoAction->setText("Meego Components");
menu->addAction(basicQtAction);
menu->addAction(meegoAction);
- menu->addAction(symbianAction);
buttons.first()->setMenu(menu);
connect(basicQtAction, SIGNAL(toggled(bool)), this, SLOT(onQtBasicOnlyChecked(bool)));
connect(this, SIGNAL(qtBasicOnlyChecked(bool)), basicQtAction, SLOT(setChecked(bool)));
- connect(symbianAction, SIGNAL(toggled(bool)), this, SLOT(onSymbianChecked(bool)));
- connect(this, SIGNAL(symbianChecked(bool)), symbianAction, SLOT(setChecked(bool)));
-
connect(meegoAction, SIGNAL(toggled(bool)), this, SLOT(onMeegoChecked(bool)));
connect(this, SIGNAL(meegoChecked(bool)), meegoAction, SLOT(setChecked(bool)));
@@ -355,7 +346,6 @@ void ItemLibraryWidget::emitImportChecked()
bool qtOnlyImport = false;
bool meegoImport = false;
- bool symbianImport = false;
foreach (const Import &import, d->model->imports()) {
if (import.isLibraryImport()) {
@@ -363,17 +353,14 @@ void ItemLibraryWidget::emitImportChecked()
meegoImport = true;
if (import.url().contains(QString("Qt"), Qt::CaseInsensitive) || import.url().contains(QString("QtQuick"), Qt::CaseInsensitive))
qtOnlyImport = true;
- if (import.url().contains(QString("symbian"), Qt::CaseInsensitive))
- symbianImport = true;
}
}
- if (meegoImport || symbianImport)
+ if (meegoImport)
qtOnlyImport = false;
emit qtBasicOnlyChecked(qtOnlyImport);
emit meegoChecked(meegoImport);
- emit symbianChecked(symbianImport);
}
void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag)
@@ -395,16 +382,10 @@ void ItemLibraryWidget::setImportFilter(FilterChangeFlag flag)
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
try {
block = true;
- if (flag == QtBasic) {
- removeImport(QLatin1String("com.nokia.meego"));
- removeImport(QLatin1String("com.nokia.symbian"));
- } else if (flag == Symbian) {
+ if (flag == QtBasic)
removeImport(QLatin1String("com.nokia.meego"));
- addImport(QLatin1String("com.nokia.symbian"), QLatin1String("1.0"));
- } else if (flag == Meego) {
- removeImport(QLatin1String("com.nokia.symbian"));
+ else if (flag == Meego)
addImport(QLatin1String("com.nokia.meego"), QLatin1String("1.0"));
- }
QApplication::restoreOverrideCursor();
block = false;
m_filterFlag = flag;
@@ -431,14 +412,6 @@ void ItemLibraryWidget::onMeegoChecked(bool b)
setImportFilter(Meego);
}
-void ItemLibraryWidget::onSymbianChecked(bool b)
-{
- if (b)
- setImportFilter(Symbian);
-}
-
-
-
void ItemLibraryWidget::updateModel()
{
d->m_itemLibraryModel->update(d->m_itemLibraryInfo.data(), d->model);
diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
index dd0b96d3a9..b2b76eb080 100644
--- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
+++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h
@@ -48,8 +48,7 @@ class ItemLibraryWidget : public QFrame
enum FilterChangeFlag {
QtBasic = 0x0,
- Meego = 0x1,
- Symbian = 0x2
+ Meego = 0x1
};
public:
@@ -77,7 +76,6 @@ public Q_SLOTS:
void onQtBasicOnlyChecked(bool b);
void onMeegoChecked(bool b);
- void onSymbianChecked(bool b);
protected:
void wheelEvent(QWheelEvent *event);
@@ -91,7 +89,6 @@ signals:
void resetItemsView();
void qtBasicOnlyChecked(bool b);
void meegoChecked(bool b);
- void symbianChecked(bool b);
private:
ItemLibraryWidgetPrivate *d;
diff --git a/src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.cpp b/src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.cpp
deleted file mode 100644
index ab65b01fce..0000000000
--- a/src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.cpp
+++ /dev/null
@@ -1,358 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the $MODULE$ of the Qt Toolkit.
-**
-** $TROLLTECH_DUAL_LICENSE$
-**
-****************************************************************************/
-
-#include "qts60stylethemeio.h"
-
-#if !defined(QT_NO_STYLE_S60)
-
-#include "qs60style.h"
-#include "qapplication.h"
-#include "qwebview.h"
-#include "qwebframe.h"
-#include "qeventloop.h"
-#include "qpicture.h"
-#include "qpicture.h"
-#include "qpainter.h"
-#include "qfile.h"
-#include "qdir.h"
-#include "qfileinfo.h"
-#include "qxmlstream.h"
-#include "qbuffer.h"
-
-#include "qdebug.h"
-
-static const quint32 blobVersion = 1;
-static const int pictureSize = 256;
-
-void dumpPartPictures(const QHash<QString, QPicture> &partPictures) {
- foreach (const QString &partKey, partPictures.keys()) {
- QPicture partPicture = partPictures.value(partKey);
- qDebug() << partKey << partPicture.boundingRect();
- QImage image(partPicture.boundingRect().size(), QImage::Format_ARGB32);
- image.fill(Qt::transparent);
- QPainter p(&image);
- partPicture.play(&p);
- image.save(partKey + QString::fromLatin1(".png"));
- }
-}
-
-void dumpColors(const QHash<QPair<QString, int>, QColor> &colors) {
- foreach (const QColor &color, colors.values()) {
- const QPair<QString, int> key = colors.key(color);
- qDebug() << key << color;
- }
-}
-
-bool setS60Theme(QHash<QString, QPicture> &partPictures,
- QHash<QPair<QString, int>, QColor> &colors,
- QS60Style *s60Style)
-{
- if (!s60Style)
- s60Style = qobject_cast<QS60Style *>(QApplication::style());
- if (!s60Style || !qobject_cast<QS60Style *>(s60Style)) {
- qWarning() << __FUNCTION__ << ": No QS60Style found.";
- return false;
- }
- s60Style->setS60Theme(partPictures, colors);
- return true;
-}
-
-#ifndef QT_NO_WEBKIT
-class WebKitSVGRenderer : public QWebView
-{
- Q_OBJECT
-
-public:
- WebKitSVGRenderer(QWidget *parent = 0);
- QPicture svgToQPicture(const QString &svgFileName);
-
-private slots:
- void loadFinishedSlot(bool ok);
-
-private:
- QEventLoop m_loop;
- QPicture m_result;
-};
-
-WebKitSVGRenderer::WebKitSVGRenderer(QWidget *parent)
- : QWebView(parent)
-{
- connect(this, SIGNAL(loadFinished(bool)), SLOT(loadFinishedSlot(bool)));
- setFixedSize(pictureSize, pictureSize);
- QPalette pal = palette();
- pal.setColor(QPalette::Base, Qt::transparent);
- setPalette(pal);
-}
-
-QPicture WebKitSVGRenderer::svgToQPicture(const QString &svgFileName)
-{
- load(QUrl::fromLocalFile(svgFileName));
- m_loop.exec();
- return m_result;
-}
-
-void WebKitSVGRenderer::loadFinishedSlot(bool ok)
-{
- // crude error-checking
- if (!ok)
- qDebug() << "Failed loading " << qPrintable(url().toString());
-
- page()->mainFrame()->evaluateJavaScript(
- "document.rootElement.preserveAspectRatio.baseVal.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_NONE;"
- "document.rootElement.style.width = '100%';"
- "document.rootElement.style.height = '100%';"
- "document.rootElement.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE, 100);"
- "document.rootElement.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE, 100);"
- );
-
- m_result = QPicture(); // "Clear"
- QPainter p(&m_result);
- page()->mainFrame()->render(&p);
- p.end();
- m_result.setBoundingRect(QRect(0, 0, pictureSize, pictureSize));
-
- m_loop.exit();
-}
-
-bool parseTdfFile(const QString &tdfFile,
- QHash<QString, QString> &partSvgs,
- QHash<QPair<QString, int>, QColor> &colors)
-{
- const QLatin1String elementKey("element");
- const QLatin1String partKey("part");
- const QLatin1String elementIdKey("id");
- const QLatin1String layerKey("layer");
- const QLatin1String layerFileNameKey("filename");
- const QLatin1String layerColourrgbKey("colourrgb");
- const QString annoyingPrefix("S60_2_6%");
- QFile file(tdfFile);
- if (!file.open(QIODevice::ReadOnly))
- return false;
- QXmlStreamReader reader(&file);
- QString partId;
- QPair<QString, int> colorId;
- // Somebody with a sense of aesthetics may implement proper XML parsing, here.
- while (!reader.atEnd()) {
- const QXmlStreamReader::TokenType token = reader.readNext();
- switch (token) {
- case QXmlStreamReader::StartElement:
- if (reader.name() == elementKey || reader.name() == partKey) {
- QString id = reader.attributes().value(elementIdKey).toString();
- if (QS60Style::partKeys().contains(id)) {
- partId = id;
- } else if (!id.isEmpty() && id.at(id.length()-1).isDigit()) {
- QString idText = id;
- idText.remove(QRegExp("[0-9]"));
- if (QS60Style::colorListKeys().contains(idText)) {
- QString idNumber = id;
- idNumber.remove(QRegExp("[a-zA-Z]"));
- colorId = QPair<QString, int>(idText, idNumber.toInt());
- }
- } else if (QS60Style::partKeys().contains(id.mid(annoyingPrefix.length()))) {
- partId = id.mid(annoyingPrefix.length());
- }
- } else if (reader.name() == layerKey) {
- if (!partId.isEmpty()) {
- const QString svgFile = reader.attributes().value(layerFileNameKey).toString();
- partSvgs.insert(partId, svgFile);
- partId.clear();
- } else if (!colorId.first.isEmpty()) {
- const QColor colorValue(reader.attributes().value(layerColourrgbKey).toString().toInt(NULL, 16));
- colors.insert(colorId, colorValue);
- colorId.first.clear();
- }
- }
- break;
- case QXmlStreamReader::EndElement:
- if (reader.tokenString() == elementKey || reader.name() == partKey)
- partId.clear();
- break;
- default:
- break;
- }
- }
- return true;
-}
-
-bool loadThemeFromTdf(const QString &tdfFile,
- QHash<QString, QPicture> &partPictures,
- QHash<QPair<QString, int>, QColor> &colors)
-{
- QHash<QString, QString> parsedPartSvgs;
- QHash<QString, QPicture> parsedPartPictures;
- QHash<QPair<QString, int>, QColor> parsedColors;
- bool success = parseTdfFile(tdfFile, parsedPartSvgs, parsedColors);
- if (!success)
- return false;
- const QString tdfBasePath = QFileInfo(tdfFile).absolutePath();
- WebKitSVGRenderer renderer;
- foreach(const QString& partKey, parsedPartSvgs.keys()) {
- const QString tdfFullName =
- tdfBasePath + QDir::separator() + parsedPartSvgs.value(partKey);
- if (!QFile(tdfFullName).exists())
- qWarning() << "Could not load part " << tdfFullName;
- const QPicture partPicture = renderer.svgToQPicture(tdfFullName);
- parsedPartPictures.insert(partKey, partPicture);
- }
-// dumpPartPictures(parsedPartPictures);
-// dumpColors(colors);
- partPictures = parsedPartPictures;
- colors = parsedColors;
- return true;
-}
-
-bool QtS60StyleThemeIO::loadThemeFromTdf(const QString &themeTdf, QS60Style *s60Style)
-{
- QHash<QString, QPicture> partPictures;
- QHash<QPair<QString, int>, QColor> colors;
-
- if (!::loadThemeFromTdf(themeTdf, partPictures, colors))
- return false;
-
- return ::setS60Theme(partPictures, colors, s60Style);
-}
-
-bool QtS60StyleThemeIO::convertTdfToBlob(const QString &themeTdf, const QString &themeBlob)
-{
- QHash<QString, QPicture> partPictures;
- QHash<QPair<QString, int>, QColor> colors;
-
- if (!::loadThemeFromTdf(themeTdf, partPictures, colors))
- return false;
-
- QFile blob(themeBlob);
- if (!blob.open(QIODevice::WriteOnly)) {
- qWarning() << __FUNCTION__ << ": Could not create blob: " << themeBlob;
- return false;
- }
-
- QByteArray data;
- QBuffer dataBuffer(&data);
- dataBuffer.open(QIODevice::WriteOnly);
- QDataStream dataOut(&dataBuffer);
-
- const int colorsCount = colors.count();
- dataOut << colorsCount;
- const QList<QPair<QString, int> > colorKeys = colors.keys();
- for (int i = 0; i < colorsCount; ++i) {
- const QPair<QString, int> &key = colorKeys.at(i);
- dataOut << key;
- const QColor color = colors.value(key);
- dataOut << color;
- }
-
- const int picturesCount = partPictures.count();
- dataOut << picturesCount;
- foreach (const QString &key, partPictures.keys()) {
- const QPicture picture = partPictures.value(key);
- dataOut << key;
- dataOut << picture;
- }
-
- QDataStream blobOut(&blob);
- blobOut << blobVersion;
- blobOut << qCompress(data);
- return blobOut.status() == QDataStream::Ok;
-}
-#endif // !QT_NO_WEBKIT
-
-bool QtS60StyleThemeIO::loadThemeFromBlob(const QString &themeBlob, QS60Style *s60Style)
-{
- QHash<QString, QPicture> partPictures;
- QHash<QPair<QString, int>, QColor> colors;
-
- QFile blob(themeBlob);
- if (!blob.open(QIODevice::ReadOnly)) {
- qWarning() << __FUNCTION__ << ": Could not read blob: " << themeBlob;
- return false;
- }
- QDataStream blobIn(&blob);
-
- quint32 version;
- blobIn >> version;
-
- if (version != blobVersion) {
- qWarning() << __FUNCTION__ << ": Invalid blob version: " << version << " ...expected: " << blobVersion;
- return false;
- }
-
- QByteArray data;
- blobIn >> data;
- data = qUncompress(data);
- QBuffer dataBuffer(&data);
- dataBuffer.open(QIODevice::ReadOnly);
- QDataStream dataIn(&dataBuffer);
-
- int colorsCount;
- dataIn >> colorsCount;
- for (int i = 0; i < colorsCount; ++i) {
- QPair<QString, int> key;
- dataIn >> key;
- QColor value;
- dataIn >> value;
- colors.insert(key, value);
- }
-
- int picturesCount;
- dataIn >> picturesCount;
- for (int i = 0; i < picturesCount; ++i) {
- QString key;
- dataIn >> key;
- QPicture value;
- dataIn >> value;
- value.setBoundingRect(QRect(0, 0, pictureSize, pictureSize)); // Bug? The forced bounding rect was not deserialized.
- partPictures.insert(key, value);
- }
-
- if (dataIn.status() != QDataStream::Ok) {
- qWarning() << __FUNCTION__ << ": Invalid data blob: " << themeBlob;
- return false;
- }
-
-// dumpPartPictures(partPictures);
-// dumpColors(colors);
-
- return ::setS60Theme(partPictures, colors, s60Style);
-}
-
-#include "qts60stylethemeio.moc"
-
-#endif // QT_NO_STYLE_S60
diff --git a/src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.h b/src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.h
deleted file mode 100644
index 4a606355c7..0000000000
--- a/src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the $MODULE$ of the Qt Toolkit.
-**
-** $TROLLTECH_DUAL_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QTS60STYLETHEMEIO_H
-#define QTS60STYLETHEMEIO_H
-
-#include "qstring.h"
-
-class QS60Style;
-
-class QtS60StyleThemeIO
-{
-public:
- static bool loadThemeFromBlob(const QString &themeBlob, QS60Style *s60Style = 0);
-#ifndef QT_NO_WEBKIT
- static bool loadThemeFromTdf(const QString &themeTdf, QS60Style *s60Style = 0);
- static bool convertTdfToBlob(const QString &themeTdf, const QString &themeBlob);
-#endif
-};
-
-#endif // QTS60STYLETHEMEIO_H
diff --git a/src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.pri b/src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.pri
deleted file mode 100644
index ec800883be..0000000000
--- a/src/plugins/qmldesigner/components/themeloader/qts60stylethemeio.pri
+++ /dev/null
@@ -1,6 +0,0 @@
-contains(QT_CONFIG, webkit) {
- QT += webkit
-}
-#SOURCES += $$PWD/qts60stylethemeio.cpp
-#INCLUDE += $$PWD/qts60stylethemeio.h
-#INCLUDEPATH += $$PWD
diff --git a/src/plugins/qmldesigner/config.pri b/src/plugins/qmldesigner/config.pri
index 24a75f2553..f10396351d 100644
--- a/src/plugins/qmldesigner/config.pri
+++ b/src/plugins/qmldesigner/config.pri
@@ -1,6 +1,4 @@
# MOC_DIR = moc
-DEFINES += QT_NO_STYLE_S60
-
debug {
DEFINES += VIEWLOGGER
}
diff --git a/src/plugins/qmldesigner/customstyleplugin/customstyleplugin.pri b/src/plugins/qmldesigner/customstyleplugin/customstyleplugin.pri
index d0b68ece2a..3d857270a4 100644
--- a/src/plugins/qmldesigner/customstyleplugin/customstyleplugin.pri
+++ b/src/plugins/qmldesigner/customstyleplugin/customstyleplugin.pri
@@ -7,7 +7,6 @@ QT += script \
include (../designercore/iwidgetplugin.pri)
-DEFINES += SYMBIAN_LIBRARY
SOURCES += $$PWD/customstyleplugin.cpp
HEADERS += $$PWD/customstyleplugin.h $$PWD/../designercore/include/iwidgetplugin.h
diff --git a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
index 02f1201bba..8377112d39 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
@@ -59,7 +59,7 @@ static inline QStringList importPaths() {
// env import paths
QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
if (!envImportPath.isEmpty()) {
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN)
QLatin1Char pathSep(';');
#else
QLatin1Char pathSep(':');
diff --git a/src/plugins/qmldesigner/desktopplugin/desktopplugin.pri b/src/plugins/qmldesigner/desktopplugin/desktopplugin.pri
index 302272967e..ec6277c618 100644
--- a/src/plugins/qmldesigner/desktopplugin/desktopplugin.pri
+++ b/src/plugins/qmldesigner/desktopplugin/desktopplugin.pri
@@ -7,7 +7,6 @@ QT += script \
include (../designercore/iwidgetplugin.pri)
-DEFINES += SYMBIAN_LIBRARY
SOURCES += $$PWD/desktopplugin.cpp
HEADERS += $$PWD/desktopplugin.h $$PWD/../designercore/include/iwidgetplugin.h
diff --git a/src/plugins/qmldesigner/extrasplugin/extrasplugin.pri b/src/plugins/qmldesigner/extrasplugin/extrasplugin.pri
index 12f923cb1e..3faaed83f3 100644
--- a/src/plugins/qmldesigner/extrasplugin/extrasplugin.pri
+++ b/src/plugins/qmldesigner/extrasplugin/extrasplugin.pri
@@ -7,7 +7,6 @@ QT += script \
include (../designercore/iwidgetplugin.pri)
-DEFINES += SYMBIAN_LIBRARY
SOURCES += $$PWD/extrasplugin.cpp
HEADERS += $$PWD/extrasplugin.h $$PWD/../designercore/include/iwidgetplugin.h
diff --git a/src/plugins/qmldesigner/meegoplugin/meegoplugin.pri b/src/plugins/qmldesigner/meegoplugin/meegoplugin.pri
index 04abc89874..d457b3c413 100644
--- a/src/plugins/qmldesigner/meegoplugin/meegoplugin.pri
+++ b/src/plugins/qmldesigner/meegoplugin/meegoplugin.pri
@@ -7,7 +7,6 @@ QT += script \
include (../designercore/iwidgetplugin.pri)
-DEFINES += SYMBIAN_LIBRARY
SOURCES += $$PWD/meegoplugin.cpp
HEADERS += $$PWD/meegoplugin.h $$PWD/../designercore/include/iwidgetplugin.h
diff --git a/src/plugins/qmldesigner/qmldesigner.pro b/src/plugins/qmldesigner/qmldesigner.pro
index 40bb44a19d..35d3d36990 100644
--- a/src/plugins/qmldesigner/qmldesigner.pro
+++ b/src/plugins/qmldesigner/qmldesigner.pro
@@ -1,3 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS = qmldesignerplugin.pro qtquickplugin symbianplugin meegoplugin extrasplugin desktopplugin customstyleplugin
+SUBDIRS = qmldesignerplugin.pro qtquickplugin meegoplugin extrasplugin desktopplugin customstyleplugin
diff --git a/src/plugins/qmldesigner/qmldesignerplugin.pro b/src/plugins/qmldesigner/qmldesignerplugin.pro
index fcac4a10ad..d042701c19 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.pro
+++ b/src/plugins/qmldesigner/qmldesignerplugin.pro
@@ -16,7 +16,6 @@ include(components/formeditor/formeditor.pri)
include(components/itemlibrary/itemlibrary.pri)
include(components/navigator/navigator.pri)
include(components/pluginmanager/pluginmanager.pri)
-include(components/themeloader/qts60stylethemeio.pri)
include(components/stateseditor/stateseditor.pri)
include(components/resources/resources.pri)
diff --git a/src/plugins/qmldesigner/symbianplugin/images/Untitled-2.png b/src/plugins/qmldesigner/symbianplugin/images/Untitled-2.png
deleted file mode 100644
index 2e0bf73a26..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/Untitled-2.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/busyindicator.png b/src/plugins/qmldesigner/symbianplugin/images/busyindicator.png
deleted file mode 100644
index 89d0283f26..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/busyindicator.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/busyindicator16.png b/src/plugins/qmldesigner/symbianplugin/images/busyindicator16.png
deleted file mode 100644
index 7e3b2d3158..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/busyindicator16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/busyindicatora.png b/src/plugins/qmldesigner/symbianplugin/images/busyindicatora.png
deleted file mode 100644
index 433f4d426b..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/busyindicatora.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/busyindicatora16.png b/src/plugins/qmldesigner/symbianplugin/images/busyindicatora16.png
deleted file mode 100644
index 82de5b0a1b..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/busyindicatora16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/button.png b/src/plugins/qmldesigner/symbianplugin/images/button.png
deleted file mode 100644
index 828af210ac..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/button.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/button16.png b/src/plugins/qmldesigner/symbianplugin/images/button16.png
deleted file mode 100644
index 8d95760b27..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/button16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/buttoncolumn.png b/src/plugins/qmldesigner/symbianplugin/images/buttoncolumn.png
deleted file mode 100644
index 46db8f6ab5..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/buttoncolumn.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/buttoncolumn16.png b/src/plugins/qmldesigner/symbianplugin/images/buttoncolumn16.png
deleted file mode 100644
index 883258048f..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/buttoncolumn16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/buttonrow.png b/src/plugins/qmldesigner/symbianplugin/images/buttonrow.png
deleted file mode 100644
index 9727749de9..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/buttonrow.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/buttonrow16.png b/src/plugins/qmldesigner/symbianplugin/images/buttonrow16.png
deleted file mode 100644
index 420de41860..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/buttonrow16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/checkbox.png b/src/plugins/qmldesigner/symbianplugin/images/checkbox.png
deleted file mode 100644
index 0f4a826f4d..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/checkbox.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/checkbox16.png b/src/plugins/qmldesigner/symbianplugin/images/checkbox16.png
deleted file mode 100644
index 01f09e3515..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/checkbox16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/choicelist.png b/src/plugins/qmldesigner/symbianplugin/images/choicelist.png
deleted file mode 100644
index 3fd9876ada..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/choicelist.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/choicelist16.png b/src/plugins/qmldesigner/symbianplugin/images/choicelist16.png
deleted file mode 100644
index 602b28229e..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/choicelist16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/item-icon.png b/src/plugins/qmldesigner/symbianplugin/images/item-icon.png
deleted file mode 100644
index fc53d38ae7..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/item-icon.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/item-icon16.png b/src/plugins/qmldesigner/symbianplugin/images/item-icon16.png
deleted file mode 100644
index 7d2d7a5050..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/item-icon16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/listview-icon.png b/src/plugins/qmldesigner/symbianplugin/images/listview-icon.png
deleted file mode 100644
index 9c1327373d..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/listview-icon.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/listview-icon16.png b/src/plugins/qmldesigner/symbianplugin/images/listview-icon16.png
deleted file mode 100644
index 1deac24a2a..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/listview-icon16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/progressbar.png b/src/plugins/qmldesigner/symbianplugin/images/progressbar.png
deleted file mode 100644
index 040f5bac03..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/progressbar.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/progressbar16.png b/src/plugins/qmldesigner/symbianplugin/images/progressbar16.png
deleted file mode 100644
index e2432475d5..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/progressbar16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/radiobutton.png b/src/plugins/qmldesigner/symbianplugin/images/radiobutton.png
deleted file mode 100644
index 143b6a99f4..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/radiobutton.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/radiobutton16.png b/src/plugins/qmldesigner/symbianplugin/images/radiobutton16.png
deleted file mode 100644
index 94912c2034..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/radiobutton16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/slider.png b/src/plugins/qmldesigner/symbianplugin/images/slider.png
deleted file mode 100644
index 746ed51932..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/slider.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/slider16.png b/src/plugins/qmldesigner/symbianplugin/images/slider16.png
deleted file mode 100644
index 10c4928b3c..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/slider16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/sliderh.png b/src/plugins/qmldesigner/symbianplugin/images/sliderh.png
deleted file mode 100644
index 87cd55678f..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/sliderh.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/sliderh16.png b/src/plugins/qmldesigner/symbianplugin/images/sliderh16.png
deleted file mode 100644
index c419911336..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/sliderh16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/statusbar.png b/src/plugins/qmldesigner/symbianplugin/images/statusbar.png
deleted file mode 100644
index ebd0775a88..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/statusbar.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/statusbar16.png b/src/plugins/qmldesigner/symbianplugin/images/statusbar16.png
deleted file mode 100644
index fec4585dce..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/statusbar16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/switchbutton.png b/src/plugins/qmldesigner/symbianplugin/images/switchbutton.png
deleted file mode 100644
index 48bf247cb8..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/switchbutton.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/switchbutton16.png b/src/plugins/qmldesigner/symbianplugin/images/switchbutton16.png
deleted file mode 100644
index 238a1be632..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/switchbutton16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/tabbar.png b/src/plugins/qmldesigner/symbianplugin/images/tabbar.png
deleted file mode 100644
index 2f44e62b3f..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/tabbar.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/tabbar16.png b/src/plugins/qmldesigner/symbianplugin/images/tabbar16.png
deleted file mode 100644
index 57c7906982..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/tabbar16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/tabbutton.png b/src/plugins/qmldesigner/symbianplugin/images/tabbutton.png
deleted file mode 100644
index d9f5fdb3f9..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/tabbutton.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/tabbutton16.png b/src/plugins/qmldesigner/symbianplugin/images/tabbutton16.png
deleted file mode 100644
index 8e279cff65..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/tabbutton16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/textarea.png b/src/plugins/qmldesigner/symbianplugin/images/textarea.png
deleted file mode 100644
index 86f2969d00..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/textarea.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/textarea16.png b/src/plugins/qmldesigner/symbianplugin/images/textarea16.png
deleted file mode 100644
index 899a4bca2e..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/textarea16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/textfield.png b/src/plugins/qmldesigner/symbianplugin/images/textfield.png
deleted file mode 100644
index b0f13da50d..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/textfield.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/textfield16.png b/src/plugins/qmldesigner/symbianplugin/images/textfield16.png
deleted file mode 100644
index 7feb8c7158..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/textfield16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/toolbar.png b/src/plugins/qmldesigner/symbianplugin/images/toolbar.png
deleted file mode 100644
index e67c042422..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/toolbar.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/toolbar16.png b/src/plugins/qmldesigner/symbianplugin/images/toolbar16.png
deleted file mode 100644
index f4a0c5ef69..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/toolbar16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/window.png b/src/plugins/qmldesigner/symbianplugin/images/window.png
deleted file mode 100644
index fc53d38ae7..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/window.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/images/window16.png b/src/plugins/qmldesigner/symbianplugin/images/window16.png
deleted file mode 100644
index 7d2d7a5050..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/images/window16.png
+++ /dev/null
Binary files differ
diff --git a/src/plugins/qmldesigner/symbianplugin/source/SymbianListView.qml b/src/plugins/qmldesigner/symbianplugin/source/SymbianListView.qml
deleted file mode 100644
index f9bead4d6b..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/source/SymbianListView.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-import QtQuick 1.0
-import com.nokia.symbian 1.0
-
-ListView {
- x: 0
- y: 36
- width: 360
- height: 320
- clip: true
- header: ListHeading {
- ListItemText {
- anchors.fill: parent.paddingItem
- role: "Heading"
- text: "ListHeading"
- }
- }
- delegate: ListItem {
- id: listItem
- Column {
- anchors.fill: parent.paddingItem
- ListItemText {
- width: parent.width
- mode: listItem.mode
- role: "Title"
- text: titleText
- }
- ListItemText {
- width: parent.width
- mode: listItem.mode
- role: "SubTitle"
- text: subTitleText
- }
- }
- }
- model: ListModel {
- ListElement {
- titleText: "Title1"
- subTitleText: "SubTitle1"
- }
- ListElement {
- titleText: "Title2"
- subTitleText: "SubTitle2"
- }
- ListElement {
- titleText: "Title3"
- subTitleText: "SubTitle3"
- }
- ListElement {
- titleText: "Title4"
- subTitleText: "SubTitle4"
- }
- }
-}
diff --git a/src/plugins/qmldesigner/symbianplugin/source/ToolBar.qml b/src/plugins/qmldesigner/symbianplugin/source/ToolBar.qml
deleted file mode 100644
index 2bfd94e0e3..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/source/ToolBar.qml
+++ /dev/null
@@ -1,15 +0,0 @@
-import QtQuick 1.0
-import com.nokia.symbian 1.0
-
-ToolBar {
- tools: ToolBarLayout {
- ToolButton {
- flat: true
- iconSource: "toolbar-back"
- }
- ToolButton {
- flat: true
- iconSource: "toolbar-menu"
- }
- }
- } \ No newline at end of file
diff --git a/src/plugins/qmldesigner/symbianplugin/symbian.metainfo b/src/plugins/qmldesigner/symbianplugin/symbian.metainfo
deleted file mode 100644
index a9781d7387..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/symbian.metainfo
+++ /dev/null
@@ -1,108 +0,0 @@
-<metainfo>
- <node name="com.nokia.symbian.Button" icon=":/symbianplugin/images/button16.png">
- <itemlibraryentry name="Button" category="Components Symbian" libraryIcon=":/symbianplugin/images/button.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="text" type="QString" value="Button"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.ToolButton" icon=":/symbianplugin/images/button16.png">
- <itemlibraryentry name="ToolButton" category="Components Symbian" libraryIcon=":/symbianplugin/images/button.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="text" type="QString" value="Button"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.TabButton" icon=":/symbianplugin/images/tabbutton16.png">
- <itemlibraryentry name="TabButton" category="Components Symbian" libraryIcon=":/symbianplugin/images/tabbutton.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="text" type="QString" value="Button"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.CheckBox" icon=":/symbianplugin/images/checkbox16.png">
- <itemlibraryentry name="CheckBox" category="Components Symbian" libraryIcon=":/symbianplugin/images/checkbox.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="text" type="QString" value="CheckBox"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.BusyIndicator" icon=":/symbianplugin/images/busyindicator16.png">
- <itemlibraryentry name="BusyIndicator" category="Components Symbian" libraryIcon=":/symbianplugin/images/busyindicator.png" version="1.0" requiredImport="com.nokia.symbian">
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.SelectionListItem" icon=":/symbianplugin/images/choicelist16.png">
- <itemlibraryentry name="SelectionListItem" category="Components Symbian" libraryIcon=":/symbianplugin/images/choicelist.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="title" type="QString" value="SelectionListItem"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.StatusBar" icon=":/symbianplugin/images/statusbar16.png">
- <itemlibraryentry name="StatusBar" category="Components Symbian" libraryIcon=":/symbianplugin/images/statusbar.png" version="1.0" requiredImport="com.nokia.symbian">
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.ListView" icon=":/symbianplugin/images/listview-icon16.png">
- <itemlibraryentry name="ListView" category="Components Symbian" libraryIcon=":/symbianplugin/images/listview-icon.png" version="1.0" requiredImport="com.nokia.symbian">
- <qml source=":/symbianplugin/source/SymbianListView.qml"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.ProgressBar" icon=":/symbianplugin/images/progressbar16.png">
- <itemlibraryentry name="ProgressBar" category="Components Symbian" libraryIcon=":/symbianplugin/images/progressbar.png" version="1.0" requiredImport="com.nokia.symbian">
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.RadioButton" icon=":/symbianplugin/images/radiobutton16.png">
- <itemlibraryentry name="RadioButton" category="Components Symbian" libraryIcon=":/symbianplugin/images/radiobutton.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="text" type="QString" value="RadioButton"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.TextArea" icon=":/symbianplugin/images/textarea16.png">
- <itemlibraryentry name="TextArea" category="Components Symbian" libraryIcon=":/symbianplugin/images/textarea.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="width" type="int" value="180"/>
- <property name="height" type="int" value="180"/>
- <property name="text" type="QString" value="TextArea"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.ButtonRow" icon=":/symbianplugin/images/buttonrow16.png">
- <itemlibraryentry name="ButtonRow" category="Components Symbian" libraryIcon=":/symbianplugin/images/buttonrow.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="width" type="int" value="120"/>
- <property name="height" type="int" value="20"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.ButtonColumn" icon=":/symbianplugin/images/buttoncolumn16.png">
- <itemlibraryentry name="ButtonColumn" category="Components Symbian" libraryIcon=":/symbianplugin/images/buttoncolumn.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="width" type="int" value="20"/>
- <property name="height" type="int" value="120"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.TabBar" icon=":/symbianplugin/images/tabbar16.png">
- <itemlibraryentry name="TabBar" category="Components Symbian" libraryIcon=":/symbianplugin/images/tabbar.png" version="1.0" requiredImport="com.nokia.symbian">
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.Slider" icon=":/symbianplugin/images/slider16.png">
- <itemlibraryentry name="Slider (horizontal)" category="Components Symbian" libraryIcon=":/symbianplugin/images/slider.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="orientation" type="int" value="1"/>
- </itemlibraryentry>
- <itemlibraryentry name="Slider (vertical)" category="Components Symbian" libraryIcon=":/symbianplugin/images/sliderh.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="orientation" type="int" value="2"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.Page" icon=":/symbianplugin/images/window16.png">
- <itemlibraryentry name="Page" category="Components Symbian" libraryIcon=":/symbianplugin/images/window.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="width" type="int" value="360"/>
- <property name="height" type="int" value="640"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.TabGroup" icon=":/symbianplugin//images/window16.png">
- <itemlibraryentry name="TabGroup" category="Components Symbian" libraryIcon=":/symbianplugin/images/window.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="width" type="int" value="360"/>
- <property name="height" type="int" value="40"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.ToolBar" icon=":/symbianplugin/images/toolbar16.png">
- <itemlibraryentry name="ToolBar" category="Components Symbian" libraryIcon=":/symbianplugin/images/toolbar.png" version="1.0" requiredImport="com.nokia.symbian">
- <qml source=":/symbianplugin/source/ToolBar.qml"/>
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.Switch" icon=":/symbianplugin/images/switchbutton16.png">
- <itemlibraryentry name="Switch" category="Components Symbian" libraryIcon=":/symbianplugin/images/switchbutton.png" version="1.0" requiredImport="com.nokia.symbian">
- </itemlibraryentry>
- </node>
- <node name="com.nokia.symbian.TextField" icon=":/symbianplugin/images/textfield16.png">
- <itemlibraryentry name="TextField" category="Components Symbian" libraryIcon=":/symbianplugin/images/textfield.png" version="1.0" requiredImport="com.nokia.symbian">
- <property name="width" type="int" value="180"/>
- <property name="height" type="int" value="50"/>
- <property name="text" type="QString" value="TextField"/>
- </itemlibraryentry>
- </node>
-</metainfo>
diff --git a/src/plugins/qmldesigner/symbianplugin/symbianplugin.cpp b/src/plugins/qmldesigner/symbianplugin/symbianplugin.cpp
deleted file mode 100644
index c1483eb44c..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/symbianplugin.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "symbianplugin.h"
-#include <widgetplugin_helper.h>
-#include <QtPlugin>
-
-namespace QmlDesigner {
-
-
-SymbianPlugin::SymbianPlugin()
-{
-}
-
-QString SymbianPlugin::pluginName() const
-{
- return ("SymbianPlugin");
-}
-
-QString SymbianPlugin::metaInfo() const
-{
- return QString(":/symbianplugin/symbian.metainfo");
-}
-
-}
-
-Q_EXPORT_PLUGIN(QmlDesigner::SymbianPlugin)
-
diff --git a/src/plugins/qmldesigner/symbianplugin/symbianplugin.h b/src/plugins/qmldesigner/symbianplugin/symbianplugin.h
deleted file mode 100644
index a2b3817ca4..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/symbianplugin.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SymbianPLUGIN_H
-#define SymbianPLUGIN_H
-
-#include <iwidgetplugin.h>
-#include <qdeclarative.h>
-
-namespace QmlDesigner {
-
-class SymbianPlugin : public QObject, QmlDesigner::IWidgetPlugin
-{
- Q_OBJECT
- Q_INTERFACES(QmlDesigner::IWidgetPlugin)
-
-public:
- SymbianPlugin();
-
- QString metaInfo() const;
- QString pluginName() const;
-};
-
-} // namespace QmlDesigner
-
-#endif // SymbianPLUGIN_H
diff --git a/src/plugins/qmldesigner/symbianplugin/symbianplugin.pri b/src/plugins/qmldesigner/symbianplugin/symbianplugin.pri
deleted file mode 100644
index 28d6323c68..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/symbianplugin.pri
+++ /dev/null
@@ -1,17 +0,0 @@
-TARGET = symbianplugin
-TEMPLATE = lib
-CONFIG += plugin
-
-QT += script \
- declarative
-
-include (../designercore/iwidgetplugin.pri)
-
-DEFINES += SYMBIAN_LIBRARY
-SOURCES += $$PWD/symbianplugin.cpp
-
-HEADERS += $$PWD/symbianplugin.h $$PWD/../designercore/include/iwidgetplugin.h
-
-RESOURCES += $$PWD/symbianplugin.qrc
-
-OTHER_FILES += $$PWD/symbian.metainfo
diff --git a/src/plugins/qmldesigner/symbianplugin/symbianplugin.pro b/src/plugins/qmldesigner/symbianplugin/symbianplugin.pro
deleted file mode 100644
index b8ea7d042a..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/symbianplugin.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-include(../../../../qtcreator.pri)
-include(../../../private_headers.pri)
-include(symbianplugin.pri)
-include(../plugindestdir.pri)
diff --git a/src/plugins/qmldesigner/symbianplugin/symbianplugin.qrc b/src/plugins/qmldesigner/symbianplugin/symbianplugin.qrc
deleted file mode 100644
index 92c2cc2062..0000000000
--- a/src/plugins/qmldesigner/symbianplugin/symbianplugin.qrc
+++ /dev/null
@@ -1,47 +0,0 @@
-<RCC>
- <qresource prefix="/symbianplugin">
- <file>symbian.metainfo</file>
- <file>images/item-icon16.png</file>
- <file>images/item-icon.png</file>
- <file>images/button.png</file>
- <file>images/button16.png</file>
- <file>images/checkbox16.png</file>
- <file>images/checkbox.png</file>
- <file>images/choicelist16.png</file>
- <file>images/choicelist.png</file>
- <file>images/progressbar.png</file>
- <file>images/progressbar16.png</file>
- <file>images/radiobutton.png</file>
- <file>images/radiobutton16.png</file>
- <file>images/slider.png</file>
- <file>images/slider16.png</file>
- <file>images/textarea16.png</file>
- <file>images/textarea.png</file>
- <file>images/textfield16.png</file>
- <file>images/textfield.png</file>
- <file>images/window16.png</file>
- <file>images/window.png</file>
- <file>images/tabbutton16.png</file>
- <file>images/tabbutton.png</file>
- <file>images/busyindicator16.png</file>
- <file>images/busyindicator.png</file>
- <file>images/sliderh16.png</file>
- <file>images/sliderh.png</file>
- <file>images/switchbutton16.png</file>
- <file>images/switchbutton.png</file>
- <file>images/buttonrow.png</file>
- <file>images/buttonrow16.png</file>
- <file>images/tabbar.png</file>
- <file>images/tabbar16.png</file>
- <file>images/toolbar.png</file>
- <file>images/toolbar16.png</file>
- <file>images/buttoncolumn.png</file>
- <file>images/buttoncolumn16.png</file>
- <file>source/ToolBar.qml</file>
- <file>images/listview-icon.png</file>
- <file>images/listview-icon16.png</file>
- <file>source/SymbianListView.qml</file>
- <file>images/statusbar.png</file>
- <file>images/statusbar16.png</file>
- </qresource>
-</RCC>
diff --git a/src/plugins/qmljseditor/qmlfilewizard.cpp b/src/plugins/qmljseditor/qmlfilewizard.cpp
index 9dbf9f07d9..38861a9112 100644
--- a/src/plugins/qmljseditor/qmlfilewizard.cpp
+++ b/src/plugins/qmljseditor/qmlfilewizard.cpp
@@ -63,8 +63,7 @@ QString QmlFileWizard::fileContents(const QString &) const
QTextStream str(&contents);
// 100:62 is the 'golden ratio'
- str << QLatin1String("// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5\n")
- << QLatin1String("import QtQuick 1.1\n")
+ str << QLatin1String("import QtQuick 1.1\n")
<< QLatin1String("\n")
<< QLatin1String("Rectangle {\n")
<< QLatin1String(" width: 100\n")
diff --git a/src/plugins/qmljstools/qmljsplugindumper.cpp b/src/plugins/qmljstools/qmljsplugindumper.cpp
index ff113d733b..d9a6cc7334 100644
--- a/src/plugins/qmljstools/qmljsplugindumper.cpp
+++ b/src/plugins/qmljstools/qmljsplugindumper.cpp
@@ -496,7 +496,6 @@ QString PluginDumper::resolvePlugin(const QDir &qmldirPath, const QString &qmldi
\row \i AIX \i \c .a
\row \i HP-UX \i \c .sl, \c .so (HP-UXi)
\row \i Mac OS X \i \c .dylib, \c .bundle, \c .so
- \row \i Symbian \i \c .dll
\endtable
Version number on unix are ignored.
diff --git a/src/plugins/qmlprofiler/codaqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/codaqmlprofilerrunner.cpp
deleted file mode 100644
index 9087833b5e..0000000000
--- a/src/plugins/qmlprofiler/codaqmlprofilerrunner.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "codaqmlprofilerrunner.h"
-#include <utils/qtcassert.h>
-
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-#include <extensionsystem/pluginmanager.h>
-#include <qt4projectmanager/qt-s60/s60deployconfiguration.h>
-#include <projectexplorer/runconfiguration.h>
-#include <analyzerbase/analyzerconstants.h>
-#include <qt4projectmanager/qt-s60/codaruncontrol.h>
-
-using namespace ProjectExplorer;
-using namespace Qt4ProjectManager;
-using namespace QmlProfiler::Internal;
-
-CodaQmlProfilerRunner::CodaQmlProfilerRunner(S60DeviceRunConfiguration *configuration,
- QObject *parent) :
- AbstractQmlProfilerRunner(parent),
- m_configuration(configuration),
- m_runControl(new CodaRunControl(configuration, QmlProfilerRunMode))
-{
- connect(m_runControl, SIGNAL(finished()), this, SIGNAL(stopped()));
- connect(m_runControl,
- SIGNAL(appendMessage(ProjectExplorer::RunControl*,QString,Utils::OutputFormat)),
- this, SLOT(appendMessage(ProjectExplorer::RunControl*,QString,Utils::OutputFormat)));
-}
-
-CodaQmlProfilerRunner::~CodaQmlProfilerRunner()
-{
- delete m_runControl;
-}
-
-void CodaQmlProfilerRunner::start()
-{
- QTC_ASSERT(m_runControl, return);
- m_runControl->start();
-}
-
-void CodaQmlProfilerRunner::stop()
-{
- QTC_ASSERT(m_runControl, return);
- m_runControl->stop();
-}
-
-void CodaQmlProfilerRunner::appendMessage(ProjectExplorer::RunControl *, const QString &message,
- Utils::OutputFormat format)
-{
- emit appendMessage(message, format);
-}
-
-quint16 QmlProfiler::Internal::CodaQmlProfilerRunner::debugPort() const
-{
- return m_configuration->debuggerAspect()->qmlDebugServerPort();
-}
-
diff --git a/src/plugins/qmlprofiler/codaqmlprofilerrunner.h b/src/plugins/qmlprofiler/codaqmlprofilerrunner.h
deleted file mode 100644
index 59b0979cbd..0000000000
--- a/src/plugins/qmlprofiler/codaqmlprofilerrunner.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef CODAQMLPROFILERRUNNER_H
-#define CODAQMLPROFILERRUNNER_H
-
-#include "abstractqmlprofilerrunner.h"
-
-#include <utils/environment.h>
-#include <projectexplorer/runconfiguration.h>
-#include <qt4projectmanager/qt-s60/s60devicerunconfiguration.h>
-
-namespace QmlProfiler {
-namespace Internal {
-
-class CodaQmlProfilerRunner : public AbstractQmlProfilerRunner
-{
- Q_OBJECT
-
- using AbstractQmlProfilerRunner::appendMessage; // don't hide signal
-public:
- explicit CodaQmlProfilerRunner(Qt4ProjectManager::S60DeviceRunConfiguration *configuration,
- QObject *parent = 0);
- ~CodaQmlProfilerRunner();
-
- // AbstractQmlProfilerRunner
- virtual void start();
- virtual void stop();
- virtual quint16 debugPort() const;
-
-private slots:
- void appendMessage(ProjectExplorer::RunControl *, const QString &message,
- Utils::OutputFormat format);
-private:
- Qt4ProjectManager::S60DeviceRunConfiguration *m_configuration;
- ProjectExplorer::RunControl *m_runControl;
-};
-
-} // namespace Internal
-} // namespace QmlProfiler
-
-#endif // CODAQMLPROFILERRUNNER_H
diff --git a/src/plugins/qmlprofiler/qmlprofiler.pro b/src/plugins/qmlprofiler/qmlprofiler.pro
index 1f6bf5c694..8c98eb2c53 100644
--- a/src/plugins/qmlprofiler/qmlprofiler.pro
+++ b/src/plugins/qmlprofiler/qmlprofiler.pro
@@ -26,7 +26,6 @@ SOURCES += \
qmlprofilerengine.cpp \
qmlprofilerattachdialog.cpp \
localqmlprofilerrunner.cpp \
- codaqmlprofilerrunner.cpp \
remotelinuxqmlprofilerrunner.cpp \
qmlprofilereventview.cpp \
qmlprofilerdetailsrewriter.cpp \
@@ -48,7 +47,6 @@ HEADERS += \
qmlprofilerattachdialog.h \
abstractqmlprofilerrunner.h \
localqmlprofilerrunner.h \
- codaqmlprofilerrunner.h \
remotelinuxqmlprofilerrunner.h \
qmlprofilereventview.h \
qmlprofilerdetailsrewriter.h \
diff --git a/src/plugins/qmlprofiler/qmlprofiler.qbs b/src/plugins/qmlprofiler/qmlprofiler.qbs
index 6e2f9f2954..92fa17e5d4 100644
--- a/src/plugins/qmlprofiler/qmlprofiler.qbs
+++ b/src/plugins/qmlprofiler/qmlprofiler.qbs
@@ -13,7 +13,6 @@ QtcPlugin {
Depends { name: "RemoteLinux" }
Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" }
- Depends { name: "symbianutils" }
Depends { name: "TextEditor" }
Depends { name: "QmlDebug" }
Depends { name: "QmlJS" }
@@ -23,7 +22,6 @@ QtcPlugin {
Depends { name: "cpp" }
cpp.includePaths: [
"canvas",
- "../../shared/symbianutils",
"..",
"../../libs",
buildDirectory
@@ -31,8 +29,6 @@ QtcPlugin {
files: [
"abstractqmlprofilerrunner.h",
- "codaqmlprofilerrunner.cpp",
- "codaqmlprofilerrunner.h",
"localqmlprofilerrunner.cpp",
"localqmlprofilerrunner.h",
"qmlprofilerattachdialog.cpp",
diff --git a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
index 547f9a0572..4e7c567b08 100644
--- a/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
@@ -225,13 +225,8 @@ void QmlProfilerClientManager::connectToClient()
if (!d->connection || d->connection->state() != QAbstractSocket::UnconnectedState)
return;
- if (d->connectMode == QmlProfilerClientManagerPrivate::TcpConnection) {
- QmlProfilerTool::logStatus(QString("QML Profiler: Connecting to %1:%2 ...").arg(d->tcpHost, QString::number(d->tcpPort)));
- d->connection->connectToHost(d->tcpHost, d->tcpPort);
- } else {
- QmlProfilerTool::logStatus(QString("QML Profiler: Connecting to %1 ...").arg(d->tcpHost));
- d->connection->connectToOst(d->ostDevice);
- }
+ QmlProfilerTool::logStatus(QString("QML Profiler: Connecting to %1:%2 ...").arg(d->tcpHost, QString::number(d->tcpPort)));
+ d->connection->connectToHost(d->tcpHost, d->tcpPort);
}
bool QmlProfilerClientManager::isConnected() const
diff --git a/src/plugins/qmlprofiler/qmlprofilerengine.cpp b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
index 32a667242d..90e056aa78 100644
--- a/src/plugins/qmlprofiler/qmlprofilerengine.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerengine.cpp
@@ -30,7 +30,6 @@
#include "qmlprofilerengine.h"
-#include "codaqmlprofilerrunner.h"
#include "localqmlprofilerrunner.h"
#include "remotelinuxqmlprofilerrunner.h"
@@ -42,8 +41,6 @@
#include <qmlprojectmanager/qmlprojectplugin.h>
#include <projectexplorer/localapplicationruncontrol.h>
#include <projectexplorer/applicationrunconfiguration.h>
-#include <qt4projectmanager/qt-s60/s60devicedebugruncontrol.h>
-#include <qt4projectmanager/qt-s60/s60devicerunconfiguration.h>
#include <qmldebug/qmloutputparser.h>
#include <remotelinux/remotelinuxrunconfiguration.h>
@@ -107,9 +104,6 @@ QmlProfilerEngine::QmlProfilerEnginePrivate::createRunner(ProjectExplorer::RunCo
conf.environment = rc2->environment();
conf.port = rc2->debuggerAspect()->qmlDebugServerPort();
runner = new LocalQmlProfilerRunner(conf, parent);
- } else if (Qt4ProjectManager::S60DeviceRunConfiguration *s60Config =
- qobject_cast<Qt4ProjectManager::S60DeviceRunConfiguration*>(runConfiguration)) {
- runner = new CodaQmlProfilerRunner(s60Config, parent);
} else if (RemoteLinux::RemoteLinuxRunConfiguration *rmConfig =
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
runner = new RemoteLinuxQmlProfilerRunner(rmConfig, parent);
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index caefcd0101..0843297cd4 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -69,11 +69,6 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
-#include <qt4projectmanager/qt-s60/s60devicedebugruncontrol.h>
-#include <qt4projectmanager/qt-s60/s60devicerunconfiguration.h>
-#include <qt4projectmanager/qt-s60/s60deployconfiguration.h>
-#include <qt4projectmanager/qt-s60/symbianidevice.h>
-
#include <qtsupport/qtprofileinformation.h>
#include <QApplication>
@@ -253,17 +248,6 @@ IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp
return 0;
}
}
-
- // Check whether we should use OST instead of TCP
- if (Qt4ProjectManager::S60DeployConfiguration *deployConfig
- = qobject_cast<Qt4ProjectManager::S60DeployConfiguration*>(
- runConfiguration->target()->activeDeployConfiguration())) {
- if (deployConfig->device()->communicationChannel()
- == Qt4ProjectManager::SymbianIDevice::CommunicationCodaSerialConnection) {
- d->m_profilerConnections->setOstConnection(deployConfig->device()->serialPortName());
- isTcpConnection = false;
- }
- }
}
// FIXME: Check that there's something sensible in sp.connParams
@@ -295,8 +279,7 @@ bool QmlProfilerTool::canRun(RunConfiguration *runConfiguration, RunMode mode) c
{
if (qobject_cast<QmlProjectRunConfiguration *>(runConfiguration)
|| qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration)
- || qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)
- || qobject_cast<Qt4ProjectManager::S60DeviceRunConfiguration *>(runConfiguration))
+ || qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration))
return mode == runMode();
return false;
}
@@ -345,16 +328,6 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
sp.analyzerCmdPrefix = rc3->commandPrefix();
sp.displayName = rc3->displayName();
sp.sysroot = sysroot(rc3);
- } else if (Qt4ProjectManager::S60DeviceRunConfiguration *rc4 =
- qobject_cast<Qt4ProjectManager::S60DeviceRunConfiguration *>(runConfiguration)) {
- Qt4ProjectManager::S60DeployConfiguration *deployConf =
- qobject_cast<Qt4ProjectManager::S60DeployConfiguration *>(runConfiguration->target()->activeDeployConfiguration());
-
- sp.debuggeeArgs = rc4->commandLineArguments();
- sp.displayName = rc4->displayName();
- sp.connParams.host = deployConf->device()->address();
- sp.connParams.port = rc4->debuggerAspect()->qmlDebugServerPort();
- sp.sysroot = sysroot(rc4);
} else {
// What could that be?
QTC_ASSERT(false, return sp);
diff --git a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
index 2f54679007..2dd5d8e94e 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
@@ -120,7 +120,7 @@ Core::GeneratedFiles QmlProjectApplicationWizard::generateFiles(const QWizard *w
QTextStream out(&contents);
out
- << "// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5" << endl
+ << "// import QtQuick 1.0 // to target Maemo 5" << endl
<< "import QtQuick 1.1" << endl
<< endl
<< "Rectangle {" << endl
diff --git a/src/plugins/qt4projectmanager/addlibrarywizard.h b/src/plugins/qt4projectmanager/addlibrarywizard.h
index 4c43a206a2..cc1be230ec 100644
--- a/src/plugins/qt4projectmanager/addlibrarywizard.h
+++ b/src/plugins/qt4projectmanager/addlibrarywizard.h
@@ -79,8 +79,7 @@ public:
enum Platform {
LinuxPlatform = 0x01,
MacPlatform = 0x02,
- WindowsPlatform = 0x04,
- SymbianPlatform = 0x08
+ WindowsPlatform = 0x04
};
Q_DECLARE_FLAGS(Platforms, Platform)
diff --git a/src/plugins/qt4projectmanager/librarydetailscontroller.cpp b/src/plugins/qt4projectmanager/librarydetailscontroller.cpp
index b8ed4641f3..4344d2d6ae 100644
--- a/src/plugins/qt4projectmanager/librarydetailscontroller.cpp
+++ b/src/plugins/qt4projectmanager/librarydetailscontroller.cpp
@@ -55,8 +55,7 @@ LibraryDetailsController::LibraryDetailsController(
QObject(parent),
m_platforms(AddLibraryWizard::LinuxPlatform
| AddLibraryWizard::MacPlatform
- | AddLibraryWizard::WindowsPlatform
- | AddLibraryWizard::SymbianPlatform),
+ | AddLibraryWizard::WindowsPlatform),
m_linkageType(AddLibraryWizard::NoLinkage),
m_macLibraryType(AddLibraryWizard::NoLibraryType),
m_proFile(proFile),
@@ -117,8 +116,6 @@ LibraryDetailsController::LibraryDetailsController(
this, SLOT(slotPlatformChanged()));
connect(m_libraryDetailsWidget->winCheckBox, SIGNAL(clicked(bool)),
this, SLOT(slotPlatformChanged()));
- connect(m_libraryDetailsWidget->symCheckBox, SIGNAL(clicked(bool)),
- this, SLOT(slotPlatformChanged()));
}
LibraryDetailsController::CreatorPlatform LibraryDetailsController::creatorPlatform() const
@@ -156,8 +153,6 @@ void LibraryDetailsController::updateGui()
m_platforms |= AddLibraryWizard::MacPlatform;
if (libraryDetailsWidget()->winCheckBox->isChecked())
m_platforms |= AddLibraryWizard::WindowsPlatform;
- if (libraryDetailsWidget()->symCheckBox->isChecked())
- m_platforms |= AddLibraryWizard::SymbianPlatform;
bool macLibraryTypeUpdated = false;
if (!m_linkageRadiosVisible) {
@@ -423,16 +418,9 @@ static QString commonScopes(AddLibraryWizard::Platforms scopes,
str << "unix";
if (!(common & AddLibraryWizard::MacPlatform))
str << ":!macx";
- if (!(common & AddLibraryWizard::SymbianPlatform))
- str << ":!symbian";
} else {
if (scopes & AddLibraryWizard::MacPlatform)
str << "macx";
- if (scopes & AddLibraryWizard::MacPlatform &&
- scopes & AddLibraryWizard::SymbianPlatform)
- str << "|";
- if (scopes & AddLibraryWizard::SymbianPlatform)
- str << "symbian";
}
}
if (scopes & AddLibraryWizard::WindowsPlatform) {
@@ -466,8 +454,6 @@ static QString generateLibsSnippet(AddLibraryWizard::Platforms platforms,
commonPlatforms &= ~QFlags<AddLibraryWizard::Platform>(AddLibraryWizard::MacPlatform);
if (useSubfolders || addSuffix) // we will generate a separate debug/release conditions
commonPlatforms &= ~QFlags<AddLibraryWizard::Platform>(AddLibraryWizard::WindowsPlatform);
- if (generateLibPath) // we will generate a separate line without -L
- commonPlatforms &= ~QFlags<AddLibraryWizard::Platform>(AddLibraryWizard::SymbianPlatform);
AddLibraryWizard::Platforms diffPlatforms = platforms ^ commonPlatforms;
AddLibraryWizard::Platforms generatedPlatforms = 0;
@@ -496,12 +482,6 @@ static QString generateLibsSnippet(AddLibraryWizard::Platforms platforms,
<< "-framework " << libName << "\n";
generatedPlatforms |= AddLibraryWizard::MacPlatform;
}
- if (diffPlatforms & AddLibraryWizard::SymbianPlatform) {
- if (generatedPlatforms)
- str << "else:";
- str << "symbian: LIBS += -l" << libName << "\n";
- generatedPlatforms |= AddLibraryWizard::SymbianPlatform;
- }
if (commonPlatforms) {
if (generatedPlatforms)
@@ -559,8 +539,6 @@ static QString generatePreTargetDepsSnippet(AddLibraryWizard::Platforms platform
}
AddLibraryWizard::Platforms commonPlatforms = platforms;
commonPlatforms &= ~QFlags<AddLibraryWizard::Platform>(AddLibraryWizard::WindowsPlatform);
- // don't generate PRE_TARGETDEPS for symbian - relinking static lib apparently works without that
- commonPlatforms &= ~QFlags<AddLibraryWizard::Platform>(AddLibraryWizard::SymbianPlatform);
if (commonPlatforms) {
if (generatedPlatforms)
str << "else:";
diff --git a/src/plugins/qt4projectmanager/librarydetailswidget.ui b/src/plugins/qt4projectmanager/librarydetailswidget.ui
index bd581d35d3..70f0186c78 100644
--- a/src/plugins/qt4projectmanager/librarydetailswidget.ui
+++ b/src/plugins/qt4projectmanager/librarydetailswidget.ui
@@ -96,16 +96,6 @@
</property>
</widget>
</item>
- <item>
- <widget class="QCheckBox" name="symCheckBox">
- <property name="text">
- <string>Symbian</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
</layout>
</widget>
</item>
diff --git a/src/plugins/qt4projectmanager/profilekeywords.cpp b/src/plugins/qt4projectmanager/profilekeywords.cpp
index fbb18acb15..b7c8d02f87 100644
--- a/src/plugins/qt4projectmanager/profilekeywords.cpp
+++ b/src/plugins/qt4projectmanager/profilekeywords.cpp
@@ -34,8 +34,6 @@ using namespace Qt4ProjectManager::Internal;
static const char *const variableKeywords[] = {
"BACKUP_REGISTRATION_FILE_MAEMO",
- "BACKUP_REGISTRATION_FILE_SYMBIAN",
- "BLD_INF_RULES",
"CCFLAG",
"CONFIG",
"DEFINES",
@@ -63,7 +61,6 @@ static const char *const variableKeywords[] = {
"LITERAL_HASH",
"MAKEFILE",
"MAKEFILE_GENERATOR",
- "MMP_RULES",
"MOBILITY",
"MOC_DIR",
"OBJECTIVE_HEADERS",
@@ -207,25 +204,11 @@ static const char *const variableKeywords[] = {
"RESOURCES",
"RES_FILE",
"RSS_RULES",
- "S60_VERSION",
"SIGNATURE_FILE",
"SOURCES",
"SRCMOC",
"STATECHARTS",
"SUBDIRS",
- "SYMBIAN_VERSION",
- "TARGET",
- "TARGET.CAPABILITY",
- "TARGET.EPOCALLOWDLLDATA",
- "TARGET.EPOCHEAPSIZE",
- "TARGET.EPOCSTACKSIZE",
- "TARGET.SID",
- "TARGET.UID2",
- "TARGET.UID3",
- "TARGET.VID",
- "TARGET_EXT",
- "TARGET_x",
- "TARGET_x.y.z",
"TEMPLATE",
"TRANSLATIONS",
"UICIMPLS",
diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index d60d98bdb8..a0897c6fab 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -230,7 +230,7 @@ QStringList QMakeStep::deducedArgumentsAfter()
// We have a target which does not allow shadow building.
// But we really don't want to have the build artefacts in the source dir
// so we try to hack around it, to make the common cases work.
- // This is a HACK, remove once the symbian make generator supports
+ // This is a HACK, remove once all make generators support
// shadow building
return QStringList() << QLatin1String("-after")
<< QLatin1String("OBJECTS_DIR=obj")
diff --git a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp
index 29f98f5f37..fd114e7856 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp
@@ -91,8 +91,7 @@ Core::FeatureSet SimulatorQtVersion::availableFeatures() const
{
Core::FeatureSet features = QtSupport::BaseQtVersion::availableFeatures();
if (qtVersion() >= QtSupport::QtVersionNumber(4, 7, 4)) //no reliable test for components, yet.
- features |= Core::FeatureSet(QtSupport::Constants::FEATURE_QTQUICK_COMPONENTS_MEEGO)
- | Core::FeatureSet(QtSupport::Constants::FEATURE_QTQUICK_COMPONENTS_SYMBIAN);
+ features |= Core::FeatureSet(QtSupport::Constants::FEATURE_QTQUICK_COMPONENTS_MEEGO);
features |= Core::FeatureSet(QtSupport::Constants::FEATURE_MOBILE);
return features;
@@ -100,7 +99,6 @@ Core::FeatureSet SimulatorQtVersion::availableFeatures() const
bool SimulatorQtVersion::supportsPlatform(const QString &platformName) const
{
- return (platformName == QtSupport::Constants::SYMBIAN_PLATFORM
- || platformName == QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM
+ return (platformName == QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM
|| platformName.isEmpty());
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp b/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp
deleted file mode 100644
index c53098ffd9..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/abldparser.cpp
+++ /dev/null
@@ -1,234 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "abldparser.h"
-
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/task.h>
-
-using namespace Qt4ProjectManager;
-using namespace ProjectExplorer;
-using namespace ProjectExplorer::Constants;
-
-AbldParser::AbldParser() :
- m_currentLine(-1),
- m_waitingForStdErrContinuation(false),
- m_waitingForStdOutContinuation(false)
-{
- setObjectName(QLatin1String("AbldParser"));
- m_perlIssue.setPattern(QLatin1String("^(WARNING|ERROR):\\s([^\\(\\)]+[^\\d])\\((\\d+)\\) : (.+)$"));
- m_perlIssue.setMinimal(true);
-}
-
-void AbldParser::stdOutput(const QString &line)
-{
- m_waitingForStdErrContinuation = false;
-
- QString lne = line.trimmed();
- // possible ABLD.bat errors:
- if (lne.startsWith(QLatin1String("Is Perl, version "))) {
- emit addTask(Task(Task::Error,
- lne /* description */,
- Utils::FileName() /* filename */,
- -1 /* linenumber */,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
- return;
- }
- if (lne.startsWith(QLatin1String("FATAL ERROR:")) ||
- lne.startsWith(QLatin1String("Error :"))) {
- emit addTask(Task(Task::Error,
- lne /* description */,
- Utils::FileName() /* filename */,
- -1 /* linenumber */,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
- m_waitingForStdOutContinuation = false;
- return;
- }
-
- if (m_perlIssue.indexIn(lne) > -1) {
- m_waitingForStdOutContinuation = true;
- m_currentFile = m_perlIssue.cap(2);
- m_currentLine = m_perlIssue.cap(3).toInt();
-
- Task task(Task::Unknown,
- m_perlIssue.cap(4) /* description */,
- Utils::FileName::fromUserInput(m_currentFile), m_currentLine,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM));
-
- if (m_perlIssue.cap(1) == QLatin1String("WARNING"))
- task.type = Task::Warning;
- else if (m_perlIssue.cap(1) == QLatin1String("ERROR"))
- task.type = Task::Error;
-
- emit addTask(task);
- return;
- }
-
- if (lne.startsWith(QLatin1String("SIS creation failed!"))) {
- m_waitingForStdOutContinuation = false;
- emit addTask(Task(Task::Error,
- line, Utils::FileName(), -1,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
- return;
- }
-
- if (lne.isEmpty()) {
- m_waitingForStdOutContinuation = false;
- return;
- }
-
- if (m_waitingForStdOutContinuation) {
- emit addTask(Task(Task::Unknown,
- lne /* description */,
- Utils::FileName::fromUserInput(m_currentFile), m_currentLine,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
- m_waitingForStdOutContinuation = true;
- return;
- }
- IOutputParser::stdOutput(line);
-}
-
-void AbldParser::stdError(const QString &line)
-{
- m_waitingForStdOutContinuation = false;
-
- QString lne = line.trimmed();
-
- // possible abld.pl errors:
- if (lne.startsWith(QLatin1String("ABLD ERROR:")) ||
- lne.startsWith(QLatin1String("This project does not support ")) ||
- lne.startsWith(QLatin1String("Platform "))) {
- emit addTask(Task(Task::Error,
- lne /* description */,
- Utils::FileName() /* filename */,
- -1 /* linenumber */,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
- return;
- }
-
- if (lne.startsWith(QLatin1String("Died at "))) {
- emit addTask(Task(Task::Error,
- lne /* description */,
- Utils::FileName() /* filename */,
- -1 /* linenumber */,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
- m_waitingForStdErrContinuation = false;
- return;
- }
-
- if (lne.startsWith(QLatin1String("MMPFILE \""))) {
- m_currentFile = lne.mid(9, lne.size() - 10);
- m_waitingForStdErrContinuation = false;
- return;
- }
- if (lne.isEmpty()) {
- m_waitingForStdErrContinuation = false;
- return;
- }
- if (lne.startsWith(QLatin1String("WARNING: "))) {
- QString description = lne.mid(9);
- emit addTask(Task(Task::Warning, description,
- Utils::FileName::fromUserInput(m_currentFile),
- -1 /* linenumber */,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
- m_waitingForStdErrContinuation = true;
- return;
- }
- if (lne.startsWith(QLatin1String("ERROR: "))) {
- QString description = lne.mid(7);
- emit addTask(Task(Task::Error, description,
- Utils::FileName::fromUserInput(m_currentFile),
- -1 /* linenumber */,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
- m_waitingForStdErrContinuation = true;
- return;
- }
- if (m_waitingForStdErrContinuation)
- {
- emit addTask(Task(Task::Unknown,
- lne /* description */,
- Utils::FileName::fromUserInput(m_currentFile),
- -1 /* linenumber */,
- Core::Id(TASK_CATEGORY_BUILDSYSTEM)));
- m_waitingForStdErrContinuation = true;
- return;
- }
- IOutputParser::stdError(line);
-}
-
-// Unit tests:
-
-#ifdef WITH_TESTS
-# include <QTest>
-
-# include "qt4projectmanagerplugin.h"
-
-# include "projectexplorer/outputparser_test.h"
-
-using namespace Qt4ProjectManager::Internal;
-
-void Qt4ProjectManagerPlugin::testAbldOutputParsers_data()
-{
- QTest::addColumn<QString>("input");
- QTest::addColumn<OutputParserTester::Channel>("inputChannel");
- QTest::addColumn<QString>("childStdOutLines");
- QTest::addColumn<QString>("childStdErrLines");
- QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
- QTest::addColumn<QString>("outputLines");
-
-
- QTest::newRow("pass-through stdout")
- << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
- << QString::fromLatin1("Sometext\n") << QString()
- << QList<ProjectExplorer::Task>()
- << QString();
- QTest::newRow("pass-through stderr")
- << QString::fromLatin1("Sometext") << OutputParserTester::STDERR
- << QString() << QString::fromLatin1("Sometext\n")
- << QList<ProjectExplorer::Task>()
- << QString();
-}
-
-void Qt4ProjectManagerPlugin::testAbldOutputParsers()
-{
- OutputParserTester testbench;
- testbench.appendOutputParser(new AbldParser);
- QFETCH(QString, input);
- QFETCH(OutputParserTester::Channel, inputChannel);
- QFETCH(QList<Task>, tasks);
- QFETCH(QString, childStdOutLines);
- QFETCH(QString, childStdErrLines);
- QFETCH(QString, outputLines);
-
- testbench.testParsing(input, inputChannel,
- tasks, childStdOutLines, childStdErrLines,
- outputLines);
-}
-#endif
diff --git a/src/plugins/qt4projectmanager/qt-s60/abldparser.h b/src/plugins/qt4projectmanager/qt-s60/abldparser.h
deleted file mode 100644
index 5a05fcded4..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/abldparser.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef ABLDPARSER_H
-#define ABLDPARSER_H
-
-#include <projectexplorer/ioutputparser.h>
-
-#include <QRegExp>
-
-namespace Qt4ProjectManager {
-
-class AbldParser : public ProjectExplorer::IOutputParser
-{
- Q_OBJECT
-
-public:
- AbldParser();
-
- virtual void stdOutput(const QString & line);
- virtual void stdError(const QString & line);
-
-private:
- QRegExp m_perlIssue;
-
- QString m_currentFile;
- int m_currentLine;
-
- bool m_waitingForStdErrContinuation;
- bool m_waitingForStdOutContinuation;
-};
-
-} // namespace Qt4ProjectExplorer
-
-#endif // ABLDPARSER_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/certificatepathchooser.cpp b/src/plugins/qt4projectmanager/qt-s60/certificatepathchooser.cpp
deleted file mode 100644
index 24c18ae105..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/certificatepathchooser.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "certificatepathchooser.h"
-#include "s60certificateinfo.h"
-
-#include <QMessageBox>
-
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-CertificatePathChooser::CertificatePathChooser(QWidget *parent) :
- Utils::PathChooser(parent)
-{
-}
-
-bool CertificatePathChooser::validatePath(const QString &path, QString *errorMessage)
-{
- if (Utils::PathChooser::validatePath(path, errorMessage)) {
- QScopedPointer<Qt4ProjectManager::Internal::S60CertificateInfo>
- certInfoPtr(new Qt4ProjectManager::Internal::S60CertificateInfo(path));
- if (certInfoPtr.data()->validateCertificate()
- == Qt4ProjectManager::Internal::S60CertificateInfo::CertificateValid) {
- if (errorMessage)
- *errorMessage = certInfoPtr.data()->toHtml();
- return true;
- } else {
- if (errorMessage)
- *errorMessage = certInfoPtr.data()->errorString();
- }
- }
- return false;
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/certificatepathchooser.h b/src/plugins/qt4projectmanager/qt-s60/certificatepathchooser.h
deleted file mode 100644
index 2f19dd1ded..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/certificatepathchooser.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef CERTIFICATEPATHCHOOSER_H
-#define CERTIFICATEPATHCHOOSER_H
-
-#include "utils/pathchooser.h"
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class CertificatePathChooser : public Utils::PathChooser
-{
- Q_OBJECT
-
-public:
- explicit CertificatePathChooser(QWidget *parent = 0);
-
- virtual bool validatePath(const QString &path, QString *errorMessage = 0);
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // CERTIFICATEPATHCHOOSER_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp b/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp
deleted file mode 100644
index 469d947de8..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.cpp
+++ /dev/null
@@ -1,438 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "codaruncontrol.h"
-
-#include "s60deployconfiguration.h"
-#include "s60devicerunconfiguration.h"
-#include "symbianidevice.h"
-
-#include "codadevice.h"
-#include "codamessage.h"
-
-#include "qt4buildconfiguration.h"
-#include "symbiandevicemanager.h"
-
-#include <coreplugin/icore.h>
-#include <utils/qtcassert.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-
-#include <symbianutils/symbiandevicemanager.h>
-
-#include <QDir>
-#include <QFileInfo>
-#include <QTimer>
-
-#include <QMessageBox>
-
-#include <QTcpSocket>
-
-using namespace ProjectExplorer;
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-using namespace Coda;
-
-enum { debug = 0 };
-
-CodaRunControl::CodaRunControl(RunConfiguration *runConfiguration, RunMode mode) :
- S60RunControlBase(runConfiguration, mode),
- m_port(0),
- m_state(StateUninit),
- m_stopAfterConnect(false)
-{
- const S60DeviceRunConfiguration *s60runConfig = qobject_cast<S60DeviceRunConfiguration *>(runConfiguration);
- QTC_ASSERT(s60runConfig, return);
- const S60DeployConfiguration *activeDeployConf = qobject_cast<S60DeployConfiguration *>(s60runConfig->target()->activeDeployConfiguration());
- QTC_ASSERT(activeDeployConf, return);
- QTC_ASSERT(activeDeployConf->device(), return);
-
- SymbianIDevice::CommunicationChannel channel = activeDeployConf->device()->communicationChannel();
- if (channel == SymbianIDevice::CommunicationCodaTcpConnection) {
- m_address = activeDeployConf->device()->address();
- m_port = activeDeployConf->device()->port().toInt();
- } else if (channel == SymbianIDevice::CommunicationCodaSerialConnection) {
- m_serialPort = activeDeployConf->device()->serialPortName();
- } else {
- QTC_ASSERT(false, return);
- }
-}
-
-CodaRunControl::~CodaRunControl()
-{
-}
-
-bool CodaRunControl::doStart()
-{
- if (m_address.isEmpty() && m_serialPort.isEmpty()) {
- cancelProgress();
- QString msg = tr("No device is connected. Please connect a device and try again.\n");
- appendMessage(msg, Utils::NormalMessageFormat);
- return false;
- }
- appendMessage(tr("Executable file: %1\n").arg(msgListFile(executableFileName())),
- Utils::NormalMessageFormat);
- return true;
-}
-
-bool CodaRunControl::isRunning() const
-{
- return m_state >= StateConnecting;
-}
-
-QIcon CodaRunControl::icon() const
-{
- return QIcon(QLatin1String(ProjectExplorer::Constants::ICON_DEBUG_SMALL));
-}
-
-bool CodaRunControl::setupLauncher()
-{
- QTC_ASSERT(!m_codaDevice, return false);
-
- if (m_serialPort.length()) {
- // We get the port from SymbianDeviceManager
- appendMessage(tr("Connecting to '%1'...\n").arg(m_serialPort), Utils::NormalMessageFormat);
- m_codaDevice = SymbianUtils::SymbianDeviceManager::instance()->getCodaDevice(m_serialPort);
- if (m_codaDevice.isNull()) {
- appendMessage(tr("Unable to create CODA connection. Please try again.\n"), Utils::ErrorMessageFormat);
- return false;
- }
- if (!m_codaDevice->device()->isOpen()) {
- appendMessage(tr("Could not open serial device: %1\n").arg(m_codaDevice->device()->errorString()), Utils::ErrorMessageFormat);
- return false;
- }
- connect(SymbianUtils::SymbianDeviceManager::instance(), SIGNAL(deviceRemoved(SymbianUtils::SymbianDevice)),
- this, SLOT(deviceRemoved(SymbianUtils::SymbianDevice)));
- m_state = StateConnecting;
- m_codaDevice->sendSerialPing(false);
- } else {
- // For TCP we don't use device manager, we just set it up directly
- m_codaDevice = QSharedPointer<Coda::CodaDevice>(new Coda::CodaDevice, &QObject::deleteLater); // finishRunControl, which deletes m_codaDevice, can get called from within a coda callback, so need to use deleteLater
- const QSharedPointer<QTcpSocket> codaSocket(new QTcpSocket);
- m_codaDevice->setDevice(codaSocket);
- codaSocket->connectToHost(m_address, m_port);
- m_state = StateConnecting;
- appendMessage(tr("Connecting to %1:%2...\n").arg(m_address).arg(m_port), Utils::NormalMessageFormat);
- }
-
- connect(m_codaDevice.data(), SIGNAL(error(QString)), this, SLOT(slotError(QString)));
- connect(m_codaDevice.data(), SIGNAL(logMessage(QString)), this, SLOT(slotCodaLogMessage(QString)));
- connect(m_codaDevice.data(), SIGNAL(codaEvent(Coda::CodaEvent)), this, SLOT(slotCodaEvent(Coda::CodaEvent)));
-
- QTimer::singleShot(5000, this, SLOT(checkForTimeout()));
- if (debug)
- m_codaDevice->setVerbose(debug);
- return true;
-}
-
-void CodaRunControl::doStop()
-{
- switch (m_state) {
- case StateUninit:
- case StateConnecting:
- case StateConnected:
- finishRunControl();
- break;
- case StateProcessRunning:
- QTC_ASSERT(!m_runningProcessId.isEmpty(), return);
- m_codaDevice->sendRunControlTerminateCommand(CodaCallback(),
- m_runningProcessId.toAscii());
- break;
- default:
- if (debug)
- qDebug() << "Unrecognised state while performing shutdown" << m_state;
- break;
- }
-}
-
-void CodaRunControl::slotError(const QString &error)
-{
- appendMessage(tr("Error: %1\n").arg(error), Utils::ErrorMessageFormat);
- finishRunControl();
-}
-
-void CodaRunControl::slotCodaLogMessage(const QString &log)
-{
- if (debug > 1)
- qDebug("CODA log: %s", qPrintable(log.size()>200?log.left(200).append(QLatin1String("...")): log));
-}
-
-void CodaRunControl::slotCodaEvent(const CodaEvent &event)
-{
- if (debug)
- qDebug() << "CODA event:" << "Type:" << event.type() << "Message:" << event.toString();
-
- switch (event.type()) {
- case CodaEvent::LocatorHello:
- handleConnected(event);
- break;
- case CodaEvent::RunControlContextRemoved:
- handleContextRemoved(event);
- break;
- case CodaEvent::RunControlContextAdded:
- m_state = StateProcessRunning;
- reportLaunchFinished();
- handleContextAdded(event);
- break;
- case CodaEvent::RunControlSuspended:
- handleContextSuspended(event);
- break;
- case CodaEvent::RunControlModuleLoadSuspended:
- handleModuleLoadSuspended(event);
- break;
- case CodaEvent::LoggingWriteEvent:
- handleLogging(event);
- break;
- case CodaEvent::ProcessExitedEvent:
- handleProcessExited(event);
- break;
- default:
- if (debug)
- qDebug() << "CODA event not handled" << event.type();
- break;
- }
-}
-
-void CodaRunControl::initCommunication()
-{
- m_codaDevice->sendDebugSessionControlSessionStartCommand(CodaCallback(this, &CodaRunControl::handleDebugSessionStarted));
-}
-
-void CodaRunControl::handleConnected(const CodaEvent &event)
-{
- if (m_state >= StateConnected)
- return;
- m_state = StateConnected;
- appendMessage(tr("Connected.\n"), Utils::NormalMessageFormat);
- setProgress(maxProgress()*0.80);
-
- m_codaServices = static_cast<const CodaLocatorHelloEvent &>(event).services();
-
- emit connected();
- if (!m_stopAfterConnect)
- initCommunication();
-}
-
-void CodaRunControl::handleContextRemoved(const CodaEvent &event)
-{
- const QVector<QByteArray> removedItems
- = static_cast<const CodaRunControlContextRemovedEvent &>(event).ids();
- if (!m_runningProcessId.isEmpty()
- && removedItems.contains(m_runningProcessId.toAscii())) {
- m_codaDevice->sendDebugSessionControlSessionEndCommand(CodaCallback(this, &CodaRunControl::handleDebugSessionEnded));
- }
-}
-
-void CodaRunControl::handleContextAdded(const CodaEvent &event)
-{
- typedef CodaRunControlContextAddedEvent CodaAddedEvent;
-
- const CodaAddedEvent &me = static_cast<const CodaAddedEvent &>(event);
- foreach (const RunControlContext &context, me.contexts()) {
- if (context.parentId == "root") //is the created context a process
- m_runningProcessId = QLatin1String(context.id);
- }
-}
-
-void CodaRunControl::handleContextSuspended(const CodaEvent &event)
-{
- typedef CodaRunControlContextSuspendedEvent CodaSuspendEvent;
-
- const CodaSuspendEvent &me = static_cast<const CodaSuspendEvent &>(event);
-
- switch (me.reason()) {
- case CodaSuspendEvent::Other:
- case CodaSuspendEvent::Crash:
- appendMessage(tr("Thread has crashed: %1\n").arg(QString::fromLatin1(me.message())), Utils::ErrorMessageFormat);
-
- if (me.reason() == CodaSuspendEvent::Crash)
- stop();
- else
- m_codaDevice->sendRunControlResumeCommand(CodaCallback(), me.id()); //TODO: Should I resume automatically
- break;
- default:
- if (debug)
- qDebug() << "Context suspend not handled:" << "Reason:" << me.reason() << "Message:" << me.message();
- break;
- }
-}
-
-void CodaRunControl::handleModuleLoadSuspended(const CodaEvent &event)
-{
- // Debug mode start: Continue:
- typedef CodaRunControlModuleLoadContextSuspendedEvent CodaModuleLoadSuspendedEvent;
-
- const CodaModuleLoadSuspendedEvent &me = static_cast<const CodaModuleLoadSuspendedEvent &>(event);
- if (me.info().requireResume)
- m_codaDevice->sendRunControlResumeCommand(CodaCallback(), me.id());
-}
-
-void CodaRunControl::handleLogging(const CodaEvent &event)
-{
- const CodaLoggingWriteEvent &me = static_cast<const CodaLoggingWriteEvent &>(event);
- appendMessage(QString::fromLatin1(QByteArray(me.message() + '\n')), Utils::StdOutFormat);
-}
-
-void CodaRunControl::handleProcessExited(const CodaEvent &event)
-{
- Q_UNUSED(event)
- appendMessage(tr("Process has finished.\n"), Utils::NormalMessageFormat);
- m_codaDevice->sendDebugSessionControlSessionEndCommand(CodaCallback(this, &CodaRunControl::handleDebugSessionEnded));
-}
-
-void CodaRunControl::handleAddListener(const CodaCommandResult &result)
-{
- Q_UNUSED(result)
- m_codaDevice->sendSymbianOsDataFindProcessesCommand(CodaCallback(this, &CodaRunControl::handleFindProcesses),
- QByteArray(),
- QByteArray::number(executableUid(), 16));
-}
-
-void CodaRunControl::handleDebugSessionStarted(const CodaCommandResult &result)
-{
- Q_UNUSED(result)
- if (m_codaDevice.isNull()) {
- finishRunControl();
- return;
- }
- m_state = StateDebugSessionStarted;
- m_codaDevice->sendLoggingAddListenerCommand(CodaCallback(this, &CodaRunControl::handleAddListener));
-}
-
-void CodaRunControl::handleDebugSessionEnded(const CodaCommandResult &result)
-{
- Q_UNUSED(result)
- m_state = StateDebugSessionEnded;
- finishRunControl();
-}
-
-void CodaRunControl::handleFindProcesses(const CodaCommandResult &result)
-{
- if (result.values.size() && result.values.at(0).type() == Json::JsonValue::Array && result.values.at(0).children().count()) {
- //there are processes running. Cannot run mine
- appendMessage(tr("The process is already running on the device. Please first close it.\n"), Utils::ErrorMessageFormat);
- finishRunControl();
- } else {
- setProgress(maxProgress()*0.90);
- m_codaDevice->sendProcessStartCommand(CodaCallback(this, &CodaRunControl::handleCreateProcess),
- executableName(),
- executableUid(),
- commandLineArguments().split(QLatin1Char(' ')),
- QString(),
- true);
- appendMessage(tr("Launching: %1\n").arg(executableName()), Utils::NormalMessageFormat);
- }
-}
-
-void CodaRunControl::handleCreateProcess(const CodaCommandResult &result)
-{
- const bool ok = result.type == CodaCommandResult::SuccessReply;
- bool processCreated = false;
- if (ok) {
- if (result.values.size()) {
- Json::JsonValue id = result.values.at(0).findChild("ID");
- if (id.isValid()) {
- m_state = StateProcessRunning;
- m_runningProcessId = QLatin1String(id.data());
- processCreated = true;
- }
- }
- }
- if (processCreated) {
- setProgress(maxProgress());
- appendMessage(tr("Launched.\n"), Utils::NormalMessageFormat);
- } else {
- appendMessage(tr("Launch failed: %1\n").arg(result.toString()), Utils::ErrorMessageFormat);
- finishRunControl();
- }
-}
-
-void CodaRunControl::finishRunControl()
-{
- m_runningProcessId.clear();
- if (m_codaDevice) {
- disconnect(m_codaDevice.data(), 0, this, 0);
- SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaDevice);
- }
- m_state = StateUninit;
- emit finished();
-}
-
-QMessageBox *CodaRunControl::createCodaWaitingMessageBox(QWidget *parent)
-{
- const QString title = tr("Waiting for CODA");
- const QString text = tr("Qt Creator is waiting for the CODA application to connect.<br>"
- "Please make sure the application is running on "
- "your mobile phone and the right IP address and/or port are "
- "configured in the project settings.");
- QMessageBox *mb = new QMessageBox(QMessageBox::Information, title, text, QMessageBox::Cancel, parent);
- return mb;
-}
-
-void CodaRunControl::checkForTimeout()
-{
- if (m_state != StateConnecting)
- return;
-
- QMessageBox *mb = createCodaWaitingMessageBox(Core::ICore::mainWindow());
- connect(this, SIGNAL(finished()), mb, SLOT(close()));
- connect(mb, SIGNAL(finished(int)), this, SLOT(cancelConnection()));
- mb->open();
-}
-
-void CodaRunControl::cancelConnection()
-{
- if (m_state != StateConnecting)
- return;
-
- stop();
- appendMessage(tr("Canceled.\n"), Utils::ErrorMessageFormat);
- emit finished();
-}
-
-void CodaRunControl::deviceRemoved(const SymbianUtils::SymbianDevice &device)
-{
- if (m_codaDevice && device.portName() == m_serialPort) {
- QString msg = tr("The device '%1' has been disconnected.\n").arg(device.friendlyName());
- appendMessage(msg, Utils::ErrorMessageFormat);
- finishRunControl();
- }
-}
-
-void CodaRunControl::connect()
-{
- m_stopAfterConnect = true;
- start();
-}
-
-void CodaRunControl::run()
-{
- initCommunication();
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.h b/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.h
deleted file mode 100644
index 4830a1c2d2..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/codaruncontrol.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef CODARUNCONTROL_H
-#define CODARUNCONTROL_H
-
-#include "s60runcontrolbase.h"
-
-QT_BEGIN_NAMESPACE
-class QMessageBox;
-class QWidget;
-QT_END_NAMESPACE
-
-namespace Coda {
-struct CodaCommandResult;
-class CodaDevice;
-class CodaEvent;
-}
-
-namespace SymbianUtils {
-class SymbianDevice;
-}
-
-namespace Qt4ProjectManager {
-
-// CodaRunControl configures Coda to run the application
-class QT4PROJECTMANAGER_EXPORT CodaRunControl : public S60RunControlBase
-{
- Q_OBJECT
-public:
- CodaRunControl(ProjectExplorer::RunConfiguration *runConfiguration,
- ProjectExplorer::RunMode mode);
- virtual ~CodaRunControl();
-
- virtual bool isRunning() const;
- virtual QIcon icon() const;
-
- static QMessageBox *createCodaWaitingMessageBox(QWidget *parent = 0);
-
- using QObject::connect;
- void connect(); // Like start() but doesn't actually launch the program; just hooks up coda.
- void run();
-
-protected:
- virtual bool doStart();
- virtual void doStop();
- virtual bool setupLauncher();
-
-signals:
- void connected();
-
-protected slots:
- void finishRunControl();
- void checkForTimeout();
- void cancelConnection();
- void deviceRemoved(const SymbianUtils::SymbianDevice &device);
-
-private slots:
- void slotError(const QString &error);
- void slotCodaLogMessage(const QString &log);
- void slotCodaEvent(const Coda::CodaEvent &event);
-
-private:
- void initCommunication();
-
- void handleConnected(const Coda::CodaEvent &event);
- void handleModuleLoadSuspended(const Coda::CodaEvent &event);
- void handleContextSuspended(const Coda::CodaEvent &event);
- void handleContextAdded(const Coda::CodaEvent &event);
- void handleContextRemoved(const Coda::CodaEvent &event);
- void handleLogging(const Coda::CodaEvent &event);
- void handleProcessExited(const Coda::CodaEvent &event);
-
-private:
- void handleCreateProcess(const Coda::CodaCommandResult &result);
- void handleAddListener(const Coda::CodaCommandResult &result);
- void handleDebugSessionStarted(const Coda::CodaCommandResult &result);
- void handleDebugSessionEnded(const Coda::CodaCommandResult &result);
- void handleFindProcesses(const Coda::CodaCommandResult &result);
-
-private:
- enum State {
- StateUninit,
- StateConnecting,
- StateConnected,
- StateDebugSessionStarted,
- StateProcessRunning,
- StateDebugSessionEnded
- };
-
- QSharedPointer<Coda::CodaDevice> m_codaDevice;
-
- QString m_address;
- unsigned short m_port;
- QString m_serialPort;
- QString m_runningProcessId;
- QStringList m_codaServices;
-
- State m_state;
- bool m_stopAfterConnect;
-};
-
-} // namespace Qt4ProjectManager
-
-#endif // CODARUNCONTROL_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
deleted file mode 100644
index dc6562f9d7..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "gccetoolchain.h"
-#include "qt4projectmanagerconstants.h"
-
-#include <utils/environment.h>
-#include <utils/synchronousprocess.h>
-#include <projectexplorer/headerpath.h>
-#include <projectexplorer/toolchainmanager.h>
-#include <qtsupport/qtversionmanager.h>
-
-#include <QDir>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-static QString gcceVersion(const Utils::FileName &command)
-{
- if (command.isEmpty())
- return QString();
-
- QProcess gxx;
- QStringList arguments;
- arguments << QLatin1String("-dumpversion");
- Utils::Environment env = Utils::Environment::systemEnvironment();
- env.set(QLatin1String("LC_ALL"), QLatin1String("C")); //override current locale settings
- gxx.setEnvironment(env.toStringList());
- gxx.setReadChannelMode(QProcess::MergedChannels);
- gxx.start(command.toString(), arguments);
- if (!gxx.waitForStarted()) {
- qWarning("Cannot start '%s': %s", qPrintable(command.toUserOutput()), qPrintable(gxx.errorString()));
- return QString();
- }
- gxx.closeWriteChannel();
- if (!gxx.waitForFinished()) {
- Utils::SynchronousProcess::stopProcess(gxx);
- qWarning("Timeout running '%s'.", qPrintable(command.toUserOutput()));
- return QString();
- }
- if (gxx.exitStatus() != QProcess::NormalExit) {
- qWarning("'%s' crashed.", qPrintable(command.toUserOutput()));
- return QString();
- }
-
- QString version = QString::fromLocal8Bit(gxx.readLine().trimmed());
- if (version.contains(QRegExp(QLatin1String("^\\d+\\.\\d+\\.\\d+.*$"))))
- return version;
-
- return QString();
-}
-
-
-// ==========================================================================
-// GcceToolChain
-// ==========================================================================
-
-QString GcceToolChain::type() const
-{
- return QLatin1String("gcce");
-}
-
-QString GcceToolChain::typeDisplayName() const
-{
- return GcceToolChainFactory::tr("GCCE");
-}
-
-QByteArray GcceToolChain::predefinedMacros(const QStringList &list) const
-{
- if (m_predefinedMacros.isEmpty()) {
- ProjectExplorer::GccToolChain::predefinedMacros(list);
- m_predefinedMacros += "\n"
- "#define __GCCE__\n"
- "#define __SYMBIAN32__\n";
- }
- return m_predefinedMacros;
-}
-
-void GcceToolChain::addToEnvironment(Utils::Environment &env) const
-{
- GccToolChain::addToEnvironment(env);
-
- if (m_gcceVersion.isEmpty())
- m_gcceVersion = gcceVersion(compilerCommand());
- if (m_gcceVersion.isEmpty())
- return;
-
- env.set(QLatin1String("QT_GCCE_VERSION"), m_gcceVersion);
- QString version = m_gcceVersion;
- env.set(QString::fromLatin1("SBS_GCCE") + version.remove(QLatin1Char('.'))
- + QLatin1String("BIN"), QDir::toNativeSeparators(compilerCommand().toFileInfo().absolutePath()));
- // Required for SBS, which checks the version output from its tools
- // and gets confused by localized output.
- env.set(QLatin1String("LANG"), QString(QLatin1Char('C')));
-}
-
-QString GcceToolChain::makeCommand() const
-{
-#if defined(Q_OS_WIN)
- return QLatin1String("make.exe");
-#else
- return QLatin1String("make");
-#endif
-}
-
-QString GcceToolChain::defaultMakeTarget() const
-{
- return QLatin1String("gcce");
-}
-
-void GcceToolChain::setCompilerCommand(const Utils::FileName &path)
-{
- m_gcceVersion.clear();
- GccToolChain::setCompilerCommand(path);
-}
-
-ProjectExplorer::ToolChain *GcceToolChain::clone() const
-{
- return new GcceToolChain(*this);
-}
-
-GcceToolChain::GcceToolChain(bool autodetected) :
- GccToolChain(QLatin1String(Constants::GCCE_TOOLCHAIN_ID), autodetected)
-{ }
-
-// ==========================================================================
-// GcceToolChainFactory
-// ==========================================================================
-
-QString GcceToolChainFactory::displayName() const
-{
- return tr("GCCE");
-}
-
-QString GcceToolChainFactory::id() const
-{
- return QLatin1String(Constants::GCCE_TOOLCHAIN_ID);
-}
-
-QList<ProjectExplorer::ToolChain *> GcceToolChainFactory::autoDetect()
-{
- QList<ProjectExplorer::ToolChain *> result;
-
- // Compatibility to pre-2.2:
- while (true) {
- const QString path = QtSupport::QtVersionManager::instance()->popPendingGcceUpdate();
- if (path.isNull())
- break;
-
- QFileInfo fi(path + QLatin1String("/bin/arm-none-symbianelf-g++.exe"));
- if (fi.exists() && fi.isExecutable()) {
- GcceToolChain *tc = new GcceToolChain(false);
- tc->setCompilerCommand(Utils::FileName(fi));
- tc->setDisplayName(tr("GCCE from Qt version"));
- result.append(tc);
- }
- }
-
- Utils::FileName fullPath =
- Utils::FileName::fromString(Utils::Environment::systemEnvironment()
- .searchInPath(QLatin1String("arm-none-symbianelf-gcc")));
- QString version = gcceVersion(fullPath);
- // If version is empty then this is not a GCC but e.g. bullseye!
- if (!fullPath.isEmpty() && !version.isEmpty()) {
- GcceToolChain *tc = new GcceToolChain(true);
- tc->setCompilerCommand(fullPath);
- tc->setDisplayName(tr("GCCE (%1)").arg(version));
- if (tc->targetAbi() == ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture,
- ProjectExplorer::Abi::SymbianOS,
- ProjectExplorer::Abi::SymbianDeviceFlavor,
- ProjectExplorer::Abi::ElfFormat,
- 32))
- result.append(tc);
- }
- return result;
-}
-
-bool GcceToolChainFactory::canCreate()
-{
- return true;
-}
-
-ProjectExplorer::ToolChain *GcceToolChainFactory::create()
-{
- GcceToolChain *tc = new GcceToolChain(false);
- tc->setDisplayName(tr("GCCE"));
- return tc;
-}
-
-bool GcceToolChainFactory::canRestore(const QVariantMap &data)
-{
- return idFromMap(data).startsWith(QLatin1String(Constants::GCCE_TOOLCHAIN_ID));
-}
-
-ProjectExplorer::ToolChain *GcceToolChainFactory::restore(const QVariantMap &data)
-{
- GcceToolChain *tc = new GcceToolChain(false);
- if (tc->fromMap(data))
- return tc;
-
- delete tc;
- return 0;
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h
deleted file mode 100644
index 163a4f14cc..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef GCCETOOLCHAIN_H
-#define GCCETOOLCHAIN_H
-
-#include <projectexplorer/gcctoolchain.h>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-// ==========================================================================
-// GcceToolChain
-// ==========================================================================
-
-class GcceToolChain : public ProjectExplorer::GccToolChain
-{
-public:
- QString type() const;
- QString typeDisplayName() const;
-
- QByteArray predefinedMacros(const QStringList &list) const;
- void addToEnvironment(Utils::Environment &env) const;
- QString makeCommand() const;
- QString defaultMakeTarget() const;
-
- void setCompilerCommand(const Utils::FileName &);
-
- ProjectExplorer::ToolChain *clone() const;
-
-private:
- explicit GcceToolChain(bool autodetected);
-
- mutable QString m_gcceVersion;
-
- friend class GcceToolChainFactory;
-};
-
-// ==========================================================================
-// GcceToolChainFactory
-// ==========================================================================
-
-class GcceToolChainFactory : public ProjectExplorer::ToolChainFactory
-{
- Q_OBJECT
-
-public:
- QString displayName() const;
- QString id() const;
-
- QList<ProjectExplorer::ToolChain *> autoDetect();
-
- bool canCreate();
- ProjectExplorer::ToolChain *create();
-
- bool canRestore(const QVariantMap &data);
- ProjectExplorer::ToolChain *restore(const QVariantMap &data);
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // GCCETOOLCHAIN_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.cpp b/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.cpp
deleted file mode 100644
index 0a2a825431..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "passphraseforkeydialog.h"
-
-#include <QCheckBox>
-#include <QDialogButtonBox>
-#include <QLabel>
-#include <QLineEdit>
-#include <QPushButton>
-#include <QVBoxLayout>
-
-using namespace Qt4ProjectManager;
-
-PassphraseForKeyDialog::PassphraseForKeyDialog(const QString &keyName, QWidget *parent) :
- QDialog(parent),
- m_buttonBox(0),
- m_saveCheckBox(0),
- m_passphraseEdit(0)
-{
- QVBoxLayout *layout = new QVBoxLayout(this);
-
- QHBoxLayout *hPasswordLayout = new QHBoxLayout;
-
- QLabel *passphraseLabel = new QLabel(this);
- passphraseLabel->setText(tr("Passphrase:"));
- hPasswordLayout->addWidget(passphraseLabel);
-
- m_passphraseEdit = new QLineEdit(this);
- m_passphraseEdit->setEchoMode(QLineEdit::Password);
- connect(m_passphraseEdit, SIGNAL(textChanged(QString)), this, SLOT(passphraseChanged()));
- hPasswordLayout->addWidget(m_passphraseEdit);
-
- m_saveCheckBox = new QCheckBox(this);
- m_saveCheckBox->setText(tr("Save passphrase"));
- m_saveCheckBox->setToolTip(tr("This is an insecure option. The password will be saved as plain text."));
-
- m_buttonBox = new QDialogButtonBox(this);
- m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
-
- connect(m_buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
- connect(m_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
-
- layout->addLayout(hPasswordLayout);
- layout->addWidget(m_saveCheckBox);
- layout->addItem(new QSpacerItem(0, 10));
- layout->addWidget(m_buttonBox);
-
- setWindowTitle(tr("Passphrase for %1").arg(keyName));
- setFixedSize(sizeHint());
-
- passphraseChanged();
-}
-
-void PassphraseForKeyDialog::passphraseChanged()
-{
- // We tried the empty passphrase when we get here, so disallow it
- Q_ASSERT(m_buttonBox->button(QDialogButtonBox::Ok));
- m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!m_passphraseEdit->text().isEmpty());
-}
-
-QString PassphraseForKeyDialog::passphrase() const
-{
- return m_passphraseEdit->text();
-}
-
-bool PassphraseForKeyDialog::savePassphrase() const
-{
- return m_saveCheckBox->isChecked();
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.h b/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.h
deleted file mode 100644
index c1df663ab1..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/passphraseforkeydialog.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef PASSPHRASEFORKEYDIALOG_H
-#define PASSPHRASEFORKEYDIALOG_H
-
-#include <QDialog>
-
-QT_FORWARD_DECLARE_CLASS(QCheckBox)
-QT_FORWARD_DECLARE_CLASS(QDialogButtonBox)
-QT_FORWARD_DECLARE_CLASS(QLineEdit)
-
-namespace Qt4ProjectManager {
-
-class PassphraseForKeyDialog : public QDialog
-{
- Q_OBJECT
-public:
- explicit PassphraseForKeyDialog(const QString &keyName, QWidget *parent = 0);
-
- QString passphrase() const;
- bool savePassphrase() const;
-
-protected slots:
- void passphraseChanged();
-
-private:
- QDialogButtonBox *m_buttonBox;
- QCheckBox *m_saveCheckBox;
- QLineEdit *m_passphraseEdit;
-};
-
-} // namespace Qt4ProjectManager
-
-#endif // PASSPHRASEFORKEYDIALOG_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/qt-s60-todo.txt b/src/plugins/qt4projectmanager/qt-s60/qt-s60-todo.txt
deleted file mode 100644
index cbb483b58c..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/qt-s60-todo.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-* SDK overview page:
- * When the refresh button is pressed
- the qtoptionspage is not updated to reflect the new versions
- though we update them in S60Manager
-
-* QtVersion:
- * gui for overriding the default make target if necessary,
- make arguments --> make options
-
-* Tool chains
- * should the default make target be defined by the project
- instead of tool chain, or perhaps by the QtVersion dependent on a
- tool chain?
-
-* Run on device
- * time stamp of copied sisx is ridiculous
- * don't copy the sisx all the time
- * don't hardcode copy destination
- * isRunning is wrong
diff --git a/src/plugins/qt4projectmanager/qt-s60/qt-s60.pri b/src/plugins/qt4projectmanager/qt-s60/qt-s60.pri
deleted file mode 100644
index 9d451e4372..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/qt-s60.pri
+++ /dev/null
@@ -1,78 +0,0 @@
-CONFIG += exceptions
-
-SOURCES += $$PWD/s60manager.cpp \
- $$PWD/symbianidevice.cpp \
- $$PWD/symbianideviceconfigwidget.cpp \
- $$PWD/symbianidevicefactory.cpp \
- $$PWD/sbsv2parser.cpp \
- $$PWD/gccetoolchain.cpp \
- $$PWD/s60devicerunconfiguration.cpp \
- $$PWD/s60devicerunconfigurationwidget.cpp \
- $$PWD/rvcttoolchain.cpp \
- $$PWD/abldparser.cpp \
- $$PWD/rvctparser.cpp \
- $$PWD/s60createpackagestep.cpp \
- $$PWD/s60deploystep.cpp \
- $$PWD/s60createpackageparser.cpp \
- $$PWD/passphraseforkeydialog.cpp \
- $$PWD/s60deployconfiguration.cpp \
- $$PWD/s60deployconfigurationwidget.cpp \
- $$PWD/s60certificateinfo.cpp \
- $$PWD/certificatepathchooser.cpp \
- $$PWD/s60symbiancertificate.cpp \
- $$PWD/s60certificatedetailsdialog.cpp \
- $$PWD/s60runcontrolfactory.cpp \
- $$PWD/codaruncontrol.cpp \
- $$PWD/s60runcontrolbase.cpp \
- $$PWD/s60publishingwizardfactories.cpp \
- $$PWD/s60publishingwizardovi.cpp \
- $$PWD/s60publishingsissettingspageovi.cpp \
- $$PWD/s60publisherovi.cpp \
- $$PWD/s60publishingbuildsettingspageovi.cpp \
- $$PWD/s60publishingresultspageovi.cpp \
- $$PWD/symbianqtversionfactory.cpp \
- $$PWD/symbianqtversion.cpp \
- $$PWD/s60devicedebugruncontrol.cpp
-
-HEADERS += $$PWD/s60manager.h \
- $$PWD/symbianidevice.h \
- $$PWD/symbianideviceconfigwidget.h \
- $$PWD/symbianidevicefactory.h \
- $$PWD/sbsv2parser.h \
- $$PWD/gccetoolchain.h \
- $$PWD/s60devicerunconfiguration.h \
- $$PWD/s60devicerunconfigurationwidget.h \
- $$PWD/rvcttoolchain.h \
- $$PWD/abldparser.h \
- $$PWD/rvctparser.h \
- $$PWD/s60createpackagestep.h \
- $$PWD/s60deploystep.h \
- $$PWD/s60createpackageparser.h \
- $$PWD/passphraseforkeydialog.h \
- $$PWD/s60deployconfiguration.h \
- $$PWD/s60deployconfigurationwidget.h \
- $$PWD/s60certificateinfo.h \
- $$PWD/certificatepathchooser.h \
- $$PWD/s60symbiancertificate.h \
- $$PWD/s60certificatedetailsdialog.h \
- $$PWD/s60runcontrolfactory.h \
- $$PWD/codaruncontrol.h \
- $$PWD/s60runcontrolbase.h \
- $$PWD/s60publishingwizardfactories.h \
- $$PWD/s60publishingwizardovi.h \
- $$PWD/s60publishingsissettingspageovi.h \
- $$PWD/s60publisherovi.h \
- $$PWD/s60publishingbuildsettingspageovi.h \
- $$PWD/s60publishingresultspageovi.h \
- $$PWD/symbianqtversionfactory.h \
- $$PWD/symbianqtversion.h \
- $$PWD/s60devicedebugruncontrol.h
-
-FORMS += $$PWD/s60createpackagestep.ui \
- $$PWD/s60certificatedetailsdialog.ui \
- $$PWD/s60publishingbuildsettingspageovi.ui \
- $$PWD/s60publishingresultspageovi.ui \
- $$PWD/s60publishingsissettingspageovi.ui
-
-include(../../../shared/json/json.pri)
-DEFINES += JSON_INCLUDE_PRI
diff --git a/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp b/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp
deleted file mode 100644
index 3e831fbbcf..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/rvctparser.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "rvctparser.h"
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/task.h>
-
-using namespace ProjectExplorer;
-using namespace ProjectExplorer::Constants;
-using namespace Qt4ProjectManager;
-
-RvctParser::RvctParser() :
- m_task(0)
-{
- setObjectName(QLatin1String("RvctParser"));
- // Start of a error or warning:
- m_warningOrError.setPattern(QLatin1String("^\"([^\\(\\)]+[^\\d])\", line (\\d+):(\\s(Warning|Error):)\\s+([^\\s].*)$"));
- m_warningOrError.setMinimal(true);
-
- // Last message for any file with warnings/errors.
- m_wrapUpTask.setPattern(QLatin1String("^([^\\(\\)]+[^\\d]):\\s(\\d+) warnings?,\\s(\\d+) errors?$"));
- m_wrapUpTask.setMinimal(true);
-
- // linker problems:
- m_genericProblem.setPattern(QLatin1String("^(Error|Warning): (.*)$"));
- m_genericProblem.setMinimal(true);
-}
-
-RvctParser::~RvctParser()
-{
- sendTask();
-}
-
-void RvctParser::stdError(const QString &line)
-{
- QString lne = line.trimmed();
- if (m_genericProblem.indexIn(lne) > -1) {
- sendTask();
-
- m_task = new Task(Task::Error,
- m_genericProblem.cap(2) /* description */,
- Utils::FileName(),
- -1 /* linenumber */,
- Core::Id(TASK_CATEGORY_COMPILE));
- if (m_warningOrError.cap(4) == QLatin1String("Warning"))
- m_task->type = Task::Warning;
- else if (m_warningOrError.cap(4) == QLatin1String("Error"))
- m_task->type = Task::Error;
-
- return;
- }
- if (m_warningOrError.indexIn(lne) > -1) {
- sendTask();
-
- m_task = new Task(Task::Unknown,
- m_warningOrError.cap(5) /* description */,
- Utils::FileName::fromUserInput(m_warningOrError.cap(1)) /* file */,
- m_warningOrError.cap(2).toInt() /* line */,
- Core::Id(TASK_CATEGORY_COMPILE));
- if (m_warningOrError.cap(4) == QLatin1String("Warning"))
- m_task->type = Task::Warning;
- else if (m_warningOrError.cap(4) == QLatin1String("Error"))
- m_task->type = Task::Error;
- return;
- }
-
- if (m_wrapUpTask.indexIn(lne) > -1) {
- sendTask();
- return;
- }
- if (m_task) {
- QString description = line;
- if (description.startsWith(QLatin1String(" ")))
- description = description.mid(2);
- if (description.endsWith(QLatin1Char('\n')))
- description.chop(1);
- if (m_task->formats.isEmpty()) {
- QTextLayout::FormatRange fr;
- fr.start = m_task->description.count(); // incl. '\n' we are about to add!
- fr.length = description.count() - 1;
- fr.format.setFontItalic(true);
- m_task->formats.append(fr);
- } else {
- m_task->formats[0].length += description.count() - 2 + 1;
- }
- m_task->description += QLatin1Char('\n') + description;
-
- // Wrap up license error:
- if (description.endsWith(QLatin1String("at \"www.macrovision.com\".")))
- sendTask();
-
- return;
- }
- IOutputParser::stdError(line);
-}
-
-void RvctParser::sendTask()
-{
- if (!m_task)
- return;
- emit addTask(*m_task);
- delete m_task;
- m_task = 0;
-}
-
-// Unit tests:
-
-#ifdef WITH_TESTS
-# include <QTest>
-
-# include "qt4projectmanagerplugin.h"
-# include <projectexplorer/metatypedeclarations.h>
-# include <projectexplorer/outputparser_test.h>
-
-using namespace Qt4ProjectManager::Internal;
-
-void Qt4ProjectManagerPlugin::testRvctOutputParser_data()
-{
- QTest::addColumn<QString>("input");
- QTest::addColumn<OutputParserTester::Channel>("inputChannel");
- QTest::addColumn<QString>("childStdOutLines");
- QTest::addColumn<QString>("childStdErrLines");
- QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
- QTest::addColumn<QString>("outputLines");
-
- const Core::Id categoryCompile = Core::Id(Constants::TASK_CATEGORY_COMPILE);
- QTest::newRow("pass-through stdout")
- << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
- << QString::fromLatin1("Sometext\n") << QString()
- << QList<ProjectExplorer::Task>()
- << QString();
- QTest::newRow("pass-through stderr")
- << QString::fromLatin1("Sometext") << OutputParserTester::STDERR
- << QString() << QString::fromLatin1("Sometext\n")
- << QList<ProjectExplorer::Task>()
- << QString();
-
- QTest::newRow("Rvct warning")
- << QString::fromLatin1("\"../../../../s60-sdk/epoc32/include/stdapis/stlport/stl/_limits.h\", line 256: Warning: #68-D: integer conversion resulted in a change of sign\n"
- " : public _Integer_limits<char, CHAR_MIN, CHAR_MAX, -1, true>\n"
- " ^")
- << OutputParserTester::STDERR
- << QString() << QString()
- << (QList<ProjectExplorer::Task>()
- << Task(Task::Warning,
- QLatin1String("#68-D: integer conversion resulted in a change of sign\n"
- " : public _Integer_limits<char, CHAR_MIN, CHAR_MAX, -1, true>\n"
- " ^"),
- Utils::FileName::fromUserInput("../../../../s60-sdk/epoc32/include/stdapis/stlport/stl/_limits.h"), 256,
- categoryCompile)
- )
- << QString();
- QTest::newRow("Rvct error")
- << QString::fromLatin1("\"mainwindow.cpp\", line 22: Error: #20: identifier \"e\" is undefined\n"
- " delete ui;e\n"
- " ^")
- << OutputParserTester::STDERR
- << QString() << QString()
- << (QList<ProjectExplorer::Task>()
- << Task(Task::Error,
- QLatin1String("#20: identifier \"e\" is undefined\n"
- " delete ui;e\n"
- " ^"),
- Utils::FileName::fromUserInput("mainwindow.cpp"), 22,
- categoryCompile)
- )
- << QString();
- QTest::newRow("Rvct linking error")
- << QString::fromLatin1("Error: L6218E: Undefined symbol MainWindow::sth() (referred from mainwindow.o)")
- << OutputParserTester::STDERR
- << QString() << QString()
- << (QList<ProjectExplorer::Task>()
- << Task(Task::Error,
- QLatin1String("L6218E: Undefined symbol MainWindow::sth() (referred from mainwindow.o)"),
- Utils::FileName(), -1,
- categoryCompile)
- )
- << QString();
- QTest::newRow("Rvct license error")
- << QString::fromLatin1("Error: C3397E: Cannot obtain license for Compiler (feature compiler) with license version >= 2.2:\n"
- "Cannot find license file.\n"
- " The license files (or license server system network addresses) attempted are \n"
- "listed below. Use LM_LICENSE_FILE to use a different license file,\n"
- " or contact your software provider for a license file.\n"
- "Feature: compiler\n"
- "Filename: /usr/local/flexlm/licenses/license.dat\n"
- "License path: /usr/local/flexlm/licenses/license.dat\n"
- "FLEXnet Licensing error:-1,359. System Error: 2 \"No such file or directory\"\n"
- "For further information, refer to the FLEXnet Licensing End User Guide,\n"
- "available at \"www.macrovision.com\".")
- << OutputParserTester::STDERR
- << QString() << QString()
- << (QList<ProjectExplorer::Task>()
- << Task(Task::Error,
- QLatin1String("C3397E: Cannot obtain license for Compiler (feature compiler) with license version >= 2.2:\n"
- "Cannot find license file.\n"
- " The license files (or license server system network addresses) attempted are \n"
- "listed below. Use LM_LICENSE_FILE to use a different license file,\n"
- " or contact your software provider for a license file.\n"
- "Feature: compiler\n"
- "Filename: /usr/local/flexlm/licenses/license.dat\n"
- "License path: /usr/local/flexlm/licenses/license.dat\n"
- "FLEXnet Licensing error:-1,359. System Error: 2 \"No such file or directory\"\n"
- "For further information, refer to the FLEXnet Licensing End User Guide,\n"
- "available at \"www.macrovision.com\"."),
- Utils::FileName(), -1,
- categoryCompile)
- )
- << QString();
-}
-
-void Qt4ProjectManagerPlugin::testRvctOutputParser()
-{
- OutputParserTester testbench;
- testbench.appendOutputParser(new RvctParser);
- QFETCH(QString, input);
- QFETCH(OutputParserTester::Channel, inputChannel);
- QFETCH(QList<Task>, tasks);
- QFETCH(QString, childStdOutLines);
- QFETCH(QString, childStdErrLines);
- QFETCH(QString, outputLines);
-
- testbench.testParsing(input, inputChannel,
- tasks, childStdOutLines, childStdErrLines,
- outputLines);
-}
-#endif
diff --git a/src/plugins/qt4projectmanager/qt-s60/rvctparser.h b/src/plugins/qt4projectmanager/qt-s60/rvctparser.h
deleted file mode 100644
index 089641b39e..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/rvctparser.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef RVCTPARSER_H
-#define RVCTPARSER_H
-
-#include <projectexplorer/ioutputparser.h>
-
-#include <QRegExp>
-
-namespace Qt4ProjectManager {
-
-class RvctParser : public ProjectExplorer::IOutputParser
-{
- Q_OBJECT
-
-public:
- RvctParser();
- ~RvctParser();
- virtual void stdError(const QString & line);
-
-private:
- void sendTask();
-
- QRegExp m_warningOrError;
- QRegExp m_wrapUpTask;
- QRegExp m_genericProblem;
-
- ProjectExplorer::Task * m_task;
-};
-
-} // namespace Qt4ProjectManager
-
-#endif // RVCTPARSER_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
deleted file mode 100644
index a6530d4d09..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
+++ /dev/null
@@ -1,581 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "rvcttoolchain.h"
-#include "rvctparser.h"
-#include "qt4projectmanager/qt4projectmanagerconstants.h"
-
-#include <projectexplorer/abi.h>
-#include <projectexplorer/headerpath.h>
-#include <projectexplorer/toolchainmanager.h>
-#include <utils/environment.h>
-#include <utils/environmentmodel.h>
-#include <utils/pathchooser.h>
-#include <utils/synchronousprocess.h>
-
-#include <QComboBox>
-#include <QDir>
-#include <QFileInfo>
-#include <QFormLayout>
-#include <QGridLayout>
-#include <QGroupBox>
-#include <QHeaderView>
-#include <QLabel>
-#include <QProcess>
-#include <QTableView>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-#if defined Q_OS_WIN
-static const char RVCT_BINARY[] = "armcc.exe";
-#else
-static const char RVCT_BINARY[] = "armcc";
-#endif
-
-static const char RVCT_LICENSE_KEY[] = "ARMLMD_LICENSE_FILE";
-
-static const char rvctPathKeyC[] = "Qt4ProjectManager.RvctToolChain.CompilerPath";
-static const char rvctEnvironmentKeyC[] = "Qt4ProjectManager.RvctToolChain.Environment";
-static const char rvctArmVersionKeyC[] = "Qt4ProjectManager.RvctToolChain.ArmVersion";
-
-static QString valueOf(const QList<Utils::EnvironmentItem> &items, const QString &suffix)
-{
- foreach (const Utils::EnvironmentItem &i, items) {
- if (i.name.mid(6) == suffix && !i.unset)
- return i.value;
- }
- return QString();
-}
-
-static QString armVersionString(RvctToolChain::ArmVersion av)
-{
- switch (av) {
- case RvctToolChain::ARMv5:
- return RvctToolChainFactory::tr("ARMv5");
- case RvctToolChain::ARMv6:
- return RvctToolChainFactory::tr("ARMv6");
- };
- return QString();
-}
-
-static Utils::Environment baseEnvironment(RvctToolChain *tc)
-{
- Utils::Environment result;
- result.modify(tc->environmentChanges());
- return result;
-}
-
-// ==========================================================================
-// RvctToolChain
-// ==========================================================================
-
-RvctToolChain::RvctToolChain(bool autodetected) :
- ToolChain(QLatin1String(Constants::RVCT_TOOLCHAIN_ID), autodetected),
- m_armVersion(ARMv5)
-{ }
-
-RvctToolChain::RvctToolChain(const RvctToolChain &tc) :
- ToolChain(tc),
- m_compilerCommand(tc.m_compilerCommand),
- m_environmentChanges(tc.m_environmentChanges),
- m_armVersion(tc.m_armVersion)
-{ }
-
-RvctToolChain::RvctVersion RvctToolChain::version(const Utils::FileName &rvctPath)
-{
- RvctToolChain::RvctVersion v;
-
- QProcess armcc;
- armcc.start(rvctPath.toString(), QStringList(QLatin1String("--version_number")));
- if (!armcc.waitForStarted()) {
- qWarning("Unable to run rvct binary '%s' when trying to determine version.", qPrintable(rvctPath.toUserOutput()));
- return v;
- }
- armcc.closeWriteChannel();
- if (!armcc.waitForFinished()) {
- Utils::SynchronousProcess::stopProcess(armcc);
- qWarning("Timeout running rvct binary '%s' trying to determine version.", qPrintable(rvctPath.toUserOutput()));
- return v;
- }
- if (armcc.exitStatus() != QProcess::NormalExit) {
- qWarning("A crash occurred when running rvct binary '%s' trying to determine version.", qPrintable(rvctPath.toUserOutput()));
- return v;
- }
- QString versionLine = QString::fromLocal8Bit(armcc.readAllStandardOutput());
- versionLine += QString::fromLocal8Bit(armcc.readAllStandardError());
- QRegExp versionRegExp(QLatin1String("^(\\d)(\\d)0*([1-9]\\d*)"), Qt::CaseInsensitive);
- Q_ASSERT(versionRegExp.isValid());
-
- if (versionRegExp.indexIn(versionLine) != -1) {
- v.majorVersion = versionRegExp.cap(1).toInt();
- v.minorVersion = versionRegExp.cap(2).toInt();
- v.build = versionRegExp.cap(3).toInt();
- }
- return v;
-}
-
-QString RvctToolChain::type() const
-{
- return QLatin1String("rvct");
-}
-
-QString RvctToolChain::typeDisplayName() const
-{
- return RvctToolChainFactory::tr("RVCT");
-}
-
-ProjectExplorer::Abi RvctToolChain::targetAbi() const
-{
- return ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::SymbianOS,
- ProjectExplorer::Abi::SymbianDeviceFlavor, ProjectExplorer::Abi::ElfFormat,
- 32);
-}
-
-bool RvctToolChain::isValid() const
-{
- return !m_compilerCommand.isEmpty();
-}
-
-QByteArray RvctToolChain::predefinedMacros(const QStringList &cxxflags) const
-{
- Q_UNUSED(cxxflags);
- // see http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0205f/Babbacdb.html (version 2.2)
- // and http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491b/BABJFEFG.html (version 4.0)
- QByteArray ba("#define __ARRAY_OPERATORS\n"
- "#define _BOOL\n"
- "#define __cplusplus\n"
- "#define __CC_ARM 1\n"
- "#define __EDG__\n"
- "#define __STDC__\n"
- "#define __STDC_VERSION__\n"
- "#define __sizeof_int 4"
- "#define __sizeof_long 4"
- "#define __sizeof_ptr 4"
- "#define __TARGET_FEATURE_DOUBLEWORD\n"
- "#define __TARGET_FEATURE_DSPMUL\n"
- "#define __TARGET_FEATURE_HALFWORD\n"
- "#define __TARGET_FEATURE_THUMB\n"
- "#define _WCHAR_T\n"
- "#define __SYMBIAN32__\n");
- return ba;
-}
-
-ProjectExplorer::ToolChain::CompilerFlags RvctToolChain::compilerFlags(const QStringList &cxxflags) const
-{
- Q_UNUSED(cxxflags);
- return NO_FLAGS;
-}
-
-QList<ProjectExplorer::HeaderPath> RvctToolChain::systemHeaderPaths() const
-{
- return QList<ProjectExplorer::HeaderPath>()
- << ProjectExplorer::HeaderPath(valueOf(m_environmentChanges, QLatin1String("INC")),
- ProjectExplorer::HeaderPath::GlobalHeaderPath);
-}
-
-void RvctToolChain::addToEnvironment(Utils::Environment &env) const
-{
- if (m_compilerCommand.isEmpty())
- return;
-
- if (m_version.isNull())
- setVersion(version(m_compilerCommand));
- if (m_version.isNull())
- return;
-
- env.modify(m_environmentChanges);
-
- env.set(QLatin1String("QT_RVCT_VERSION"), QString::fromLatin1("%1.%2")
- .arg(m_version.majorVersion).arg(m_version.minorVersion));
- const QString cxxPath = compilerCommand().toFileInfo().absolutePath();
- env.set(varName(QLatin1String("BIN")), QDir::toNativeSeparators(cxxPath));
-
- // Add rvct to path and set locale to 'C'
- if (!m_compilerCommand.isEmpty())
- env.prependOrSetPath(cxxPath);
- env.set(QLatin1String("LANG"), QString(QLatin1Char('C')));
-}
-
-QString RvctToolChain::makeCommand() const
-{
-#if defined(Q_OS_WIN)
- return QLatin1String("make.exe");
-#else
- return QLatin1String("make");
-#endif
-}
-
-QString RvctToolChain::defaultMakeTarget() const
-{
- if (!isValid())
- return QString();
- if (m_armVersion == ARMv6)
- return QLatin1String("armv6");
- return QLatin1String("armv5");
-}
-
-ProjectExplorer::IOutputParser *RvctToolChain::outputParser() const
-{
- return new RvctParser;
-}
-
-bool RvctToolChain::operator ==(const ToolChain &other) const
-{
- if (!ToolChain::operator ==(other))
- return false;
- const RvctToolChain *otherPtr = dynamic_cast<const RvctToolChain *>(&other);
- return m_compilerCommand == otherPtr->m_compilerCommand
- && m_environmentChanges == otherPtr->m_environmentChanges
- && m_armVersion == otherPtr->m_armVersion;
-}
-
-void RvctToolChain::setEnvironmentChanges(const QList<Utils::EnvironmentItem> &changes)
-{
- if (m_environmentChanges == changes)
- return;
- m_environmentChanges = changes;
- toolChainUpdated();
-}
-
-QList<Utils::EnvironmentItem> RvctToolChain::environmentChanges() const
-{
- return m_environmentChanges;
-}
-
-void RvctToolChain::setCompilerCommand(const Utils::FileName &path)
-{
- if (m_compilerCommand == path)
- return;
-
- m_compilerCommand = path;
- m_version.reset();
- toolChainUpdated();
-}
-
-Utils::FileName RvctToolChain::compilerCommand() const
-{
- return m_compilerCommand;
-}
-
-void RvctToolChain::setArmVersion(RvctToolChain::ArmVersion av)
-{
- if (m_armVersion == av)
- return;
- m_armVersion = av;
- toolChainUpdated();
-}
-
-RvctToolChain::ArmVersion RvctToolChain::armVersion() const
-{
- return m_armVersion;
-}
-
-void RvctToolChain::setVersion(const RvctVersion &v) const
-{
- if (m_version == v)
- return;
- m_version = v;
- // Internal use only! No need to call toolChainUpdated()!
-}
-
-ProjectExplorer::ToolChainConfigWidget *RvctToolChain::configurationWidget()
-{
- return new RvctToolChainConfigWidget(this);
-}
-
-ProjectExplorer::ToolChain *RvctToolChain::clone() const
-{
- return new RvctToolChain(*this);
-}
-
-
-QVariantMap RvctToolChain::toMap() const
-{
- QVariantMap result = ToolChain::toMap();
- result.insert(QLatin1String(rvctPathKeyC), m_compilerCommand.toString());
- QVariantMap tmp;
- foreach (const Utils::EnvironmentItem &i, m_environmentChanges)
- tmp.insert(i.name, i.value);
- result.insert(QLatin1String(rvctEnvironmentKeyC), tmp);
- result.insert(QLatin1String(rvctArmVersionKeyC), static_cast<int>(m_armVersion));
- return result;
-}
-
-bool RvctToolChain::fromMap(const QVariantMap &data)
-{
- if (!ToolChain::fromMap(data))
- return false;
- m_compilerCommand = Utils::FileName::fromString(data.value(QLatin1String(rvctPathKeyC)).toString());
-
- m_environmentChanges.clear();
- QVariantMap tmp = data.value(QLatin1String(rvctEnvironmentKeyC)).toMap();
- for (QVariantMap::const_iterator i = tmp.constBegin(); i != tmp.constEnd(); ++i)
- m_environmentChanges.append(Utils::EnvironmentItem(i.key(), i.value().toString()));
- m_armVersion = static_cast<ArmVersion>(data.value(QLatin1String(rvctArmVersionKeyC), 0).toInt());
- return isValid();
-}
-
-QString RvctToolChain::varName(const QString &postFix) const
-{
- return QString::fromLatin1("RVCT%1%2%3")
- .arg(m_version.majorVersion).arg(m_version.minorVersion).arg(postFix);
-}
-
-// ==========================================================================
-// RvctToolChainConfigWidget
-// ==========================================================================
-
-class RvctToolChainConfigWidgetUi
-{
-public:
- QComboBox *versionComboBox;
- Utils::PathChooser *compilerPath;
- QTableView *environmentView;
-};
-
-RvctToolChainConfigWidget::RvctToolChainConfigWidget(RvctToolChain *tc) :
- ProjectExplorer::ToolChainConfigWidget(tc),
- m_ui(new RvctToolChainConfigWidgetUi),
- m_model(new Utils::EnvironmentModel(this))
-{
- m_ui->versionComboBox = new QComboBox(this);
- m_ui->versionComboBox->addItem(tr("Version 5"));
- m_ui->versionComboBox->addItem(tr("Version 6"));
- m_ui->compilerPath = new Utils::PathChooser(this);
- m_ui->environmentView = new QTableView(this);
-
- m_mainLayout->addRow(tr("ARM &version:"), m_ui->versionComboBox);
- m_mainLayout->addRow(tr("&Compiler path:"), m_ui->compilerPath);
- m_mainLayout->addRow(tr("Environment Variables"), m_ui->environmentView);
-
- m_ui->environmentView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
- m_ui->environmentView->horizontalHeader()->setStretchLastSection(true);
- m_ui->environmentView->horizontalHeader()->setHighlightSections(false);
- m_ui->environmentView->setGridStyle(Qt::NoPen);
- m_ui->environmentView->verticalHeader()->hide();
- QFontMetrics fm(font());
- m_ui->environmentView->verticalHeader()->setDefaultSectionSize(qMax(int(fm.height() * 1.2), fm.height() + 4));
- m_ui->environmentView->setModel(m_model);
-
- connect(m_model, SIGNAL(userChangesChanged()), this, SIGNAL(dirty()));
-
- m_ui->compilerPath->setExpectedKind(Utils::PathChooser::ExistingCommand);
- m_ui->compilerPath->setFileName(tc->compilerCommand());
- connect(m_ui->compilerPath, SIGNAL(changed(QString)), this, SIGNAL(dirty()));
- m_ui->versionComboBox->setCurrentIndex(static_cast<int>(tc->armVersion()));
- connect(m_ui->versionComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(dirty()));
-
- setFromToolChain();
-}
-
-RvctToolChainConfigWidget::~RvctToolChainConfigWidget()
-{
- delete m_ui;
-}
-
-void RvctToolChainConfigWidget::applyImpl()
-{
- RvctToolChain *tc = static_cast<RvctToolChain *>(toolChain());
- Q_ASSERT(tc);
-
- QList<Utils::EnvironmentItem> changes = environmentChanges();
- tc->setCompilerCommand(m_ui->compilerPath->fileName());
- tc->setArmVersion(static_cast<RvctToolChain::ArmVersion>(m_ui->versionComboBox->currentIndex()));
- tc->setEnvironmentChanges(changes);
-
- m_model->setUserChanges(changes);
-}
-
-void RvctToolChainConfigWidget::setFromToolChain()
-{
- RvctToolChain *tc = static_cast<RvctToolChain *>(toolChain());
- Q_ASSERT(tc);
-
- m_model->setBaseEnvironment(baseEnvironment(tc));
-
- m_ui->compilerPath->setFileName(tc->compilerCommand());
- m_ui->versionComboBox->setCurrentIndex(static_cast<int>(tc->armVersion()));
-}
-
-bool RvctToolChainConfigWidget::isDirtyImpl() const
-{
- RvctToolChain *tc = static_cast<RvctToolChain *>(toolChain());
- Q_ASSERT(tc);
-
- return tc->compilerCommand() != m_ui->compilerPath->fileName()
- || tc->armVersion() != static_cast<RvctToolChain::ArmVersion>(m_ui->versionComboBox->currentIndex())
- || tc->environmentChanges() != environmentChanges();
-}
-
-void RvctToolChainConfigWidget::makeReadOnlyImpl()
-{
- m_ui->versionComboBox->setEnabled(false);
- m_ui->compilerPath->setEnabled(false);
- m_ui->environmentView->setEditTriggers(QAbstractItemView::NoEditTriggers);
-}
-
-QList<Utils::EnvironmentItem> RvctToolChainConfigWidget::environmentChanges() const
-{
- Utils::Environment baseEnv;
- Utils::Environment resultEnv = baseEnvironment(static_cast<RvctToolChain *>(toolChain()));
- resultEnv.modify(m_model->userChanges());
- return baseEnv.diff(resultEnv);
-}
-
-void RvctToolChainConfigWidget::changeEvent(QEvent *ev)
-{
- if (ev->type() == QEvent::EnabledChange) {
- if (isEnabled()) {
- m_ui->environmentView->horizontalHeader()->setVisible(true);
- m_ui->environmentView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
- } else {
- m_ui->environmentView->horizontalHeader()->setVisible(false);
- m_ui->environmentView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- }
- }
- ToolChainConfigWidget::changeEvent(ev);
-}
-
-// ==========================================================================
-// RvctToolChainFactory
-// ==========================================================================
-
-QString RvctToolChainFactory::displayName() const
-{
- return tr("RVCT");
-}
-
-QString RvctToolChainFactory::id() const
-{
- return QLatin1String(Constants::RVCT_TOOLCHAIN_ID);
-}
-
-QList<ProjectExplorer::ToolChain *> RvctToolChainFactory::autoDetect()
-{
- Utils::Environment env = Utils::Environment::systemEnvironment();
-
- QMap<QString, QList<Utils::EnvironmentItem> > rvcts;
- QList<Utils::EnvironmentItem> globalItems;
-
- // Find all RVCT..x variables
- for (Utils::Environment::const_iterator i = env.constBegin(); i != env.constEnd(); ++i) {
- if (i.key() == QLatin1String(RVCT_LICENSE_KEY))
- globalItems.append(Utils::EnvironmentItem(i.key(), i.value()));
- if (!i.key().startsWith(QLatin1String("RVCT")))
- continue;
-
- const QString key = i.key().left(6);
- QList<Utils::EnvironmentItem> values = rvcts.value(key);
-
- values.append(Utils::EnvironmentItem(i.key(), i.value()));
-
- rvcts.insert(key, values);
- }
-
- // Set up tool chains for each RVCT.. set
- QList<ProjectExplorer::ToolChain *> result;
- for (QMap<QString, QList<Utils::EnvironmentItem> >::const_iterator i = rvcts.constBegin();
- i != rvcts.constEnd(); ++i) {
- QList<Utils::EnvironmentItem> changes = i.value();
- changes.append(globalItems);
-
- Utils::FileName binary = Utils::FileName::fromUserInput(valueOf(changes, QLatin1String("BIN")));
- if (binary.isEmpty())
- continue;
- binary.appendPath(QLatin1String(RVCT_BINARY));
- QFileInfo fi(binary.toFileInfo());
- if (!fi.exists() || !fi.isExecutable())
- continue;
-
- RvctToolChain::RvctVersion v = RvctToolChain::version(binary);
- if (v.majorVersion == 0 && v.minorVersion == 0 && v.build == 0)
- continue; // Failed to start.
-
- //: %1 arm version, %2 major version, %3 minor version, %4 build number
- const QString name = tr("RVCT (%1 %2.%3 Build %4)");
-
- RvctToolChain *tc = new RvctToolChain(true);
- tc->setCompilerCommand(binary);
- tc->setEnvironmentChanges(changes);
- tc->setDisplayName(name.arg(armVersionString(tc->armVersion()))
- .arg(v.majorVersion).arg(v.minorVersion).arg(v.build));
- tc->setVersion(v);
- result.append(tc);
-
- tc = new RvctToolChain(true);
- tc->setCompilerCommand(binary);
- tc->setEnvironmentChanges(changes);
- tc->setArmVersion(RvctToolChain::ARMv6);
- tc->setDisplayName(name.arg(armVersionString(tc->armVersion()))
- .arg(v.majorVersion).arg(v.minorVersion).arg(v.build));
- tc->setVersion(v);
- result.append(tc);
- }
-
- return result;
-}
-
-bool RvctToolChainFactory::canCreate()
-{
- return true;
-}
-
-ProjectExplorer::ToolChain *RvctToolChainFactory::create()
-{
- RvctToolChain *tc = new RvctToolChain(false);
- Utils::Environment env = Utils::Environment::systemEnvironment();
- if (env.hasKey(QLatin1String(RVCT_LICENSE_KEY))) {
- tc->setEnvironmentChanges(QList<Utils::EnvironmentItem>()
- << Utils::EnvironmentItem(QLatin1String(RVCT_LICENSE_KEY),
- env.value(QLatin1String(RVCT_LICENSE_KEY))));
- }
- tc->setDisplayName(tr("RVCT"));
- return tc;
-}
-
-bool RvctToolChainFactory::canRestore(const QVariantMap &data)
-{
- return idFromMap(data).startsWith(QLatin1String(Constants::RVCT_TOOLCHAIN_ID));
-}
-
-ProjectExplorer::ToolChain *RvctToolChainFactory::restore(const QVariantMap &data)
-{
- RvctToolChain *tc = new RvctToolChain(false);
- if (tc->fromMap(data))
- return tc;
-
- delete tc;
- return 0;
-
-}
-
-} // Internal
-} // Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h
deleted file mode 100644
index 362d58b22e..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef RVCTTOOLCHAIN_H
-#define RVCTTOOLCHAIN_H
-
-#include <projectexplorer/toolchain.h>
-#include <projectexplorer/toolchainconfigwidget.h>
-#include <utils/environment.h>
-
-namespace Utils {
-class EnvironmentModel;
-class PathChooser;
-} // namespace Utils
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class RvctToolChainConfigWidgetUi;
-class RvctToolChainFactory;
-
-// ==========================================================================
-// RvctToolChain
-// ==========================================================================
-
-class RvctToolChain : public ProjectExplorer::ToolChain
-{
-public:
- struct RvctVersion {
- RvctVersion() : majorVersion(0), minorVersion(0), build(0)
- { }
-
- bool isNull() { return majorVersion == 0 && minorVersion == 0 && build == 0; }
- void reset() { majorVersion = 0; minorVersion = 0; build = 0; }
-
- bool operator ==(const RvctVersion &other) const
- {
- return majorVersion == other.majorVersion
- && minorVersion == other.minorVersion
- && build == other.build;
- }
-
- int majorVersion;
- int minorVersion;
- int build;
- };
-
- static RvctVersion version(const Utils::FileName &rvctPath);
-
- enum ArmVersion { ARMv5, ARMv6 };
-
- QString type() const;
- QString typeDisplayName() const;
- ProjectExplorer::Abi targetAbi() const;
-
- bool isValid() const;
-
- QByteArray predefinedMacros(const QStringList &cxxflags) const;
- ProjectExplorer::ToolChain::CompilerFlags compilerFlags(const QStringList &cxxflags) const;
- QList<ProjectExplorer::HeaderPath> systemHeaderPaths() const;
- void addToEnvironment(Utils::Environment &env) const;
- QString makeCommand() const;
- QString defaultMakeTarget() const;
- ProjectExplorer::IOutputParser *outputParser() const;
-
- bool operator ==(const ToolChain &) const;
-
- void setEnvironmentChanges(const QList<Utils::EnvironmentItem> &changes);
- QList<Utils::EnvironmentItem> environmentChanges() const;
-
- void setCompilerCommand(const Utils::FileName &path);
- Utils::FileName compilerCommand() const;
-
- void setArmVersion(ArmVersion);
- ArmVersion armVersion() const;
-
- ProjectExplorer::ToolChainConfigWidget *configurationWidget();
- ProjectExplorer::ToolChain *clone() const;
-
- QVariantMap toMap() const;
- bool fromMap(const QVariantMap &data);
-
-private:
- void setVersion(const RvctVersion &v) const;
-
- explicit RvctToolChain(bool autodetected = false);
- RvctToolChain(const RvctToolChain &);
-
- QString varName(const QString &postFix) const;
-
- QList<ProjectExplorer::HeaderPath> m_systemHeaderPaths;
- Utils::FileName m_compilerCommand;
- QList<Utils::EnvironmentItem> m_environmentChanges;
- ArmVersion m_armVersion;
- mutable RvctVersion m_version;
-
- friend class RvctToolChainFactory;
-};
-
-// ==========================================================================
-// RvctToolChainConfigWidget
-// ==========================================================================
-
-class RvctToolChainConfigWidget : public ProjectExplorer::ToolChainConfigWidget
-{
- Q_OBJECT
-
-public:
- RvctToolChainConfigWidget(RvctToolChain *tc);
- ~RvctToolChainConfigWidget();
-
-private:
- void applyImpl();
- void discardImpl() { setFromToolChain(); }
- bool isDirtyImpl() const;
- void makeReadOnlyImpl();
- void changeEvent(QEvent *ev);
-
- void setFromToolChain();
- QList<Utils::EnvironmentItem> environmentChanges() const;
-
- RvctToolChainConfigWidgetUi *m_ui;
- Utils::EnvironmentModel *m_model;
-};
-
-// ==========================================================================
-// RvctToolChainFactory
-// ==========================================================================
-
-class RvctToolChainFactory : public ProjectExplorer::ToolChainFactory
-{
- Q_OBJECT
-
-public:
- // Name used to display the name of the tool chain that will be created.
- QString displayName() const;
- QString id() const;
-
- QList<ProjectExplorer::ToolChain *> autoDetect();
-
- bool canCreate();
- ProjectExplorer::ToolChain *create();
-
- // Used by the ToolChainManager to restore user-generated tool chains
- bool canRestore(const QVariantMap &data);
- ProjectExplorer::ToolChain *restore(const QVariantMap &data);
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // RVCTTOOLCHAIN_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.cpp b/src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.cpp
deleted file mode 100644
index 743ca2b40b..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60certificatedetailsdialog.h"
-#include "ui_s60certificatedetailsdialog.h"
-
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-struct S60CertificateDetailsDialogPrivate
-{
- S60CertificateDetailsDialogPrivate(){}
- Ui::S60CertificateDetailsDialog m_ui;
-};
-
-S60CertificateDetailsDialog::S60CertificateDetailsDialog(QWidget *parent) :
- QDialog(parent),
- d(new S60CertificateDetailsDialogPrivate)
-{
- d->m_ui.setupUi(this);
- connect(d->m_ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(close()));
-}
-
-S60CertificateDetailsDialog::~S60CertificateDetailsDialog()
-{
- delete d;
-}
-
-void S60CertificateDetailsDialog::setText(const QString &text)
-{
- d->m_ui.textBrowser->setText(text);
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.h b/src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.h
deleted file mode 100644
index a8c95b4bee..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60CERTIFICATEDETAILSDIALOG_H
-#define S60CERTIFICATEDETAILSDIALOG_H
-
-#include <QDialog>
-
-struct S60CertificateDetailsDialogPrivate;
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60CertificateDetailsDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- explicit S60CertificateDetailsDialog(QWidget *parent = 0);
- ~S60CertificateDetailsDialog();
-
- void setText(const QString &text);
-
-private:
- S60CertificateDetailsDialogPrivate *d;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60CERTIFICATEDETAILSDIALOG_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.ui b/src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.ui
deleted file mode 100644
index 076515885f..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60certificatedetailsdialog.ui
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qt4ProjectManager::Internal::S60CertificateDetailsDialog</class>
- <widget class="QDialog" name="Qt4ProjectManager::Internal::S60CertificateDetailsDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Details of Certificate</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QTextBrowser" name="textBrowser"/>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Close</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.cpp b/src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.cpp
deleted file mode 100644
index 3620b30f5d..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.cpp
+++ /dev/null
@@ -1,295 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60certificateinfo.h"
-#include "s60symbiancertificate.h"
-
-#include <QDateTime>
-#include <QFileInfo>
-#include <QCoreApplication>
-#include <QTextStream>
-#include <QHash>
-#include <QMutableHashIterator>
-
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-namespace {
- const char * const SIMPLE_DATE_FORMAT = "dd.MM.yyyy";
-}
-
-struct Capability {
- const char *name;
- const int value;
-};
-
-static const Capability capability[] =
-{
- { "LocalServices", S60CertificateInfo::LocalServices },
- { "Location", S60CertificateInfo::Location },
- { "NetworkServices", S60CertificateInfo::NetworkServices },
- { "ReadUserData", S60CertificateInfo::ReadUserData },
- { "UserEnvironment", S60CertificateInfo::UserEnvironment },
- { "WriteUserData", S60CertificateInfo::WriteUserData },
- { "PowerMgmt", S60CertificateInfo::PowerMgmt },
- { "ProtServ", S60CertificateInfo::ProtServ },
- { "ReadDeviceData", S60CertificateInfo::ReadDeviceData },
- { "SurroundingsDD", S60CertificateInfo::SurroundingsDD },
- { "SwEvent", S60CertificateInfo::SwEvent },
- { "TrustedUI", S60CertificateInfo::TrustedUI },
- { "WriteDeviceData", S60CertificateInfo::WriteDeviceData },
- { "CommDD", S60CertificateInfo::CommDD },
- { "DiskAdmin", S60CertificateInfo::DiskAdmin },
- { "NetworkControl", S60CertificateInfo::NetworkControl },
- { "MultimediaDD", S60CertificateInfo::MultimediaDD },
- { "AllFiles", S60CertificateInfo::AllFiles },
- { "DRM", S60CertificateInfo::DRM },
- { "TCB", S60CertificateInfo::TCB }
-};
-
-struct CapabilitySet {
- const char *color;
- const int value;
-};
-
-static const CapabilitySet capabilitySet[] =
-{
- { "green", S60CertificateInfo::UserCapabilities },
- { "darkorange", S60CertificateInfo::SystemCapabilities },
- { "orangered", S60CertificateInfo::RestrictedCapabilities },
- { "red", S60CertificateInfo::ManufacturerCapabilities }
-};
-
-QHash<int, QStringList> createCapabilityMap(uint capabilities)
-{
- const int capabilityCount = sizeof(capability)/sizeof(capability[0]);
- const int capabilitySetCount = sizeof(capabilitySet)/sizeof(capabilitySet[0]);
-
- QHash<int, QStringList> capabilityMap; //to separate the groups of capabilities
- for(int i = 0; i < capabilityCount; ++i)
- if (capabilities&capability[i].value) {
- for (int j = 0; j < capabilitySetCount; ++j)
- if (capability[i].value&capabilitySet[j].value) {
- capabilityMap[capabilitySet[j].value] << QLatin1String(capability[i].name);
- break;
- }
- }
-
- QMutableHashIterator<int, QStringList> i(capabilityMap);
- while (i.hasNext()) {
- i.next();
- i.value().sort();
- }
-
- return capabilityMap;
-}
-
-QStringList createCapabilityList(uint capabilities)
-{
- QHash<int, QStringList> capabilityMap(createCapabilityMap(capabilities));
-
- return capabilityMap[S60CertificateInfo::UserCapabilities]
- + capabilityMap[S60CertificateInfo::SystemCapabilities]
- + capabilityMap[S60CertificateInfo::RestrictedCapabilities]
- + capabilityMap[S60CertificateInfo::ManufacturerCapabilities];
-}
-
-QStringList createHtmlCapabilityList(uint capabilities)
-{
- const int capabilitySetCount = sizeof(capabilitySet)/sizeof(capabilitySet[0]);
- QHash<int, QStringList> capabilityMap(createCapabilityMap(capabilities));
- QStringList result;
-
- for (int j = 0; j < capabilitySetCount; ++j) {
- QHashIterator<int, QStringList> i(capabilityMap);
- while (i.hasNext()) {
- i.next();
- if (i.key() == capabilitySet[j].value) {
- foreach (const QString &capability, i.value()) {
- result << QString::fromAscii("<font color=\"%1\">%2</font>")
- .arg(QLatin1String(capabilitySet[j].color)).arg(capability);
- }
- break;
- }
- }
- }
- return result;
-}
-
-S60CertificateInfo::S60CertificateInfo(const QString &filePath, QObject* parent)
- : QObject(parent),
- m_certificate(new S60SymbianCertificate(filePath)),
- m_filePath(filePath),
- m_capabilities(NoInformation)
-{
- if (!m_certificate->isValid())
- return;
-
- m_imeiList = m_certificate->subjectInfo(QLatin1String("1.2.826.0.1.1796587.1.1.1.1"));
-
- const QStringList capabilityList(m_certificate->subjectInfo(QLatin1String("1.2.826.0.1.1796587.1.1.1.6")));
- if (capabilityList.isEmpty())
- m_capabilities = 0;
- else
- m_capabilities = capabilityList.at(0).toLong();
-}
-
-S60CertificateInfo::~S60CertificateInfo()
-{
- delete m_certificate;
-}
-
-S60CertificateInfo::CertificateState S60CertificateInfo::validateCertificate()
-{
- CertificateState result = CertificateValid;
- if (m_certificate->isValid()) {
- QDateTime currentTime(QDateTime::currentDateTimeUtc());
- QDateTime endTime(m_certificate->endTime());
- QDateTime startTime(m_certificate->startTime());
- if (currentTime > endTime) {
- m_errorString = tr("The certificate \"%1\" has already expired and cannot be used."
- "\nExpiration date: %2.")
- .arg(QFileInfo(m_filePath).fileName())
- .arg(endTime.toLocalTime().toString(QLatin1String(SIMPLE_DATE_FORMAT)));
- result = CertificateError;
- } else if (currentTime < startTime) {
- m_errorString = tr("The certificate \"%1\" is not yet valid.\nValid from: %2.")
- .arg(QFileInfo(m_filePath).fileName())
- .arg(startTime.toLocalTime().toString(QLatin1String(SIMPLE_DATE_FORMAT)));
- result = CertificateWarning; //This certificate may be valid in the near future
- }
- } else {
- m_errorString = tr("The certificate \"%1\" is not a valid X.509 certificate.")
- .arg(QFileInfo(m_filePath).baseName());
- result = CertificateError;
- }
- return result;
-}
-
-bool S60CertificateInfo::compareCapabilities(const QStringList &givenCaps, QStringList &unsupportedCaps) const
-{
- if (!m_certificate->isValid())
- return false;
- unsupportedCaps.clear();
- if (capabilitiesSupported() == NoInformation)
- return true;
-
- QStringList capabilities(createCapabilityList(capabilitiesSupported()));
- foreach (const QString &capability, givenCaps) {
- if (!capabilities.contains(capability, Qt::CaseInsensitive))
- unsupportedCaps << capability;
- }
- return true;
-}
-
-QString S60CertificateInfo::errorString() const
-{
- return m_errorString.isEmpty()?m_certificate->errorString():m_errorString;
-}
-
-QStringList S60CertificateInfo::devicesSupported() const
-{
- return m_imeiList;
-}
-
-quint32 S60CertificateInfo::capabilitiesSupported() const
-{
- return m_capabilities;
-}
-
-bool S60CertificateInfo::isDeveloperCertificate() const
-{
- return !devicesSupported().isEmpty() || capabilitiesSupported();
-}
-
-QString S60CertificateInfo::toHtml(bool keepShort)
-{
- if (!m_certificate->isValid())
- return errorString();
-
- QString htmlString;
- QTextStream str(&htmlString);
- str << "<html><body><table>"
- << "<tr><td><b>" << tr("Type: ") << "</b></td>";
-
- if (isDeveloperCertificate())
- str << "<td>" << tr("Developer certificate") << "</td>";
- if (m_certificate->isSelfSigned())
- str << "<td>" << tr("Self signed certificate") << "</td>";
- str << "</tr>";
-
- QString issuer;
- QStringList issuerOrganizationList(m_certificate->issuerInfo(QLatin1String("X520.Organization")));
- if (!issuerOrganizationList.isEmpty())
- issuer = issuerOrganizationList.join(QLatin1String(" "));
-
- QString subject;
- QStringList subjectOrganizationList(m_certificate->subjectInfo(QLatin1String("X520.Organization")));
- if (!subjectOrganizationList.isEmpty())
- subject = subjectOrganizationList.join(QLatin1String(" "));
-
- QDateTime startDate(m_certificate->startTime().toLocalTime());
- QDateTime endDate(m_certificate->endTime().toLocalTime());
-
- str << "<tr><td><b>" << tr("Issued by: ")
- << "</b></td><td>" << issuer << "</td></tr>"
- << "<tr><td><b>" << tr("Issued to: ")
- << "</b></td><td>" << subject << "</td></tr>"
- << "<tr><td><b>" << tr("Valid from: ")
- << "</b></td><td>" << startDate.toString(QLatin1String(SIMPLE_DATE_FORMAT)) << "</td></tr>"
- << "<tr><td><b>" << tr("Valid to: ")
- << "</b></td><td>" << endDate.toString(QLatin1String(SIMPLE_DATE_FORMAT)) << "</td></tr>";
-
- if (capabilitiesSupported()) {
- QStringList capabilities;
- if (keepShort)
- capabilities = createCapabilityList(capabilitiesSupported());
- else
- capabilities = createHtmlCapabilityList(capabilitiesSupported());
- str << "<tr><td><b>" << tr("Capabilities: ")
- << "</b></td><td><i>" << capabilities.join(QLatin1String(" ")) << "</i></td></tr>";
- }
-
- const QStringList &imeiList(devicesSupported());
- if (!imeiList.isEmpty()) {
- QString imeiListString;
- const QString space(QLatin1Char(' '));
- int MAX_DISPLAYED_IMEI_COUNT = 30;
- if (imeiList.count() > MAX_DISPLAYED_IMEI_COUNT && keepShort) {//1000 items would be too much :)
- for (int i = 0; i < MAX_DISPLAYED_IMEI_COUNT; ++i)
- imeiListString += imeiList.at(i) + space;
- imeiListString.replace(imeiListString.length()-1, 1, QLatin1String("..."));
- } else
- imeiListString = imeiList.join(space);
- str << "<tr><td><b>" << tr("Supporting %n device(s): ", "", imeiList.count())
- << "</b></td><td>" << imeiListString << "</td></tr>";
- }
- return htmlString;
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.h b/src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.h
deleted file mode 100644
index 0ce1075884..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60certificateinfo.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60CERTIFICATEINFO_H
-#define S60CERTIFICATEINFO_H
-
-#include <QObject>
-#include <QStringList>
-#include <QtGlobal>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60SymbianCertificate;
-
-class S60CertificateInfo : public QObject
-{
- Q_OBJECT
-
-public:
- enum CertificateState {
- CertificateValid,
- CertificateWarning,
- CertificateError
- };
-
- enum S60Capability {
- TCB = 1 << (31-0),
- CommDD = 1 << (31-1),
- PowerMgmt = 1 << (31-2),
- MultimediaDD = 1 << (31-3),
- ReadDeviceData = 1 << (31-4),
- WriteDeviceData = 1 << (31-5),
- DRM = 1 << (31-6),
- TrustedUI = 1 << (31-7),
- ProtServ = 1 << (31-8),
- DiskAdmin = 1 << (31-9),
- NetworkControl = 1 << (31-10),
- AllFiles = 1 << (31-11),
- SwEvent = 1 << (31-12),
- NetworkServices = 1 << (31-13),
- LocalServices = 1 << (31-14),
- ReadUserData = 1 << (31-15),
- WriteUserData = 1 << (31-16),
- Location = 1 << (31-17),
- SurroundingsDD = 1 << (31-18),
- UserEnvironment = 1 << (31-19),
-
- NoInformation = 0
- };
-
- enum S60CapabilitySet {
- UserCapabilities = LocalServices|Location|NetworkServices|ReadUserData
- |UserEnvironment|WriteUserData,
- SystemCapabilities = PowerMgmt|ProtServ|ReadDeviceData|SurroundingsDD
- |SwEvent|TrustedUI|WriteDeviceData,
- RestrictedCapabilities = CommDD|DiskAdmin|NetworkControl|MultimediaDD,
- ManufacturerCapabilities = AllFiles|DRM|TCB
- };
-
- explicit S60CertificateInfo(const QString &filePath, QObject* parent = 0);
- ~S60CertificateInfo();
-
- CertificateState validateCertificate();
- QStringList devicesSupported() const;
- quint32 capabilitiesSupported() const;
- QString toHtml(bool keepShort = true);
- QString errorString() const;
- bool isDeveloperCertificate() const;
-
- bool compareCapabilities(const QStringList &givenCaps, QStringList &unsupportedCaps) const;
-
-private:
- S60SymbianCertificate *m_certificate;
- QString m_filePath;
- QString m_errorString;
- QStringList m_imeiList;
- quint32 m_capabilities;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectExplorer
-
-#endif // S60CERTIFICATEINFO_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.cpp b/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.cpp
deleted file mode 100644
index 3c0d8a0a3a..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60createpackageparser.h"
-
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/task.h>
-
-using namespace Qt4ProjectManager::Internal;
-
-S60CreatePackageParser::S60CreatePackageParser(const QString &packageName) :
- m_packageName(packageName),
- m_needPassphrase(false)
-{
- setObjectName(QLatin1String("S60CreatePackageParser"));
- m_signSis.setPattern(QLatin1String("^(\\s*|\\(\\d+\\)\\s*:\\s*)(error\\s?:\\s?)+(.+)$"));
- m_signSis.setMinimal(true);
- m_signSis.setCaseSensitivity(Qt::CaseInsensitive);
-}
-
-bool S60CreatePackageParser::parseLine(const QString &line)
-{
- if (line.startsWith(QLatin1String("Patching: "))) {
- m_patchingLines.append(line.mid(10).trimmed());
- return true;
- }
- if (!m_patchingLines.isEmpty()) {
- emit packageWasPatched(m_packageName, m_patchingLines);
-
- QString lines = m_patchingLines.join(QLatin1String("\n"));
- m_patchingLines.clear();
- //: %1 package name, %2 will be replaced by a list of patching lines.
- QString message = tr("The binary package '%1' was patched to be installable after being self-signed.\n%2\n"
- "Use a developer certificate or any other signing option to prevent "
- "this patching from happening.").
- arg(m_packageName, lines);
- ProjectExplorer::Task task(ProjectExplorer::Task::Warning, message, Utils::FileName(), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
-
- QTextLayout::FormatRange fr;
- fr.start = message.indexOf(lines);
- fr.length = lines.length();
- fr.format.setFontItalic(true);
- task.formats.append(fr);
-
- emit addTask(task);
- }
-
- if (m_signSis.indexIn(line) > -1) {
- QString errorMessage(m_signSis.cap(3));
- if (errorMessage.contains(QLatin1String("bad password"))
- || errorMessage.contains(QLatin1String("bad decrypt")))
- m_needPassphrase = true;
- else if (errorMessage.contains(QLatin1String("Cannot open file"))
- && errorMessage.contains(QLatin1String("smartinstaller")))
- emit addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error,
- tr("Cannot create Smart Installer package "
- "as the Smart Installer's base file is missing. "
- "Please ensure that it is located in the SDK."),
- Utils::FileName(), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
- else
- emit addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error, errorMessage, Utils::FileName(), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
- return true;
- }
- return false;
-}
-
-void S60CreatePackageParser::stdOutput(const QString &line)
-{
- if (!parseLine(line))
- IOutputParser::stdOutput(line);
-}
-
-void S60CreatePackageParser::stdError(const QString &line)
-{
- if (!parseLine(line))
- IOutputParser::stdError(line);
-}
-
-bool S60CreatePackageParser::needPassphrase() const
-{
- return m_needPassphrase;
-}
-
-/* STDOUT:
-make[1]: Entering directory `C:/temp/test/untitled131'
-createpackage.bat -g untitled131_template.pkg RELEASE-armv5
-Auto-patching capabilities for self signed package.
-
-Patching package file and relevant binaries...
-Patching: Removed dependency to qt.sis (0x2001E61C) to avoid installation issues in case qt.sis is also patched.
-
-
-NOTE: A patched package may not work as expected due to reduced capabilities and other modifications,
- so it should not be used for any kind of Symbian signing or distribution!
- Use a proper certificate to avoid the need to patch the package.
-
-Processing untitled131_release-armv5.pkg...
-
-
-and errors like:
-(35) : error: Cannot find file : c:/QtSDK/Symbian/SDKs/Symbian3Qt471/epoc32/data/z/resource/apps/untitledSymbian.mif
-*/
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.h b/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.h
deleted file mode 100644
index f8b56230cb..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60createpackageparser.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SIGNSISPARSER_H
-#define SIGNSISPARSER_H
-
-#include <projectexplorer/ioutputparser.h>
-
-#include <QRegExp>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60CreatePackageParser : public ProjectExplorer::IOutputParser
-{
- Q_OBJECT
-
-public:
- S60CreatePackageParser(const QString &packageName);
-
- virtual void stdOutput(const QString &line);
- virtual void stdError(const QString &line);
-
- bool needPassphrase() const;
-
-signals:
- void packageWasPatched(const QString &, const QStringList &pachingLines);
-
-private:
- bool parseLine(const QString &line);
-
- const QString m_packageName;
-
- QRegExp m_signSis;
- QStringList m_patchingLines;
-
- bool m_needPassphrase;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectExplorer
-
-
-#endif // SIGNSISPARSER_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
deleted file mode 100644
index 3f53cff59e..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
+++ /dev/null
@@ -1,973 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60createpackagestep.h"
-
-#include "qt4projectmanagerconstants.h"
-#include "qt4buildconfiguration.h"
-#include "qt4nodes.h"
-#include "qt4project.h"
-#include "s60createpackageparser.h"
-#include "abldparser.h"
-#include "sbsv2parser.h"
-#include "passphraseforkeydialog.h"
-#include "s60certificateinfo.h"
-#include "s60certificatedetailsdialog.h"
-#include "symbianqtversion.h"
-#include "symbianidevicefactory.h"
-
-#include <app/app_version.h>
-
-#include <utils/checkablemessagebox.h>
-#include <utils/fileutils.h>
-
-#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/project.h>
-#include <projectexplorer/gnumakeparser.h>
-#include <projectexplorer/task.h>
-
-#include <qtsupport/qtprofileinformation.h>
-
-#include <QDir>
-#include <QTimer>
-#include <QCryptographicHash>
-
-#include <QSettings>
-#include <QMessageBox>
-
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-namespace {
- const char * const SIGN_BS_ID = "Qt4ProjectManager.S60SignBuildStep";
- const char * const SIGNMODE_KEY("Qt4ProjectManager.S60CreatePackageStep.SignMode");
- const char * const CERTIFICATE_KEY("Qt4ProjectManager.S60CreatePackageStep.Certificate");
- const char * const KEYFILE_KEY("Qt4ProjectManager.S60CreatePackageStep.Keyfile");
- const char * const SMART_INSTALLER_KEY("Qt4ProjectManager.S60CreatorPackageStep.SmartInstaller");
- const char * const PATCH_WARNING_SHOWN_KEY("Qt4ProjectManager.S60CreatorPackageStep.PatchWarningShown");
- const char * const SUPPRESS_PATCH_WARNING_DIALOG_KEY("Qt4ProjectManager.S60CreatorPackageStep.SuppressPatchWarningDialog");
-
- const char * const MAKE_PASSPHRASE_ARGUMENT("QT_SIS_PASSPHRASE=");
- const char * const MAKE_KEY_ARGUMENT("QT_SIS_KEY=");
- const char * const MAKE_CERTIFICATE_ARGUMENT("QT_SIS_CERTIFICATE=");
-}
-
-S60CreatePackageStep::S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl) :
- BuildStep(bsl, Core::Id(SIGN_BS_ID)),
- m_signingMode(SignSelf),
- m_createSmartInstaller(false),
- m_outputParserChain(0),
- m_process(0),
- m_timer(0),
- m_eventLoop(0),
- m_futureInterface(0),
- m_passphrases(0),
- m_parser(0),
- m_suppressPatchWarningDialog(false),
- m_patchWarningDialog(0)
-{
- ctor_package();
-}
-
-S60CreatePackageStep::S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl, S60CreatePackageStep *bs) :
- BuildStep(bsl, bs),
- m_signingMode(bs->m_signingMode),
- m_customSignaturePath(bs->m_customSignaturePath),
- m_customKeyPath(bs->m_customKeyPath),
- m_passphrase(bs->m_passphrase),
- m_createSmartInstaller(bs->m_createSmartInstaller),
- m_outputParserChain(0),
- m_timer(0),
- m_eventLoop(0),
- m_futureInterface(0),
- m_passphrases(0),
- m_parser(0),
- m_suppressPatchWarningDialog(false),
- m_patchWarningDialog(0)
-{
- ctor_package();
-}
-
-S60CreatePackageStep::S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id) :
- BuildStep(bsl, id),
- m_signingMode(SignSelf),
- m_createSmartInstaller(false),
- m_outputParserChain(0),
- m_timer(0),
- m_eventLoop(0),
- m_futureInterface(0),
- m_passphrases(0),
- m_parser(0),
- m_suppressPatchWarningDialog(false),
- m_patchWarningDialog(0)
-{
- ctor_package();
-}
-
-void S60CreatePackageStep::ctor_package()
-{
- //: default create SIS package build step display name
- setDefaultDisplayName(tr("Create SIS Package"));
- connect(this, SIGNAL(badPassphrase()),
- this, SLOT(definePassphrase()), Qt::QueuedConnection);
- connect(this, SIGNAL(warnAboutPatching()),
- this, SLOT(handleWarnAboutPatching()), Qt::QueuedConnection);
-
- m_passphrases = new QSettings(QSettings::IniFormat, QSettings::UserScope,
- QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
- QLatin1String("QtCreatorKeys"), this);
-}
-
-S60CreatePackageStep::~S60CreatePackageStep()
-{
- delete m_patchWarningDialog;
-}
-
-QVariantMap S60CreatePackageStep::toMap() const
-{
- QVariantMap map(BuildStep::toMap());
- map.insert(QLatin1String(SIGNMODE_KEY), static_cast<int>(m_signingMode));
- map.insert(QLatin1String(CERTIFICATE_KEY), m_customSignaturePath);
- map.insert(QLatin1String(KEYFILE_KEY), m_customKeyPath);
- map.insert(QLatin1String(SMART_INSTALLER_KEY), m_createSmartInstaller);
- map.insert(QLatin1String(SUPPRESS_PATCH_WARNING_DIALOG_KEY), m_suppressPatchWarningDialog);
- return map;
-}
-
-bool S60CreatePackageStep::fromMap(const QVariantMap &map)
-{
- m_signingMode = static_cast<SigningMode>(map.value(QLatin1String(SIGNMODE_KEY), static_cast<int>(SignSelf)).toInt());
- m_customSignaturePath = map.value(QLatin1String(CERTIFICATE_KEY)).toString();
- setCustomKeyPath(map.value(QLatin1String(KEYFILE_KEY)).toString());
- m_createSmartInstaller = map.value(QLatin1String(SMART_INSTALLER_KEY), false).toBool();
- m_suppressPatchWarningDialog = map.value(QLatin1String(SUPPRESS_PATCH_WARNING_DIALOG_KEY),
- false).toBool();
- return BuildStep::fromMap(map);
-}
-
-Qt4BuildConfiguration *S60CreatePackageStep::qt4BuildConfiguration() const
-{
- return static_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
-}
-
-bool S60CreatePackageStep::init()
-{
- Qt4Project *pro = qobject_cast<Qt4Project *>(project());
- ProjectExplorer::ToolChain *tc
- = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
-
- QList<Qt4ProFileNode *> nodes = pro->allProFiles();
-
- SymbianQtVersion *sqv
- = dynamic_cast<SymbianQtVersion *>(QtSupport::QtProfileInformation::qtVersion(target()->profile()));
- if (!sqv) {
- emit addOutput(tr("The selected target is not configured with a Symbian Qt"), BuildStep::ErrorOutput);
- return false;
- }
- if (!tc) {
- emit addOutput(ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget(), BuildStep::ErrorOutput);
- return false;
- }
- m_isBuildWithSymbianSbsV2 = sqv->isBuildWithSymbianSbsV2();
-
- m_workingDirectories.clear();
- QStringList projectCapabilities;
- foreach (Qt4ProFileNode *node, nodes) {
- projectCapabilities += node->symbianCapabilities();
- m_workingDirectories << node->buildDir();
- }
- projectCapabilities.removeDuplicates();
-
- m_makeCmd = tc->makeCommand();
- if (!QFileInfo(m_makeCmd).isAbsolute()) {
- // Try to detect command in environment
- const QString tmp = qt4BuildConfiguration()->environment().searchInPath(m_makeCmd);
- if (tmp.isEmpty()) {
- emit addOutput(tr("Could not find make command '%1' in the build environment").arg(m_makeCmd), BuildStep::ErrorOutput);
- return false;
- }
- m_makeCmd = tmp;
- }
-
- if (signingMode() == SignCustom && !validateCustomSigningResources(projectCapabilities))
- return false;
-
- m_environment = qt4BuildConfiguration()->environment();
-
- m_cancel = false;
-
- return true;
-}
-
-void S60CreatePackageStep::definePassphrase()
-{
- Q_ASSERT(!m_cancel);
- PassphraseForKeyDialog *passwordDialog
- = new PassphraseForKeyDialog(QFileInfo(customKeyPath()).fileName());
- if (passwordDialog->exec()) {
- QString newPassphrase = passwordDialog->passphrase();
- setPassphrase(newPassphrase);
- if (passwordDialog->savePassphrase())
- savePassphraseForKey(m_keyId, newPassphrase);
- } else {
- m_cancel = true;
- }
- delete passwordDialog;
-
- m_waitCondition.wakeAll();
-}
-
-void S60CreatePackageStep::packageWasPatched(const QString &package, const QStringList &changes)
-{
- m_packageChanges.append(qMakePair(package, changes));
-}
-
-void S60CreatePackageStep::handleWarnAboutPatching()
-{
- if (!m_suppressPatchWarningDialog && !m_packageChanges.isEmpty()) {
- if (m_patchWarningDialog){
- m_patchWarningDialog->raise();
- return;
- }
-
- m_patchWarningDialog = new Utils::CheckableMessageBox(0);
- connect(m_patchWarningDialog, SIGNAL(finished(int)), this, SLOT(packageWarningDialogDone()));
-
- QString title;
- QString changedText;
- const QString url = QString::fromLatin1("qthelp://com.nokia.qtcreator.%1%2%3/doc/creator-run-settings.html#capabilities-and-signing").
- arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR).arg(IDE_VERSION_RELEASE);
- if (m_packageChanges.count() == 1) {
- title = tr("Package Modified");
- changedText = tr("<p>Qt modified your package <b>%1</b>.</p>").arg(m_packageChanges.at(0).first);
- } else {
- title = tr("Packages Modified");
- changedText = tr("<p>Qt modified some of your packages.</p>");
- }
- const QString text =
- tr("%1<p><em>These changes were not part of your build profile</em> but are required to "
- "make sure the <em>self-signed</em> package can be installed successfully on a device.</p>"
- "<p>Check the Issues pane for more details on the modifications made.</p>"
- "<p>Please see the <a href=\"%2\">documentation</a> for other signing options which "
- "remove the need for this patching.</p>").arg(changedText, url);
- m_patchWarningDialog->setWindowTitle(title);
- m_patchWarningDialog->setText(text);
- m_patchWarningDialog->setCheckBoxText(tr("Ignore patching for this packaging step."));
- m_patchWarningDialog->setIconPixmap(QMessageBox::standardIcon(QMessageBox::Warning));
- m_patchWarningDialog->setChecked(m_suppressPatchWarningDialog);
- m_patchWarningDialog->setStandardButtons(QDialogButtonBox::Ok);
- m_patchWarningDialog->open();
- }
-}
-
-void S60CreatePackageStep::savePassphraseForKey(const QString &keyId, const QString &passphrase)
-{
- m_passphrases->beginGroup(QLatin1String("keys"));
- if (passphrase.isEmpty())
- m_passphrases->remove(keyId);
- else
- m_passphrases->setValue(keyId, obfuscatePassphrase(passphrase, keyId));
- m_passphrases->endGroup();
-}
-
-QString S60CreatePackageStep::loadPassphraseForKey(const QString &keyId)
-{
- if (keyId.isEmpty())
- return QString();
- m_passphrases->beginGroup(QLatin1String("keys"));
- QString passphrase = elucidatePassphrase(m_passphrases->value(keyId, QByteArray()).toByteArray(), keyId);
- m_passphrases->endGroup();
- return passphrase;
-}
-
-QByteArray S60CreatePackageStep::obfuscatePassphrase(const QString &passphrase, const QString &key) const
-{
- QByteArray byteArray = passphrase.toUtf8();
- char *data = byteArray.data();
- const QChar *keyData = key.data();
- int keyDataSize = key.size();
- for (int i = 0; i <byteArray.size(); ++i)
- data[i] = data[i]^keyData[i%keyDataSize].toAscii();
- return byteArray.toBase64();
-}
-
-QString S60CreatePackageStep::elucidatePassphrase(QByteArray obfuscatedPassphrase, const QString &key) const
-{
- QByteArray byteArray = QByteArray::fromBase64(obfuscatedPassphrase);
- if (byteArray.isEmpty())
- return QString();
-
- char *data = byteArray.data();
- const QChar *keyData = key.data();
- int keyDataSize = key.size();
- for (int i = 0; i < byteArray.size(); ++i)
- data[i] = data[i]^keyData[i%keyDataSize].toAscii();
- return QString::fromUtf8(byteArray.data());
-}
-
-void S60CreatePackageStep::run(QFutureInterface<bool> &fi)
-{
- if (m_workingDirectories.isEmpty()) {
- fi.reportResult(true);
- return;
- }
-
- m_timer = new QTimer();
- connect(m_timer, SIGNAL(timeout()), this, SLOT(checkForCancel()), Qt::DirectConnection);
- m_timer->start(500);
- m_eventLoop = new QEventLoop;
-
- bool returnValue = false;
- if (!createOnePackage()) {
- fi.reportResult(false);
- return;
- }
-
- Q_ASSERT(!m_futureInterface);
- m_futureInterface = &fi;
- returnValue = m_eventLoop->exec();
-
- // Finished
- m_timer->stop();
- delete m_timer;
- m_timer = 0;
-
- delete m_process;
- m_process = 0;
- delete m_eventLoop;
- m_eventLoop = 0;
-
- m_futureInterface = 0;
-
- if (returnValue)
- emit warnAboutPatching();
- fi.reportResult(returnValue);
-}
-
-bool S60CreatePackageStep::createOnePackage()
-{
- // Setup arguments:
- m_args.clear();
- if (m_createSmartInstaller) {
- if (signingMode() == NotSigned)
- m_args << QLatin1String("unsigned_installer_sis");
- else
- m_args << QLatin1String("installer_sis");
- } else if (signingMode() == NotSigned)
- m_args << QLatin1String("unsigned_sis");
- else
- m_args << QLatin1String("sis");
-
- if (signingMode() == SignCustom) {
- m_args << QLatin1String(MAKE_CERTIFICATE_ARGUMENT) + QDir::toNativeSeparators(customSignaturePath())
- << QLatin1String(MAKE_KEY_ARGUMENT) + QDir::toNativeSeparators(customKeyPath());
-
- setPassphrase(loadPassphraseForKey(m_keyId));
-
- if (!passphrase().isEmpty())
- m_args << QLatin1String(MAKE_PASSPHRASE_ARGUMENT) + passphrase();
- }
-
- // Setup working directory:
- QString workingDirectory = m_workingDirectories.first();
- QDir wd(workingDirectory);
- if (!wd.exists())
- wd.mkpath(wd.absolutePath());
-
-
- // Setup process...
- Q_ASSERT(!m_process);
- m_process = new QProcess();
- m_process->setEnvironment(m_environment.toStringList());
-
- connect(m_process, SIGNAL(readyReadStandardOutput()),
- this, SLOT(processReadyReadStdOutput()),
- Qt::DirectConnection);
- connect(m_process, SIGNAL(readyReadStandardError()),
- this, SLOT(processReadyReadStdError()),
- Qt::DirectConnection);
-
- connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)),
- this, SLOT(packageDone(int,QProcess::ExitStatus)),
- Qt::DirectConnection);
-
- m_process->setWorkingDirectory(wd.absolutePath());
-
- // Setup parsers:
- Q_ASSERT(!m_outputParserChain);
- if (!m_isBuildWithSymbianSbsV2) {
- m_outputParserChain = new Qt4ProjectManager::AbldParser;
- m_outputParserChain->appendOutputParser(new ProjectExplorer::GnuMakeParser);
- } else {
- m_outputParserChain = new ProjectExplorer::GnuMakeParser();
- }
- Q_ASSERT(!m_parser);
- m_parser = new S60CreatePackageParser(wd.absolutePath());
- m_outputParserChain->appendOutputParser(m_parser);
- m_outputParserChain->setWorkingDirectory(wd.absolutePath());
-
- connect(m_outputParserChain, SIGNAL(addOutput(QString,ProjectExplorer::BuildStep::OutputFormat)),
- this, SIGNAL(addOutput(QString,ProjectExplorer::BuildStep::OutputFormat)));
- connect(m_outputParserChain, SIGNAL(addTask(ProjectExplorer::Task)),
- this, SIGNAL(addTask(ProjectExplorer::Task)), Qt::DirectConnection);
-
- connect(m_parser, SIGNAL(packageWasPatched(QString,QStringList)),
- this, SLOT(packageWasPatched(QString,QStringList)), Qt::DirectConnection);
-
- // Go for it!
- m_process->start(m_makeCmd, m_args);
- if (!m_process->waitForStarted()) {
- emit addOutput(tr("Could not start process \"%1\" in %2")
- .arg(QDir::toNativeSeparators(m_makeCmd),
- workingDirectory),
- BuildStep::ErrorMessageOutput);
- return false;
- }
- emit addOutput(tr("Starting: \"%1\" %2 in %3\n")
- .arg(QDir::toNativeSeparators(m_makeCmd),
- m_args.join(QLatin1String(" ")),
- workingDirectory),
- BuildStep::MessageOutput);
- return true;
-}
-
-bool S60CreatePackageStep::validateCustomSigningResources(const QStringList &capabilitiesInPro)
-{
- Q_ASSERT(signingMode() == SignCustom);
-
- QString errorString;
- if (customSignaturePath().isEmpty())
- errorString = tr("No certificate file specified. Please specify one in the project settings.");
- else if (!QFileInfo(customSignaturePath()).exists())
- errorString = tr("Certificate file \"%1\" does not exist. "
- "Please specify an existing certificate file in the project settings.").arg(customSignaturePath());
-
- if (customKeyPath().isEmpty())
- errorString = tr("No key file specified. Please specify one in the project settings.");
- else if (!QFileInfo(customKeyPath()).exists())
- errorString = tr("Key file \"%1\" does not exist. "
- "Please specify an existing key file in the project settings.").arg(customKeyPath());
-
- if (!errorString.isEmpty()) {
- reportPackageStepIssue(errorString, true);
- return false;
- }
- QScopedPointer<S60CertificateInfo> certInfoPtr(new S60CertificateInfo(customSignaturePath()));
- S60CertificateInfo::CertificateState certState = certInfoPtr.data()->validateCertificate();
- switch (certState) {
- case S60CertificateInfo::CertificateError:
- reportPackageStepIssue(certInfoPtr.data()->errorString(), true);
- return false;
- case S60CertificateInfo::CertificateWarning:
- reportPackageStepIssue(certInfoPtr.data()->errorString(), false);
- break;
- default:
- break;
- }
-
- QStringList unsupportedCaps;
- if (certInfoPtr.data()->compareCapabilities(capabilitiesInPro, unsupportedCaps)) {
- if (!unsupportedCaps.isEmpty()) {
- QString message = tr("The package created will not install on a "
- "device as some of the defined capabilities "
- "are not supported by the certificate: %1")
- .arg(unsupportedCaps.join(QLatin1String(" ")));
- reportPackageStepIssue(message, true);
- return false;
- }
-
- } else
- reportPackageStepIssue(certInfoPtr.data()->errorString(), false);
- return true;
-}
-
-void S60CreatePackageStep::reportPackageStepIssue(const QString &message, bool isError )
-{
- emit addOutput(message, isError?
- BuildStep::ErrorMessageOutput:
- BuildStep::MessageOutput);
- emit addTask(ProjectExplorer::Task(isError?
- ProjectExplorer::Task::Error:
- ProjectExplorer::Task::Warning,
- message,
- Utils::FileName(), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
-}
-
-void S60CreatePackageStep::packageWarningDialogDone()
-{
- if (m_patchWarningDialog)
- m_suppressPatchWarningDialog = m_patchWarningDialog->isChecked();
- if (m_suppressPatchWarningDialog) {
- m_patchWarningDialog->deleteLater();
- m_patchWarningDialog = 0;
- }
-}
-
-void S60CreatePackageStep::packageDone(int exitCode, QProcess::ExitStatus status)
-{
- QString line = QString::fromLocal8Bit(m_process->readAllStandardError());
- if (!line.isEmpty())
- stdError(line);
-
- line = QString::fromLocal8Bit(m_process->readAllStandardOutput());
- if (!line.isEmpty())
- stdOutput(line);
-
- if (status == QProcess::NormalExit && exitCode == 0) {
- emit addOutput(tr("The process \"%1\" exited normally.")
- .arg(QDir::toNativeSeparators(m_makeCmd)),
- BuildStep::MessageOutput);
- } else if (status == QProcess::NormalExit) {
- emit addOutput(tr("The process \"%1\" exited with code %2.")
- .arg(QDir::toNativeSeparators(m_makeCmd), QString::number(exitCode)),
- BuildStep::ErrorMessageOutput);
- } else {
- emit addOutput(tr("The process \"%1\" crashed.").arg(QDir::toNativeSeparators(m_makeCmd)), BuildStep::ErrorMessageOutput);
- }
-
- bool needPassphrase = m_parser->needPassphrase();
-
- // Clean up:
- delete m_outputParserChain;
- m_outputParserChain = 0;
- m_parser = 0;
- delete m_process;
- m_process = 0;
-
- // Process next directories:
- if (needPassphrase) {
- emit badPassphrase();
- QMutexLocker locker(&m_mutex);
- m_waitCondition.wait(&m_mutex);
- } else {
- if (status != QProcess::NormalExit || exitCode != 0) {
- m_eventLoop->exit(false);
- return;
- }
-
- m_workingDirectories.removeFirst();
- if (m_workingDirectories.isEmpty()) {
- m_eventLoop->exit(true);
- return;
- }
- }
-
- if (m_cancel || !createOnePackage())
- m_eventLoop->exit(false);
-}
-
-void S60CreatePackageStep::processReadyReadStdOutput()
-{
- m_process->setReadChannel(QProcess::StandardOutput);
- while (m_process->canReadLine()) {
- QString line = QString::fromLocal8Bit(m_process->readLine());
- stdOutput(line);
- }
-}
-
-void S60CreatePackageStep::stdOutput(const QString &line)
-{
- if (m_outputParserChain)
- m_outputParserChain->stdOutput(line);
- emit addOutput(line, BuildStep::NormalOutput, BuildStep::DontAppendNewline);
-}
-
-void S60CreatePackageStep::processReadyReadStdError()
-{
- m_process->setReadChannel(QProcess::StandardError);
- while (m_process->canReadLine()) {
- QString line = QString::fromLocal8Bit(m_process->readLine());
- stdError(line);
- }
-}
-
-void S60CreatePackageStep::stdError(const QString &line)
-{
- if (m_outputParserChain)
- m_outputParserChain->stdError(line);
- emit addOutput(line, BuildStep::ErrorOutput, BuildStep::DontAppendNewline);
-}
-
-void S60CreatePackageStep::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);
- }
-}
-
-QString S60CreatePackageStep::generateKeyId(const QString &keyPath) const
-{
- if (keyPath.isEmpty())
- return QString();
-
- Utils::FileReader reader;
- if (!reader.fetch(keyPath, QIODevice::Text)) {
- emit addOutput(reader.errorString(), BuildStep::ErrorOutput);
- return QString();
- }
-
- //key file is quite small in size
- return QLatin1String(QCryptographicHash::hash(reader.data(),
- QCryptographicHash::Md5).toHex());
-}
-
-bool S60CreatePackageStep::immutable() const
-{
- return false;
-}
-
-ProjectExplorer::BuildStepConfigWidget *S60CreatePackageStep::createConfigWidget()
-{
- return new S60CreatePackageStepConfigWidget(this);
-}
-
-S60CreatePackageStep::SigningMode S60CreatePackageStep::signingMode() const
-{
- return m_signingMode;
-}
-
-void S60CreatePackageStep::setSigningMode(SigningMode mode)
-{
- m_signingMode = mode;
-}
-
-QString S60CreatePackageStep::customSignaturePath() const
-{
- return m_customSignaturePath;
-}
-
-void S60CreatePackageStep::setCustomSignaturePath(const QString &path)
-{
- m_customSignaturePath = path;
-}
-
-QString S60CreatePackageStep::customKeyPath() const
-{
- return m_customKeyPath;
-}
-
-void S60CreatePackageStep::setCustomKeyPath(const QString &path)
-{
- m_customKeyPath = path;
- m_keyId = generateKeyId(m_customKeyPath);
-}
-
-QString S60CreatePackageStep::passphrase() const
-{
- return m_passphrase;
-}
-
-void S60CreatePackageStep::setPassphrase(const QString &passphrase)
-{
- if (passphrase.isEmpty())
- return;
- m_passphrase = passphrase;
-}
-
-QString S60CreatePackageStep::keyId() const
-{
- return m_keyId;
-}
-
-void S60CreatePackageStep::setKeyId(const QString &keyId)
-{
- m_keyId = keyId;
-}
-
-bool S60CreatePackageStep::createsSmartInstaller() const
-{
- return m_createSmartInstaller;
-}
-
-void S60CreatePackageStep::setCreatesSmartInstaller(bool value)
-{
- m_createSmartInstaller = value;
- qt4BuildConfiguration()->emitS60CreatesSmartInstallerChanged();
-}
-
-void S60CreatePackageStep::resetPassphrases()
-{
- m_passphrases->beginGroup(QLatin1String("keys"));
- QStringList keys = m_passphrases->allKeys();
- foreach (const QString &key, keys) {
- m_passphrases->setValue(key, QString());
- }
- m_passphrases->remove(QString());
- m_passphrases->endGroup();
-}
-
-// #pragma mark -- S60SignBuildStepFactory
-
-S60CreatePackageStepFactory::S60CreatePackageStepFactory(QObject *parent) :
- ProjectExplorer::IBuildStepFactory(parent)
-{
-}
-
-S60CreatePackageStepFactory::~S60CreatePackageStepFactory()
-{
-}
-
-bool S60CreatePackageStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
-{
- return canHandle(parent) && id == SIGN_BS_ID;
-}
-
-ProjectExplorer::BuildStep *S60CreatePackageStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
-{
- if (!canCreate(parent, id))
- return 0;
- return new S60CreatePackageStep(parent);
-}
-
-bool S60CreatePackageStepFactory::canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const
-{
- return canCreate(parent, source->id());
-}
-
-ProjectExplorer::BuildStep *S60CreatePackageStepFactory::clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source)
-{
- if (!canClone(parent, source))
- return 0;
- return new S60CreatePackageStep(parent, static_cast<S60CreatePackageStep *>(source));
-}
-
-bool S60CreatePackageStepFactory::canHandle(ProjectExplorer::BuildStepList *parent) const
-{
- if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- return false;
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
- if (deviceType != SymbianIDeviceFactory::deviceType())
- return false;
- return qobject_cast<Qt4Project *>(parent->target()->project());
-}
-
-bool S60CreatePackageStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const
-{
- return canCreate(parent, ProjectExplorer::idFromMap(map));
-}
-
-ProjectExplorer::BuildStep *S60CreatePackageStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map)
-{
- if (!canRestore(parent, map))
- return 0;
- S60CreatePackageStep *bs(new S60CreatePackageStep(parent));
- if (bs->fromMap(map))
- return bs;
- delete bs;
- return 0;
-}
-
-QList<Core::Id> S60CreatePackageStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
-{
- if (!canHandle(parent))
- return QList<Core::Id>();
-
- return QList<Core::Id>() << Core::Id(SIGN_BS_ID);
-}
-
-QString S60CreatePackageStepFactory::displayNameForId(const Core::Id id) const
-{
- if (id == SIGN_BS_ID)
- return tr("Create SIS Package");
- return QString();
-}
-
-// #pragma mark -- S60SignBuildStepConfigWidget
-
-S60CreatePackageStepConfigWidget::S60CreatePackageStepConfigWidget(S60CreatePackageStep *signStep)
- : BuildStepConfigWidget(), m_signStep(signStep)
-{
- m_ui.setupUi(this);
- m_ui.signaturePath->setExpectedKind(Utils::PathChooser::File);
- m_ui.signaturePath->setPromptDialogFilter(QLatin1String("*.cer *.crt *.der *.pem"));
- m_ui.keyFilePath->setExpectedKind(Utils::PathChooser::File);
- updateUi();
-
- bool enableCertDetails = m_signStep->signingMode() == S60CreatePackageStep::SignCustom
- && m_ui.signaturePath->isValid();
- m_ui.certificateDetails->setEnabled(enableCertDetails);
-
- connect(m_ui.certificateDetails, SIGNAL(clicked()),
- this, SLOT(displayCertificateDetails()));
- connect(m_ui.customCertificateButton, SIGNAL(clicked()),
- this, SLOT(updateFromUi()));
- connect(m_ui.selfSignedButton, SIGNAL(clicked()),
- this, SLOT(updateFromUi()));
- connect(m_ui.notSignedButton, SIGNAL(clicked()),
- this, SLOT(updateFromUi()));
- connect(m_ui.signaturePath, SIGNAL(changed(QString)),
- this, SLOT(signatureChanged(QString)));
- connect(m_ui.keyFilePath, SIGNAL(changed(QString)),
- this, SLOT(updateFromUi()));
- connect(m_ui.smartInstaller, SIGNAL(clicked()),
- this, SLOT(updateFromUi()));
- connect(m_ui.resetPassphrasesButton, SIGNAL(clicked()),
- this, SLOT(resetPassphrases()));
-}
-
-void S60CreatePackageStepConfigWidget::signatureChanged(QString certFile)
-{
- m_ui.certificateDetails->setEnabled(m_ui.signaturePath->isValid());
-
- if (!certFile.isEmpty() && m_ui.keyFilePath->path().isEmpty()) {
- /* If a cert file is selected and there is not key file inserted,
- then we check if there is a .key or .pem file in the folder with
- the same base name as the cert file. This file is probably a key
- file for this cert and the key field is then populated automatically
- */
- QFileInfo certFileInfo(certFile);
- QDir directory = QDir(certFileInfo.absolutePath());
- QString keyFile(certFileInfo.baseName() + QLatin1String(".key"));
- QString pemFile(certFileInfo.baseName() + QLatin1String(".pem"));
- QStringList files;
- QStringList keys;
- keys << keyFile << pemFile;
- files = directory.entryList(QStringList(keys),
- QDir::Files | QDir::NoSymLinks);
-
- if (files.isEmpty())
- m_ui.keyFilePath->setInitialBrowsePathBackup(certFileInfo.path());
- else
- m_ui.keyFilePath->setPath(directory.filePath(files[0]));
- }
- updateFromUi();
-}
-
-void S60CreatePackageStepConfigWidget::updateUi()
-{
- switch(m_signStep->signingMode()) {
- case S60CreatePackageStep::SignCustom:
- m_ui.selfSignedButton->setChecked(false);
- m_ui.customCertificateButton->setChecked(true);
- m_ui.notSignedButton->setChecked(false);
- m_ui.certificateDetails->setEnabled(m_ui.signaturePath->isValid());
- break;
- case S60CreatePackageStep::NotSigned:
- m_ui.selfSignedButton->setChecked(false);
- m_ui.customCertificateButton->setChecked(false);
- m_ui.notSignedButton->setChecked(true);
- m_ui.certificateDetails->setEnabled(false);
- break;
- default:
- m_ui.selfSignedButton->setChecked(true);
- m_ui.customCertificateButton->setChecked(false);
- m_ui.notSignedButton->setChecked(false);
- m_ui.certificateDetails->setEnabled(false);
- break;
- }
- bool customSigned = m_signStep->signingMode() == S60CreatePackageStep::SignCustom;
- m_ui.signaturePath->setEnabled(customSigned);
- m_ui.keyFilePath->setEnabled(customSigned);
- m_ui.signaturePath->setPath(m_signStep->customSignaturePath());
- m_ui.keyFilePath->setPath(m_signStep->customKeyPath());
- m_ui.smartInstaller->setChecked(m_signStep->createsSmartInstaller());
- emit updateSummary();
-}
-
-void S60CreatePackageStepConfigWidget::updateFromUi()
-{
- S60CreatePackageStep::SigningMode signingMode(S60CreatePackageStep::SignSelf);
- if (m_ui.selfSignedButton->isChecked())
- signingMode = S60CreatePackageStep::SignSelf;
- else if (m_ui.customCertificateButton->isChecked())
- signingMode = S60CreatePackageStep::SignCustom;
- else if (m_ui.notSignedButton->isChecked())
- signingMode = S60CreatePackageStep::NotSigned;
-
- m_signStep->setSigningMode(signingMode);
- m_signStep->setCustomSignaturePath(m_ui.signaturePath->path());
- m_signStep->setCustomKeyPath(m_ui.keyFilePath->path());
- m_signStep->setCreatesSmartInstaller(m_ui.smartInstaller->isChecked());
- updateUi();
-}
-
-void S60CreatePackageStepConfigWidget::displayCertificateDetails()
-{
- S60CertificateInfo *certificateInformation = new S60CertificateInfo(m_ui.signaturePath->path());
- certificateInformation->devicesSupported().sort();
-
- S60CertificateDetailsDialog dialog;
- dialog.setText(certificateInformation->toHtml(false));
- dialog.exec();
- delete certificateInformation;
-}
-
-void S60CreatePackageStepConfigWidget::resetPassphrases()
-{
- QMessageBox msgBox(QMessageBox::Question, tr("Reset Passphrases"),
- tr("Do you want to reset all passphrases saved for keys used?"),
- QMessageBox::Reset|QMessageBox::Cancel, this);
- if (msgBox.exec() == QMessageBox::Reset)
- m_signStep->resetPassphrases();
-}
-
-QString S60CreatePackageStepConfigWidget::summaryText() const
-{
- QString text;
- switch(m_signStep->signingMode()) {
- case S60CreatePackageStep::SignCustom:
- if (!m_signStep->customSignaturePath().isEmpty()
- && !m_signStep->customKeyPath().isEmpty())
- text = tr("signed with the certificate \"%1\" using the key \"%2\"")
- .arg(QFileInfo(m_signStep->customSignaturePath()).fileName(),
- QFileInfo(m_signStep->customKeyPath()).fileName());
- else
- text = tr("signed with a certificate and a key that need to be specified");
- break;
- case S60CreatePackageStep::NotSigned:
- text = tr("not signed");
- break;
- default:
- text = tr("self-signed");
- break;
- }
- if (m_signStep->createsSmartInstaller())
- return tr("<b>Create SIS Package:</b> %1, using Smart Installer").arg(text);
- return tr("<b>Create SIS Package:</b> %1").arg(text);
-}
-
-QString S60CreatePackageStepConfigWidget::displayName() const
-{
- return m_signStep->displayName();
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h
deleted file mode 100644
index 515d300b5b..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60CREATEPACKAGESTEP_H
-#define S60CREATEPACKAGESTEP_H
-
-#include "ui_s60createpackagestep.h"
-
-#include <projectexplorer/buildstep.h>
-#include <qt4projectmanager/makestep.h>
-
-#include <QMutex>
-#include <QWaitCondition>
-
-QT_BEGIN_NAMESPACE
-class QSettings;
-QT_END_NAMESPACE
-
-namespace Utils {
-class CheckableMessageBox;
-} // namespace Utils
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60CreatePackageParser;
-
-class S60CreatePackageStepFactory : public ProjectExplorer::IBuildStepFactory
-{
- Q_OBJECT
-public:
- explicit S60CreatePackageStepFactory(QObject *parent = 0);
- ~S60CreatePackageStepFactory();
-
- // used to show the list of possible additons to a target, returns a list of types
- QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- // used to translate the types to names to display to the user
- QString displayNameForId(const Core::Id id) const;
-
- bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
- // used to recreate the runConfigurations when restoring settings
- 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);
-
- bool canHandle(ProjectExplorer::BuildStepList *parent) const;
-};
-
-
-class S60CreatePackageStep : public ProjectExplorer::BuildStep
-{
- Q_OBJECT
- friend class S60CreatePackageStepFactory;
-
-public:
- enum SigningMode {
- SignSelf = 0,
- SignCustom = 1,
- NotSigned = 2
- };
-
- explicit S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl);
- virtual ~S60CreatePackageStep();
-
- virtual bool init();
- virtual void run(QFutureInterface<bool> &fi);
- virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
- virtual bool immutable() const;
-
- QVariantMap toMap() const;
-
- SigningMode signingMode() const;
- void setSigningMode(SigningMode mode);
- QString customSignaturePath() const;
- void setCustomSignaturePath(const QString &path);
- QString customKeyPath() const;
- void setCustomKeyPath(const QString &path);
- QString passphrase() const ;
- void setPassphrase(const QString &passphrase);
- QString keyId() const;
- void setKeyId(const QString &keyId);
- bool createsSmartInstaller() const;
- void setCreatesSmartInstaller(bool value);
-
- void resetPassphrases();
-
-signals:
- void badPassphrase();
- void warnAboutPatching();
-
-protected:
- S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl, S60CreatePackageStep *bs);
- S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
- bool fromMap(const QVariantMap &map);
-
- Qt4BuildConfiguration *qt4BuildConfiguration() const;
-
-private slots:
- void packageWarningDialogDone();
- void packageDone(int, QProcess::ExitStatus);
- void processReadyReadStdOutput();
- void processReadyReadStdError();
- void checkForCancel();
- void definePassphrase();
-
- void packageWasPatched(const QString &, const QStringList &);
- void handleWarnAboutPatching();
-
-private:
- void stdOutput(const QString &line);
- void stdError(const QString &line);
-
- void reportPackageStepIssue(const QString &message, bool isError );
- void setupProcess();
- bool createOnePackage();
- bool validateCustomSigningResources(const QStringList &capabilitiesInPro);
-
- QString generateKeyId(const QString &keyPath) const;
- QString loadPassphraseForKey(const QString &keyId);
- void savePassphraseForKey(const QString &keyId, const QString &passphrase);
- QString elucidatePassphrase(QByteArray obfuscatedPassphrase, const QString &key) const;
- QByteArray obfuscatePassphrase(const QString &passphrase, const QString &key) const;
-
- QStringList m_workingDirectories;
-
- QString m_makeCmd;
- Utils::Environment m_environment;
- QStringList m_args;
-
- void ctor_package();
-
- SigningMode m_signingMode;
- QString m_customSignaturePath;
- QString m_customKeyPath;
- QString m_passphrase;
- QString m_keyId;
- bool m_createSmartInstaller;
- ProjectExplorer::IOutputParser *m_outputParserChain;
-
- QProcess *m_process;
- QTimer *m_timer;
- QEventLoop *m_eventLoop;
- QFutureInterface<bool> *m_futureInterface;
-
- QWaitCondition m_waitCondition;
- QMutex m_mutex;
-
- bool m_cancel;
-
- QSettings *m_passphrases;
- S60CreatePackageParser *m_parser;
- QList<QPair<QString, QStringList> > m_packageChanges;
-
- bool m_suppressPatchWarningDialog;
- Utils::CheckableMessageBox *m_patchWarningDialog;
- bool m_isBuildWithSymbianSbsV2;
-};
-
-class S60CreatePackageStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
-{
- Q_OBJECT
-public:
- S60CreatePackageStepConfigWidget(S60CreatePackageStep *signStep);
- QString displayName() const;
- QString summaryText() const;
-
-private slots:
- void updateUi();
- void updateFromUi();
- void resetPassphrases();
- void signatureChanged(QString certFile);
- void displayCertificateDetails();
-
-private:
- S60CreatePackageStep *m_signStep;
-
- Ui::S60CreatePackageStepWidget m_ui;
-};
-
-} // Internal
-} // Qt4ProjectManager
-
-#endif // S60CREATEPACKAGESTEP_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.ui b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.ui
deleted file mode 100644
index 17f55a750c..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.ui
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qt4ProjectManager::Internal::S60CreatePackageStepWidget</class>
- <widget class="QWidget" name="Qt4ProjectManager::Internal::S60CreatePackageStepWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>517</width>
- <height>171</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string notr="true">Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QGridLayout" name="gridLayout_3" rowstretch="0,0" columnstretch="0,0" rowminimumheight="0,0" columnminimumwidth="0,0">
- <item row="1" column="0">
- <widget class="QRadioButton" name="notSignedButton">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="notSignedLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Not signed</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0" columnminimumwidth="0,0">
- <item row="0" column="0">
- <widget class="QRadioButton" name="selfSignedButton">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="selfSignedLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Self-signed certificate</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QRadioButton" name="customCertificateButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="1" rowspan="2">
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="customLabel">
- <property name="text">
- <string>Custom certificate:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="CertificatePathChooser" name="signaturePath" native="true">
- <property name="promptDialogTitle" stdset="0">
- <string>Choose certificate file</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Key file:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="Utils::PathChooser" name="keyFilePath" native="true"/>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QCheckBox" name="smartInstaller">
- <property name="text">
- <string>Create Smart Installer package</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QPushButton" name="resetPassphrasesButton">
- <property name="toolTip">
- <string>Resets saved passphrases for all used keys</string>
- </property>
- <property name="text">
- <string>Reset Passphrases</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="certificateDetails">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="toolTip">
- <string/>
- </property>
- <property name="text">
- <string>Certificate's details</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>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </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>
- <customwidget>
- <class>CertificatePathChooser</class>
- <extends>QWidget</extends>
- <header location="global">qt4projectmanager/qt-s60/certificatepathchooser.h</header>
- <container>1</container>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp
deleted file mode 100644
index 2ef0e4d64c..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp
+++ /dev/null
@@ -1,448 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60deployconfiguration.h"
-#include "s60deployconfigurationwidget.h"
-#include "s60manager.h"
-#include "qt4project.h"
-#include "qt4nodes.h"
-#include "qt4projectmanagerconstants.h"
-#include "qt4buildconfiguration.h"
-#include "s60createpackagestep.h"
-#include "s60deploystep.h"
-#include "symbianidevice.h"
-#include "symbianidevicefactory.h"
-
-#include <utils/qtcassert.h>
-#include <symbianutils/symbiandevicemanager.h>
-
-#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/devicesupport/devicemanager.h>
-#include <projectexplorer/project.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/toolchain.h>
-#include <projectexplorer/devicesupport/devicemanager.h>
-
-#include <qtsupport/qtprofileinformation.h>
-
-#include <QFileInfo>
-
-using namespace ProjectExplorer;
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-namespace {
-const char S60_DC_PREFIX[] = "Qt4ProjectManager.S60DeployConfiguration.";
-
-const char INSTALLATION_DRIVE_LETTER_KEY[] = "Qt4ProjectManager.S60DeployConfiguration.InstallationDriveLetter";
-const char SILENT_INSTALL_KEY[] = "Qt4ProjectManager.S60DeployConfiguration.SilentInstall";
-
-QString pathFromId(Core::Id id)
-{
- QString idstr = QString::fromUtf8(id.name());
- const QString prefix = QLatin1String(S60_DC_PREFIX);
- if (!idstr.startsWith(prefix))
- return QString();
- return idstr.mid(prefix.size());
-}
-
-} // namespace
-
-// ======== S60DeployConfiguration
-
-S60DeployConfiguration::S60DeployConfiguration(Target *parent) :
- DeployConfiguration(parent, Core::Id(S60_DEPLOYCONFIGURATION_ID)),
- m_activeBuildConfiguration(0),
- m_installationDrive('C'),
- m_silentInstall(true)
-{
- ctor();
-
- ProjectExplorer::DeviceManager *dm = ProjectExplorer::DeviceManager::instance();
- IDevice::ConstPtr defaultDevice
- = dm->defaultDevice(Internal::SymbianIDeviceFactory::deviceType());
- if (defaultDevice)
- m_deviceId = defaultDevice->id();
-}
-
-S60DeployConfiguration::S60DeployConfiguration(Target *target, S60DeployConfiguration *source) :
- DeployConfiguration(target, source),
- m_activeBuildConfiguration(0),
- m_deviceId(source->m_deviceId),
- m_installationDrive(source->m_installationDrive),
- m_silentInstall(source->m_silentInstall)
-{
- ctor();
-}
-
-void S60DeployConfiguration::ctor()
-{
- setDefaultDisplayName(defaultDisplayName());
-
- Qt4Project *project = static_cast<Qt4Project *>(target()->project());
- // TODO disable S60 Deploy Configuration while parsing
- // requires keeping track of the parsing state of the project
- connect(project, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
- this, SLOT(slotTargetInformationChanged(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
- connect(target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
- this, SLOT(updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
- connect(target(), SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
- this, SLOT(updateActiveRunConfiguration(ProjectExplorer::RunConfiguration*)));
- updateActiveBuildConfiguration(target()->activeBuildConfiguration());
-}
-
-S60DeployConfiguration::~S60DeployConfiguration()
-{ }
-
-ProjectExplorer::DeployConfigurationWidget *S60DeployConfiguration::configurationWidget() const
-{
- return new S60DeployConfigurationWidget();
-}
-
-void S60DeployConfiguration::slotTargetInformationChanged(Qt4ProjectManager::Qt4ProFileNode*,bool success, bool parseInProgress)
-{
- Q_UNUSED(success)
- if (!parseInProgress)
- emit targetInformationChanged();
-}
-
-bool S60DeployConfiguration::isStaticLibrary(const Qt4ProFileNode &projectNode) const
-{
- if (projectNode.projectType() == LibraryTemplate) {
- const QStringList &config(projectNode.variableValue(ConfigVar));
- if (config.contains(QLatin1String("static")) || config.contains(QLatin1String("staticlib")))
- return true;
- }
- return false;
-}
-
-bool S60DeployConfiguration::isApplication(const Qt4ProFileNode &projectNode) const
-{
- return projectNode.projectType() == ApplicationTemplate;
-}
-
-bool S60DeployConfiguration::hasSisPackage(const Qt4ProFileNode &projectNode) const
-{
- return projectNode.isDeployable();
-}
-
-QStringList S60DeployConfiguration::signedPackages() const
-{
- QList<Qt4ProFileNode *> list = static_cast<Qt4Project *>(target()->project())->allProFiles();
- QStringList result;
- foreach (Qt4ProFileNode *node, list) {
- if (!hasSisPackage(*node))
- continue;
- TargetInformation ti = node->targetInformation();
- if (ti.valid)
- result << ti.buildDir + QLatin1Char('/') + createPackageName(ti.target);
- }
- return result;
-}
-
-QString S60DeployConfiguration::createPackageName(const QString &baseName) const
-{
- QString name(baseName);
- name += runSmartInstaller() ? QLatin1String("_installer") : QLatin1String("");
- name += isSigned() ? QLatin1String("") : QLatin1String("_unsigned");
- name += QLatin1String(".sis");
- return name;
-}
-
-SymbianIDevice::ConstPtr S60DeployConfiguration::device() const
-{
- return ProjectExplorer::DeviceManager::instance()->find(m_deviceId).dynamicCast<const SymbianIDevice>();
-}
-
-QStringList S60DeployConfiguration::packageFileNamesWithTargetInfo() const
-{
- QList<Qt4ProFileNode *> leafs = static_cast<Qt4Project *>(target()->project())->allProFiles();
- QStringList result;
- foreach (Qt4ProFileNode *qt4ProFileNode, leafs) {
- if (!hasSisPackage(*qt4ProFileNode))
- continue;
- TargetInformation ti = qt4ProFileNode->targetInformation();
- if (!ti.valid)
- continue;
- QString baseFileName = ti.buildDir + QLatin1Char('/') + ti.target;
- ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
- baseFileName += QLatin1Char('_')
- + (isDebug() ? QLatin1String("debug") : QLatin1String("release"))
- + QLatin1Char('-') + S60Manager::platform(tc) + QLatin1String(".sis");
- result << baseFileName;
- }
- return result;
-}
-
-QStringList S60DeployConfiguration::packageTemplateFileNames() const
-{
- QList<Qt4ProFileNode *> list = static_cast<Qt4Project *>(target()->project())->allProFiles();
- QStringList result;
- foreach (Qt4ProFileNode *node, list) {
- if (!hasSisPackage(*node))
- continue;
- TargetInformation ti = node->targetInformation();
- if (ti.valid)
- result << ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String("_template.pkg");
- }
- return result;
-}
-
-QStringList S60DeployConfiguration::appPackageTemplateFileNames() const
-{
- QList<Qt4ProFileNode *> list = static_cast<Qt4Project *>(target()->project())->allProFiles();
- QStringList result;
- foreach (Qt4ProFileNode *node, list) {
- if (!hasSisPackage(*node))
- continue;
- TargetInformation ti = node->targetInformation();
- if (ti.valid)
- result << ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String("_template.pkg");
- }
- return result;
-}
-
-bool S60DeployConfiguration::runSmartInstaller() const
-{
- DeployConfiguration *dc = target()->activeDeployConfiguration();
- QTC_ASSERT(dc, return false);
- BuildStepList *bsl = dc->stepList();
- QTC_ASSERT(bsl, return false);
- QList<BuildStep *> steps = bsl->steps();
- foreach (const BuildStep *step, steps) {
- if (const S60CreatePackageStep *packageStep = qobject_cast<const S60CreatePackageStep *>(step)) {
- return packageStep->createsSmartInstaller();
- }
- }
- return false;
-}
-
-bool S60DeployConfiguration::isSigned() const
-{
- DeployConfiguration *dc = target()->activeDeployConfiguration();
- QTC_ASSERT(dc, return false);
- BuildStepList *bsl = dc->stepList();
- QTC_ASSERT(bsl, return false);
- QList<BuildStep *> steps = bsl->steps();
- foreach (const BuildStep *step, steps) {
- if (const S60CreatePackageStep *packageStep = qobject_cast<const S60CreatePackageStep *>(step)) {
- return packageStep->signingMode() != S60CreatePackageStep::NotSigned;
- }
- }
- return false;
-}
-
-bool S60DeployConfiguration::isDebug() const
-{
- const Qt4BuildConfiguration *qt4bc = qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
- QTC_ASSERT(qt4bc, return false);
- return (qt4bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild);
-}
-
-QString S60DeployConfiguration::symbianTarget() const
-{
- return isDebug() ? QLatin1String("udeb") : QLatin1String("urel");
-}
-
-void S60DeployConfiguration::updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration *buildConfiguration)
-{
- if (m_activeBuildConfiguration)
- disconnect(m_activeBuildConfiguration, SIGNAL(s60CreatesSmartInstallerChanged()),
- this, SIGNAL(targetInformationChanged()));
- m_activeBuildConfiguration = buildConfiguration;
- if (m_activeBuildConfiguration)
- connect(m_activeBuildConfiguration, SIGNAL(s60CreatesSmartInstallerChanged()),
- this, SIGNAL(targetInformationChanged()));
-}
-
-void S60DeployConfiguration::updateActiveRunConfiguration(ProjectExplorer::RunConfiguration *runConfiguration)
-{
- Q_UNUSED(runConfiguration);
- setDefaultDisplayName(defaultDisplayName());
-}
-
-QVariantMap S60DeployConfiguration::toMap() const
-{
- QVariantMap map(ProjectExplorer::DeployConfiguration::toMap());
- map.insert(QLatin1String(INSTALLATION_DRIVE_LETTER_KEY), QChar(QLatin1Char(m_installationDrive)));
- map.insert(QLatin1String(SILENT_INSTALL_KEY), QVariant(m_silentInstall));
-
- return map;
-}
-
-QString S60DeployConfiguration::defaultDisplayName() const
-{
- QList<Qt4ProFileNode *> list = static_cast<Qt4Project *>(target()->project())->allProFiles();
- foreach (Qt4ProFileNode *node, list) {
- TargetInformation ti = node->targetInformation();
- if (ti.valid && !ti.buildDir.isEmpty())
- return tr("Deploy %1 to Symbian device").arg(QFileInfo(ti.buildDir).completeBaseName());
- }
- return tr("Deploy to Symbian device");
-}
-
-bool S60DeployConfiguration::fromMap(const QVariantMap &map)
-{
- if (!DeployConfiguration::fromMap(map))
- return false;
- m_installationDrive = map.value(QLatin1String(INSTALLATION_DRIVE_LETTER_KEY), QChar(QLatin1Char('C')))
- .toChar().toAscii();
- m_silentInstall = map.value(QLatin1String(SILENT_INSTALL_KEY), QVariant(true)).toBool();
-
- setDefaultDisplayName(defaultDisplayName());
- return true;
-}
-
-char S60DeployConfiguration::installationDrive() const
-{
- return m_installationDrive;
-}
-
-void S60DeployConfiguration::setInstallationDrive(char drive)
-{
- if (m_installationDrive == drive)
- return;
- m_installationDrive = drive;
- emit installationDriveChanged();
-}
-
-bool S60DeployConfiguration::silentInstall() const
-{
- return m_silentInstall;
-}
-
-void S60DeployConfiguration::setSilentInstall(bool silent)
-{
- m_silentInstall = silent;
-}
-
-void S60DeployConfiguration::setAvailableDeviceDrives(QList<DeviceDrive> drives)
-{
- m_availableDeviceDrives = drives;
- emit availableDeviceDrivesChanged();
-}
-
-const QList<S60DeployConfiguration::DeviceDrive> &S60DeployConfiguration::availableDeviceDrives() const
-{
- return m_availableDeviceDrives;
-}
-
-// ======== S60DeployConfigurationFactory
-
-S60DeployConfigurationFactory::S60DeployConfigurationFactory(QObject *parent) :
- DeployConfigurationFactory(parent)
-{ setObjectName(QLatin1String("S60DeployConfiguration")); }
-
-S60DeployConfigurationFactory::~S60DeployConfigurationFactory()
-{
-}
-
-QList<Core::Id> S60DeployConfigurationFactory::availableCreationIds(Target *parent) const
-{
- QList<Core::Id> result;
- Qt4Project *project = qobject_cast<Qt4Project *>(parent->project());
-
- if (!project)
- return result;
-
- ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceProfileInformation::device(parent->profile());
- if (dev.isNull() || dev->type() != SymbianIDeviceFactory::deviceType())
- return result;
-
- QStringList proFiles = project->applicationProFilePathes(QLatin1String(S60_DC_PREFIX));
- foreach (const QString &pf, proFiles)
- result << Core::Id(pf.toUtf8().constData());
- return result;
-}
-
-QString S60DeployConfigurationFactory::displayNameForId(const Core::Id id) const
-{
- if (!pathFromId(id).isEmpty())
- return tr("%1 on Symbian Device").arg(QFileInfo(pathFromId(id)).completeBaseName());
- return QString();
-}
-
-DeployConfiguration *S60DeployConfigurationFactory::create(Target *parent, const Core::Id id)
-{
- if (!canCreate(parent, id))
- return 0;
-
- S60DeployConfiguration *dc = new S60DeployConfiguration(parent);
-
- dc->setDefaultDisplayName(tr("Deploy to Symbian device"));
- dc->stepList()->insertStep(0, new S60CreatePackageStep(dc->stepList()));
- dc->stepList()->insertStep(1, new S60DeployStep(dc->stepList()));
- return dc;
-}
-
-bool S60DeployConfigurationFactory::canCreate(Target *parent, const Core::Id id) const
-{
- Qt4Project *project = qobject_cast<Qt4Project *>(parent->project());
- if (!project)
- return false;
- ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceProfileInformation::device(parent->profile());
- if (dev.isNull() || dev->type() != SymbianIDeviceFactory::deviceType())
- return false;
- return id == S60_DEPLOYCONFIGURATION_ID;
-}
-
-bool S60DeployConfigurationFactory::canRestore(Target *parent, const QVariantMap& map) const
-{
- return canCreate(parent, idFromMap(map));
-}
-
-DeployConfiguration *S60DeployConfigurationFactory::restore(Target *parent, const QVariantMap &map)
-{
- if (!canRestore(parent, map))
- return 0;
- S60DeployConfiguration *dc = new S60DeployConfiguration(parent);
- if (dc->fromMap(map))
- return dc;
-
- delete dc;
- return 0;
-}
-
-bool S60DeployConfigurationFactory::canClone(Target *parent, DeployConfiguration *source) const
-{
- if (!qobject_cast<Qt4Project *>(parent->project()))
- return false;
- return source->id() == S60_DEPLOYCONFIGURATION_ID;
-}
-
-DeployConfiguration *S60DeployConfigurationFactory::clone(Target *parent, DeployConfiguration *source)
-{
- if (!canClone(parent, source))
- return 0;
- S60DeployConfiguration *old = static_cast<S60DeployConfiguration *>(source);
- return new S60DeployConfiguration(parent, old);
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h
deleted file mode 100644
index 9b3b1d2f99..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60DEPLOYCONFIGURATION_H
-#define S60DEPLOYCONFIGURATION_H
-
-#include "symbianidevice.h"
-
-#include <projectexplorer/deployconfiguration.h>
-#include <qt4projectmanager/qt4projectmanager_global.h>
-
-namespace ProjectExplorer {
-class BuildConfiguration;
-class RunConfiguration;
-class ToolChain;
-}
-
-namespace QtSupport {
-class BaseQtVersion;
-}
-
-namespace Qt4ProjectManager {
-class Qt4ProFileNode;
-class S60DeployConfigurationFactory;
-
-namespace Internal {
-class Qt4SymbianTarget;
-
-const char S60_DEPLOYCONFIGURATION_ID[] = "Qt4ProjectManager.S60DeployConfiguration";
-}
-
-class QT4PROJECTMANAGER_EXPORT S60DeployConfiguration : public ProjectExplorer::DeployConfiguration
-{
- Q_OBJECT
- friend class S60DeployConfigurationFactory;
-
-public:
- typedef QPair<char, int> DeviceDrive;
-
- explicit S60DeployConfiguration(ProjectExplorer::Target *parent);
- virtual ~S60DeployConfiguration();
-
- ProjectExplorer::DeployConfigurationWidget *configurationWidget() const;
-
- char installationDrive() const;
- void setInstallationDrive(char drive);
-
- bool silentInstall() const;
- void setSilentInstall(bool silent);
-
- void setAvailableDeviceDrives(QList<DeviceDrive> drives);
- const QList<DeviceDrive> &availableDeviceDrives() const;
-
- QStringList signedPackages() const;
- QStringList packageFileNamesWithTargetInfo() const;
- QStringList packageTemplateFileNames() const;
- QStringList appPackageTemplateFileNames() const;
-
- bool runSmartInstaller() const;
- SymbianIDevice::ConstPtr device() const;
-
- QVariantMap toMap() const;
-
-signals:
- void deviceChanged();
- void targetInformationChanged();
- void availableDeviceDrivesChanged();
- void installationDriveChanged();
-
-private slots:
- void slotTargetInformationChanged(Qt4ProjectManager::Qt4ProFileNode*,bool success, bool parseInProgress);
- void updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration *buildConfiguration);
- void updateActiveRunConfiguration(ProjectExplorer::RunConfiguration *runConfiguration);
-
-protected:
- S60DeployConfiguration(ProjectExplorer::Target *parent, S60DeployConfiguration *source);
- virtual bool fromMap(const QVariantMap &map);
- QString defaultDisplayName() const;
-
-private:
- void ctor();
- bool isSigned() const;
- QString symbianTarget() const;
- QString createPackageName(const QString &baseName) const;
- bool isDebug() const;
- bool isStaticLibrary(const Qt4ProFileNode &projectNode) const;
- bool isApplication(const Qt4ProFileNode &projectNode) const;
- bool hasSisPackage(const Qt4ProFileNode &projectNode) const;
-
-private:
- ProjectExplorer::BuildConfiguration *m_activeBuildConfiguration;
- Core::Id m_deviceId;
-
- char m_installationDrive;
- bool m_silentInstall;
- QList<DeviceDrive> m_availableDeviceDrives;
-};
-
-class S60DeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory
-{
- Q_OBJECT
-
-public:
- explicit S60DeployConfigurationFactory(QObject *parent = 0);
- ~S60DeployConfigurationFactory();
-
- bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
- ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const 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);
-
- QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
- // used to translate the ids to names to display to the user
- QString displayNameForId(const Core::Id id) const;
-};
-
-} // namespace Qt4ProjectManager
-
-#endif // S60DEPLOYCONFIGURATION_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp
deleted file mode 100644
index 7f5c213949..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60deployconfigurationwidget.h"
-#include "s60deployconfiguration.h"
-#include "s60devicerunconfiguration.h"
-#include "symbianidevice.h"
-
-#include <symbianutils/symbiandevicemanager.h>
-#include <codadevice.h>
-
-#include <coreplugin/helpmanager.h>
-
-#include "codaruncontrol.h"
-
-#include <utils/detailswidget.h>
-#include <utils/ipaddresslineedit.h>
-#include <utils/qtcassert.h>
-#include <utils/pathchooser.h>
-
-#include <QDir>
-#include <QTimer>
-#include <QLabel>
-#include <QLineEdit>
-#include <QComboBox>
-#include <QVBoxLayout>
-#include <QHBoxLayout>
-#include <QFormLayout>
-#include <QToolButton>
-#include <QStyle>
-#include <QApplication>
-#include <QSpacerItem>
-#include <QMessageBox>
-#include <QCheckBox>
-#include <QGroupBox>
-#include <QRadioButton>
-#include <QValidator>
-
-#include <QTcpSocket>
-
-Q_DECLARE_METATYPE(SymbianUtils::SymbianDevice)
-
-static const char STARTING_DRIVE_LETTER = 'C';
-static const char LAST_DRIVE_LETTER = 'Z';
-
-static QString formatDriveText(const Qt4ProjectManager::S60DeployConfiguration::DeviceDrive &drive)
-{
- const QChar driveLetter = QChar(QLatin1Char(drive.first)).toUpper();
- if (drive.second <= 0)
- return driveLetter + QLatin1Char(':');
- if (drive.second >= 1024)
- return QString::fromLatin1("%1:%2 MB").arg(driveLetter).arg(drive.second);
- return QString::fromLatin1("%1:%2 kB").arg(driveLetter).arg(drive.second);
-}
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-
-S60DeployConfigurationWidget::S60DeployConfigurationWidget(QWidget *parent)
- : ProjectExplorer::DeployConfigurationWidget(parent),
- m_detailsWidget(new Utils::DetailsWidget),
- m_sisFileLabel(new QLabel),
- m_deviceInfoButton(new QToolButton),
- m_installationDriveCombo(new QComboBox()),
- m_silentInstallCheckBox(new QCheckBox(tr("Silent installation")))
-{
-}
-
-S60DeployConfigurationWidget::~S60DeployConfigurationWidget()
-{
-}
-
-void S60DeployConfigurationWidget::init(ProjectExplorer::DeployConfiguration *dc)
-{
- m_deployConfiguration = qobject_cast<S60DeployConfiguration *>(dc);
-
- m_detailsWidget->setState(Utils::DetailsWidget::NoSummary);
-
- QVBoxLayout *mainBoxLayout = new QVBoxLayout();
- mainBoxLayout->setMargin(0);
- setLayout(mainBoxLayout);
- mainBoxLayout->addWidget(m_detailsWidget);
- QWidget *detailsContainer = new QWidget;
- m_detailsWidget->setWidget(detailsContainer);
-
- QVBoxLayout *detailsBoxLayout = new QVBoxLayout();
- detailsBoxLayout->setMargin(0);
- detailsContainer->setLayout(detailsBoxLayout);
-
- QFormLayout *formLayout = new QFormLayout();
- formLayout->setMargin(0);
- detailsBoxLayout->addLayout(formLayout);
- formLayout->addRow(tr("Installation file:"), m_sisFileLabel);
-
- // Installation Drive control
- updateInstallationDrives();
-
- QHBoxLayout *installationBoxLayout = new QHBoxLayout();
- m_installationDriveCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents);
- connect(m_installationDriveCombo, SIGNAL(activated(int)), this, SLOT(setInstallationDrive(int)));
- QHBoxLayout *installationDriveHBoxLayout = new QHBoxLayout;
- installationDriveHBoxLayout->addWidget(m_installationDriveCombo);
- installationBoxLayout->addLayout(installationDriveHBoxLayout);
-
- // Non-silent installs are a fallback if one wants to override missing dependencies.
- m_silentInstallCheckBox->setChecked(m_deployConfiguration->silentInstall());
- m_silentInstallCheckBox->setToolTip(tr("Silent installation is an installation mode "
- "that does not require user's intervention. "
- "In case it fails the non silent installation is launched."));
- connect(m_silentInstallCheckBox, SIGNAL(stateChanged(int)), this, SLOT(silentInstallChanged(int)));
- installationBoxLayout->addWidget(m_silentInstallCheckBox);
- installationBoxLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored));
- formLayout->addRow(tr("Installation drive:"), installationBoxLayout);
-
- updateTargetInformation();
- connect(m_deployConfiguration, SIGNAL(targetInformationChanged()),
- this, SLOT(updateTargetInformation()));
- connect(m_deployConfiguration, SIGNAL(availableDeviceDrivesChanged()),
- this, SLOT(updateInstallationDrives()));
-}
-
-void S60DeployConfigurationWidget::updateInstallationDrives()
-{
- m_installationDriveCombo->clear();
- const QList<S60DeployConfiguration::DeviceDrive> &availableDrives(m_deployConfiguration->availableDeviceDrives());
- int index = 0;
- char currentDrive = QChar::toUpper(static_cast<ushort>(m_deployConfiguration->installationDrive()));
- if (availableDrives.isEmpty()) {
- for (int i = STARTING_DRIVE_LETTER; i <= LAST_DRIVE_LETTER; ++i) {
- const QChar qc = QLatin1Char(static_cast<char>(i));
- m_installationDriveCombo->addItem(qc + QLatin1Char(':'), QVariant(qc));
- }
- index = currentDrive - STARTING_DRIVE_LETTER;
- } else {
- for (int i = 0; i < availableDrives.count(); ++i) {
- const S60DeployConfiguration::DeviceDrive& drive(availableDrives.at(i));
- char driveLetter = QChar::toUpper(static_cast<ushort>(drive.first));
- m_installationDriveCombo->addItem(formatDriveText(drive),
- QVariant(QChar(QLatin1Char(driveLetter))));
- if (currentDrive == driveLetter)
- index = i;
- }
- }
- QTC_ASSERT(index >= 0 && index <= m_installationDriveCombo->count(), return);
-
- m_installationDriveCombo->setCurrentIndex(index);
- setInstallationDrive(index);
-}
-
-void S60DeployConfigurationWidget::silentInstallChanged(int state)
-{
- m_deployConfiguration->setSilentInstall(state == Qt::Checked);
-}
-
-void S60DeployConfigurationWidget::updateTargetInformation()
-{
- QString package;
- for (int i = 0; i < m_deployConfiguration->signedPackages().count(); ++i)
- package += m_deployConfiguration->signedPackages()[i] + QLatin1String("\n");
- if (!package.isEmpty())
- package.remove(package.length()-1, 1);
- m_sisFileLabel->setText(QDir::toNativeSeparators(package));
-}
-
-void S60DeployConfigurationWidget::setInstallationDrive(int index)
-{
- QTC_ASSERT(index >= 0, return);
- QTC_ASSERT(index < m_installationDriveCombo->count(), return);
-
- QChar driveLetter(m_installationDriveCombo->itemData(index).toChar());
- m_deployConfiguration->setInstallationDrive(driveLetter.toAscii());
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h b/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h
deleted file mode 100644
index 46d0336bb8..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfigurationwidget.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60DEPLOYCONFIGURATIONWIDGET_H
-#define S60DEPLOYCONFIGURATIONWIDGET_H
-
-#include <projectexplorer/deployconfiguration.h>
-
-#include <QWidget>
-#include <QPointer>
-
-QT_BEGIN_NAMESPACE
-class QLabel;
-class QLineEdit;
-class QComboBox;
-class QToolButton;
-class QCheckBox;
-class QRadioButton;
-QT_END_NAMESPACE
-
-namespace Utils {
- class DetailsWidget;
- class IpAddressLineEdit;
-}
-
-namespace SymbianUtils {
-class SymbianDevice;
-}
-
-namespace Coda {
- class CodaDevice;
- class CodaEvent;
- struct CodaCommandResult;
-}
-
-namespace Qt4ProjectManager {
-
-class S60DeployConfiguration;
-
-namespace Internal {
-
-/* Configuration widget for S60 devices on serial ports that are
- * provided by the SerialDeviceLister class. Has an info/test
- * button connecting to the device and showing info. */
-class S60DeployConfigurationWidget : public ProjectExplorer::DeployConfigurationWidget
-{
- Q_OBJECT
-public:
- explicit S60DeployConfigurationWidget(QWidget *parent = 0);
- ~S60DeployConfigurationWidget();
-
- void init(ProjectExplorer::DeployConfiguration *dc);
-
-private slots:
- void updateTargetInformation();
- void updateInstallationDrives();
- void setInstallationDrive(int index);
- void silentInstallChanged(int);
-
-private:
- void setDeviceInfoLabel(const QString &message, bool isError = false);
-
- S60DeployConfiguration *m_deployConfiguration;
- Utils::DetailsWidget *m_detailsWidget;
- QLabel *m_sisFileLabel;
- QToolButton *m_deviceInfoButton;
- QComboBox *m_installationDriveCombo;
- QCheckBox *m_silentInstallCheckBox;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60DEPLOYCONFIGURATIONWIDGET_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
deleted file mode 100644
index 00b24f3a9b..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
+++ /dev/null
@@ -1,745 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60deploystep.h"
-
-#include "qt4buildconfiguration.h"
-#include "qt4project.h"
-#include "s60deployconfiguration.h"
-#include "s60devicerunconfiguration.h"
-#include "symbianidevice.h"
-#include "symbianidevicefactory.h"
-#include "codadevice.h"
-#include "codaruncontrol.h"
-
-#include <coreplugin/icore.h>
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <qt4projectmanagerconstants.h>
-
-#include <symbianutils/symbiandevicemanager.h>
-#include <utils/qtcassert.h>
-
-#include <QMessageBox>
-
-#include <QTimer>
-#include <QDateTime>
-#include <QDir>
-#include <QEventLoop>
-#include <QFile>
-#include <QFileInfo>
-
-#include <QTcpSocket>
-
-using namespace ProjectExplorer;
-using namespace Qt4ProjectManager::Internal;
-
-enum { debug = 0 };
-
-static const quint64 DEFAULT_CHUNK_SIZE = 40000;
-
-namespace {
-const char * const S60_DEPLOY_STEP_ID = "Qt4ProjectManager.S60DeployStep";
-}
-
-static inline bool ensureDeleteFile(const QString &fileName, QString *errorMessage)
-{
- QFile file(fileName);
- if (file.exists() && !file.remove()) {
- *errorMessage = S60DeployStep::tr("Unable to remove existing file '%1': %2").arg(fileName, file.errorString());
- return false;
- }
- return true;
-}
-
-static inline bool renameFile(const QString &sourceName, const QString &targetName,
- QString *errorMessage)
-{
- if (sourceName == targetName)
- return true;
- if (!ensureDeleteFile(targetName, errorMessage))
- return false;
- QFile source(sourceName);
- if (!source.rename(targetName)) {
- *errorMessage = S60DeployStep::tr("Unable to rename file '%1' to '%2': %3")
- .arg(sourceName, targetName, source.errorString());
- return false;
- }
- return true;
-}
-
-// #pragma mark -- S60DeployStep
-
-S60DeployStep::S60DeployStep(ProjectExplorer::BuildStepList *bc,
- S60DeployStep *bs):
- BuildStep(bc, bs), m_timer(0),
- m_timeoutTimer(new QTimer(this)),
- m_eventLoop(0),
- m_state(StateUninit),
- m_putWriteOk(false),
- m_putLastChunkSize(0),
- m_putChunkSize(DEFAULT_CHUNK_SIZE),
- m_currentFileIndex(0),
- m_channel(bs->m_channel),
- m_deployCanceled(false),
- m_copyProgress(0)
-{
- ctor();
-}
-
-S60DeployStep::S60DeployStep(ProjectExplorer::BuildStepList *bc):
- BuildStep(bc, Core::Id(S60_DEPLOY_STEP_ID)), m_timer(0),
- m_timeoutTimer(new QTimer(this)),
- m_eventLoop(0),
- m_state(StateUninit),
- m_putWriteOk(false),
- m_putLastChunkSize(0),
- m_putChunkSize(DEFAULT_CHUNK_SIZE),
- m_currentFileIndex(0),
- m_channel(SymbianIDevice::CommunicationCodaSerialConnection),
- m_deployCanceled(false),
- m_copyProgress(0)
-{
- ctor();
-}
-
-void S60DeployStep::ctor()
-{
- //: Qt4 Deploystep display name
- setDefaultDisplayName(tr("Deploy SIS Package"));
- m_timeoutTimer->setSingleShot(true);
- m_timeoutTimer->setInterval(10000);
- connect(m_timeoutTimer, SIGNAL(timeout()), this, SLOT(timeout()));
-}
-
-S60DeployStep::~S60DeployStep()
-{
- delete m_timer;
- delete m_eventLoop;
-}
-
-
-bool S60DeployStep::init()
-{
- Qt4BuildConfiguration *bc = static_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
- S60DeployConfiguration *deployConfiguration = static_cast<S60DeployConfiguration *>(bc->target()->activeDeployConfiguration());
- if (!deployConfiguration)
- return false;
-
- SymbianIDevice::ConstPtr dev = deployConfiguration->device();
- m_serialPortName = dev->serialPortName();
- m_serialPortFriendlyName = SymbianUtils::SymbianDeviceManager::instance()->friendlyNameForPort(m_serialPortName);
- m_packageFileNamesWithTarget = deployConfiguration->packageFileNamesWithTargetInfo();
- m_signedPackages = deployConfiguration->signedPackages();
- m_installationDrive = deployConfiguration->installationDrive();
- m_silentInstall = deployConfiguration->silentInstall();
- m_channel = dev->communicationChannel();
-
- if (m_signedPackages.isEmpty()) {
- appendMessage(tr("No package has been found. Specify at least one installation package."), true);
- return false;
- }
-
- if (m_channel == SymbianIDevice::CommunicationCodaTcpConnection) {
- m_address = dev->address();
- m_port = dev->port().toInt();
- }
- return true;
-}
-
-QVariantMap S60DeployStep::toMap() const
-{
- return BuildStep::toMap();
-}
-
-bool S60DeployStep::fromMap(const QVariantMap &map)
-{
- return BuildStep::fromMap(map);
-}
-
-void S60DeployStep::appendMessage(const QString &error, bool isError)
-{
- emit addOutput(error, isError?ProjectExplorer::BuildStep::ErrorMessageOutput:
- ProjectExplorer::BuildStep::MessageOutput);
-}
-
-void S60DeployStep::reportError(const QString &error)
-{
- emit addOutput(error, ProjectExplorer::BuildStep::ErrorMessageOutput);
- emit addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error,
- error,
- Utils::FileName(), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
- emit s60DeploymentFinished(false);
-}
-
-bool S60DeployStep::processPackageName(QString &errorMessage)
-{
- for (int i = 0; i < m_signedPackages.count(); ++i) {
- QFileInfo packageInfo(m_signedPackages.at(i));
- // support for 4.6.1 and pre, where make sis creates 'targetname_armX_udeb.sis' instead of 'targetname.sis'
- QFileInfo packageWithTargetInfo(m_packageFileNamesWithTarget.at(i));
- // does the 4.6.1 version exist?
- if (packageWithTargetInfo.exists() && packageWithTargetInfo.isFile()) {
- // is the 4.6.1 version newer? (to guard against behavior change Qt Creator 1.3 --> 2.0)
- if (!packageInfo.exists() || packageInfo.lastModified() < packageWithTargetInfo.lastModified()) { //TODO change the QtCore
- // the 'targetname_armX_udeb.sis' crap exists and is new, rename it
- appendMessage(tr("Renaming new package '%1' to '%2'")
- .arg(QDir::toNativeSeparators(m_packageFileNamesWithTarget.at(i)),
- QDir::toNativeSeparators(m_signedPackages.at(i))), false);
- return renameFile(m_packageFileNamesWithTarget.at(i), m_signedPackages.at(i), &errorMessage);
- } else {
- // the 'targetname_armX_udeb.sis' crap exists but is old, remove it
- appendMessage(tr("Removing old package '%1'")
- .arg(QDir::toNativeSeparators(m_packageFileNamesWithTarget.at(i))),
- false);
- ensureDeleteFile(m_packageFileNamesWithTarget.at(i), &errorMessage);
- }
- }
- if (!packageInfo.exists() || !packageInfo.isFile()) {
- errorMessage = tr("'%1': Package file not found").arg(m_signedPackages.at(i));
- return false;
- }
- }
- return true;
-}
-
-void S60DeployStep::start()
-{
- QString errorMessage;
-
- bool serialConnection = m_channel == SymbianIDevice::CommunicationCodaSerialConnection;
-
- if (serialConnection && m_serialPortName.isEmpty()) {
- errorMessage = tr("No device is connected. Connect a device and try again.");
- reportError(errorMessage);
- return;
- }
- QTC_ASSERT(!m_codaDevice.data(), return);
- if (m_address.isEmpty() && !serialConnection) {
- errorMessage = tr("No address for a device has been defined. Define an address and try again.");
- reportError(errorMessage);
- return;
- }
-
- // make sure we have the right name of the sis package
- if (processPackageName(errorMessage))
- startDeployment();
- else {
- errorMessage = tr("Failed to find package %1").arg(errorMessage);
- reportError(errorMessage);
- stop();
- }
-}
-
-void S60DeployStep::stop()
-{
- if (m_codaDevice) {
- switch (state()) {
- case StateSendingData:
- closeFiles();
- break;
- default:
- break; //should also stop the package installation, but CODA does not support it yet
- }
- disconnect(m_codaDevice.data(), 0, this, 0);
- SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaDevice);
- }
- setState(StateUninit);
- emit s60DeploymentFinished(false);
-}
-
-void S60DeployStep::setupConnections()
-{
- if (m_channel == SymbianIDevice::CommunicationCodaSerialConnection)
- connect(SymbianUtils::SymbianDeviceManager::instance(), SIGNAL(deviceRemoved(SymbianUtils::SymbianDevice)),
- this, SLOT(deviceRemoved(SymbianUtils::SymbianDevice)));
-
- connect(m_codaDevice.data(), SIGNAL(error(QString)), this, SLOT(slotError(QString)));
- connect(m_codaDevice.data(), SIGNAL(logMessage(QString)), this, SLOT(slotCodaLogMessage(QString)));
- connect(m_codaDevice.data(), SIGNAL(codaEvent(Coda::CodaEvent)), this, SLOT(slotCodaEvent(Coda::CodaEvent)), Qt::DirectConnection);
- connect(m_codaDevice.data(), SIGNAL(serialPong(QString)), this, SLOT(slotSerialPong(QString)));
- connect(this, SIGNAL(manualInstallation()), this, SLOT(showManualInstallationInfo()));
-}
-
-void S60DeployStep::startDeployment()
-{
- QTC_ASSERT(!m_codaDevice.data(), return);
-
- // We need to defer setupConnections() in the case of CommunicationCodaSerialConnection
- //setupConnections();
-
- if (m_channel == SymbianIDevice::CommunicationCodaSerialConnection) {
- appendMessage(tr("Deploying application to '%1'...").arg(m_serialPortFriendlyName), false);
- m_codaDevice = SymbianUtils::SymbianDeviceManager::instance()->getCodaDevice(m_serialPortName);
- bool ok = m_codaDevice && m_codaDevice->device()->isOpen();
- if (!ok) {
- QString deviceError = tr("No such port");
- if (m_codaDevice)
- deviceError = m_codaDevice->device()->errorString();
- reportError(tr("Could not open serial device: %1").arg(deviceError));
- stop();
- return;
- }
- setupConnections();
- setState(StateConnecting);
- m_codaDevice->sendSerialPing(false);
- } else {
- m_codaDevice = QSharedPointer<Coda::CodaDevice>(new Coda::CodaDevice);
- setupConnections();
- const QSharedPointer<QTcpSocket> codaSocket(new QTcpSocket);
- m_codaDevice->setDevice(codaSocket);
- codaSocket->connectToHost(m_address, m_port);
- setState(StateConnecting);
- appendMessage(tr("Connecting to %1:%2...").arg(m_address).arg(m_port), false);
- }
- QTimer::singleShot(4000, this, SLOT(checkForTimeout()));
-}
-
-void S60DeployStep::run(QFutureInterface<bool> &fi)
-{
- m_futureInterface = &fi;
- m_deployResult = true;
- m_deployCanceled = false;
- disconnect(this);
-
- m_futureInterface->setProgressRange(0, 100*m_signedPackages.count());
-
- connect(this, SIGNAL(s60DeploymentFinished(bool)), this, SLOT(deploymentFinished(bool)));
- connect(this, SIGNAL(finishNow(bool)), this, SLOT(deploymentFinished(bool)), Qt::DirectConnection);
- connect(this, SIGNAL(allFilesSent()), this, SLOT(startInstalling()), Qt::DirectConnection);
- connect(this, SIGNAL(allFilesInstalled()), this, SIGNAL(s60DeploymentFinished()), Qt::DirectConnection);
- connect(this, SIGNAL(copyProgressChanged(int)), this, SLOT(updateProgress(int)));
-
- start();
- m_timer = new QTimer();
- connect(m_timer, SIGNAL(timeout()), this, SLOT(checkForCancel()), Qt::DirectConnection);
- m_timer->start(500);
- m_eventLoop = new QEventLoop();
- m_eventLoop->exec();
- m_timer->stop();
- delete m_timer;
- m_timer = 0;
-
- if (m_codaDevice) {
- disconnect(m_codaDevice.data(), 0, this, 0);
- SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaDevice);
- }
-
- delete m_eventLoop;
- m_eventLoop = 0;
- fi.reportResult(m_deployResult);
- m_futureInterface = 0;
-}
-
-void S60DeployStep::slotWaitingForCodaClosed(int result)
-{
- if (result == QMessageBox::Cancel)
- m_deployCanceled = true;
-}
-
-void S60DeployStep::slotError(const QString &error)
-{
- reportError(tr("Error: %1").arg(error));
-}
-
-void S60DeployStep::slotCodaLogMessage(const QString &log)
-{
- if (debug > 1)
- qDebug() << "CODA log:" << log;
-}
-
-void S60DeployStep::slotSerialPong(const QString &message)
-{
- if (debug)
- qDebug() << "CODA serial pong:" << message;
- handleConnected();
-}
-
-void S60DeployStep::slotCodaEvent(const Coda::CodaEvent &event)
-{
- if (debug)
- qDebug() << "CODA event:" << "Type:" << event.type() << "Message:" << event.toString();
-
- switch (event.type()) {
- case Coda::CodaEvent::LocatorHello:
- handleConnected();
- break;
- default:
- if (debug)
- qDebug() << "Unhandled event:" << "Type:" << event.type() << "Message:" << event.toString();
- break;
- }
-}
-
-void S60DeployStep::handleConnected()
-{
- if (state() >= StateConnected)
- return;
- setState(StateConnected);
- emit codaConnected();
- startTransferring();
-}
-
-void S60DeployStep::initFileSending()
-{
- QTC_ASSERT(m_currentFileIndex < m_signedPackages.count(), return);
- QTC_ASSERT(m_currentFileIndex >= 0, return);
- QTC_ASSERT(m_codaDevice, return);
-
- const unsigned flags =
- Coda::CodaDevice::FileSystem_TCF_O_WRITE
- |Coda::CodaDevice::FileSystem_TCF_O_CREAT
- |Coda::CodaDevice::FileSystem_TCF_O_TRUNC;
- m_putWriteOk = false;
-
- QString packageName(QFileInfo(m_signedPackages.at(m_currentFileIndex)).fileName());
- QString remoteFileLocation = QString::fromLatin1("%1:\\Data\\%2").arg(m_installationDrive).arg(packageName);
- m_codaDevice->sendFileSystemOpenCommand(Coda::CodaCallback(this, &S60DeployStep::handleFileSystemOpen),
- remoteFileLocation.toAscii(), flags);
- appendMessage(tr("Copying \"%1\"...").arg(packageName), false);
- m_timeoutTimer->start();
-}
-
-void S60DeployStep::initFileInstallation()
-{
- QTC_ASSERT(m_currentFileIndex < m_signedPackages.count(), return);
- QTC_ASSERT(m_currentFileIndex >= 0, return);
-
- if (!m_codaDevice)
- return;
-
- QString packageName(QFileInfo(m_signedPackages.at(m_currentFileIndex)).fileName());
- QString remoteFileLocation = QString::fromLatin1("%1:\\Data\\%2").arg(m_installationDrive).arg(packageName);
- if (m_silentInstall) {
- m_codaDevice->sendSymbianInstallSilentInstallCommand(Coda::CodaCallback(this, &S60DeployStep::handleSymbianInstall),
- remoteFileLocation.toAscii(), QString::fromLatin1("%1:").arg(m_installationDrive).toAscii());
- appendMessage(tr("Installing package \"%1\" on drive %2:...").arg(packageName).arg(m_installationDrive), false);
- } else {
- m_codaDevice->sendSymbianInstallUIInstallCommand(Coda::CodaCallback(this, &S60DeployStep::handleSymbianInstall),
- remoteFileLocation.toAscii());
- appendMessage(tr("Continue the installation on your device."), false);
- emit manualInstallation();
- }
-}
-
-void S60DeployStep::startTransferring()
-{
- m_currentFileIndex = 0;
- initFileSending();
- setState(StateSendingData);
-}
-
-void S60DeployStep::startInstalling()
-{
- m_currentFileIndex = 0;
- initFileInstallation();
- setState(StateInstalling);
-}
-
-void S60DeployStep::handleFileSystemOpen(const Coda::CodaCommandResult &result)
-{
- if (result.type != Coda::CodaCommandResult::SuccessReply) {
- reportError(tr("Could not open remote file: %1").arg(result.errorString()));
- return;
- }
-
- if (result.values.size() < 1 || result.values.at(0).data().isEmpty()) {
- reportError(tr("Internal error: No filehandle obtained"));
- return;
- }
-
- m_remoteFileHandle = result.values.at(0).data();
-
- const QString fileName = m_signedPackages.at(m_currentFileIndex);
- m_putFile.reset(new QFile(fileName));
- if (!m_putFile->open(QIODevice::ReadOnly)) { // Should not fail, was checked before
- reportError(tr("Could not open local file %1: %2").arg(fileName, m_putFile->errorString()));
- return;
- }
- putSendNextChunk();
-}
-
-void S60DeployStep::handleSymbianInstall(const Coda::CodaCommandResult &result)
-{
- if (result.type == Coda::CodaCommandResult::SuccessReply) {
- appendMessage(tr("Installation has finished"), false);
- if (++m_currentFileIndex >= m_signedPackages.count()) {
- setState(StateFinished);
- emit allFilesInstalled();
- } else
- initFileInstallation();
- } else {
- reportError(tr("Installation failed: %1; "
- "see %2 for descriptions of the error codes")
- .arg(result.errorString(),
- QLatin1String("http://www.developer.nokia.com/Community/Wiki/Symbian_OS_Error_Codes")));
- }
-}
-
-void S60DeployStep::putSendNextChunk()
-{
- if (!m_codaDevice)
- return;
- QTC_ASSERT(m_putFile, return);
-
- // Read and send off next chunk
- const quint64 pos = m_putFile->pos();
- const QByteArray data = m_putFile->read(m_putChunkSize);
- const quint64 size = m_putFile->size();
- if (data.isEmpty()) {
- m_putWriteOk = true;
- closeFiles();
- setCopyProgress(100);
- } else {
- m_putLastChunkSize = data.size();
- if (debug > 1)
- qDebug("Writing %llu bytes to remote file '%s' at %llu\n",
- m_putLastChunkSize,
- m_remoteFileHandle.constData(), pos);
- m_codaDevice->sendFileSystemWriteCommand(Coda::CodaCallback(this, &S60DeployStep::handleFileSystemWrite),
- m_remoteFileHandle, data, unsigned(pos));
- setCopyProgress((100*(m_putLastChunkSize+pos))/size);
- m_timeoutTimer->start();
- }
-}
-
-void S60DeployStep::closeFiles()
-{
- m_putFile.reset();
- QTC_ASSERT(m_codaDevice, return);
-
- emit addOutput(QLatin1String("\n"), ProjectExplorer::BuildStep::MessageOutput);
- m_codaDevice->sendFileSystemCloseCommand(Coda::CodaCallback(this, &S60DeployStep::handleFileSystemClose),
- m_remoteFileHandle);
-}
-
-void S60DeployStep::handleFileSystemWrite(const Coda::CodaCommandResult &result)
-{
- m_timeoutTimer->stop();
- // Close remote file even if copy fails
- m_putWriteOk = result;
- if (!m_putWriteOk) {
- QString packageName(QFileInfo(m_signedPackages.at(m_currentFileIndex)).fileName());
- reportError(tr("Could not write to file %1 on device: %2").arg(packageName).arg(result.errorString()));
- }
-
- if (!m_putWriteOk || m_putLastChunkSize < m_putChunkSize) {
- closeFiles();
- } else {
- putSendNextChunk();
- }
-}
-
-void S60DeployStep::handleFileSystemClose(const Coda::CodaCommandResult &result)
-{
- if (result.type == Coda::CodaCommandResult::SuccessReply) {
- if (debug)
- qDebug("File closed.\n");
- if (++m_currentFileIndex >= m_signedPackages.count())
- emit allFilesSent();
- else
- initFileSending();
- } else {
- reportError(tr("Failed to close the remote file: %1").arg(result.toString()));
- }
-}
-
-void S60DeployStep::checkForTimeout()
-{
- if (state() != StateConnecting)
- return;
- QMessageBox *mb = CodaRunControl::createCodaWaitingMessageBox(Core::ICore::mainWindow());
- connect(this, SIGNAL(codaConnected()), mb, SLOT(close()));
- connect(this, SIGNAL(s60DeploymentFinished()), mb, SLOT(close()));
- connect(this, SIGNAL(finishNow()), mb, SLOT(close()));
- connect(mb, SIGNAL(finished(int)), this, SLOT(slotWaitingForCodaClosed(int)));
- mb->open();
-}
-
-void S60DeployStep::showManualInstallationInfo()
-{
- const QString title = tr("Installation");
- const QString text = tr("Continue the installation on your device.");
- QMessageBox *mb = new QMessageBox(QMessageBox::Information, title, text,
- QMessageBox::Ok, Core::ICore::mainWindow());
- connect(this, SIGNAL(allFilesInstalled()), mb, SLOT(close()));
- connect(this, SIGNAL(s60DeploymentFinished()), mb, SLOT(close()));
- connect(this, SIGNAL(finishNow()), mb, SLOT(close()));
- mb->open();
-}
-
-void S60DeployStep::checkForCancel()
-{
- if ((m_futureInterface->isCanceled() || m_deployCanceled) && m_timer->isActive()) {
- m_timer->stop();
- stop();
- QString canceledText(tr("Deployment has been cancelled."));
- appendMessage(canceledText, true);
- emit addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error,
- canceledText,
- Utils::FileName(), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
- emit finishNow(false);
- }
-}
-
-void S60DeployStep::deploymentFinished(bool success)
-{
- m_deployResult = success;
- if(m_deployResult && m_futureInterface)
- m_futureInterface->setProgressValue(m_futureInterface->progressMaximum());
- if (m_eventLoop)
- m_eventLoop->exit();
-}
-
-void S60DeployStep::deviceRemoved(const SymbianUtils::SymbianDevice &device)
-{
- if (device.portName() == m_serialPortName)
- reportError(tr("The device '%1' has been disconnected").arg(device.friendlyName()));
-}
-
-void S60DeployStep::setCopyProgress(int progress)
-{
- if (progress < 0)
- progress = 0;
- else if (progress > 100)
- progress = 100;
- if (copyProgress() == progress)
- return;
- m_copyProgress = progress;
- emit addOutput(QLatin1String("."), ProjectExplorer::BuildStep::MessageOutput, DontAppendNewline);
- emit copyProgressChanged(m_copyProgress);
-}
-
-int S60DeployStep::copyProgress() const
-{
- return m_copyProgress;
-}
-
-void S60DeployStep::updateProgress(int progress)
-{
- //This would show the percentage on the Compile output
- //appendMessage(tr("Copy percentage: %1%").arg((m_currentFileIndex*100 + progress) /m_signedPackages.count()), false);
- int copyProgress = ((m_currentFileIndex*100 + progress) /m_signedPackages.count());
- int entireProgress = copyProgress * 0.8; //the copy progress is just 80% of the whole deployment progress
- m_futureInterface->setProgressValueAndText(entireProgress, tr("Copy progress: %1%").arg(copyProgress));
-}
-
-void S60DeployStep::timeout()
-{
- reportError(tr("A timeout while deploying has occurred. CODA might not be responding. Try reconnecting the device."));
-}
-
-BuildStepConfigWidget *S60DeployStep::createConfigWidget()
-{
- return new SimpleBuildStepConfigWidget(this);
-}
-
-// #pragma mark -- S60DeployStepFactory
-
-S60DeployStepFactory::S60DeployStepFactory(QObject *parent) :
- ProjectExplorer::IBuildStepFactory(parent)
-{
-}
-
-S60DeployStepFactory::~S60DeployStepFactory()
-{
-}
-
-bool S60DeployStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
-{
- return canHandle(parent) && id == S60_DEPLOY_STEP_ID;
-}
-
-ProjectExplorer::BuildStep *S60DeployStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
-{
- if (!canCreate(parent, id))
- return 0;
- return new S60DeployStep(parent);
-}
-
-bool S60DeployStepFactory::canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const
-{
- if (!canCreate(parent, source->id()))
- return false;
- if (!qobject_cast<S60DeployStep *>(source))
- return false;
- return true;
-}
-
-ProjectExplorer::BuildStep *S60DeployStepFactory::clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source)
-{
- if (!canClone(parent, source))
- return 0;
- return new S60DeployStep(parent, static_cast<S60DeployStep *>(source));
-}
-
-bool S60DeployStepFactory::canHandle(BuildStepList *parent) const
-{
- if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- return false;
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
- if (deviceType != SymbianIDeviceFactory::deviceType())
- return false;
- return qobject_cast<Qt4Project *>(parent->target()->project());
-}
-
-bool S60DeployStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const
-{
- return canCreate(parent, ProjectExplorer::idFromMap(map));
-}
-
-ProjectExplorer::BuildStep *S60DeployStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map)
-{
- if (!canRestore(parent, map))
- return 0;
- S60DeployStep *bs = new S60DeployStep(parent);
- if (bs->fromMap(map))
- return bs;
- delete bs;
- return 0;
-}
-
-QList<Core::Id> S60DeployStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
-{
- if (!canHandle(parent))
- return QList<Core::Id>();
- return QList<Core::Id>() << Core::Id(S60_DEPLOY_STEP_ID);
-}
-
-QString S60DeployStepFactory::displayNameForId(const Core::Id id) const
-{
- if (id == S60_DEPLOY_STEP_ID)
- return tr("Deploy SIS Package");
- return QString();
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h
deleted file mode 100644
index 58e03fe491..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60DeployStep_H
-#define S60DeployStep_H
-
-#include <projectexplorer/buildstep.h>
-
-#include <QString>
-
-QT_FORWARD_DECLARE_CLASS(QEventLoop)
-QT_FORWARD_DECLARE_CLASS(QFile)
-
-namespace SymbianUtils {
-class SymbianDevice;
-}
-
-namespace Coda {
- struct CodaCommandResult;
- class CodaDevice;
- class CodaEvent;
-}
-
-namespace ProjectExplorer {
-class IOutputParser;
-}
-
-namespace Qt4ProjectManager {
-
-class S60DeviceRunConfiguration;
-
-namespace Internal {
-
-class BuildConfiguration;
-struct CommunicationChannel;
-
-class S60DeployStepFactory : public ProjectExplorer::IBuildStepFactory
-{
- Q_OBJECT
-public:
- explicit S60DeployStepFactory(QObject *parent = 0);
- virtual ~S60DeployStepFactory();
-
- // used to show the list of possible additons to a target, returns a list of types
- QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- // used to translate the types to names to display to the user
- QString displayNameForId(const Core::Id id) const;
-
- bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
- // used to recreate the runConfigurations when restoring settings
- 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);
-
- bool canHandle(ProjectExplorer::BuildStepList *parent) const;
-};
-
-class S60DeployStep : public ProjectExplorer::BuildStep
-{
- Q_OBJECT
-public:
- friend class S60DeployStepFactory;
-
- explicit S60DeployStep(ProjectExplorer::BuildStepList *parent);
-
- virtual ~S60DeployStep();
-
- virtual bool init();
- virtual void run(QFutureInterface<bool> &fi);
- virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
-
- virtual QVariantMap toMap() const;
-
-protected:
- virtual bool fromMap(const QVariantMap &map);
-
-protected slots:
- void deviceRemoved(const SymbianUtils::SymbianDevice &);
-
-private slots:
- void checkForCancel();
- void checkForTimeout();
- void timeout();
-
- void slotError(const QString &error);
- void slotCodaLogMessage(const QString &log);
- void slotSerialPong(const QString &message);
- void slotCodaEvent(const Coda::CodaEvent &event);
-
- void startInstalling();
- void startTransferring();
-
- void deploymentFinished(bool success);
- void slotWaitingForCodaClosed(int result);
- void showManualInstallationInfo();
-
- void setCopyProgress(int progress);
-
- void updateProgress(int progress);
-
-signals:
- void s60DeploymentFinished(bool success = true);
- void finishNow(bool success = true);
-
- void allFilesSent();
- void allFilesInstalled();
-
- void codaConnected();
-
- void manualInstallation();
- void copyProgressChanged(int progress);
-
-private:
- S60DeployStep(ProjectExplorer::BuildStepList *parent,
- S60DeployStep *bs);
- void ctor();
-
- void start();
- void stop();
- void startDeployment();
- bool processPackageName(QString &errorMessage);
- void setupConnections();
- void appendMessage(const QString &error, bool isError);
- void reportError(const QString &error);
-
- void handleConnected();
- void handleSymbianInstall(const Coda::CodaCommandResult &result);
- void handleFileSystemOpen(const Coda::CodaCommandResult &result);
- void handleFileSystemWrite(const Coda::CodaCommandResult &result);
- void closeFiles();
- void putSendNextChunk();
- void handleFileSystemClose(const Coda::CodaCommandResult &result);
-
- void initFileSending();
- void initFileInstallation();
- int copyProgress() const;
-
- enum State {
- StateUninit,
- StateConnecting,
- StateConnected,
- StateSendingData,
- StateInstalling,
- StateFinished
- };
-
- inline void setState(State state) { m_state = state; }
- inline State state() { return m_state; }
-
- QString m_serialPortName;
- QString m_serialPortFriendlyName;
- QStringList m_packageFileNamesWithTarget; // Support for 4.6.1
- QStringList m_signedPackages;
- QString m_address;
- unsigned short m_port;
-
- QTimer *m_timer;
- QTimer* m_timeoutTimer;
-
- QFutureInterface<bool> *m_futureInterface; //not owned
-
- QSharedPointer<Coda::CodaDevice> m_codaDevice;
-
- QEventLoop *m_eventLoop;
- bool m_deployResult;
- char m_installationDrive;
- bool m_silentInstall;
-
- State m_state;
- bool m_putWriteOk;
- QScopedPointer<QFile> m_putFile;
- quint64 m_putLastChunkSize;
- QByteArray m_remoteFileHandle;
- quint64 m_putChunkSize;
- int m_currentFileIndex;
- int m_channel;
- volatile bool m_deployCanceled;
- int m_copyProgress;
-};
-
-} // Internal
-} // Qt4ProjectManager
-
-#endif // S60DeployStep_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicedebugruncontrol.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicedebugruncontrol.cpp
deleted file mode 100644
index ebffb5b73a..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicedebugruncontrol.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60devicedebugruncontrol.h"
-
-#include "codaruncontrol.h"
-#include "s60deployconfiguration.h"
-#include "s60devicerunconfiguration.h"
-#include "symbianidevice.h"
-
-#include <coreplugin/icore.h>
-#include <debugger/debuggerengine.h>
-#include <debugger/debuggerprofileinformation.h>
-#include <debugger/debuggerstartparameters.h>
-#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/profile.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/project.h>
-#include <projectexplorer/target.h>
-#include <utils/qtcassert.h>
-
-#include <QFileInfo>
-
-using namespace ProjectExplorer;
-using namespace Qt4ProjectManager::Internal;
-using namespace Qt4ProjectManager;
-
-// Return symbol file which should co-exist with the executable.
-// location in debug builds. This can be 'foo.sym' (ABLD) or 'foo.exe.sym' (Raptor)
-static inline QString symbolFileFromExecutable(const QString &executable)
-{
- // 'foo.exe.sym' (Raptor)
- const QFileInfo raptorSymFi(executable + QLatin1String(".sym"));
- if (raptorSymFi.isFile())
- return raptorSymFi.absoluteFilePath();
- // 'foo.sym' (ABLD)
- const int lastDotPos = executable.lastIndexOf(QLatin1Char('.'));
- if (lastDotPos != -1) {
- const QString symbolFileName = executable.mid(0, lastDotPos) + QLatin1String(".sym");
- const QFileInfo symbolFileNameFi(symbolFileName);
- if (symbolFileNameFi.isFile())
- return symbolFileNameFi.absoluteFilePath();
- }
- return QString();
-}
-
-// Create start parameters from run configuration
-static Debugger::DebuggerStartParameters s60DebuggerStartParams(const S60DeviceRunConfiguration *rc)
-{
- Debugger::DebuggerStartParameters sp;
- QTC_ASSERT(rc, return sp);
-
- const S60DeployConfiguration *activeDeployConf =
- qobject_cast<S60DeployConfiguration *>(rc->target()->activeDeployConfiguration());
- QTC_ASSERT(activeDeployConf, return sp);
-
- DebuggerRunConfigurationAspect *debuggerAspect = rc->debuggerAspect();
-
- const QString debugFileName = QString::fromLatin1("%1:\\sys\\bin\\%2.exe")
- .arg(activeDeployConf->installationDrive()).arg(rc->targetName());
-
- Profile *profile = rc->target()->profile();
- sp.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
- sp.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(profile).toString();
- if (ToolChain *tc = ToolChainProfileInformation::toolChain(profile))
- sp.toolChainAbi = tc->targetAbi();
- SymbianIDevice::ConstPtr dev = activeDeployConf->device();
- sp.remoteChannel = dev->serialPortName();
- sp.processArgs = rc->commandLineArguments();
- if (debuggerAspect->useQmlDebugger() && !debuggerAspect->useCppDebugger()) {
- sp.remoteSetupNeeded = true;
- sp.startMode = Debugger::AttachToRemoteServer;
- } else {
- sp.startMode = Debugger::StartInternal;
- }
-
- sp.executable = debugFileName;
- sp.executableUid = rc->executableUid();
- sp.serverAddress = dev->address();
- sp.serverPort = dev->port().toInt();
- sp.displayName = rc->displayName();
- sp.qmlServerAddress = dev->address();
- sp.qmlServerPort = debuggerAspect->qmlDebugServerPort();
- if (debuggerAspect->useQmlDebugger()) {
- sp.languages |= Debugger::QmlLanguage;
- QString qmlArgs = rc->qmlCommandLineArguments();
- if (sp.processArgs.length())
- sp.processArgs.prepend(QLatin1Char(' '));
- sp.processArgs.prepend(qmlArgs);
- }
- if (debuggerAspect->useCppDebugger())
- sp.languages |= Debugger::CppLanguage;
-
- sp.communicationChannel = dev->communicationChannel() == SymbianIDevice::CommunicationCodaTcpConnection?
- Debugger::DebuggerStartParameters::CommunicationChannelTcpIp:
- Debugger::DebuggerStartParameters::CommunicationChannelUsb;
-
- if (const ProjectExplorer::Project *project = rc->target()->project()) {
- sp.projectSourceDirectory = project->projectDirectory();
- if (const ProjectExplorer::BuildConfiguration *buildConfig = rc->target()->activeBuildConfiguration()) {
- sp.projectBuildDirectory = buildConfig->buildDirectory();
- }
- sp.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
- }
-
- QTC_ASSERT(sp.executableUid, return sp);
-
- // Prefer the '*.sym' file over the '.exe', which should exist at the same
- // location in debug builds. This can be 'foo.exe' (ABLD) or 'foo.exe.sym' (Raptor)
- sp.symbolFileName = symbolFileFromExecutable(rc->localExecutableFileName());
- return sp;
-}
-
-S60DeviceDebugRunControl::S60DeviceDebugRunControl(S60DeviceRunConfiguration *rc,
- const Debugger::DebuggerStartParameters &sp) :
- Debugger::DebuggerRunControl(rc, sp),
- m_codaRunControl(NULL),
- m_codaState(ENotUsingCodaRunControl)
-{
- if (startParameters().symbolFileName.isEmpty()) {
- const QString msg = tr("Warning: Cannot locate the symbol file belonging to %1.\n").
- arg(rc->localExecutableFileName());
- appendMessage(msg, Utils::ErrorMessageFormat);
- }
- if (sp.masterEngineType == Debugger::QmlEngineType) {
- connect(engine(), SIGNAL(requestRemoteSetup()), this, SLOT(remoteSetupRequested()));
- connect(engine(), SIGNAL(stateChanged(Debugger::DebuggerState)), this, SLOT(qmlEngineStateChanged(Debugger::DebuggerState)));
- }
-}
-
-void S60DeviceDebugRunControl::start()
-{
- appendMessage(tr("Launching debugger...\n"), Utils::NormalMessageFormat);
- Debugger::DebuggerRunControl::start();
-}
-
-bool S60DeviceDebugRunControl::promptToStop(bool *) const
-{
- // We override the settings prompt
- return Debugger::DebuggerRunControl::promptToStop(0);
-}
-
-void S60DeviceDebugRunControl::remoteSetupRequested()
-{
- // This is called from Engine->setupInferior(), ie InferiorSetupRequested state
- QTC_CHECK(runConfiguration()->debuggerAspect()->useQmlDebugger() && !runConfiguration()->debuggerAspect()->useCppDebugger());
- m_codaRunControl = new CodaRunControl(runConfiguration(), DebugRunMode);
- connect(m_codaRunControl, SIGNAL(connected()), this, SLOT(codaConnected()));
- connect(m_codaRunControl, SIGNAL(finished()), this, SLOT(codaFinished()));
- connect(m_codaRunControl, SIGNAL(appendMessage(ProjectExplorer::RunControl*,QString,Utils::OutputFormat)), this, SLOT(handleMessageFromCoda(ProjectExplorer::RunControl*,QString,Utils::OutputFormat)));
- connect(this, SIGNAL(finished()), this, SLOT(handleDebuggingFinished()));
- m_codaState = EWaitingForCodaConnection;
- m_codaRunControl->connect();
-}
-
-void S60DeviceDebugRunControl::codaFinished()
-{
- if (m_codaRunControl) {
- m_codaRunControl->deleteLater();
- m_codaRunControl = NULL;
- }
- if (m_codaState == EWaitingForCodaConnection) {
- engine()->notifyEngineRemoteSetupFailed(QLatin1String("CODA failed to initialise")); // TODO sort out this error string? Unlikely we'll ever hit this state anyway.
- } else {
- debuggingFinished();
- }
- m_codaState = ENotUsingCodaRunControl;
-}
-
-void S60DeviceDebugRunControl::codaConnected()
-{
- QTC_ASSERT(m_codaState == EWaitingForCodaConnection, return);
- m_codaState = ECodaConnected;
- engine()->notifyEngineRemoteSetupDone(-1, -1); // calls notifyInferiorSetupOk()
-}
-
-void S60DeviceDebugRunControl::qmlEngineStateChanged(Debugger::DebuggerState state)
-{
- if (state == Debugger::EngineRunRequested)
- m_codaRunControl->run();
-}
-
-void S60DeviceDebugRunControl::handleDebuggingFinished()
-{
- if (m_codaRunControl) {
- m_codaRunControl->stop(); // We'll get a callback to our codaFinished() slot when it's done
- }
-}
-
-void S60DeviceDebugRunControl::handleMessageFromCoda(ProjectExplorer::RunControl *aCodaRunControl, const QString &msg, Utils::OutputFormat format)
-{
- // This only gets used when QmlEngine is the master debug engine. If GDB is running, messages are handled via the gdb adapter
- Q_UNUSED(aCodaRunControl)
- Q_UNUSED(format)
- engine()->showMessage(msg, Debugger::AppOutput);
-}
-
-//
-
-S60DeviceDebugRunControlFactory::S60DeviceDebugRunControlFactory(QObject *parent) :
- IRunControlFactory(parent)
-{
-}
-
-bool S60DeviceDebugRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mode) const
-{
- return mode == DebugRunMode && qobject_cast<S60DeviceRunConfiguration *>(runConfiguration);
-}
-
-ProjectExplorer::RunControl* S60DeviceDebugRunControlFactory::create(RunConfiguration *runConfiguration, RunMode mode)
-{
- S60DeviceRunConfiguration *rc = qobject_cast<S60DeviceRunConfiguration *>(runConfiguration);
- QTC_ASSERT(rc && mode == DebugRunMode, return 0);
- return new S60DeviceDebugRunControl(rc, s60DebuggerStartParams(rc));
-}
-
-QString S60DeviceDebugRunControlFactory::displayName() const
-{
- return S60DeviceDebugRunControl::tr("Debug on Device");
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicedebugruncontrol.h b/src/plugins/qt4projectmanager/qt-s60/s60devicedebugruncontrol.h
deleted file mode 100644
index f01d4a13c2..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicedebugruncontrol.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60DEVICEDEBUGRUNCONTROL_H
-#define S60DEVICEDEBUGRUNCONTROL_H
-
-#include <debugger/debuggerrunner.h>
-
-namespace Qt4ProjectManager {
-
-class S60DeviceRunConfiguration;
-class CodaRunControl;
-
-namespace Internal {
-
-class S60DeviceDebugRunControl : public Debugger::DebuggerRunControl
-{
- Q_OBJECT
-
-public:
- explicit S60DeviceDebugRunControl(S60DeviceRunConfiguration *runConfiguration,
- const Debugger::DebuggerStartParameters &sp);
- virtual void start();
- virtual bool promptToStop(bool *optionalPrompt = 0) const;
-
-private slots:
- void remoteSetupRequested();
- void codaConnected();
- void qmlEngineStateChanged(Debugger::DebuggerState state);
- void codaFinished();
- void handleDebuggingFinished();
- void handleMessageFromCoda(ProjectExplorer::RunControl *aCodaRunControl, const QString &msg, Utils::OutputFormat format);
-
-private:
- CodaRunControl *m_codaRunControl;
- enum {
- ENotUsingCodaRunControl = 0,
- EWaitingForCodaConnection,
- ECodaConnected
- } m_codaState;
-};
-
-class S60DeviceDebugRunControlFactory : public ProjectExplorer::IRunControlFactory
-{
-public:
- explicit S60DeviceDebugRunControlFactory(QObject *parent = 0);
- bool canRun(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode) const;
-
- ProjectExplorer::RunControl* create(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode);
- QString displayName() const;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60DEVICEDEBUGRUNCONTROL_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
deleted file mode 100644
index b8cf0ddb40..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
+++ /dev/null
@@ -1,410 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60devicerunconfiguration.h"
-
-#include "qt4project.h"
-#include "qt4nodes.h"
-#include "qt4projectmanagerconstants.h"
-#include "qt4buildconfiguration.h"
-#include "s60deployconfiguration.h"
-#include "s60devicerunconfigurationwidget.h"
-#include "s60manager.h"
-#include "symbianidevice.h"
-#include "symbianidevicefactory.h"
-#include "symbianqtversion.h"
-
-#include <utils/qtcassert.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/target.h>
-#include <qtsupport/customexecutablerunconfiguration.h>
-#include <qtsupport/qtoutputformatter.h>
-#include <qtsupport/qtprofileinformation.h>
-
-using namespace ProjectExplorer;
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-namespace {
-
-const char * const S60_DEVICE_RC_ID("Qt4ProjectManager.S60DeviceRunConfiguration");
-const char * const S60_DEVICE_RC_PREFIX("Qt4ProjectManager.S60DeviceRunConfiguration:");
-
-const char * const PRO_FILE_KEY("Qt4ProjectManager.S60DeviceRunConfiguration.ProFile");
-const char * const COMMUNICATION_TYPE_KEY("Qt4ProjectManager.S60DeviceRunConfiguration.CommunicationType");
-const char * const COMMAND_LINE_ARGUMENTS_KEY("Qt4ProjectManager.S60DeviceRunConfiguration.CommandLineArguments");
-
-enum { debug = 0 };
-
-QString pathFromId(Core::Id id)
-{
- QString idstr = QString::fromUtf8(id.name());
- const QString prefix = QLatin1String(S60_DEVICE_RC_PREFIX);
- if (!idstr.startsWith(prefix))
- return QString();
- return idstr.mid(prefix.size());
-}
-
-} // anonymous namespace
-
-// ======== S60DeviceRunConfiguration
-
-S60DeviceRunConfiguration::S60DeviceRunConfiguration(Target *parent, Core::Id id) :
- RunConfiguration(parent, id),
- m_proFilePath(pathFromId(id))
-{
- Qt4Project *project = static_cast<Qt4Project *>(parent->project());
- m_validParse = project->validParse(m_proFilePath);
- m_parseInProgress = project->parseInProgress(m_proFilePath);
-
- ctor();
-}
-
-S60DeviceRunConfiguration::S60DeviceRunConfiguration(Target *parent, S60DeviceRunConfiguration *source) :
- RunConfiguration(parent, source),
- m_proFilePath(source->m_proFilePath),
- m_commandLineArguments(source->m_commandLineArguments),
- m_validParse(source->m_validParse),
- m_parseInProgress(source->m_parseInProgress)
-{
- ctor();
-}
-
-void S60DeviceRunConfiguration::ctor()
-{
- if (!m_proFilePath.isEmpty())
- //: S60 device runconfiguration default display name, %1 is base pro-File name
- setDefaultDisplayName(tr("%1 on Symbian Device").arg(QFileInfo(m_proFilePath).completeBaseName()));
- else
- //: S60 device runconfiguration default display name (no profile set)
- setDefaultDisplayName(tr("Run on Symbian device"));
-
- Qt4Project *pro = static_cast<Qt4Project *>(target()->project());
- connect(pro, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
- this, SLOT(proFileUpdate(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
-}
-
-void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress)
-{
- if (m_proFilePath != pro->path())
- return;
- bool enabled = isEnabled();
- QString reason = disabledReason();
- m_validParse = success;
- m_parseInProgress = parseInProgress;
- if (enabled != isEnabled() || reason != disabledReason())
- emit enabledChanged();
- if (!parseInProgress)
- emit targetInformationChanged();
-}
-
-S60DeviceRunConfiguration::~S60DeviceRunConfiguration()
-{
-}
-
-bool S60DeviceRunConfiguration::isEnabled() const
-{
- return m_validParse && !m_parseInProgress;
-}
-
-QString S60DeviceRunConfiguration::disabledReason() const
-{
- if (m_parseInProgress)
- return tr("The .pro file '%1' is currently being parsed.")
- .arg(QFileInfo(m_proFilePath).fileName());
- if (!m_validParse)
- return static_cast<Qt4Project *>(target()->project())->disabledReasonForRunConfiguration(m_proFilePath);
- return QString();
-}
-
-QWidget *S60DeviceRunConfiguration::createConfigurationWidget()
-{
- return new S60DeviceRunConfigurationWidget(this);
-}
-
-Utils::OutputFormatter *S60DeviceRunConfiguration::createOutputFormatter() const
-{
- return new QtSupport::QtOutputFormatter(target()->project());
-}
-
-QVariantMap S60DeviceRunConfiguration::toMap() const
-{
- QVariantMap map = ProjectExplorer::RunConfiguration::toMap();
- const QDir projectDir = QDir(target()->project()->projectDirectory());
-
- map.insert(QLatin1String(PRO_FILE_KEY), projectDir.relativeFilePath(m_proFilePath));
- map.insert(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY), m_commandLineArguments);
-
- return map;
-}
-
-bool S60DeviceRunConfiguration::fromMap(const QVariantMap &map)
-{
- const QDir projectDir = QDir(target()->project()->projectDirectory());
-
- m_proFilePath = QDir::cleanPath(projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString()));
- m_commandLineArguments = map.value(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY)).toString();
-
- if (m_proFilePath.isEmpty())
- return false;
- if (!QFileInfo(m_proFilePath).exists())
- return false;
-
- m_validParse = static_cast<Qt4Project *>(target()->project())->validParse(m_proFilePath);
- m_parseInProgress = static_cast<Qt4Project *>(target()->project())->parseInProgress(m_proFilePath);
-
- setDefaultDisplayName(tr("%1 on Symbian Device").arg(QFileInfo(m_proFilePath).completeBaseName()));
-
- return RunConfiguration::fromMap(map);
-}
-
-static inline QString fixBaseNameTarget(const QString &in)
-{
- if (in == QLatin1String("udeb"))
- return QLatin1String("debug");
- if (in == QLatin1String("urel"))
- return QLatin1String("release");
- return in;
-}
-
-QString S60DeviceRunConfiguration::targetName() const
-{
- TargetInformation ti = static_cast<Qt4Project *>(target()->project())
- ->rootQt4ProjectNode()->targetInformation(projectFilePath());
- if (!ti.valid)
- return QString();
- return ti.target;
-}
-
-bool S60DeviceRunConfiguration::isDebug() const
-{
- const Qt4BuildConfiguration *qt4bc = static_cast<const Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
- return (qt4bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild);
-}
-
-QString S60DeviceRunConfiguration::symbianTarget() const
-{
- return isDebug() ? QLatin1String("udeb") : QLatin1String("urel");
-}
-
-// ABLD/Raptor: Return executable from device/EPOC
-static inline QString localExecutableFromVersion(const ProjectExplorer::Profile *p,
- const QString &symbianTarget, /* udeb/urel */
- const QString &targetName)
-{
- Q_ASSERT(p);
-
- ToolChain *tc = ToolChainProfileInformation::toolChain(p);
- SymbianQtVersion *qtv = dynamic_cast<SymbianQtVersion *>(QtSupport::QtProfileInformation::qtVersion(p));
- QString root;
- if (SysRootProfileInformation::hasSysRoot(p))
- root = SysRootProfileInformation::sysRoot(p).toString();
-
- if (!tc)
- return QString();
-
- QString localExecutable;
- QString platform = S60Manager::platform(tc);
- if (qtv->isBuildWithSymbianSbsV2() && platform == QLatin1String("gcce"))
- platform = QLatin1String("armv5");
- QTextStream(&localExecutable) << root << "/epoc32/release/"
- << platform << '/' << symbianTarget << '/' << targetName << ".exe";
- return localExecutable;
-}
-
-QString S60DeviceRunConfiguration::localExecutableFileName() const
-{
- TargetInformation ti = static_cast<Qt4Project *>(target()->project())->rootQt4ProjectNode()->targetInformation(projectFilePath());
- if (!ti.valid)
- return QString();
-
- return localExecutableFromVersion(target()->profile(), symbianTarget(), targetName());
-}
-
-quint32 S60DeviceRunConfiguration::executableUid() const
-{
- quint32 uid = 0;
- QString executablePath = localExecutableFileName();
- if (!executablePath.isEmpty()) {
- QFile file(executablePath);
- if (file.open(QIODevice::ReadOnly)) {
- // executable's UID is 4 bytes starting at 8.
- const QByteArray data = file.read(12);
- if (data.size() == 12) {
- const unsigned char *d = reinterpret_cast<const unsigned char*>(data.data() + 8);
- uid = *d++;
- uid += *d++ << 8;
- uid += *d++ << 16;
- uid += *d++ << 24;
- }
- }
- }
- return uid;
-}
-
-QString S60DeviceRunConfiguration::projectFilePath() const
-{
- return m_proFilePath;
-}
-
-QString S60DeviceRunConfiguration::commandLineArguments() const
-{
- return m_commandLineArguments;
-}
-
-void S60DeviceRunConfiguration::setCommandLineArguments(const QString &args)
-{
- m_commandLineArguments = args;
-}
-
-QString S60DeviceRunConfiguration::qmlCommandLineArguments() const
-{
- QString args;
- if (debuggerAspect()->useQmlDebugger()) {
- const S60DeployConfiguration *activeDeployConf =
- qobject_cast<const S60DeployConfiguration *>(target()->activeDeployConfiguration());
- QTC_ASSERT(activeDeployConf, return args);
-
- QSharedPointer<const SymbianIDevice> dev = activeDeployConf->device().dynamicCast<const SymbianIDevice>();
- if (dev->communicationChannel() == SymbianIDevice::CommunicationCodaTcpConnection)
- args = QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(debuggerAspect()->qmlDebugServerPort());
- else
- args = QLatin1String("-qmljsdebugger=ost");
- }
- return args;
-}
-
-QString S60DeviceRunConfiguration::proFilePath() const
-{
- return m_proFilePath;
-}
-
-// ======== S60DeviceRunConfigurationFactory
-
-S60DeviceRunConfigurationFactory::S60DeviceRunConfigurationFactory(QObject *parent) :
- QmakeRunConfigurationFactory(parent)
-{ setObjectName(QLatin1String("S60DeviceRunConfigurationFactory"));}
-
-S60DeviceRunConfigurationFactory::~S60DeviceRunConfigurationFactory()
-{ }
-
-QList<Core::Id> S60DeviceRunConfigurationFactory::availableCreationIds(Target *parent) const
-{
- QList<Core::Id> result;
- if (!canHandle(parent))
- return result;
-
- Qt4Project *project = static_cast<Qt4Project *>(parent->project());
- QStringList proFiles = project->applicationProFilePathes(QLatin1String(S60_DEVICE_RC_PREFIX));
- foreach (const QString &pf, proFiles)
- result << Core::Id(pf);
- return result;
-}
-
-QString S60DeviceRunConfigurationFactory::displayNameForId(const Core::Id id) const
-{
- if (!pathFromId(id).isEmpty())
- return tr("%1 on Symbian Device").arg(QFileInfo(pathFromId(id)).completeBaseName());
- return QString();
-}
-
-bool S60DeviceRunConfigurationFactory::canHandle(Target *t) const
-{
- if (!t->project()->supportsProfile(t->profile()))
- return false;
- if (!qobject_cast<Qt4Project *>(t->project()))
- return false;
-
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(t->profile());
- return deviceType == SymbianIDeviceFactory::deviceType();
-}
-
-QList<RunConfiguration *> S60DeviceRunConfigurationFactory::runConfigurationsForNode(Target *t, ProjectExplorer::Node *n)
-{
- QList<ProjectExplorer::RunConfiguration *> result;
- foreach (ProjectExplorer::RunConfiguration *rc, t->runConfigurations()) {
- if (S60DeviceRunConfiguration *s60rc = qobject_cast<S60DeviceRunConfiguration *>(rc))
- if (s60rc->proFilePath() == n->path())
- result << rc;
- }
- return result;
-}
-
-bool S60DeviceRunConfigurationFactory::canCreate(Target *parent, const Core::Id id) const
-{
- if (!canHandle(parent))
- return false;
- Qt4Project *project = static_cast<Qt4Project *>(parent->project());
- return project->hasApplicationProFile(pathFromId(id));
-}
-
-RunConfiguration *S60DeviceRunConfigurationFactory::create(Target *parent, const Core::Id id)
-{
- if (!canCreate(parent, id))
- return 0;
-
- return new S60DeviceRunConfiguration(parent, id);
-}
-
-bool S60DeviceRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
-{
- if (!canHandle(parent))
- return false;
-
- const Core::Id id = ProjectExplorer::idFromMap(map);
- return id == S60_DEVICE_RC_ID;
-}
-
-RunConfiguration *S60DeviceRunConfigurationFactory::restore(Target *parent, const QVariantMap &map)
-{
- if (!canRestore(parent, map))
- return 0;
- S60DeviceRunConfiguration *rc = new S60DeviceRunConfiguration(parent, idFromMap(map));
- if (rc->fromMap(map))
- return rc;
-
- delete rc;
- return 0;
-}
-
-bool S60DeviceRunConfigurationFactory::canClone(Target *parent, RunConfiguration *source) const
-{
- if (!canHandle(parent))
- return false;
- return source->id() == S60_DEVICE_RC_ID;
-}
-
-RunConfiguration *S60DeviceRunConfigurationFactory::clone(Target *parent, RunConfiguration *source)
-{
- if (!canClone(parent, source))
- return 0;
- S60DeviceRunConfiguration *old = static_cast<S60DeviceRunConfiguration *>(source);
- return new S60DeviceRunConfiguration(parent, old);
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
deleted file mode 100644
index f76f6a67b4..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60DEVICERUNCONFIGURATION_H
-#define S60DEVICERUNCONFIGURATION_H
-
-#include "../qmakerunconfigurationfactory.h"
-#include "../qt4projectmanager_global.h"
-
-#include <projectexplorer/runconfiguration.h>
-
-#include <QFutureInterface>
-#include <QStringList>
-
-QT_BEGIN_NAMESPACE
-class QWidget;
-QT_END_NAMESPACE
-
-namespace ProjectExplorer { class Node; }
-
-namespace Qt4ProjectManager {
-class Qt4ProFileNode;
-
-namespace Internal { class SymbianQtVersion; }
-
-class S60DeviceRunConfigurationFactory;
-
-class QT4PROJECTMANAGER_EXPORT S60DeviceRunConfiguration : public ProjectExplorer::RunConfiguration
-{
- Q_OBJECT
- friend class S60DeviceRunConfigurationFactory;
-
-public:
- S60DeviceRunConfiguration(ProjectExplorer::Target *parent, Core::Id id);
- virtual ~S60DeviceRunConfiguration();
-
- bool isEnabled() const;
- QString disabledReason() const;
- QWidget *createConfigurationWidget();
-
- Utils::OutputFormatter *createOutputFormatter() const;
-
- QString commandLineArguments() const;
- void setCommandLineArguments(const QString &args);
- QString qmlCommandLineArguments() const;
-
- QString projectFilePath() const;
-
- QString targetName() const;
- QString localExecutableFileName() const;
- quint32 executableUid() const;
-
- bool isDebug() const;
- QString symbianTarget() const;
-
- QVariantMap toMap() const;
-
- QString proFilePath() const;
-signals:
- void targetInformationChanged();
-
-protected:
- S60DeviceRunConfiguration(ProjectExplorer::Target *parent, S60DeviceRunConfiguration *source);
- QString defaultDisplayName() const;
- virtual bool fromMap(const QVariantMap &map);
-
-private slots:
- void proFileUpdate(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress);
-
-private:
- void ctor();
-
- QString m_proFilePath;
- QString m_commandLineArguments;
- bool m_validParse;
- bool m_parseInProgress;
-};
-
-class S60DeviceRunConfigurationFactory : public QmakeRunConfigurationFactory
-{
- Q_OBJECT
-
-public:
- explicit S60DeviceRunConfigurationFactory(QObject *parent = 0);
- ~S60DeviceRunConfigurationFactory();
-
- bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
- ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
- bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
- ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
- bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) const;
- ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source);
-
- QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
- // used to translate the ids to names to display to the user
- QString displayNameForId(const Core::Id id) const;
-
- bool canHandle(ProjectExplorer::Target *t) const;
- QList<ProjectExplorer::RunConfiguration *> runConfigurationsForNode(ProjectExplorer::Target *t,
- ProjectExplorer::Node *n);
-};
-
-} // namespace Qt4ProjectManager
-
-#endif // S60DEVICERUNCONFIGURATION_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp
deleted file mode 100644
index b981ab5ca5..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60devicerunconfigurationwidget.h"
-#include "s60devicerunconfiguration.h"
-
-#include <utils/detailswidget.h>
-
-#include <coreplugin/helpmanager.h>
-
-#include <QLabel>
-#include <QLineEdit>
-#include <QVBoxLayout>
-#include <QHBoxLayout>
-#include <QFormLayout>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-S60DeviceRunConfigurationWidget::S60DeviceRunConfigurationWidget(
- S60DeviceRunConfiguration *runConfiguration,
- QWidget *parent)
- : QWidget(parent),
- m_runConfiguration(runConfiguration),
- m_detailsWidget(new Utils::DetailsWidget),
- m_argumentsLineEdit(new QLineEdit(m_runConfiguration->commandLineArguments()))
-{
- m_detailsWidget->setState(Utils::DetailsWidget::NoSummary);
- QVBoxLayout *mainBoxLayout = new QVBoxLayout();
- mainBoxLayout->setMargin(0);
-
- QHBoxLayout *hl = new QHBoxLayout();
- hl->addStretch();
- m_disabledIcon = new QLabel(this);
- m_disabledIcon->setPixmap(QPixmap(QLatin1String(":/projectexplorer/images/compile_warning.png")));
- hl->addWidget(m_disabledIcon);
- m_disabledReason = new QLabel(this);
- m_disabledReason->setVisible(false);
- hl->addWidget(m_disabledReason);
- hl->addStretch();
- mainBoxLayout->addLayout(hl);
-
- setLayout(mainBoxLayout);
- mainBoxLayout->addWidget(m_detailsWidget);
- QWidget *detailsContainer = new QWidget;
- m_detailsWidget->setWidget(detailsContainer);
-
- QVBoxLayout *detailsBoxLayout = new QVBoxLayout();
- detailsBoxLayout->setMargin(0);
- detailsContainer->setLayout(detailsBoxLayout);
-
- QFormLayout *formLayout = new QFormLayout();
- formLayout->setMargin(0);
- detailsBoxLayout->addLayout(formLayout);
- formLayout->addRow(tr("Arguments:"), m_argumentsLineEdit);
-
- connect(m_argumentsLineEdit, SIGNAL(textEdited(QString)),
- this, SLOT(argumentsEdited(QString)));
-
- connect(m_runConfiguration, SIGNAL(enabledChanged()),
- this, SLOT(runConfigurationEnabledChange()));
-
- runConfigurationEnabledChange();
-}
-
-void S60DeviceRunConfigurationWidget::argumentsEdited(const QString &text)
-{
- m_runConfiguration->setCommandLineArguments(text.trimmed());
-}
-
-void S60DeviceRunConfigurationWidget::runConfigurationEnabledChange()
-{
- bool enabled = m_runConfiguration->isEnabled();
- m_detailsWidget->setEnabled(enabled);
- m_disabledIcon->setVisible(!enabled);
- m_disabledReason->setVisible(!enabled);
- m_disabledReason->setText(m_runConfiguration->disabledReason());
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h
deleted file mode 100644
index 0ebb2b6029..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfigurationwidget.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60DEVICERUNCONFIGURATIONWIDGET_H
-#define S60DEVICERUNCONFIGURATIONWIDGET_H
-
-#include <QWidget>
-#include <QLabel>
-
-QT_BEGIN_NAMESPACE
-class QLineEdit;
-QT_END_NAMESPACE
-
-namespace Utils { class DetailsWidget; }
-
-namespace Qt4ProjectManager {
-
-class S60DeviceRunConfiguration;
-
-namespace Internal {
-
-class S60DeviceRunConfigurationWidget : public QWidget
-{
- Q_OBJECT
-public:
- explicit S60DeviceRunConfigurationWidget(S60DeviceRunConfiguration *runConfiguration,
- QWidget *parent = 0);
-private slots:
- void argumentsEdited(const QString &text);
- void runConfigurationEnabledChange();
-
-private:
- S60DeviceRunConfiguration *m_runConfiguration;
- QLabel *m_disabledIcon;
- QLabel *m_disabledReason;
- Utils::DetailsWidget *m_detailsWidget;
- QLineEdit *m_argumentsLineEdit;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60DEVICERUNCONFIGURATIONWIDGET_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60manager.cpp b/src/plugins/qt4projectmanager/qt-s60/s60manager.cpp
deleted file mode 100644
index 18a065a420..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60manager.cpp
+++ /dev/null
@@ -1,220 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60manager.h"
-
-#include "s60devicerunconfiguration.h"
-#include "s60createpackagestep.h"
-#include "s60deployconfiguration.h"
-#include "s60deploystep.h"
-#include "s60runcontrolfactory.h"
-#include "s60devicedebugruncontrol.h"
-#include "symbianidevice.h"
-#include "symbianidevicefactory.h"
-
-#include "s60publishingwizardfactories.h"
-
-#include "gccetoolchain.h"
-#include "rvcttoolchain.h"
-#include "symbianqtversionfactory.h"
-
-#include <symbianutils/symbiandevicemanager.h>
-
-#include <coreplugin/icore.h>
-#include <extensionsystem/pluginmanager.h>
-#include <projectexplorer/devicesupport/devicemanager.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <qtsupport/qtversionmanager.h>
-#include <qtsupport/qtsupportconstants.h>
-#include <debugger/debuggerconstants.h>
-#include <utils/qtcassert.h>
-
-#include <QDir>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-S60Manager *S60Manager::m_instance = 0;
-
-// ======== Parametrizable Factory for RunControls, depending on the configuration
-// class and mode.
-
-template <class RunControl, class RunConfiguration>
- class RunControlFactory : public ProjectExplorer::IRunControlFactory
-{
-public:
- RunControlFactory(ProjectExplorer::RunMode mode, const QString &name, QObject *parent = 0) :
- IRunControlFactory(parent), m_mode(mode), m_name(name) {}
-
- bool canRun(ProjectExplorer::RunConfiguration *runConfiguration, ProjectExplorer::RunMode mode) const
- {
- return mode == m_mode && qobject_cast<RunConfiguration *>(runConfiguration);
- }
-
- ProjectExplorer::RunControl* create(ProjectExplorer::RunConfiguration *runConfiguration,
- ProjectExplorer::RunMode mode)
- {
- RunConfiguration *rc = qobject_cast<RunConfiguration *>(runConfiguration);
- QTC_ASSERT(rc && mode == m_mode, return 0);
- return new RunControl(rc, mode);
- }
-
- QString displayName() const {
- return m_name;
- }
-
-private:
- const ProjectExplorer::RunMode m_mode;
- const QString m_name;
-};
-
-// ======== S60Manager
-
-S60Manager *S60Manager::instance() { return m_instance; }
-
-S60Manager::S60Manager(QObject *parent) : QObject(parent)
-{
- m_instance = this;
-
- addAutoReleasedObject(new GcceToolChainFactory);
- addAutoReleasedObject(new RvctToolChainFactory);
-
- addAutoReleasedObject(new S60DeviceRunConfigurationFactory);
- addAutoReleasedObject(new S60RunControlFactory(ProjectExplorer::NormalRunMode,
- tr("Run on Device"), parent));
- addAutoReleasedObject(new S60CreatePackageStepFactory);
- addAutoReleasedObject(new S60DeployStepFactory);
-
- addAutoReleasedObject(new S60DeviceDebugRunControlFactory);
- addAutoReleasedObject(new S60DeployConfigurationFactory);
-
- addAutoReleasedObject(new S60PublishingWizardFactoryOvi);
- addAutoReleasedObject(new SymbianQtVersionFactory);
-
- addAutoReleasedObject(new Internal::SymbianIDeviceFactory);
-
- connect(Core::ICore::mainWindow(), SIGNAL(deviceChange()),
- SymbianUtils::SymbianDeviceManager::instance(), SLOT(update()));
-
- SymbianUtils::SymbianDeviceManager *dm = SymbianUtils::SymbianDeviceManager::instance();
- connect(dm, SIGNAL(deviceAdded(SymbianUtils::SymbianDevice)),
- this, SLOT(symbianDeviceAdded(SymbianUtils::SymbianDevice)));
- connect(dm, SIGNAL(deviceRemoved(SymbianUtils::SymbianDevice)),
- this, SLOT(symbianDeviceRemoved(SymbianUtils::SymbianDevice)));
-}
-
-S60Manager::~S60Manager()
-{
- for (int i = m_pluginObjects.size() - 1; i >= 0; i--) {
- ExtensionSystem::PluginManager::removeObject(m_pluginObjects.at(i));
- delete m_pluginObjects.at(i);
- }
-}
-
-QString S60Manager::platform(const ProjectExplorer::ToolChain *tc)
-{
- if (!tc || tc->targetAbi().os() != ProjectExplorer::Abi::SymbianOS)
- return QString();
- QString target = tc->defaultMakeTarget();
- return target.right(target.lastIndexOf(QLatin1Char('-')));
-}
-
-void S60Manager::extensionsInitialize()
-{
- handleQtVersionChanges();
- connect(QtSupport::QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>,QList<int>,QList<int>)),
- this, SLOT(handleQtVersionChanges()));
-}
-
-void S60Manager::symbianDeviceRemoved(const SymbianUtils::SymbianDevice &d)
-{
- handleSymbianDeviceStateChange(d, ProjectExplorer::IDevice::DeviceDisconnected);
-}
-
-void S60Manager::symbianDeviceAdded(const SymbianUtils::SymbianDevice &d)
-{
- handleSymbianDeviceStateChange(d, ProjectExplorer::IDevice::DeviceReadyToUse);
-}
-
-void S60Manager::handleQtVersionChanges()
-{
- bool symbianQtFound = false;
- Core::Id symbianDeviceId;
- QList<QtSupport::BaseQtVersion *> versionList = QtSupport::QtVersionManager::instance()->versions();
- foreach (QtSupport::BaseQtVersion *v, versionList) {
- if (v->platformName() != QLatin1String(QtSupport::Constants::SYMBIAN_PLATFORM))
- continue;
-
- symbianQtFound = true;
- break;
- }
-
- ProjectExplorer::DeviceManager *dm = ProjectExplorer::DeviceManager::instance();
- for (int i = 0; i < dm->deviceCount(); ++i) {
- ProjectExplorer::IDevice::ConstPtr dev = dm->deviceAt(i);
- if (dev->type() != SymbianIDeviceFactory::deviceType())
- continue;
-
- symbianDeviceId = dev->id();
- break;
- }
-
- if (symbianQtFound && !symbianDeviceId.isValid())
- dm->addDevice(ProjectExplorer::IDevice::Ptr(new SymbianIDevice));
- if (!symbianQtFound && symbianDeviceId.isValid())
- dm->removeDevice(symbianDeviceId);
-}
-
-void S60Manager::handleSymbianDeviceStateChange(const SymbianUtils::SymbianDevice &d, ProjectExplorer::IDevice::DeviceState s)
-{
- ProjectExplorer::DeviceManager *dm = ProjectExplorer::DeviceManager::instance();
- for (int i = 0; i < dm->deviceCount(); ++i) {
- ProjectExplorer::IDevice::ConstPtr dev = dm->deviceAt(i);
- const SymbianIDevice *sdev = dynamic_cast<const SymbianIDevice *>(dev.data());
- if (!sdev || sdev->communicationChannel() != SymbianIDevice::CommunicationCodaSerialConnection)
- continue;
- if (sdev->serialPortName() != d.portName())
- continue;
-
- SymbianIDevice *newDev = new SymbianIDevice(*sdev); // Get a new device to replace the current one
- newDev->setDeviceState(s);
- dm->addDevice(ProjectExplorer::IDevice::Ptr(newDev));
- break;
- }
-}
-
-void S60Manager::addAutoReleasedObject(QObject *o)
-{
- ExtensionSystem::PluginManager::addObject(o);
- m_pluginObjects.push_back(o);
-}
-
-} // namespace internal
-} // namespace qt4projectmanager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60manager.h b/src/plugins/qt4projectmanager/qt-s60/s60manager.h
deleted file mode 100644
index 467316273f..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60manager.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60MANAGER_H
-#define S60MANAGER_H
-
-#include <projectexplorer/devicesupport/idevice.h>
-#include <symbianutils/symbiandevicemanager.h>
-
-#include <QObject>
-
-namespace ProjectExplorer { class ToolChain; }
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60Manager : public QObject
-{
- Q_OBJECT
-public:
- S60Manager(QObject *parent = 0);
- ~S60Manager();
-
- static S60Manager *instance();
-
- static QString platform(const ProjectExplorer::ToolChain *tc);
-
- void extensionsInitialize();
-
-private slots:
- void symbianDeviceRemoved(const SymbianUtils::SymbianDevice &d);
- void symbianDeviceAdded(const SymbianUtils::SymbianDevice &d);
-
- void handleQtVersionChanges();
-
-private:
- void handleSymbianDeviceStateChange(const SymbianUtils::SymbianDevice &d,
- ProjectExplorer::IDevice::DeviceState s);
-
- void addAutoReleasedObject(QObject *p);
-
- static S60Manager *m_instance;
- QObjectList m_pluginObjects;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60MANAGER_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp
deleted file mode 100644
index d87f7a6506..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.cpp
+++ /dev/null
@@ -1,552 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-#include "s60publisherovi.h"
-
-#include "s60certificateinfo.h"
-#include "s60manager.h"
-
-#include "qt4buildconfiguration.h"
-#include "qmakestep.h"
-#include "makestep.h"
-#include "qt4project.h"
-#include "qt4nodes.h"
-
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/buildstep.h>
-#include <projectexplorer/target.h>
-#include <qtsupport/qtversionmanager.h>
-#include <qtsupport/qtprofileinformation.h>
-#include <qtsupport/profilereader.h>
-
-#include <utils/qtcassert.h>
-#include <utils/fileutils.h>
-#include <proparser/prowriter.h>
-
-#include <QProcess>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-S60PublisherOvi::S60PublisherOvi(QObject *parent) :
- QObject(parent),
- m_reader(0),
- m_finishedAndSuccessful(false)
-{
- // build m_rejectedVendorNames
- m_rejectedVendorNames.append(QLatin1String(Constants::REJECTED_VENDOR_NAMES_NOKIA));
- m_rejectedVendorNames.append(QLatin1String(Constants::REJECTED_VENDOR_NAMES_VENDOR));
- m_rejectedVendorNames.append(QLatin1String(Constants::REJECTED_VENDOR_NAMES_VENDOR_EN));
- m_rejectedVendorNames.append(QLatin1String(Constants::REJECTED_VENDOR_NAMES_EMPTY));
-
- // build m_capabilitiesForCertifiedSigned
- m_capabilitiesForCertifiedSigned.append(QLatin1String(Constants::CERTIFIED_SIGNED_CAPABILITY_COMM_DD));
- m_capabilitiesForCertifiedSigned.append(QLatin1String(Constants::CERTIFIED_SIGNED_CAPABILITY_DISK_ADMIN));
- m_capabilitiesForCertifiedSigned.append(QLatin1String(Constants::CERTIFIED_SIGNED_CAPABILITY_MULTIMEDIA_DD));
- m_capabilitiesForCertifiedSigned.append(QLatin1String(Constants::CERTIFIED_SIGNED_CAPABILITY_NETWORK_CONTROL));
-
- // build m_capabilitesForManufacturerApproved
- m_capabilitesForManufacturerApproved.append(QLatin1String(Constants::MANUFACTURER_APPROVED_CAPABILITY_ALL_FILES));
- m_capabilitesForManufacturerApproved.append(QLatin1String(Constants::MANUFACTURER_APPROVED_CAPABILITY_DRM));
- m_capabilitesForManufacturerApproved.append(QLatin1String(Constants::MANUFACTURER_APPROVED_CAPABILITY_TCB));
-
- // set up colours for progress reports
- m_errorColor = Qt::red;
- m_commandColor = Qt::blue;
- m_okColor = Qt::darkGreen;
- m_normalColor = Qt::black;
-}
-
-S60PublisherOvi::~S60PublisherOvi()
-{
- cleanUp();
-}
-
-void S60PublisherOvi::setBuildConfiguration(Qt4BuildConfiguration *qt4bc)
-{
- // set build configuration
- m_qt4bc = qt4bc;
-}
-
-void S60PublisherOvi::setDisplayName(const QString &displayName)
-{
- m_displayName = displayName;
-}
-
-void S60PublisherOvi::setVendorName(const QString &vendorName)
-{
- m_vendorName = vendorName;
-}
-
-void S60PublisherOvi::setLocalVendorNames(const QString &localVendorNames)
-{
- QStringList vendorNames = localVendorNames.split(QLatin1Char(','));
- QStringList resultingList;
- foreach (QString vendorName, vendorNames) {
- resultingList.append(QLatin1String("\\\"") + vendorName.trimmed() + QLatin1String("\\\""));
- }
- m_localVendorNames = resultingList.join(QLatin1String(", "));
-}
-
-void S60PublisherOvi::setAppUid(const QString &appuid)
-{
- m_appUid = appuid;
-}
-
-void S60PublisherOvi::cleanUp()
-{
- if (m_qt4project && m_reader) {
- m_qt4project->destroyProFileReader(m_reader);
- m_reader = 0;
- }
- m_publishSteps.clear();
-}
-
-void S60PublisherOvi::completeCreation()
-{
-#if 0 // FIXME: This needs serious reworking!
- // set active target
- m_activeTargetOfProject = qobject_cast<Qt4SymbianTarget *>(m_qt4bc->target());
- QTC_ASSERT(m_activeTargetOfProject, return);
-
- //set up project
- m_qt4project = m_activeTargetOfProject->qt4Project();
-
- // set up pro file reader
- m_reader = m_qt4project->createProFileReader(m_qt4project->rootQt4ProjectNode(), m_qt4bc);
- //m_reader->setCumulative(false); // todo need to reenable that, after fixing parsing for symbian scopes
-
- ProFile *profile = m_reader->parsedProFile(m_qt4project->rootProjectNode()->path());
- m_reader->accept(profile, QMakeEvaluator::LoadProOnly);
- profile->deref();
-
- // set up process for creating the resulting SIS files
- ProjectExplorer::AbstractProcessStep * makeStep = m_qt4bc->makeStep();
- makeStep->init();
- const ProjectExplorer::ProcessParameters * const makepp = makeStep->processParameters();
-
- ProjectExplorer::AbstractProcessStep *qmakeStep = m_qt4bc->qmakeStep();
- qmakeStep->init();
- const ProjectExplorer::ProcessParameters * const qmakepp = qmakeStep->processParameters();
-
- m_publishSteps.clear();
- const QChar space = QLatin1Char(' ');
- m_publishSteps.append(new S60CommandPublishStep(*m_qt4bc,
- makepp->effectiveCommand() + QLatin1String(" clean -w"),
- tr("Clean"),
- false));
-
- m_publishSteps.append(new S60CommandPublishStep(*m_qt4bc,
- qmakepp->effectiveCommand() + space + qmakepp->arguments(),
- tr("qmake")));
-
- m_publishSteps.append(new S60CommandPublishStep(*m_qt4bc,
- makepp->effectiveCommand() + space + makepp->arguments(),
- tr("Build")));
- if (isDynamicLibrary(*m_qt4project)) {
- const QString freezeArg = QLatin1String("freeze-") + makepp->arguments();
- m_publishSteps.append(new S60CommandPublishStep(*m_qt4bc,
- makepp->effectiveCommand() + space + freezeArg,
- tr("Freeze")));
-
- m_publishSteps.append(new S60CommandPublishStep(*m_qt4bc,
- makepp->effectiveCommand() + QLatin1String(" clean -w"),
- tr("Secondary clean"),
- false));
-
- m_publishSteps.append(new S60CommandPublishStep(*m_qt4bc,
- qmakepp->effectiveCommand() + space + qmakepp->arguments(),
- tr("Secondary qmake")));
-
- m_publishSteps.append(new S60CommandPublishStep(*m_qt4bc,
- makepp->effectiveCommand() + space + makepp->arguments(),
- tr("Secondary build")));
- }
-
- QString signArg = QLatin1String("unsigned_installer_sis");
- if (m_qt4bc->qtVersion()->qtVersion() == QtSupport::QtVersionNumber(4,6,3) )
- signArg = QLatin1String("installer_sis");
- m_publishSteps.append(new S60CommandPublishStep(*m_qt4bc,
- makepp->effectiveCommand() + space + signArg,
- tr("Making SIS file")));
-
- // set up access to vendor names
- QStringList deploymentLevelVars = m_reader->values(QLatin1String("DEPLOYMENT"));
- QStringList vendorInfoVars;
- QStringList valueLevelVars;
-
- foreach (const QString &deploymentLevelVar, deploymentLevelVars) {
- vendorInfoVars = m_reader->values(deploymentLevelVar+QLatin1String(".pkg_prerules"));
- foreach (const QString &vendorInfoVar, vendorInfoVars) {
- valueLevelVars = m_reader->values(vendorInfoVar);
- foreach (const QString &valueLevelVar, valueLevelVars) {
- if (valueLevelVar.startsWith(QLatin1String("%{\""))) {
- m_vendorInfoVariable = vendorInfoVar;
- break;
- }
- }
- }
- }
-#endif
-}
-
-bool S60PublisherOvi::isDynamicLibrary(const Qt4Project &project) const
-{
- Qt4ProFileNode *proFile = project.rootQt4ProjectNode();
- if (proFile->projectType() == LibraryTemplate) {
- const QStringList &config(proFile->variableValue(ConfigVar));
- if (!config.contains(QLatin1String("static")) && !config.contains(QLatin1String("staticlib")))
- return true;
- }
- return false;
-}
-
-QString S60PublisherOvi::nameFromTarget() const
-{
- QString target = m_reader->value(QLatin1String("TARGET"));
- if (target.isEmpty())
- target = QFileInfo(m_qt4project->rootProjectNode()->path()).baseName();
- return target;
-}
-
-QString S60PublisherOvi::displayName() const
-{
- const QStringList displayNameList = m_reader->values(QLatin1String("DEPLOYMENT.display_name"));
-
- if (displayNameList.isEmpty())
- return nameFromTarget();
-
- return displayNameList.join(QLatin1String(" "));
-}
-
-QString S60PublisherOvi::globalVendorName() const
-{
- QStringList vendorinfos = m_reader->values(m_vendorInfoVariable);
-
- foreach (QString vendorinfo, vendorinfos) {
- if (vendorinfo.startsWith(QLatin1Char(':'))) {
- return vendorinfo.remove(QLatin1Char(':')).remove(QLatin1Char('"')).trimmed();
- }
- }
- return QString();
-}
-
-QString S60PublisherOvi::localisedVendorNames() const
-{
- QStringList vendorinfos = m_reader->values(m_vendorInfoVariable);
- QString result;
-
- QStringList localisedVendorNames;
- foreach (QString vendorinfo, vendorinfos) {
- if (vendorinfo.startsWith(QLatin1Char('%'))) {
- localisedVendorNames = vendorinfo.remove(QLatin1String("%{")).remove(QLatin1Char('}')).split(QLatin1Char(','));
- foreach (QString localisedVendorName, localisedVendorNames) {
- if (!result.isEmpty())
- result.append(QLatin1String(", "));
- result.append(localisedVendorName.remove(QLatin1Char('"')).trimmed());
- }
- return result;
- }
- }
- return QString();
-}
-
-bool S60PublisherOvi::isVendorNameValid(const QString &vendorName) const
-{
- // vendorName cannot containg "Nokia"
- if (vendorName.trimmed().contains(QLatin1String(Constants::REJECTED_VENDOR_NAMES_NOKIA), Qt::CaseInsensitive))
- return false;
-
- // vendorName cannot be any of the rejected vendor names
- foreach (const QString &rejectedVendorName, m_rejectedVendorNames)
- if (vendorName.trimmed().compare(rejectedVendorName, Qt::CaseInsensitive) == 0)
- return false;
-
- return true;
-}
-
-QString S60PublisherOvi::qtVersion() const
-{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(m_qt4bc->target()->profile());
- return version ? version->displayName() : QString();
-}
-
-QString S60PublisherOvi::uid3() const
-{
- return m_reader->value(QLatin1String("TARGET.UID3"));
-}
-
-bool S60PublisherOvi::isUID3Valid(const QString &uid3) const
-{
- bool ok;
- ulong hex = uid3.trimmed().toULong(&ok, 0);
-
- return ok && (hex >= AssignedRestrictedStart && hex <= AssignedRestrictedEnd);
-}
-
-bool S60PublisherOvi::isTestUID3(const QString &uid3) const
-{
- bool ok;
- ulong hex = uid3.trimmed().toULong(&ok, 0);
- return ok && (hex >= TestStart && hex <= TestEnd);
-}
-
-bool S60PublisherOvi::isKnownSymbianSignedUID3(const QString &uid3) const
-{
- bool ok;
- ulong hex = uid3.trimmed().toULong(&ok, 0);
- return ok && (hex >= SymbianSignedUnprotectedStart && hex <= SymbianSignedUnprotectedEnd);
-}
-
-QString S60PublisherOvi::capabilities() const
-{
- return m_reader->values(QLatin1String("TARGET.CAPABILITY")).join(QLatin1String(", "));
-}
-
-bool S60PublisherOvi::isCapabilityOneOf(const QString &capability, CapabilityLevel level) const
-{
- QStringList capabilitiesInLevel;
- if (level == CertifiedSigned)
- capabilitiesInLevel = m_capabilitiesForCertifiedSigned;
- else if (level == ManufacturerApproved)
- capabilitiesInLevel = m_capabilitesForManufacturerApproved;
-
- return capabilitiesInLevel.contains(capability.trimmed());
-}
-
-void S60PublisherOvi::updateProFile(const QString &var, const QString &values)
-{
- QStringList lines;
- ProFile *profile = m_reader->parsedProFile(m_qt4project->rootProjectNode()->path());
-
- Utils::FileReader reader;
- if (!reader.fetch(m_qt4project->rootProjectNode()->path(), QIODevice::Text)) {
- emit progressReport(reader.errorString(), m_errorColor);
- return;
- }
- lines = QString::fromLocal8Bit(reader.data()).split(QLatin1Char('\n'));
-
- ProWriter::putVarValues(profile, &lines, QStringList() << values, var,
- ProWriter::ReplaceValues | ProWriter::OneLine | ProWriter::AppendOperator,
- QLatin1String("symbian"));
-
- Utils::FileSaver saver(m_qt4project->rootProjectNode()->path(), QIODevice::Text);
- saver.write(lines.join(QLatin1String("\n")).toLocal8Bit());
- if (!saver.finalize())
- emit progressReport(saver.errorString(), m_errorColor);
-}
-
-void S60PublisherOvi::updateProFile()
-{
- if (m_vendorInfoVariable.isEmpty()) {
- m_vendorInfoVariable = QLatin1String("vendorinfo");
- updateProFile(QLatin1String("my_deployment.pkg_prerules"), m_vendorInfoVariable);
- updateProFile(QLatin1String("DEPLOYMENT"), QLatin1String("my_deployment"));
- }
-
- if (!m_displayName.isEmpty() && m_displayName != nameFromTarget())
- updateProFile(QLatin1String("DEPLOYMENT.display_name"), m_displayName);
-
- updateProFile(m_vendorInfoVariable, QLatin1String("\"%{")
- + m_localVendorNames
- + QLatin1String("}\" \":\\\"")
- + m_vendorName
- + QLatin1String("\\\"\"") );
- updateProFile(QLatin1String("TARGET.UID3"), m_appUid);
-}
-
-void S60PublisherOvi::buildSis()
-{
- updateProFile();
- if (!runStep()) {
- emit progressReport(tr("Done.\n"), m_commandColor);
- emit finished();
- }
-}
-
-bool S60PublisherOvi::runStep()
-{
- QTC_ASSERT(m_publishSteps.count(), return false);
-
- S60PublishStep *step = m_publishSteps.at(0);
- emit progressReport(step->displayDescription() + QLatin1Char('\n'), m_commandColor);
- connect(step, SIGNAL(finished(bool)), this, SLOT(publishStepFinished(bool)));
- connect(step, SIGNAL(output(QString,bool)), this, SLOT(printMessage(QString,bool)));
- step->start();
- return true;
-}
-
-bool S60PublisherOvi::nextStep()
-{
- QTC_ASSERT(m_publishSteps.count(), return false);
- m_publishSteps.removeAt(0);
- return m_publishSteps.count();
-}
-
-void S60PublisherOvi::printMessage(QString message, bool error)
-{
- emit progressReport(message + QLatin1Char('\n'), error ? m_errorColor : m_okColor);
-}
-
-void S60PublisherOvi::publishStepFinished(bool success)
-{
- if (!success && m_publishSteps.at(0)->mandatory()) {
- emit progressReport(tr("SIS file not created due to previous errors.\n") , m_errorColor);
- emit finished();
- return;
- }
-
- if (nextStep())
- runStep();
- else {
- QString sisFile;
- if (sisExists(sisFile)) {
- emit progressReport(tr("Created %1.\n").arg(QDir::toNativeSeparators(sisFile)), m_normalColor);
- m_finishedAndSuccessful = true;
- emit succeeded();
- }
- emit progressReport(tr("Done.\n"), m_commandColor);
- emit finished();
- }
-}
-
-bool S60PublisherOvi::sisExists(QString &sisFile)
-{
- QString fileNamePostFix = QLatin1String("_installer_unsigned.sis");
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(m_qt4bc->target()->profile());
- if (version && version->qtVersion() == QtSupport::QtVersionNumber(4,6,3) )
- fileNamePostFix = QLatin1String("_installer.sis");
-
- sisFile = m_qt4bc->buildDirectory() + QLatin1Char('/') + m_qt4project->displayName() + fileNamePostFix;
-
- QFileInfo fi(sisFile);
- return fi.exists();
-}
-
-QString S60PublisherOvi::createdSisFileContainingFolder()
-{
- QString fileNamePostFix = QLatin1String("_installer_unsigned.sis");
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(m_qt4bc->target()->profile());
- if (version && version->qtVersion() == QtSupport::QtVersionNumber(4,6,3) )
- fileNamePostFix = QLatin1String("_installer.sis");
-
- QString resultFile = m_qt4bc->buildDirectory() + QLatin1Char('/') + m_qt4project->displayName() + fileNamePostFix;
- QFileInfo fi(resultFile);
-
- return fi.exists() ? QDir::toNativeSeparators(m_qt4bc->buildDirectory()) : QString();
-}
-
-QString S60PublisherOvi::createdSisFilePath()
-{
- QString fileNamePostFix = QLatin1String("_installer_unsigned.sis");
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(m_qt4bc->target()->profile());
- if (version && version->qtVersion() == QtSupport::QtVersionNumber(4,6,3) )
- fileNamePostFix = QLatin1String("_installer.sis");
-
- const QString resultFile = m_qt4bc->buildDirectory() + QLatin1Char('/')
- + m_qt4project->displayName() + fileNamePostFix;
- QFileInfo fi(resultFile);
- return fi.exists() ? QDir::toNativeSeparators(resultFile) : QString();
-}
-
-bool S60PublisherOvi::hasSucceeded()
-{
- return m_finishedAndSuccessful;
-}
-
-// ======== S60PublishStep
-
-S60PublishStep::S60PublishStep(bool mandatory, QObject *parent)
- : QObject(parent),
- m_succeeded(false),
- m_mandatory(mandatory)
-{
-}
-
-bool S60PublishStep::succeeded() const
-{
- return m_succeeded;
-}
-
-bool S60PublishStep::mandatory() const
-{
- return m_mandatory;
-}
-
-void S60PublishStep::setSucceeded(bool succeeded)
-{
- m_succeeded = succeeded;
-}
-
-// ======== S60CommandPublishStep
-
-S60CommandPublishStep::S60CommandPublishStep(const Qt4ProjectManager::Qt4BuildConfiguration &bc,
- const QString &command,
- const QString &name,
- bool mandatory,
- QObject *parent)
- : S60PublishStep(mandatory, parent),
- m_proc(new QProcess(this)),
- m_command(command),
- m_name(name)
-{
- m_proc->setEnvironment(bc.environment().toStringList());
- m_proc->setWorkingDirectory(bc.buildDirectory());
-
- connect(m_proc, SIGNAL(finished(int)), SLOT(processFinished(int)));
-}
-
-void S60CommandPublishStep::processFinished(int exitCode)
-{
- QByteArray outputText = m_proc->readAllStandardOutput();
- if (!outputText.isEmpty())
- emit output(QString::fromLocal8Bit(outputText), false);
-
- outputText = m_proc->readAllStandardError();
- if (!outputText.isEmpty())
- emit output(QString::fromLocal8Bit(outputText), true);
-
- setSucceeded(exitCode == QProcess::NormalExit);
- emit finished(succeeded());
-}
-
-void S60CommandPublishStep::start()
-{
- emit output(m_command, false);
- m_proc->start(m_command);
-}
-
-QString S60CommandPublishStep::displayDescription() const
-{
- //: %1 is a name of the Publish Step i.e. Clean Step
- return tr("Running %1").arg(m_name);
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.h b/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.h
deleted file mode 100644
index 8438ad9014..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publisherovi.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-#ifndef S60PUBLISHEROVI_H
-#define S60PUBLISHEROVI_H
-
-#include <QObject>
-#include <QColor>
-
-QT_BEGIN_NAMESPACE
-class QProcess;
-QT_END_NAMESPACE
-
-namespace QtSupport {
-class ProFileReader;
-}
-
-namespace ProjectExplorer {
-class Project;
-}
-
-namespace Qt4ProjectManager {
-class Qt4BuildConfiguration;
-class Qt4Project;
-namespace Internal {
-class Qt4SymbianTarget;
-class S60PublishStep;
-
-namespace Constants {
-const char REJECTED_VENDOR_NAMES_VENDOR[] = "Vendor";
-const char REJECTED_VENDOR_NAMES_VENDOR_EN[] = "Vendor-EN";
-const char REJECTED_VENDOR_NAMES_NOKIA[] = "Nokia";
-const char REJECTED_VENDOR_NAMES_EMPTY[] = "";
-
-const char CERTIFIED_SIGNED_CAPABILITY_NETWORK_CONTROL[] = "NetworkControl";
-const char CERTIFIED_SIGNED_CAPABILITY_MULTIMEDIA_DD[] = "MultimediaDD";
-const char CERTIFIED_SIGNED_CAPABILITY_COMM_DD[] = "CommDD";
-const char CERTIFIED_SIGNED_CAPABILITY_DISK_ADMIN[] = "DiskAdmin";
-const char MANUFACTURER_APPROVED_CAPABILITY_ALL_FILES[] = "AllFiles";
-const char MANUFACTURER_APPROVED_CAPABILITY_DRM[] = "DRM";
-const char MANUFACTURER_APPROVED_CAPABILITY_TCB[] = "TCB";
-}
-
-class S60PublisherOvi : public QObject
-{
- Q_OBJECT
-
-public:
- enum UID3Ranges {
- // Protected UID range: 0x00000000 - 0x7FFFFFFF
- // Unprotected UID range: 0x80000000 - 0xFFFFFFFF
- //
- // Specifically, there are two important unprotected UID ranges:
- // UIDs from Symbian Signed: 0xA0000000 - 0xAFFFFFFF
- // UIDs for test/development use: 0xE0000000 - 0xEFFFFFFF
- //
- // And one important protected range:
- // UIDs from Ovi Sign: 0x20000000 to 0x2FFFFFFF
- // Warning: Some of these UIDs are assigned by Symbiansigned.
- // Apps with such UIDs cannot be signed by Ovi.
- // It is currently impossible to say which UIDs have been assigned by whome.
-
- AssignedRestrictedStart = 0x20000000,
- AssignedRestrictedEnd = 0x2FFFFFFF,
- SymbianSignedUnprotectedStart = 0xA0000000,
- SymbianSignedUnprotectedEnd = 0xAFFFFFFF,
- TestStart = 0xE0000000,
- TestEnd = 0xEFFFFFFF
- };
-
- enum CapabilityLevel {
- CertifiedSigned,
- ManufacturerApproved
- };
-
-public:
- explicit S60PublisherOvi(QObject *parent = 0);
- ~S60PublisherOvi();
-
- void setBuildConfiguration(Qt4BuildConfiguration *qt4bc);
- void cleanUp();
- void completeCreation();
-
- QString displayName() const;
- QString globalVendorName() const;
- QString localisedVendorNames() const;
- bool isVendorNameValid(const QString &vendorName) const;
-
- QString nameFromTarget() const;
- QString qtVersion() const;
-
- QString uid3() const;
- bool isUID3Valid(const QString &uid3) const;
- bool isTestUID3(const QString &uid3) const;
- bool isKnownSymbianSignedUID3(const QString &uid3) const;
-
- QString capabilities() const;
- bool isCapabilityOneOf(const QString &capability, CapabilityLevel level) const;
-
- void updateProFile();
- void updateProFile(const QString &var, const QString &values);
- void buildSis();
-
- QString createdSisFileContainingFolder();
- QString createdSisFilePath();
-
- bool hasSucceeded();
-
- void setDisplayName(const QString &displayName);
- void setVendorName(const QString &vendorName);
- void setLocalVendorNames(const QString &localVendorNames);
- void setAppUid(const QString &appuid);
-
-signals:
- void progressReport(const QString& status, QColor c);
- void succeeded();
- void finished();
-
-public slots:
- void publishStepFinished(bool succeeded);
- void printMessage(QString message, bool error);
-
-private:
- bool nextStep();
- bool runStep();
-
- bool sisExists(QString &sisFile);
- bool isDynamicLibrary(const Qt4Project &project) const;
-
-private:
- QColor m_errorColor;
- QColor m_commandColor;
- QColor m_okColor;
- QColor m_normalColor;
-
- Qt4BuildConfiguration * m_qt4bc;
- const Qt4SymbianTarget * m_activeTargetOfProject;
- Qt4Project * m_qt4project;
- QtSupport::ProFileReader *m_reader;
- QStringList m_rejectedVendorNames;
- QStringList m_capabilitiesForCertifiedSigned;
- QStringList m_capabilitesForManufacturerApproved;
- QString m_vendorInfoVariable;
- QString m_vendorName;
- QString m_localVendorNames;
- QString m_appUid;
- QString m_displayName;
-
- QList<S60PublishStep *> m_publishSteps;
-
- bool m_finishedAndSuccessful;
-};
-
-class S60PublishStep : public QObject
-{
- Q_OBJECT
-
-public:
- explicit S60PublishStep(bool mandatory, QObject *parent = 0);
- virtual void start() = 0;
-
- virtual QString displayDescription() const = 0;
- bool succeeded() const;
- bool mandatory() const;
-
-signals:
- void finished(bool succeeded);
- void output(QString output, bool error);
-
-protected:
- void setSucceeded(bool succeeded);
-
-private:
- bool m_succeeded;
- bool m_mandatory;
-};
-
-class S60CommandPublishStep : public S60PublishStep
-{
- Q_OBJECT
-
-public:
- explicit S60CommandPublishStep(const Qt4BuildConfiguration& bc,
- const QString &command,
- const QString &name,
- bool mandatory = true,
- QObject *parent = 0);
-
- virtual void start();
- virtual QString displayDescription() const;
-
-private slots:
- void processFinished(int exitCode);
-
-private:
- QProcess* m_proc;
- const QString m_command;
- const QString m_name;
-
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60PUBLISHEROVI_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp
deleted file mode 100644
index 69352b346e..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60publishingbuildsettingspageovi.h"
-#include "s60publisherovi.h"
-#include "ui_s60publishingbuildsettingspageovi.h"
-#include "qt4buildconfiguration.h"
-#include "qt4projectmanagerconstants.h"
-
-#include <projectexplorer/project.h>
-#include <projectexplorer/target.h>
-#include <projectexplorer/toolchain.h>
-
-#include <QAbstractButton>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-S60PublishingBuildSettingsPageOvi::S60PublishingBuildSettingsPageOvi(S60PublisherOvi *publisher, const ProjectExplorer::Project *project, QWidget *parent) :
- QWizardPage(parent),
- m_bc(0),
- m_toolchain(0),
- m_ui(new Ui::S60PublishingBuildSettingsPageOvi),
- m_publisher(publisher)
-{
- m_ui->setupUi(this);
-
-#if 0 // FIXME: This needs serious work!
- QList<Qt4BuildConfiguration *> list;
- foreach (const ProjectExplorer::Target *const target, project->targets()) {
- if (target->id() != Qt4ProjectManager::Constants::S60_DEVICE_TARGET_ID)
- continue;
- foreach (ProjectExplorer::BuildConfiguration * const bc, target->buildConfigurations()) {
- Qt4BuildConfiguration * const qt4bc
- = qobject_cast<Qt4BuildConfiguration *>(bc);
- if (!qt4bc || !qt4bc->qtVersion())
- continue;
- if (qt4bc->qtVersion()->qtVersion() > QtSupport::QtVersionNumber(4, 6, 2))
- list << qt4bc;
- }
- break;
- }
-
- foreach (Qt4BuildConfiguration *qt4bc, list)
- m_ui->chooseBuildConfigDropDown->addItem(qt4bc->displayName(), QVariant::fromValue(static_cast<ProjectExplorer::BuildConfiguration *>(qt4bc)));
-
- // todo more intelligent selection? prefer newer versions?
- foreach (Qt4BuildConfiguration *qt4bc, list)
- if (!m_bc && !(qt4bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild))
- m_bc = qt4bc;
-
- if (!m_bc && !list.isEmpty())
- m_bc = list.first();
-
- m_ui->chooseBuildConfigDropDown->setSizeAdjustPolicy(QComboBox::AdjustToContentsOnFirstShow);
- int focusedIndex = m_ui->chooseBuildConfigDropDown->findData(QVariant::fromValue(m_bc));
- m_ui->chooseBuildConfigDropDown->setCurrentIndex(focusedIndex);
- m_ui->chooseBuildConfigDropDown->setEnabled(!list.isEmpty());
- m_publisher->setBuildConfiguration(static_cast<Qt4BuildConfiguration *>(m_bc));
- m_ui->buildConfigInfoLabel->setVisible(list.isEmpty());
-
- m_ui->buildConfigInfoLabel->setToolTip(tr("No valid Qt version has been detected.<br>"
- "Define a correct Qt version in \"Options > Qt4\""));
- m_ui->toolchainInfoIconLabel->setToolTip(tr("No valid tool chain has been detected.<br>"
- "Define a correct tool chain in \"Options > Tool Chains\""));
- populateToolchainList(m_bc);
-#else
- Q_UNUSED(project);
-#endif
-
- //change the build configuration if the user changes it
- connect(m_ui->chooseBuildConfigDropDown, SIGNAL(currentIndexChanged(int)), this, SLOT(buildConfigChosen()));
- connect(this, SIGNAL(configurationChosen()), SIGNAL(completeChanged()));
- connect(this, SIGNAL(toolchainConfigurationChosen()), SIGNAL(completeChanged()));
-}
-
-bool S60PublishingBuildSettingsPageOvi::isComplete() const
-{
- return m_bc && m_toolchain;
-}
-
-void S60PublishingBuildSettingsPageOvi::populateToolchainList(ProjectExplorer::BuildConfiguration *bc)
-{
-#if 0 // FIXME: Do the right thing here...
- if (!bc)
- return;
-
- disconnect(m_ui->chooseToolchainDropDown, SIGNAL(currentIndexChanged(int)), this, SLOT(toolchainChosen()));
- m_ui->chooseToolchainDropDown->clear();
- QList<ProjectExplorer::ToolChain *> toolchains = bc->target()->possibleToolChains(bc);
-
- int index = 0;
- bool toolchainChanged = true; // if the new build conf. doesn't contain previous toolchain
- foreach (ProjectExplorer::ToolChain *toolchain, toolchains) {
- m_ui->chooseToolchainDropDown->addItem(toolchain->displayName(),
- qVariantFromValue(static_cast<void *>(toolchain)));
- if (toolchainChanged && m_toolchain == toolchain) {
- toolchainChanged = false;
- m_ui->chooseToolchainDropDown->setCurrentIndex(index);
- }
- ++index;
- }
-
- connect(m_ui->chooseToolchainDropDown, SIGNAL(currentIndexChanged(int)), this, SLOT(toolchainChosen()));
-
- m_ui->toolchainInfoIconLabel->setVisible(!toolchains.size());
- m_ui->chooseToolchainDropDown->setEnabled(toolchains.size() > 1);
-
- if (toolchainChanged)
- toolchainChosen();
- else
- bc->setToolChain(m_toolchain);
-#else
- Q_UNUSED(bc);
-#endif
-}
-
-void S60PublishingBuildSettingsPageOvi::buildConfigChosen()
-{
- int currentIndex = m_ui->chooseBuildConfigDropDown->currentIndex();
- if (currentIndex == -1)
- return;
- m_bc = m_ui->chooseBuildConfigDropDown->itemData(currentIndex).value<ProjectExplorer::BuildConfiguration *>();
- populateToolchainList(m_bc);
- m_publisher->setBuildConfiguration(static_cast<Qt4BuildConfiguration *>(m_bc));
- emit configurationChosen();
-}
-
-void S60PublishingBuildSettingsPageOvi::toolchainChosen()
-{
-#if 0 // FIXME: Do the right thing!
- const int currentIndex = m_ui->chooseToolchainDropDown->currentIndex();
- if (currentIndex == -1) {
- m_toolchain = 0;
- emit toolchainConfigurationChosen();
- return;
- }
-
- m_toolchain = static_cast<ProjectExplorer::ToolChain *>(m_ui->chooseToolchainDropDown->itemData(currentIndex, Qt::UserRole).value<void *>());
-
- if (m_bc)
- m_bc->setToolChain(m_toolchain);
-#endif
- emit toolchainConfigurationChosen();
-}
-
-S60PublishingBuildSettingsPageOvi::~S60PublishingBuildSettingsPageOvi()
-{
- delete m_ui;
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.h b/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.h
deleted file mode 100644
index 6f6e69af30..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60PUBLISHINGBUILDSETTINGSPAGEOVI_H
-#define S60PUBLISHINGBUILDSETTINGSPAGEOVI_H
-
-#include <QWizardPage>
-
-namespace ProjectExplorer {
-class Project;
-class BuildConfiguration;
-class ToolChain;
-}
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-namespace Ui { class S60PublishingBuildSettingsPageOvi; }
-
-class S60PublisherOvi;
-
-
-class S60PublishingBuildSettingsPageOvi : public QWizardPage
-{
- Q_OBJECT
-
-public:
- explicit S60PublishingBuildSettingsPageOvi(S60PublisherOvi *publisher,
- const ProjectExplorer::Project *project, QWidget *parent = 0);
- ~S60PublishingBuildSettingsPageOvi();
-
- virtual bool isComplete() const;
-
-signals:
- void configurationChosen();
- void toolchainConfigurationChosen();
-
-private slots:
- void buildConfigChosen();
- void toolchainChosen();
-
-private:
- void populateToolchainList(ProjectExplorer::BuildConfiguration *bc);
-
-private:
- ProjectExplorer::BuildConfiguration *m_bc;
- ProjectExplorer::ToolChain *m_toolchain;
- Ui::S60PublishingBuildSettingsPageOvi *m_ui;
- S60PublisherOvi * const m_publisher;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60PUBLISHINGBUILDSETTINGSPAGEOVI_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.ui b/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.ui
deleted file mode 100644
index b4efc6b00e..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.ui
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qt4ProjectManager::Internal::S60PublishingBuildSettingsPageOvi</class>
- <widget class="QWidget" name="Qt4ProjectManager::Internal::S60PublishingBuildSettingsPageOvi">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>414</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="2" column="1">
- <spacer name="verticalSpacer_2">
- <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="0" column="2">
- <widget class="QLabel" name="buildConfigInfoLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_error.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QComboBox" name="chooseToolchainDropDown">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="chooseBuildConfigLabel">
- <property name="text">
- <string>Choose a build configuration:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>252</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="chooseBuildConfigDropDown">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="chooseToolchainLabel">
- <property name="text">
- <string>Choose a tool chain:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="toolchainInfoIconLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_error.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="3" column="0" colspan="4">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Only Qt versions above 4.6.3 are made available in this wizard.
-Previous Qt versions have limitations in building suitable SIS files.</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <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>
- <resources>
- <include location="../../projectexplorer/projectexplorer.qrc"/>
- </resources>
- <connections/>
-</ui>
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.cpp
deleted file mode 100644
index 993202e5e2..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-#include "s60publishingresultspageovi.h"
-#include "s60publisherovi.h"
-#include "ui_s60publishingresultspageovi.h"
-
-#include <QDesktopServices>
-#include <QAbstractButton>
-#include <QScrollBar>
-#include <QProcess>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-S60PublishingResultsPageOvi::S60PublishingResultsPageOvi(S60PublisherOvi *publisher, QWidget *parent) :
- QWizardPage(parent),
- ui(new Ui::S60PublishingResultsPageOvi),
- m_publisher(publisher)
-{
- ui->setupUi(this);
- connect(m_publisher, SIGNAL(progressReport(QString,QColor)), SLOT(updateResultsPage(QString,QColor)));
-}
-
-S60PublishingResultsPageOvi::~S60PublishingResultsPageOvi()
-{
- delete ui;
-}
-
-void S60PublishingResultsPageOvi::initializePage()
-{
- wizard()->setButtonText(QWizard::FinishButton, tr("Open Containing Folder"));
- connect(m_publisher, SIGNAL(finished()), SIGNAL(completeChanged()));
- connect(m_publisher, SIGNAL(finished()), SLOT(packageCreationFinished()));
- connect(wizard()->button(QWizard::FinishButton), SIGNAL(clicked()), SLOT(openFileLocation()));
- m_publisher->buildSis();
-}
-
-bool S60PublishingResultsPageOvi::isComplete() const
-{
- return m_publisher->hasSucceeded();
-}
-
-void S60PublishingResultsPageOvi::packageCreationFinished()
-{
- wizard()->setButtonText(QWizard::CancelButton, tr("Close"));
-}
-
-void S60PublishingResultsPageOvi::updateResultsPage(const QString& status, QColor c)
-{
- const bool atBottom = isScrollbarAtBottom();
- QTextCursor cur(ui->resultsTextBrowser->document());
- QTextCharFormat tcf = cur.charFormat();
- tcf.setForeground(c);
- cur.movePosition(QTextCursor::End);
- cur.insertText(status, tcf);
- if (atBottom)
- scrollToBottom();
-}
-
-bool S60PublishingResultsPageOvi::isScrollbarAtBottom() const
-{
- QScrollBar *scrollBar = ui->resultsTextBrowser->verticalScrollBar();
- return scrollBar->value() == scrollBar->maximum();
-}
-
-void S60PublishingResultsPageOvi::scrollToBottom()
-{
- QScrollBar *scrollBar = ui->resultsTextBrowser->verticalScrollBar();
- scrollBar->setValue(scrollBar->maximum());
- // QPlainTextEdit destroys the first calls value in case of multiline
- // text, so make sure that the scroll bar actually gets the value set.
- // Is a noop if the first call succeeded.
- scrollBar->setValue(scrollBar->maximum());
-}
-
-void S60PublishingResultsPageOvi::openFileLocation()
-{
-#ifdef Q_OS_WIN
- QProcess::startDetached(QLatin1String("explorer /select,")+ m_publisher->createdSisFilePath());
-#else
- QDesktopServices::openUrl(QUrl(QLatin1String("file:///") + m_publisher->createdSisFileContainingFolder()));
-#endif
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.h b/src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.h
deleted file mode 100644
index 5d86ff8e8e..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60PUBLISHINGRESULTSPAGEOVI_H
-#define S60PUBLISHINGRESULTSPAGEOVI_H
-
-#include <QWizardPage>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60PublisherOvi;
-
-namespace Ui { class S60PublishingResultsPageOvi; }
-
-class S60PublishingResultsPageOvi : public QWizardPage
-{
- Q_OBJECT
-
-public:
- explicit S60PublishingResultsPageOvi(S60PublisherOvi *publisher, QWidget *parent = 0);
- ~S60PublishingResultsPageOvi();
-
- virtual void initializePage();
- virtual bool isComplete() const;
-
-public slots:
- void updateResultsPage(const QString &status, QColor c);
- void openFileLocation();
- void packageCreationFinished();
-
-private:
- void scrollToBottom();
- bool isScrollbarAtBottom() const;
-
-private:
- Ui::S60PublishingResultsPageOvi *ui;
- S60PublisherOvi * const m_publisher;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60PUBLISHINGRESULTSPAGEOVI_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.ui b/src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.ui
deleted file mode 100644
index b5307d8e56..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingresultspageovi.ui
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qt4ProjectManager::Internal::S60PublishingResultsPageOvi</class>
- <widget class="QWidget" name="Qt4ProjectManager::Internal::S60PublishingResultsPageOvi">
- <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="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QTextBrowser" name="resultsTextBrowser">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.cpp
deleted file mode 100644
index 94ac9cefed..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.cpp
+++ /dev/null
@@ -1,311 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60publishingsissettingspageovi.h"
-#include "ui_s60publishingsissettingspageovi.h"
-#include "s60publisherovi.h"
-#include "s60certificateinfo.h"
-
-#include <QAbstractButton>
-
-using namespace ProjectExplorer;
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-S60PublishingSisSettingsPageOvi::S60PublishingSisSettingsPageOvi(S60PublisherOvi *publisher, QWidget *parent) :
- QWizardPage(parent),
- ui(new Ui::S60PublishingSisSettingsPageOvi),
- m_publisher(publisher)
-{
- ui->setupUi(this);
-
- //Setup labels which display icons about the state of the entry
- //error icons
- ui->capabilitiesErrorLabel->hide();
- ui->qtVersionErrorLabel->hide();
- ui->uid3ErrorLabel->hide();
- ui->globalVendorNameErrorLabel->hide();
- ui->localisedVendorNamesErrorLabel->hide();
- //ok icons
- ui->capabilitiesOkLabel->hide();
- ui->qtVersionOkLabel->hide();
- ui->uid3OkLabel->hide();
- ui->globalVendorNameOkLabel->hide();
- ui->localisedVendorNamesOkLabel->hide();
- //warning icons
- ui->globalVendorNameWarningLabel->hide();
- ui->localisedVendorNamesWarningLabel->hide();
- ui->qtVersionWarningLabel->hide();
- ui->uid3WarningLabel->hide();
-}
-
-void S60PublishingSisSettingsPageOvi::initializePage()
-{
- //Finish creation of the publisher
- m_publisher->completeCreation();
-
- showWarningsForUnenforcableChecks();
-
- //Check Display Name
- ui->displayNameLineEdit->setText(m_publisher->displayName());
- displayNameChanged();
- connect(ui->displayNameLineEdit,SIGNAL(textChanged(QString)),SLOT(displayNameChanged()));
-
- //Check Global Vendor Name
- ui->globalVendorNameLineEdit->setText(m_publisher->globalVendorName());
- globalVendorNameChanged();
- connect(ui->globalVendorNameLineEdit,SIGNAL(textChanged(QString)),SLOT(globalVendorNameChanged()));
-
- //Check Localised Vendor Names
- ui->localisedVendorNamesLineEdit->setText(m_publisher->localisedVendorNames());
- localisedVendorNamesChanged();
- connect(ui->localisedVendorNamesLineEdit,SIGNAL(textChanged(QString)),SLOT(localisedVendorNamesChanged()));
-
- //Check Qt Version Used in Builds
- ui->qtVersionDisplayLabel->setText(m_publisher->qtVersion());
- qtVersionChanged();
-
- //Check UID3
- ui->uid3LineEdit->setText(m_publisher->uid3());
- uid3Changed();
- connect(ui->uid3LineEdit,SIGNAL(textChanged(QString)),SLOT(uid3Changed()));
-
- //Check for capabilities which are not signed for
- ui->capabilitiesDisplayLabel->setText(m_publisher->capabilities());
- capabilitiesChanged();
-}
-
-void S60PublishingSisSettingsPageOvi::cleanupPage()
-{
- m_publisher->cleanUp();
-}
-
-S60PublishingSisSettingsPageOvi::~S60PublishingSisSettingsPageOvi()
-{
- delete ui;
-}
-
-void S60PublishingSisSettingsPageOvi::reflectSettingState(bool settingState, QLabel *okLabel, QLabel *errorLabel, QLabel *errorReasonLabel, const QString &errorReason)
-{
- if (!settingState) {
- okLabel->hide();
- errorLabel->show();
- errorReasonLabel->setTextFormat(Qt::RichText);
- errorReasonLabel->setText(errorReason);
- errorReasonLabel->show();
- } else {
- okLabel->show();
- errorLabel->hide();
- errorReasonLabel->hide();
- }
-
- // This is a hack.
- // the labels change size, most likely increasing height but that doesn't change the wizard layout
- // It essentially forces QWizard to update its layout. (Until setTitleFormat checks whether the format changed at all...)
- // todo figure out whether the QWizard should be doing that automatically
- wizard()->setTitleFormat(wizard()->titleFormat());
-}
-
-void S60PublishingSisSettingsPageOvi::displayNameChanged()
-{
- reflectSettingState(!ui->displayNameLineEdit->text().isEmpty(),
- ui->displayNameOkLabel,
- ui->displayNameErrorLabel,
- ui->displayNameErrorReasonLabel,
- tr("This should be application's display name. <br>"
- "It cannot be empty.<br>"));
-
- const int visibleCharacters = 12;
- if (ui->displayNameLineEdit->text().length() > visibleCharacters) {
- ui->displayNameWarningLabel->show();
- ui->displayNameWarningReasonLabel->setText(tr("The display name is quite long.<br>"
- "It might not be fully visible in the phone's menu.<br>"));
- ui->displayNameWarningReasonLabel->show();
- } else {
- ui->displayNameWarningLabel->hide();
- ui->displayNameWarningReasonLabel->hide();
- }
-
- m_publisher->setDisplayName(ui->displayNameLineEdit->text());
-}
-
-void S60PublishingSisSettingsPageOvi::globalVendorNameChanged()
-{
- reflectSettingState(m_publisher->isVendorNameValid(ui->globalVendorNameLineEdit->text()),
- ui->globalVendorNameOkLabel,
- ui->globalVendorNameErrorLabel,
- ui->globalVendorNameErrorReasonLabel,
- tr("\"%1\" is a default vendor name used for testing and development. <br>"
- "The Vendor_Name field cannot contain the name 'Nokia'. <br>"
- "You are advised against using the default names 'Vendor' and 'Vendor-EN'. <br>"
- "You should also not leave the entry blank. <br>"
- "see <a href=\"http://www.developer.nokia.com/Distribute/Packaging_and_signing.xhtml\">Packaging and Signing</a> for guidelines.<br>")
- .arg(ui->globalVendorNameLineEdit->text()));
- m_publisher->setVendorName(ui->globalVendorNameLineEdit->text());
-}
-
-void S60PublishingSisSettingsPageOvi::localisedVendorNamesChanged()
-{
- QStringList localisedVendorNames = ui->localisedVendorNamesLineEdit->text().split(QLatin1Char(','));
-
- bool settingState = true;
- QStringList wrongVendorNames;
-
- foreach (const QString &localisedVendorName, localisedVendorNames) {
- if (!m_publisher->isVendorNameValid(localisedVendorName)) {
- wrongVendorNames.append(localisedVendorName);
- settingState = false;
- }
- }
-
- const QString wrongVendorNamesString = wrongVendorNames.join(QLatin1String(", "));
- QString pluralOrSingular = tr("%1 is a default vendor name used for testing and development.").arg(wrongVendorNamesString);
- if (wrongVendorNames.count() > 1)
- pluralOrSingular = tr("%1 are default vendor names used for testing and development.").arg(wrongVendorNamesString);
-
- reflectSettingState(settingState,
- ui->localisedVendorNamesOkLabel,
- ui->localisedVendorNamesErrorLabel,
- ui->localisedVendorNamesErrorReasonLabel,
- tr("%1 <br>"
- "The Vendor_Name field cannot contain the name 'Nokia'. <br>"
- "You are advised against using the default names 'Vendor' and 'Vendor-EN'. <br>"
- "You should also not leave the entry blank. <br>"
- "See <a href=\"http://www.developer.nokia.com/Distribute/Packaging_and_signing.xhtml\">"
- "Packaging and Signing</a> for guidelines.<br>").arg(pluralOrSingular));
- m_publisher->setLocalVendorNames(ui->localisedVendorNamesLineEdit->text());
-}
-
-void S60PublishingSisSettingsPageOvi::qtVersionChanged()
-{
-}
-
-void S60PublishingSisSettingsPageOvi::uid3Changed()
-{
- QString testUID3ErrorMsg = tr("The application UID %1 is only for testing and development.<br>"
- "SIS packages built with it cannot be distributed via the Nokia Store.<br>");
-
- QString symbianSignedUID3ErrorMsg = tr("The application UID %1 is a symbiansigned.com UID. <br>"
- "Applications with this UID will be rejected by "
- "Application Signing Services for Nokia Store.<br>"
- "If you want to continue with a symbiansigned.com UID, "
- "sign your application on symbiansigned.com and upload the "
- "signed application to Nokia Publish.<br>");
-
- QString errorMsg = tr("The application UID %1 is not an acceptable UID.<br>"
- "SIS packages built with it cannot be signed by "
- "Application Signing Services for Nokia Store.<br>");
-
- if (m_publisher->isTestUID3(ui->uid3LineEdit->text())) {
- errorMsg = testUID3ErrorMsg;
- } else if (m_publisher->isKnownSymbianSignedUID3(ui->uid3LineEdit->text())) {
- errorMsg = symbianSignedUID3ErrorMsg;
- }
-
- reflectSettingState(m_publisher->isUID3Valid(ui->uid3LineEdit->text()),
- ui->uid3OkLabel,
- ui->uid3ErrorLabel,
- ui->uid3ErrorReasonLabel,
- tr("The application UID is a global unique indentifier of the SIS package.<br>") +
- errorMsg.arg(ui->uid3LineEdit->text()) +
- tr("To get a unique application UID for your package file,<br>"
- "please register at <a href=\"http://info.publish.ovi.com/\">publish.ovi.com</a>"));
-
- if (m_publisher->isUID3Valid(ui->uid3LineEdit->text())) {
- ui->uid3WarningLabel->show();
- ui->uid3WarningReasonLabel->setText(tr("If this UID is from symbiansigned.com, It will be "
- "rejected by Application Signing Services for Nokia Store.<br>"
- "If you want to continue with a symbiansigned.com UID, "
- "sign your application on symbiansigned.com and upload "
- "the signed application to Nokia Publish.<br>"
- "It is, however, recommended that you obtain a UID from "
- "<a href=\"http://info.publish.ovi.com/\">publish.ovi.com</a>"));
- ui->uid3WarningReasonLabel->show();
- } else {
- ui->uid3WarningLabel->hide();
- ui->uid3WarningReasonLabel->hide();
- }
-
- m_publisher->setAppUid(ui->uid3LineEdit->text());
-}
-
-void S60PublishingSisSettingsPageOvi::capabilitiesChanged()
-{
- QStringList capabilities = ui->capabilitiesDisplayLabel->text().split(QLatin1Char(','));
- QString errorMessage;
-
- //Check for certified Signed capabilities
- QStringList capabilitesNeedingCertifiedSigned;
- foreach (const QString &capability, capabilities) {
- if (m_publisher->isCapabilityOneOf(capability, S60PublisherOvi::CertifiedSigned)) {
- capabilitesNeedingCertifiedSigned.append(capability);
- capabilities.removeOne(capability);
- }
- }
-
- if (!capabilitesNeedingCertifiedSigned.isEmpty())
- errorMessage.append(tr("%1 need(s) to be certified signed. "
- "Please go to <a href=\"symbiansigned.com\">symbiansigned.com</a> for guidance.")
- .arg(capabilitesNeedingCertifiedSigned.join(QLatin1String(", "))));
-
- //Check for capabilities needing manufacturer approval
- QStringList capabilitiesNeedingManufacturerApproved;
-
- foreach (const QString &capability, capabilities) {
- if (m_publisher->isCapabilityOneOf(capability, S60PublisherOvi::ManufacturerApproved))
- capabilitiesNeedingManufacturerApproved.append(capability);
- }
-
- if (!capabilitiesNeedingManufacturerApproved.isEmpty()) {
- errorMessage.append(tr("<br>%1 need(s) manufacturer approval.<br>")
- .arg(capabilitiesNeedingManufacturerApproved.join(QLatin1String(", "))));
- }
-
- errorMessage.prepend(tr("Some capabilities might require a special kind of signing or approval from the manufacturer.<br>"));
-
- reflectSettingState(capabilitesNeedingCertifiedSigned.isEmpty() && capabilitiesNeedingManufacturerApproved.isEmpty(),
- ui->capabilitiesOkLabel,
- ui->capabilitiesErrorLabel,
- ui->capabilitiesErrorReasonLabel,
- errorMessage);
-}
-
-void S60PublishingSisSettingsPageOvi::showWarningsForUnenforcableChecks()
-{
- //Warn about use of unreleased Qt Versions
- //ui->qtVersionWarningLabel->show(); //looks better without...
- ui->qtVersionWarningReasonLabel->setText(tr("Please verify that you have a released version of Qt. <br>"
- "<a href=\"http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian\">"
- "Qt Packages Distributed by Smart Installer</a> has a list of released Qt versions."));
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.h b/src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.h
deleted file mode 100644
index d47eeaa69b..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60PUBLISHINGSISSETTINGSPAGEOVI_H
-#define S60PUBLISHINGSISSETTINGSPAGEOVI_H
-
-#include <QWizardPage>
-
-QT_BEGIN_NAMESPACE
-class QLabel;
-QT_END_NAMESPACE
-
-namespace ProjectExplorer { class Project; }
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60PublisherOvi;
-
-namespace Ui { class S60PublishingSisSettingsPageOvi; }
-
-class S60PublishingSisSettingsPageOvi : public QWizardPage
-{
- Q_OBJECT
-public:
- explicit S60PublishingSisSettingsPageOvi(S60PublisherOvi *publisher, QWidget *parent = 0);
- ~S60PublishingSisSettingsPageOvi();
-
- virtual void initializePage();
- virtual void cleanupPage();
-
-
-private slots:
- void globalVendorNameChanged();
- void localisedVendorNamesChanged();
- void qtVersionChanged();
- void uid3Changed();
- void capabilitiesChanged();
- void displayNameChanged();
-
-private:
- void reflectSettingState(bool settingState, QLabel *okLabel,
- QLabel *errorLabel, QLabel *errorReasonLabel, const QString &errorReason);
- void showWarningsForUnenforcableChecks();
-
- Ui::S60PublishingSisSettingsPageOvi *ui;
- S60PublisherOvi * const m_publisher;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60PUBLISHINGSISSETTINGSPAGEOVI_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.ui b/src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.ui
deleted file mode 100644
index b48f74fda2..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingsissettingspageovi.ui
+++ /dev/null
@@ -1,535 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qt4ProjectManager::Internal::S60PublishingSisSettingsPageOvi</class>
- <widget class="QWidget" name="Qt4ProjectManager::Internal::S60PublishingSisSettingsPageOvi">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>453</width>
- <height>630</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <property name="sizeConstraint">
- <enum>QLayout::SetMinAndMaxSize</enum>
- </property>
- <item row="10" column="1" colspan="2">
- <widget class="QLabel" name="localisedVendorNamesErrorReasonLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="10" column="0">
- <widget class="QLabel" name="localisedVendorNamesErrorLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_error.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="9" column="2">
- <widget class="QLabel" name="localisedVendorNamesOkLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/DeviceReadyToUse.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="9" column="1">
- <widget class="QLineEdit" name="localisedVendorNamesLineEdit">
- <property name="text">
- <string>Localised Vendor Names</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QLineEdit" name="globalVendorNameLineEdit">
- <property name="text">
- <string>Current Global Vendor Name</string>
- </property>
- </widget>
- </item>
- <item row="24" column="1" colspan="3">
- <widget class="QLabel" name="capabilitiesErrorReasonLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="4" column="0" colspan="4">
- <widget class="Line" name="line_5">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="displayNameErrorLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_error.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="displayNameLabel">
- <property name="text">
- <string>Display name:</string>
- </property>
- </widget>
- </item>
- <item row="19" column="1">
- <widget class="QLabel" name="uid3WarningReasonLabel">
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="19" column="0">
- <widget class="QLabel" name="uid3WarningLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="20" column="0" colspan="4">
- <widget class="Line" name="line">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="7" column="1" colspan="2">
- <widget class="QLabel" name="globalVendorNameWarningReasonLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="globalVendorNameWarningLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="15" column="1" colspan="2">
- <widget class="QLabel" name="qtVersionWarningReasonLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="15" column="0">
- <widget class="QLabel" name="qtVersionWarningLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="11" column="0">
- <widget class="QLabel" name="localisedVendorNamesWarningLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="11" column="1" colspan="2">
- <widget class="QLabel" name="localisedVendorNamesWarningReasonLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="12" column="0" colspan="4">
- <widget class="Line" name="line_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="24" column="0">
- <widget class="QLabel" name="capabilitiesErrorLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_error.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="18" column="0">
- <widget class="QLabel" name="uid3ErrorLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_error.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="14" column="0">
- <widget class="QLabel" name="qtVersionErrorLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_error.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="9" column="0">
- <widget class="QLabel" name="localisedVendorNamesLabel">
- <property name="text">
- <string>Localised vendor names:</string>
- </property>
- </widget>
- </item>
- <item row="23" column="0">
- <widget class="QLabel" name="capabilitiesLabel">
- <property name="text">
- <string>Capabilities:</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1" colspan="3">
- <widget class="QLabel" name="globalVendorNameErrorReasonLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="17" column="2">
- <widget class="QLabel" name="uid3OkLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/DeviceReadyToUse.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="17" column="1">
- <widget class="QLineEdit" name="uid3LineEdit">
- <property name="text">
- <string>Current UID3</string>
- </property>
- </widget>
- </item>
- <item row="17" column="0">
- <widget class="QLabel" name="uid3Label">
- <property name="text">
- <string>Application UID:</string>
- </property>
- </widget>
- </item>
- <item row="13" column="2">
- <widget class="QLabel" name="qtVersionOkLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/DeviceReadyToUse.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="13" column="1">
- <widget class="QLabel" name="qtVersionDisplayLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="text">
- <string>Current Qt Version</string>
- </property>
- </widget>
- </item>
- <item row="13" column="0">
- <widget class="QLabel" name="qtVersionLabel">
- <property name="text">
- <string>Qt version used in builds:</string>
- </property>
- </widget>
- </item>
- <item row="23" column="1">
- <widget class="QLabel" name="capabilitiesDisplayLabel">
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="text">
- <string>Current set of capabilities</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="globalVendorNameLabel">
- <property name="text">
- <string>Global vendor name:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="2">
- <widget class="QLabel" name="globalVendorNameOkLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/DeviceReadyToUse.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="16" column="0" colspan="4">
- <widget class="Line" name="line_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="8" column="0" colspan="4">
- <widget class="Line" name="line_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="globalVendorNameErrorLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_error.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="18" column="1" colspan="3">
- <widget class="QLabel" name="uid3ErrorReasonLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="14" column="1" colspan="3">
- <widget class="QLabel" name="qtVersionErrorReasonLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="23" column="2">
- <widget class="QLabel" name="capabilitiesOkLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/DeviceReadyToUse.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="displayNameWarningLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="displayNameLineEdit"/>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="displayNameOkLabel">
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/DeviceReadyToUse.png</pixmap>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="displayNameWarningReasonLabel">
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="displayNameErrorReasonLabel">
- <property name="text">
- <string/>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources>
- <include location="../../projectexplorer/projectexplorer.qrc"/>
- </resources>
- <connections/>
-</ui>
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.cpp
deleted file mode 100644
index 0a74b22a26..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60publishingwizardfactories.h"
-#include "s60publishingwizardovi.h"
-
-#include "qmakestep.h"
-#include "qt4project.h"
-#include "qt4projectmanagerconstants.h"
-
-#include <projectexplorer/target.h>
-
-#include <qtsupport/qtsupportconstants.h>
-#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
-
-using namespace ProjectExplorer;
-
-namespace Qt4ProjectManager {
-namespace Internal {
-S60PublishingWizardFactoryOvi::S60PublishingWizardFactoryOvi(QObject *parent)
- : IPublishingWizardFactory(parent)
-{}
-
-QString S60PublishingWizardFactoryOvi::displayName() const
-{
- return tr("Publish Qt Symbian Applications to Nokia Store");
-}
-
-QString S60PublishingWizardFactoryOvi::description() const
-{
- return tr("This wizard checks "
- "your project file to make sure it complies with "
- "Nokia Store submission criteria.\n\n"
- "The wizard creates SIS files that can be submitted "
- "to Nokia Publish.\n\n"
- "You cannot use it if you use application UIDs from Symbian Signed.\n\n"
- "You cannot use it for the Certified Signed and Manufacturer level capabilities:\n"
- "NetworkControl, MultimediaDD, CommDD, DiskAdmin, AllFiles, DRM and TCB.\n\n"
- "Your application will also be rejected by Nokia Store QA if you choose "
- "an unreleased Qt version on the next page.");
-}
-
-bool S60PublishingWizardFactoryOvi::canCreateWizard(const Project *project) const
-{
- if (!qobject_cast<const Qt4Project *>(project))
- return false;
- foreach (const Target *const target, project->targets()) {
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
- if (version->type() == QLatin1String(QtSupport::Constants::SYMBIANQT))
- return true;
- }
- return false;
-}
-
-QWizard *S60PublishingWizardFactoryOvi::createWizard(const Project *project) const
-{
- Q_ASSERT(canCreateWizard(project));
- return new S60PublishingWizardOvi(project);
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.h b/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.h
deleted file mode 100644
index 518f8c2afd..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60PUBLISHINGWIZARDFACTORIES_H
-#define S60PUBLISHINGWIZARDFACTORIES_H
-
-#include <projectexplorer/publishing/ipublishingwizardfactory.h>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60PublishingWizardFactoryOvi : public ProjectExplorer::IPublishingWizardFactory
-{
- Q_OBJECT
-public:
- explicit S60PublishingWizardFactoryOvi(QObject *parent =0);
-private:
- QString displayName() const;
- QString description() const;
- bool canCreateWizard(const ProjectExplorer::Project *project) const;
- QWizard *createWizard(const ProjectExplorer::Project *project) const;
-};
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60PUBLISHINGWIZARDFACTORIES_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardovi.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardovi.cpp
deleted file mode 100644
index a3fb0b25fa..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardovi.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60publishingwizardovi.h"
-#include "s60publisherovi.h"
-#include "s60publishingbuildsettingspageovi.h"
-#include "s60publishingsissettingspageovi.h"
-#include "s60publishingresultspageovi.h"
-
-using namespace ProjectExplorer;
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-S60PublishingWizardOvi::S60PublishingWizardOvi(const Project *project, QWidget *parent) :
- Wizard(parent),
- m_publisher(new S60PublisherOvi(this))
-{
- setWindowTitle(tr("Publishing to Nokia Store"));
-
- m_buildSettingsPage = new S60PublishingBuildSettingsPageOvi(m_publisher, project);
- m_buildSettingsPage->setTitle(tr("Build Configuration"));
- addPage(m_buildSettingsPage);
-
- m_sisSettingsPage = new S60PublishingSisSettingsPageOvi(m_publisher);
- m_sisSettingsPage->setTitle(tr("Project File Checks"));
- m_sisSettingsPage->setCommitPage(true);
- addPage(m_sisSettingsPage);
-
- m_resultsPage = new S60PublishingResultsPageOvi(m_publisher);
- m_resultsPage->setTitle(tr("Creating an Uploadable SIS File"));
- m_resultsPage->setFinalPage(true);
- addPage(m_resultsPage);
-
- setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
-}
-
-S60PublishingWizardOvi::~S60PublishingWizardOvi()
-{
- delete m_publisher;
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardovi.h b/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardovi.h
deleted file mode 100644
index a6dc735d36..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardovi.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60PUBLISHINGWIZARDOVI_H
-#define S60PUBLISHINGWIZARDOVI_H
-
-#include <utils/wizard.h>
-
-namespace ProjectExplorer {
-class Project;
-}
-
-namespace Qt4ProjectManager {
-namespace Internal {
-class S60PublisherOvi;
-class S60PublishingBuildSettingsPageOvi;
-class S60PublishingSisSettingsPageOvi;
-class S60PublishingResultsPageOvi;
-
-class S60PublishingWizardOvi : public Utils::Wizard
-{
- Q_OBJECT
-public:
- explicit S60PublishingWizardOvi(const ProjectExplorer::Project *project, QWidget *parent = 0);
- ~S60PublishingWizardOvi();
-
-private:
- S60PublisherOvi *m_publisher;
- S60PublishingBuildSettingsPageOvi *m_buildSettingsPage;
- S60PublishingSisSettingsPageOvi *m_sisSettingsPage;
- S60PublishingResultsPageOvi *m_resultsPage;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60PUBLISHINGWIZARDOVI_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp
deleted file mode 100644
index 1cd924b68c..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60runcontrolbase.h"
-
-#include "qt4buildconfiguration.h"
-#include "s60deployconfiguration.h"
-#include "s60devicerunconfiguration.h"
-
-#include <analyzerbase/analyzerconstants.h>
-#include <coreplugin/icore.h>
-#include <debugger/debuggerconstants.h>
-#include <coreplugin/progressmanager/progressmanager.h>
-#include <projectexplorer/target.h>
-#include <qtsupport/qtprofileinformation.h>
-#include <utils/qtcassert.h>
-
-#include <QDateTime>
-#include <QDir>
-#include <QFileInfo>
-
-using namespace ProjectExplorer;
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-const int PROGRESS_MIN = 0;
-const int PROGRESS_MAX = 200;
-
-enum { debug = 0 };
-
-// Format information about a file
-QString S60RunControlBase::msgListFile(const QString &file)
-{
- QString rc;
- const QFileInfo fi(file);
- QTextStream str(&rc);
- if (fi.exists())
- str << fi.size() << ' ' << fi.lastModified().toString(Qt::ISODate) << ' ' << QDir::toNativeSeparators(fi.absoluteFilePath());
- else
- str << "<non-existent> " << QDir::toNativeSeparators(fi.absoluteFilePath());
- return rc;
-}
-
-S60RunControlBase::S60RunControlBase(RunConfiguration *runConfiguration,
- RunMode mode) :
- RunControl(runConfiguration, mode),
- m_launchProgress(0)
-{
- connect(this, SIGNAL(finished()), this, SLOT(reportLaunchFinished()));
- connect(this, SIGNAL(finished()), this, SLOT(handleFinished()));
-
- const S60DeviceRunConfiguration *s60runConfig = qobject_cast<S60DeviceRunConfiguration *>(runConfiguration);
- QTC_ASSERT(s60runConfig, return);
- const Qt4BuildConfiguration *activeBuildConf = qobject_cast<Qt4BuildConfiguration *>(s60runConfig->target()->activeBuildConfiguration());
- QTC_ASSERT(activeBuildConf, return);
- const S60DeployConfiguration *activeDeployConf = qobject_cast<S60DeployConfiguration *>(s60runConfig->target()->activeDeployConfiguration());
- QTC_ASSERT(activeDeployConf, return);
-
- m_executableUid = s60runConfig->executableUid();
- m_targetName = s60runConfig->targetName();
- m_commandLineArguments = s60runConfig->commandLineArguments();
- QString qmlArgs = s60runConfig->qmlCommandLineArguments();
- if ((mode == DebugRunMode || mode == QmlProfilerRunMode) && !qmlArgs.isEmpty()) {
- m_commandLineArguments.prepend(QLatin1Char(' '));
- m_commandLineArguments.prepend(qmlArgs);
- }
- m_installationDrive = activeDeployConf->installationDrive();
- m_executableFileName = s60runConfig->localExecutableFileName();
- m_runSmartInstaller = activeDeployConf->runSmartInstaller();
-
- if (debug)
- qDebug() << "S60RunControlBase::CT" << m_targetName;
-}
-
-void S60RunControlBase::start()
-{
- QTC_ASSERT(!m_launchProgress, return);
-
- m_launchProgress = new QFutureInterface<void>;
- Core::ICore::progressManager()->addTask(m_launchProgress->future(),
- tr("Launching"),
- QLatin1String("Symbian.Launch"));
- m_launchProgress->setProgressRange(PROGRESS_MIN, PROGRESS_MAX);
- m_launchProgress->setProgressValue(PROGRESS_MIN);
- m_launchProgress->reportStarted();
-
- if (m_runSmartInstaller) { //Smart Installer does the running by itself
- cancelProgress();
- appendMessage(tr("Please finalise the installation on your device.\n"), Utils::NormalMessageFormat);
- emit finished();
- return;
- }
-
- if (!doStart()) {
- emit finished();
- return;
- }
- emit started();
- startLaunching();
-}
-
-S60RunControlBase::~S60RunControlBase()
-{
- if (m_launchProgress) {
- m_launchProgress->reportFinished();
- delete m_launchProgress;
- m_launchProgress = 0;
- }
-}
-
-RunControl::StopResult S60RunControlBase::stop()
-{
- doStop();
- return AsynchronousStop;
-}
-
-bool S60RunControlBase::promptToStop(bool *optionalPrompt) const
-{
- Q_UNUSED(optionalPrompt)
- // We override the settings prompt
- QTC_ASSERT(isRunning(), return true);
-
- const QString question = tr("<html><head/><body><center><i>%1</i> is still running on the device.</center>"
- "<center>Terminating it can leave the target in an inconsistent state.</center>"
- "<center>Would you still like to terminate it?</center></body></html>").arg(displayName());
- return showPromptToStopDialog(tr("Application Still Running"), question,
- tr("Force Quit"), tr("Keep Running"));
-}
-
-void S60RunControlBase::startLaunching()
-{
- if (setupLauncher())
- setProgress(maxProgress()*0.30);
- else {
- stop();
- emit finished();
- }
-}
-
-void S60RunControlBase::handleFinished()
-{
- appendMessage(tr("Finished.\n"), Utils::NormalMessageFormat);
-}
-
-void S60RunControlBase::setProgress(int value)
-{
- if (m_launchProgress) {
- if (value < PROGRESS_MAX) {
- if (value < PROGRESS_MIN)
- m_launchProgress->setProgressValue(PROGRESS_MIN);
- else
- m_launchProgress->setProgressValue(value);
- } else {
- m_launchProgress->setProgressValue(PROGRESS_MAX);
- m_launchProgress->reportFinished();
- delete m_launchProgress;
- m_launchProgress = 0;
- }
- }
-}
-
-void S60RunControlBase::cancelProgress()
-{
- if (m_launchProgress) {
- m_launchProgress->reportCanceled();
- m_launchProgress->reportFinished();
- }
- delete m_launchProgress;
- m_launchProgress = 0;
-}
-
-int S60RunControlBase::maxProgress() const
-{
- return PROGRESS_MAX;
-}
-
-void S60RunControlBase::reportLaunchFinished()
-{
- setProgress(maxProgress());
-}
-
-quint32 S60RunControlBase::executableUid() const
-{
- return m_executableUid;
-}
-
-QString S60RunControlBase::executableName() const
-{
- return QString::fromLatin1("%1.exe").arg(targetName());
-}
-
-const QString &S60RunControlBase::targetName() const
-{
- return m_targetName;
-}
-
-const QString &S60RunControlBase::commandLineArguments() const
-{
- return m_commandLineArguments;
-}
-
-const QString &S60RunControlBase::executableFileName() const
-{
- return m_executableFileName;
-}
-
-bool S60RunControlBase::runSmartInstaller() const
-{
- return m_runSmartInstaller;
-}
-
-char S60RunControlBase::installationDrive() const
-{
- return m_installationDrive;
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.h b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.h
deleted file mode 100644
index c5a5ae22f3..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60RUNCONTROLBASE_H
-#define S60RUNCONTROLBASE_H
-
-#include <qt4projectmanager/qt4projectmanager_global.h>
-#include <projectexplorer/runconfiguration.h>
-#include <projectexplorer/toolchain.h>
-
-#include <QFutureInterface>
-
-namespace Qt4ProjectManager {
-
-class QT4PROJECTMANAGER_EXPORT S60RunControlBase : public ProjectExplorer::RunControl
-{
- Q_OBJECT
-public:
- S60RunControlBase(ProjectExplorer::RunConfiguration *runConfiguration,
- ProjectExplorer::RunMode mode);
- ~S60RunControlBase();
-
- virtual void start();
- virtual StopResult stop();
- virtual bool promptToStop(bool *optionalPrompt = 0) const;
-
- static QString msgListFile(const QString &file);
-
-protected:
- virtual bool doStart() = 0;
- virtual void doStop() = 0;
- virtual bool setupLauncher() = 0;
-
-protected:
- quint32 executableUid() const;
- QString executableName() const;
- const QString &targetName() const;
- const QString &commandLineArguments() const;
- const QString &executableFileName() const;
- bool runSmartInstaller() const;
- char installationDrive() const;
-
- void setProgress(int value);
- void cancelProgress();
- int maxProgress() const;
-
-private:
- void startLaunching();
-
-
-protected slots:
- void reportLaunchFinished();
-
-private slots:
- void handleFinished();
-
-private:
- QFutureInterface<void> *m_launchProgress;
- quint32 m_executableUid;
- QString m_targetName;
- QString m_commandLineArguments;
- QString m_executableFileName;
- bool m_runSmartInstaller;
- char m_installationDrive;
-};
-
-} // namespace Qt4ProjectManager
-
-#endif // S60RUNCONTROLBASE_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolfactory.cpp b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolfactory.cpp
deleted file mode 100644
index 24c72a0cd9..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolfactory.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60runcontrolfactory.h"
-
-#include "codaruncontrol.h"
-#include "s60devicerunconfiguration.h"
-#include "s60deployconfiguration.h"
-
-#include <projectexplorer/target.h>
-#include <utils/qtcassert.h>
-
-using namespace ProjectExplorer;
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-S60RunControlFactory::S60RunControlFactory(RunMode mode, const QString &name, QObject *parent) :
- IRunControlFactory(parent), m_mode(mode), m_name(name)
-{
-}
-
-bool S60RunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mode) const
-{
- if (mode != m_mode)
- return false;
- S60DeviceRunConfiguration *rc = qobject_cast<S60DeviceRunConfiguration *>(runConfiguration);
- if (!rc)
- return false;
- S60DeployConfiguration *activeDeployConf = qobject_cast<S60DeployConfiguration *>(rc->target()->activeDeployConfiguration());
- return activeDeployConf != 0;
-}
-
-RunControl* S60RunControlFactory::create(RunConfiguration *runConfiguration, RunMode mode)
-{
- S60DeviceRunConfiguration *rc = qobject_cast<S60DeviceRunConfiguration *>(runConfiguration);
-
- QTC_ASSERT(rc, return 0);
- QTC_ASSERT(mode == m_mode, return 0);
-
- S60DeployConfiguration *activeDeployConf = qobject_cast<S60DeployConfiguration *>(rc->target()->activeDeployConfiguration());
- if (!activeDeployConf)
- return 0;
- return new CodaRunControl(rc, mode);
-}
-
-QString S60RunControlFactory::displayName() const
-{
- return m_name;
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolfactory.h b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolfactory.h
deleted file mode 100644
index 29413f825c..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolfactory.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60RUNCONTROLFACTORY_H
-#define S60RUNCONTROLFACTORY_H
-
-#include <projectexplorer/runconfiguration.h>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60RunControlFactory : public ProjectExplorer::IRunControlFactory
-{
-public:
- explicit S60RunControlFactory(ProjectExplorer::RunMode mode,
- const QString &name,
- QObject *parent = 0);
-
- bool canRun(ProjectExplorer::RunConfiguration *runConfiguration,
- ProjectExplorer::RunMode mode) const;
-
- ProjectExplorer::RunControl *create(ProjectExplorer::RunConfiguration *runConfiguration,
- ProjectExplorer::RunMode mode);
-
- QString displayName() const;
-
-private:
- const ProjectExplorer::RunMode m_mode;
- const QString m_name;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectExplorer
-
-#endif // S60RUNCONTROLFACTORY_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60symbiancertificate.cpp b/src/plugins/qt4projectmanager/qt-s60/s60symbiancertificate.cpp
deleted file mode 100644
index 6b01c73d51..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60symbiancertificate.cpp
+++ /dev/null
@@ -1,841 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "s60symbiancertificate.h"
-
-#include <botan/botan.h>
-
-#include <algorithm>
-#include <memory>
-#include <string>
-
-#include <QDateTime>
-
-using namespace Botan;
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-namespace {
- const char CERT_IMEI_FIELD_NAME[] = "1.2.826.0.1.1796587.1.1.1.1";
- const char CERT_CAPABILITY_FIELD_NAME[] = "1.2.826.0.1.1796587.1.1.1.6";
-}
-
-// ======== S60CertificateExtension
-
-/*
-* X.509 S60 Certificate Extension
-*/
-class S60CertificateExtension : public Certificate_Extension
-{
-public:
- OID oid_of() const;
-
- virtual S60CertificateExtension* copy() const = 0;
- virtual ~S60CertificateExtension() {}
-protected:
- friend class S60Extensions;
- virtual bool should_encode() const { return false; }
- virtual MemoryVector<byte> encode_inner() const = 0;
- virtual void decode_inner(const MemoryRegion<byte>&) = 0;
-};
-
-// ======== S60DeviceIdListConstraint
-
-class S60DeviceIdListConstraint : public S60CertificateExtension
-{
-public:
- S60CertificateExtension* copy() const { return new S60DeviceIdListConstraint(imei_list); }
-
- S60DeviceIdListConstraint() {}
- S60DeviceIdListConstraint(const std::vector<ASN1_String>& o) : imei_list(o) {}
-
- std::vector<ASN1_String> get_imei_list() const { return imei_list; }
-private:
- std::string config_id() const { return "deviceid_list_constraint"; }
- std::string oid_name() const { return CERT_IMEI_FIELD_NAME; }
-
- MemoryVector<byte> encode_inner() const;
- void decode_inner(const MemoryRegion<byte>&);
- void contents_to(Data_Store&, Data_Store&) const;
-
- std::vector<ASN1_String> imei_list;
-};
-
-/*
-* Encode the extension
-*/
-MemoryVector<byte> S60DeviceIdListConstraint::encode_inner() const
-{
- qFatal("Encoding S60 extensions is not supported.");
- return MemoryVector<byte>();
-}
-
-/*
-* Decode the extension
-*/
-void S60DeviceIdListConstraint::decode_inner(const MemoryRegion<byte>& in)
-{
- BER_Decoder(in)
- .start_cons(SEQUENCE)
- .decode_list(imei_list)
- .end_cons();
-}
-
-/*
-* Return a textual representation
-*/
-void S60DeviceIdListConstraint::contents_to(Data_Store& subject, Data_Store&) const
-{
- for(u32bit j = 0; j != imei_list.size(); ++j)
- subject.add(CERT_IMEI_FIELD_NAME, imei_list[j].value());
-}
-
-// ======== S60CapabilityConstraint
-
-class S60CapabilityConstraint : public S60CertificateExtension
-{
-public:
- S60CertificateExtension* copy() const { return new S60CapabilityConstraint(capabilities); }
-
- S60CapabilityConstraint() {}
- S60CapabilityConstraint(const SecureVector<byte>& o) : capabilities(o) {}
-
- SecureVector<byte> get_capability_list() const { return capabilities; }
-private:
- std::string config_id() const { return "capability_constraint"; }
- std::string oid_name() const { return "CERT_CAPABILITY_FIELD_NAME"; }
-
- MemoryVector<byte> encode_inner() const;
- void decode_inner(const MemoryRegion<byte>&);
- void contents_to(Data_Store&, Data_Store&) const;
-
- SecureVector<byte> capabilities;
-};
-
-/*
-* Encode the extension
-*/
-MemoryVector<byte> S60CapabilityConstraint::encode_inner() const
-{
- qFatal("Encoding S60 extensions is not supported.");
- return MemoryVector<byte>();
-}
-
-/*
-* Decode the extension
-*/
-void S60CapabilityConstraint::decode_inner(const MemoryRegion<byte>& in)
-{
- BER_Decoder(in)
- .decode(capabilities, BIT_STRING)
- .verify_end();
-}
-
-/*
-* Return a textual representation
-*/
-void S60CapabilityConstraint::contents_to(Data_Store& subject, Data_Store&) const
-{
- quint32 capabilitiesValue = 0;
- for(u32bit j = 0; j != sizeof(quint32); ++j) {
- quint32 capabilitie(capabilities[sizeof(quint32)-1-j]);
- capabilitiesValue |= capabilitie << 8*j;
- }
- subject.add(CERT_CAPABILITY_FIELD_NAME, capabilitiesValue);
-}
-
-// ======== S60Extensions
-
-class S60Extensions : public ASN1_Object
-{
-public:
- void encode_into(class DER_Encoder&) const;
- void decode_from(class BER_Decoder&);
-
- void contents_to(Data_Store&, Data_Store&) const;
-
- void add(Certificate_Extension* extn)
- { extensions.push_back(extn); }
-
- S60Extensions& operator=(const S60Extensions&);
-
- S60Extensions(const S60Extensions&);
- S60Extensions(bool st = true) : should_throw(st) {}
- ~S60Extensions();
-private:
- static Certificate_Extension* get_extension(const OID&);
-
- std::vector<Certificate_Extension*> extensions;
- bool should_throw;
-};
-
-/*
-* S60Extensions Copy Constructor
-*/
-S60Extensions::S60Extensions(const S60Extensions& extensions) : ASN1_Object()
-{
- *this = extensions;
-}
-
-/*
-* Extensions Assignment Operator
-*/
-S60Extensions& S60Extensions::operator=(const S60Extensions& other)
-{
- for(u32bit j = 0; j != extensions.size(); ++j)
- delete extensions[j];
- extensions.clear();
-
- for(u32bit j = 0; j != other.extensions.size(); ++j)
- extensions.push_back(other.extensions[j]->copy());
-
- return (*this);
-}
-
-/*
-* Return the OID of this extension
-*/
-OID S60CertificateExtension::oid_of() const
-{
- return OIDS::lookup(oid_name());
-}
-
-/*
-* Encode an Extensions list
-*/
-void S60Extensions::encode_into(DER_Encoder& to_object) const
-{
- Q_UNUSED(to_object);
- qFatal("Encoding S60 extensions is not supported.");
-}
-
-/*
-* Decode a list of Extensions
-*/
-void S60Extensions::decode_from(BER_Decoder& from_source)
-{
- for(u32bit j = 0; j != extensions.size(); ++j)
- delete extensions[j];
- extensions.clear();
-
- BER_Decoder sequence = from_source.start_cons(SEQUENCE);
- while(sequence.more_items())
- {
- OID oid;
- MemoryVector<byte> value;
- bool critical;
-
- sequence.start_cons(SEQUENCE)
- .decode(oid)
- .decode_optional(critical, BOOLEAN, UNIVERSAL, false)
- .decode(value, OCTET_STRING)
- .verify_end()
- .end_cons();
-
- S60CertificateExtension* ext = 0;
- if (OIDS::name_of(oid, CERT_IMEI_FIELD_NAME))
- ext = new S60DeviceIdListConstraint();
-
- if (OIDS::name_of(oid, CERT_CAPABILITY_FIELD_NAME))
- ext = new S60CapabilityConstraint();
-
- if (!ext) {
- if (!critical || !should_throw)
- continue;
-
- throw Decoding_Error("Encountered unknown X.509 extension marked "
- "as critical; OID = " + oid.as_string());
- }
- ext->decode_inner(value);
- extensions.push_back(ext);
- }
- sequence.verify_end();
-}
-
-/*
-* Write the extensions to an info store
-*/
-void S60Extensions::contents_to(Data_Store& subject_info,
- Data_Store& issuer_info) const
-{
- for(u32bit j = 0; j != extensions.size(); ++j)
- extensions[j]->contents_to(subject_info, issuer_info);
-}
-
-/*
-* Delete an Extensions list
-*/
-S60Extensions::~S60Extensions()
-{
- for(u32bit j = 0; j != extensions.size(); ++j)
- delete extensions[j];
-}
-
-
-
-// ======== S60SymbianCertificatePrivate
-
-class S60SymbianCertificatePrivate : private Botan::X509_Object
-{
-public:
- /**
- * Get the issuer certificate DN.
- * @return the issuer DN of this certificate
- */
- Botan::X509_DN issuerDn() const;
-
- /**
- * Get the subject certificate DN.
- * @return the subject DN of this certificate
- */
- Botan::X509_DN subjectDn() const;
-
- /**
- * Get a value for a specific subject_info parameter name.
- * @param name the name of the parameter to look up. Possible names are
- * "X509.Certificate.version", "X509.Certificate.serial",
- * "X509.Certificate.start", "X509.Certificate.end",
- * "X509.Certificate.v2.key_id", "X509.Certificate.public_key",
- * "X509v3.BasicConstraints.path_constraint",
- * "X509v3.BasicConstraints.is_ca", "X509v3.ExtendedKeyUsage",
- * "X509v3.CertificatePolicies", "X509v3.SubjectKeyIdentifier" or
- * "X509.Certificate.serial".
- * @return the value(s) of the specified parameter
- */
- std::vector<std::string> subjectInfo(const std::string& name) const;
-
- /**
- * Get a value for a specific subject_info parameter name.
- * @param name the name of the parameter to look up. Possible names are
- * "X509.Certificate.v2.key_id" or "X509v3.AuthorityKeyIdentifier".
- * @return the value(s) of the specified parameter
- */
- std::vector<std::string> issuerInfo(const std::string& name) const;
-
- /**
- * Get the notBefore of the certificate.
- * @return the notBefore of the certificate
- */
- std::string startTime() const;
-
- /**
- * Get the notAfter of the certificate.
- * @return the notAfter of the certificate
- */
- std::string endTime() const;
-
- /**
- * Get the X509 version of this certificate object.
- * @return the X509 version
- */
- Botan::u32bit x509Version() const;
-
- /**
- * Get the serial number of this certificate.
- * @return the certificates serial number
- */
- Botan::MemoryVector<Botan::byte> serialNumber() const;
-
- /**
- * Check whether this certificate is self signed.
- * @return true if this certificate is self signed
- */
- bool isSelfSigned() const { return m_selfSigned; }
-
- /**
- * Check whether this certificate is a CA certificate.
- * @return true if this certificate is a CA certificate
- */
- bool isCaCert() const;
-
- /**
- * Get the key constraints as defined in the KeyUsage extension of this
- * certificate.
- * @return the key constraints
- */
- Botan::Key_Constraints constraints() const;
-
- /**
- * Get the key constraints as defined in the ExtendedKeyUsage
- * extension of this
- * certificate.
- * @return the key constraints
- */
- std::vector<std::string> exConstraints() const;
-
- /**
- * Get the policies as defined in the CertificatePolicies extension
- * of this certificate.
- * @return the certificate policies
- */
- std::vector<std::string> policies() const;
-
- /**
- * Check to certificates for equality.
- * @return true both certificates are (binary) equal
- */
- bool operator==(const S60SymbianCertificatePrivate& other) const;
-
- /**
- * Create a certificate from a file containing the DER or PEM
- * encoded certificate.
- * @param filename the name of the certificate file
- */
- S60SymbianCertificatePrivate(const QByteArray &filename);
-
-private:
- Botan::X509_DN createDn(const Botan::Data_Store& info) const;
-
-protected:
- friend class X509_CA;
- S60SymbianCertificatePrivate() {}
-
- void force_decode();
-
-protected:
- Botan::Data_Store m_subject;
- Botan::Data_Store m_issuer;
- bool m_selfSigned;
-};
-
-/*
-* Lookup each OID in the vector
-*/
-std::vector<std::string> lookup_oids(const std::vector<std::string>& in)
-{
- std::vector<std::string> out;
-
- std::vector<std::string>::const_iterator i = in.begin();
- while(i != in.end())
- {
- out.push_back(OIDS::lookup(OID(*i)));
- ++i;
- }
- return out;
-}
-
-/*
-* S60SymbianCertificate Constructor
-*/
-S60SymbianCertificatePrivate::S60SymbianCertificatePrivate(const QByteArray &in) :
- X509_Object(in.constData(), "CERTIFICATE/X509 CERTIFICATE")
-{
- m_selfSigned = false;
-
- do_decode();
-}
-
-/*
-* Decode the TBSCertificate data
-*/
-void S60SymbianCertificatePrivate::force_decode()
-{
- size_t version;
- BigInt serial_bn;
- AlgorithmIdentifier sig_algo_inner;
- X509_DN dn_issuer, dn_subject;
- X509_Time start, end;
-
- BER_Decoder tbs_cert(tbs_bits);
-
- tbs_cert.decode_optional(version, ASN1_Tag(0),
- ASN1_Tag(CONSTRUCTED | CONTEXT_SPECIFIC))
- .decode(serial_bn)
- .decode(sig_algo_inner)
- .decode(dn_issuer)
- .start_cons(SEQUENCE)
- .decode(start)
- .decode(end)
- .verify_end()
- .end_cons()
- .decode(dn_subject);
-
- if(version > 2)
- throw Decoding_Error("Unknown X.509 cert version " + to_string(version));
- if(sig_algo != sig_algo_inner)
- throw Decoding_Error("Algorithm identifier mismatch");
-
- m_selfSigned = (dn_subject == dn_issuer);
-
- m_subject.add(dn_subject.contents());
- m_issuer.add(dn_issuer.contents());
-
- BER_Object public_key = tbs_cert.get_next_object();
- if(public_key.type_tag != SEQUENCE || public_key.class_tag != CONSTRUCTED)
- throw Decoding_Error("Unexpected tag for public key");
-
- MemoryVector<byte> v2_issuer_key_id, v2_subject_key_id;
-
- tbs_cert.decode_optional_string(v2_issuer_key_id, BIT_STRING, 1);
- tbs_cert.decode_optional_string(v2_subject_key_id, BIT_STRING, 2);
-
- BER_Object v3_exts_data = tbs_cert.get_next_object();
- if(v3_exts_data.type_tag == 3 &&
- v3_exts_data.class_tag == ASN1_Tag(CONSTRUCTED | CONTEXT_SPECIFIC))
- {
- S60Extensions s60extensions(false);
-
- BER_Decoder(v3_exts_data.value).decode(s60extensions).verify_end();
-
- s60extensions.contents_to(m_subject, m_issuer);
-
- Extensions extensions(false);
-
- BER_Decoder(v3_exts_data.value).decode(extensions).verify_end();
-
- extensions.contents_to(m_subject, m_issuer);
- }
- else if(v3_exts_data.type_tag != NO_OBJECT)
- throw Decoding_Error("Unknown tag in X.509 cert");
-
- if(tbs_cert.more_items())
- throw Decoding_Error("TBSCertificate has more items that expected");
-
- m_subject.add("X509.Certificate.version", version);
- m_subject.add("X509.Certificate.serial", BigInt::encode(serial_bn));
- m_subject.add("X509.Certificate.start", start.readable_string());
- m_subject.add("X509.Certificate.end", end.readable_string());
-
- m_issuer.add("X509.Certificate.v2.key_id", v2_issuer_key_id);
- m_subject.add("X509.Certificate.v2.key_id", v2_subject_key_id);
-
- if(isCaCert() &&
- !m_subject.has_value("X509v3.BasicConstraints.path_constraint"))
- {
- u32bit limit = (x509Version() < 3) ? Cert_Extension::NO_CERT_PATH_LIMIT : 0;
- m_subject.add("X509v3.BasicConstraints.path_constraint", limit);
- }
-}
-
-/*
-* Return the X.509 version in use
-*/
-u32bit S60SymbianCertificatePrivate::x509Version() const
-{
- return (m_subject.get1_u32bit("X509.Certificate.version") + 1);
-}
-
-/*
-* Return the time this cert becomes valid
-*/
-std::string S60SymbianCertificatePrivate::startTime() const
-{
- return m_subject.get1("X509.Certificate.start");
-}
-
-/*
-* Return the time this cert becomes invalid
-*/
-std::string S60SymbianCertificatePrivate::endTime() const
-{
- return m_subject.get1("X509.Certificate.end");
-}
-
-/*
-* Return information about the subject
-*/
-std::vector<std::string>
-S60SymbianCertificatePrivate::subjectInfo(const std::string& what) const
-{
- return m_subject.get(X509_DN::deref_info_field(what));
-}
-
-/*
-* Return information about the issuer
-*/
-std::vector<std::string>
-S60SymbianCertificatePrivate::issuerInfo(const std::string& what) const
-{
- return m_issuer.get(X509_DN::deref_info_field(what));
-}
-
-/*
-* Check if the certificate is for a CA
-*/
-bool S60SymbianCertificatePrivate::isCaCert() const
-{
- if(!m_subject.get1_u32bit("X509v3.BasicConstraints.is_ca"))
- return false;
- if((constraints() & KEY_CERT_SIGN) || (constraints() == NO_CONSTRAINTS))
- return true;
- return false;
-}
-
-/*
-* Return the key usage constraints
-*/
-Key_Constraints S60SymbianCertificatePrivate::constraints() const
-{
- return Key_Constraints(m_subject.get1_u32bit("X509v3.KeyUsage",
- NO_CONSTRAINTS));
-}
-
-/*
-* Return the list of extended key usage OIDs
-*/
-std::vector<std::string> S60SymbianCertificatePrivate::exConstraints() const
-{
- return lookup_oids(m_subject.get("X509v3.ExtendedKeyUsage"));
-}
-
-/*
-* Return the list of certificate policies
-*/
-std::vector<std::string> S60SymbianCertificatePrivate::policies() const
-{
- return lookup_oids(m_subject.get("X509v3.CertificatePolicies"));
-}
-
-/*
-* Return the certificate serial number
-*/
-MemoryVector<byte> S60SymbianCertificatePrivate::serialNumber() const
-{
- return m_subject.get1_memvec("X509.Certificate.serial");
-}
-
-/*
-* Return the distinguished name of the issuer
-*/
-X509_DN S60SymbianCertificatePrivate::issuerDn() const
-{
- return createDn(m_issuer);
-}
-
-/*
-* Return the distinguished name of the subject
-*/
-X509_DN S60SymbianCertificatePrivate::subjectDn() const
-{
- return createDn(m_subject);
-}
-
-/*
-* Compare two certificates for equality
-*/
-bool S60SymbianCertificatePrivate::operator==(const S60SymbianCertificatePrivate& other) const
-{
- return (sig == other.sig &&
- sig_algo == other.sig_algo &&
- m_selfSigned == other.m_selfSigned &&
- m_issuer == other.m_issuer &&
- m_subject == other.m_subject);
-}
-
-/*
-* X.509 Certificate Comparison
-*/
-bool operator!=(const S60SymbianCertificatePrivate& cert1, const S60SymbianCertificatePrivate& cert2)
-{
- return !(cert1 == cert2);
-}
-
-/*
-* Create and populate a X509_DN
-*/
-X509_DN S60SymbianCertificatePrivate::createDn(const Data_Store& info) const
-{
- class DN_Matcher : public Data_Store::Matcher
- {
- public:
- bool operator()(const std::string& key, const std::string&) const
- {
- if(key.find("X520.") != std::string::npos)
- return true;
- return false;
- }
- };
-
- std::multimap<std::string, std::string> names =
- info.search_with(DN_Matcher());
-
- X509_DN dn;
-
- std::multimap<std::string, std::string>::iterator j;
- for(j = names.begin(); j != names.end(); ++j)
- dn.add_attribute(j->first, j->second);
-
- return dn;
-}
-
-/*
-* Create and populate an AlternativeName
-*/
-AlternativeName create_alt_name(const Data_Store& info)
-{
- class AltName_Matcher : public Data_Store::Matcher
- {
- public:
- bool operator()(const std::string& key, const std::string&) const
- {
- for(u32bit j = 0; j != matches.size(); ++j)
- if(key.compare(matches[j]) == 0)
- return true;
- return false;
- }
-
- AltName_Matcher(const std::string& match_any_of)
- {
- matches = split_on(match_any_of, '/');
- }
- private:
- std::vector<std::string> matches;
- };
-
- std::multimap<std::string, std::string> names =
- info.search_with(AltName_Matcher("RFC822/DNS/URI/IP"));
-
- AlternativeName alt_name;
-
- std::multimap<std::string, std::string>::iterator j;
- for(j = names.begin(); j != names.end(); ++j)
- alt_name.add_attribute(j->first, j->second);
-
- return alt_name;
-}
-
-// ======== S60SymbianCertificate
-
-S60SymbianCertificate::S60SymbianCertificate(const QString &filename) : d(0)
-{
- S60SymbianCertificatePrivate *certificate = 0;
- try {
- certificate = new S60SymbianCertificatePrivate(filename.toLatin1());
- d = certificate;
- certificate = 0;
- } catch (Botan::Exception &e) {
- m_errorString = QLatin1String(e.what());
- }
- delete certificate;
-}
-
-S60SymbianCertificate::~S60SymbianCertificate()
-{
- delete d;
-}
-
-bool S60SymbianCertificate::isValid() const
-{
- return d != 0;
-}
-
-QString S60SymbianCertificate::errorString() const
-{
- return m_errorString;
-}
-
-QStringList S60SymbianCertificate::subjectInfo(const QString &name)
-{
- Q_ASSERT(d);
- QStringList result;
- try {
- std::vector<std::string> subjectInfo =
- d->subjectInfo(name.toLatin1().constData());
- std::vector<std::string>::const_iterator i;
- for (i = subjectInfo.begin(); i != subjectInfo.end(); ++i)
- result << QString::fromLatin1(i->c_str());
- } catch (Botan::Exception &e) {
- m_errorString = QString::fromLatin1(e.what());
- }
- return result;
-}
-
-QStringList S60SymbianCertificate::issuerInfo(const QString &name)
-{
- Q_ASSERT(d);
- QStringList result;
- try {
- std::vector<std::string> issuerInfo =
- d->issuerInfo(name.toLatin1().constData());
-
- std::vector<std::string>::const_iterator i;
- for (i = issuerInfo.begin(); i != issuerInfo.end(); ++i)
- result << QString::fromLatin1(i->c_str());
- } catch (Botan::Exception &e) {
- m_errorString = QString::fromLatin1(e.what());
- }
- return result;
-}
-
-QDateTime S60SymbianCertificate::parseTime(const QByteArray &time)
-{
- QDateTime result;
- try {
- const char * const CERTIFICATE_DATE_FORMAT = "yyyy/M/d h:mm:ss UTC";
- QDateTime dateTime = QDateTime::fromString(QString::fromLatin1(time),
- QLatin1String(CERTIFICATE_DATE_FORMAT));
- result = QDateTime(dateTime.date(), dateTime.time(), Qt::UTC);
- } catch (Botan::Exception &e) {
- m_errorString = QString::fromLatin1(e.what());
- }
- return result;
-}
-
-QDateTime S60SymbianCertificate::startTime()
-{
- Q_ASSERT(d);
- return parseTime(d->startTime().c_str());
-}
-
-QDateTime S60SymbianCertificate::endTime()
-{
- Q_ASSERT(d);
- return parseTime(d->endTime().c_str());
-}
-
-quint32 S60SymbianCertificate::certificateVersion()
-{
- Q_ASSERT(d);
- quint32 version = 0;
- try {
- version = static_cast<quint32>(d->x509Version());
- } catch (Botan::Exception &e) {
- m_errorString = QString::fromLatin1(e.what());
- }
- return version;
-}
-
-bool S60SymbianCertificate::isSelfSigned()
-{
- Q_ASSERT(d);
- return d->isSelfSigned();
-}
-
-bool S60SymbianCertificate::isCaCert()
-{
- Q_ASSERT(d);
- bool isCaCertificate = false;
- try {
- isCaCertificate = d->isCaCert();
- } catch (Botan::Exception &e) {
- m_errorString = QString::fromLatin1(e.what());
- }
- return isCaCertificate;
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60symbiancertificate.h b/src/plugins/qt4projectmanager/qt-s60/s60symbiancertificate.h
deleted file mode 100644
index 2706209f1e..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/s60symbiancertificate.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef S60SYMBIANCERTIFICATE_H
-#define S60SYMBIANCERTIFICATE_H
-
-#include <QStringList>
-
-QT_FORWARD_DECLARE_CLASS(QDateTime)
-
-class S60SymbianCertificatePrivate;
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class S60SymbianCertificate
-{
-public:
- explicit S60SymbianCertificate(const QString &filename);
- ~S60SymbianCertificate();
-
- bool isValid() const;
-
- QString errorString() const;
-
- QStringList subjectInfo(const QString &name);
- QStringList issuerInfo(const QString &name);
-
- QDateTime startTime();
- QDateTime endTime();
-
- quint32 certificateVersion();
- bool isSelfSigned();
- bool isCaCert();
-
-private:
- QDateTime parseTime(const QByteArray &time);
-
-protected:
- S60SymbianCertificatePrivate const *d;
- QString m_errorString;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // S60SYMBIANCERTIFICATE_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp b/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
deleted file mode 100644
index 1b5e396507..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.cpp
+++ /dev/null
@@ -1,251 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "sbsv2parser.h"
-
-#include <projectexplorer/projectexplorer.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/taskhub.h>
-
-using namespace Qt4ProjectManager;
-using namespace ProjectExplorer;
-using namespace ProjectExplorer::Constants;
-
-/*
- * This parser takes a somewhat unusal approach of just eating most of its
- * input :-)
- *
- * Only when the XML-based log file generated by SBSv2 is announced it will
- * open that file and parse that. Tasks will then get generated by passing
- * any CDATA found in the XML file on to its child parsers (using STDERR).
- *
- * In additon <error> and <warning> tags are reported, too.
- */
-
-SbsV2Parser::SbsV2Parser() :
- m_hub(0)
-{
- setObjectName(QLatin1String("SbsV2Parser"));
- m_hub = ProjectExplorerPlugin::instance()->taskHub();
-}
-
-void SbsV2Parser::stdOutput(const QString &line)
-{
- // Eat most output!
- if (line.startsWith(QLatin1String("sbs: build log in "))) {
- QString logfile = QDir::fromNativeSeparators(line.mid(18).trimmed());
- parseLogFile(logfile);
- addTask(ProjectExplorer::Task(Task::Unknown, tr("SBSv2 build log"),
- Utils::FileName::fromUserInput(logfile), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
- }
-}
-
-void SbsV2Parser::stdError(const QString &line)
-{
- // Eat all output!
- Q_UNUSED(line);
-}
-
-void SbsV2Parser::taskAdded(const ProjectExplorer::Task &task)
-{
- // Fix pathes:
- ProjectExplorer::Task tmp(task);
- const QString filename = tmp.file.toString();
-
- if (!tmp.file.isEmpty()) {
- QFileInfo fi(tmp.file.toFileInfo());
- if (!fi.isAbsolute()) {
- if (m_currentSource.exists(filename))
- tmp.file = Utils::FileName::fromString(m_currentSource.absoluteFilePath(filename));
- else if (m_currentTarget.exists(filename))
- tmp.file = Utils::FileName::fromString(m_currentTarget.absoluteFilePath(filename));
- }
- }
-
- // Do not report tasks from our children via the normal channel:
- // We do not want them get registered with the Compile output window!
- m_hub->addTask(tmp);
-}
-
-void SbsV2Parser::parseLogFile(const QString &file)
-{
- QFile logFile(file);
- logFile.open(QIODevice::ReadOnly);
- m_log.setDevice(&logFile);
-
- if (m_log.readNextStartElement()) {
- if (m_log.name() == QLatin1String("buildlog"))
- readBuildLog();
- else
- m_log.raiseError(tr("The file '%1' is not a SBSv2 log file.").arg(file));
- }
-}
-
-void SbsV2Parser::readBuildLog()
-{
- Q_ASSERT(m_log.isStartElement() && m_log.name() == QLatin1String("buildlog"));
-
- while (m_log.readNextStartElement()) {
- if (m_log.name() == QLatin1String("error"))
- readError();
- else if (m_log.name() == QLatin1String("warning"))
- readWarning();
- else if (m_log.name() == QLatin1String("recipe"))
- readRecipe();
- else
- m_log.skipCurrentElement();
- }
-}
-
-void SbsV2Parser::readError()
-{
- Q_ASSERT(m_log.isStartElement() && m_log.name() == QLatin1String("error"));
-
- QString error = m_log.readElementText();
- addTask(Task(Task::Error, error, Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
-}
-
-void SbsV2Parser::readWarning()
-{
- Q_ASSERT(m_log.isStartElement() && m_log.name() == QLatin1String("warning"));
-
- QString warning = m_log.readElementText();
- addTask(Task(Task::Warning, warning, Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
-}
-
-void SbsV2Parser::readRecipe()
-{
- Q_ASSERT(m_log.isStartElement() && m_log.name() == QLatin1String("recipe"));
-
- const QString name = m_log.attributes().value(QLatin1String("name")).toString();
- m_currentSource = QDir(m_log.attributes().value(QLatin1String("source")).toString()).absolutePath();
- m_currentTarget = QDir(m_log.attributes().value(QLatin1String("target")).toString()).absolutePath();
-
- int returnCode = 0;
- QString outputText;
- QXmlStreamReader::TokenType tokenType = QXmlStreamReader::Invalid;
- while ((tokenType = m_log.readNext()) != QXmlStreamReader::Invalid) {
- if (tokenType == QXmlStreamReader::Characters) {
- outputText.append(m_log.text());
- } else if (tokenType == QXmlStreamReader::StartElement) {
- if (m_log.name() == QLatin1String("status")) {
- if (m_log.attributes().value(QLatin1String("exit")) == QLatin1String("failed"))
- returnCode = m_log.attributes().value(QLatin1String("code")).toString().toInt();
- }
- } else if (tokenType == QXmlStreamReader::EndElement) {
- if (m_log.name() == QLatin1String("recipe"))
- break;
- }
- }
-
- QStringList output = outputText.split(QLatin1Char('\n'));
- outputText.clear();
- foreach (const QString &line, output) {
- if (line.isEmpty())
- continue;
- if (line.startsWith(QLatin1Char('+'))) {
- outputText.append(tr("Running command: %1\n").arg(line.mid(2)));
- continue;
- }
- outputText.append(line);
- outputText.append(QLatin1Char('\n'));
- if (name == QLatin1String("compile") || name == QLatin1String("qmake_extra_pre_targetdep"))
- IOutputParser::stdError(line);
- }
-
- if (returnCode != 0) {
- //: %1 is the SBSv2 build recipe name, %2 the return code of the failed command
- QString description = tr("Recipe %1 failed with exit code %2.").arg(name).arg(returnCode);
- m_hub->addTask(Task(Task::Error, description, Utils::FileName(), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
- m_hub->addTask(Task(Task::Unknown, outputText, Utils::FileName(), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
- }
-}
-
-// Unit tests:
-
-#ifdef WITH_TESTS
-# include <QTest>
-
-# include "qt4projectmanagerplugin.h"
-
-# include "projectexplorer/outputparser_test.h"
-
-using namespace Qt4ProjectManager::Internal;
-
-void Qt4ProjectManagerPlugin::testSbsV2OutputParsers_data()
-{
- QTest::addColumn<QString>("input");
- QTest::addColumn<OutputParserTester::Channel>("inputChannel");
- QTest::addColumn<QString>("childStdOutLines");
- QTest::addColumn<QString>("childStdErrLines");
- QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
- QTest::addColumn<QString>("outputLines");
-
-
- QTest::newRow("eat stdout")
- << QString::fromLatin1(" Sometext") << OutputParserTester::STDOUT
- << QString() << QString()
- << QList<ProjectExplorer::Task>()
- << QString();
- QTest::newRow("eat stderr")
- << QString::fromLatin1(" Sometext") << OutputParserTester::STDERR
- << QString() << QString()
- << QList<ProjectExplorer::Task>()
- << QString();
-
- QTest::newRow("build log")
- << QString::fromLatin1("sbs: build log in X:/epoc32/build/Makefile.2010-08-10-15-25-52.log") << OutputParserTester::STDOUT
- << QString() << QString()
- << (QList<ProjectExplorer::Task>()
- << ProjectExplorer::Task(Task::Unknown, QLatin1String("SBSv2 build log"),
- Utils::FileName::fromUserInput("X:/epoc32/build/Makefile.2010-08-10-15-25-52.log"), -1,
- Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)))
- << QString();
-}
-
-void Qt4ProjectManagerPlugin::testSbsV2OutputParsers()
-{
- OutputParserTester testbench;
- testbench.appendOutputParser(new SbsV2Parser);
- QFETCH(QString, input);
- QFETCH(OutputParserTester::Channel, inputChannel);
- QFETCH(QList<Task>, tasks);
- QFETCH(QString, childStdOutLines);
- QFETCH(QString, childStdErrLines);
- QFETCH(QString, outputLines);
-
- testbench.testParsing(input, inputChannel,
- tasks, childStdOutLines, childStdErrLines,
- outputLines);
-}
-#endif
diff --git a/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.h b/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.h
deleted file mode 100644
index 5624843170..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/sbsv2parser.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SBSV2PARSER_H
-#define SBSV2PARSER_H
-
-#include <projectexplorer/ioutputparser.h>
-
-#include <QDir>
-#include <QXmlStreamReader>
-
-namespace ProjectExplorer {
-class TaskHub;
-}
-
-namespace Qt4ProjectManager {
-
-class SbsV2Parser : public ProjectExplorer::IOutputParser
-{
- Q_OBJECT
-
-public:
- SbsV2Parser();
-
- virtual void stdOutput(const QString & line);
- virtual void stdError(const QString & line);
-
-public slots:
- virtual void taskAdded(const ProjectExplorer::Task &task);
-
-private:
- void parseLogFile(const QString &file);
- void readBuildLog();
- void readError();
- void readWarning();
- void readRecipe();
-
- QXmlStreamReader m_log;
- QDir m_currentSource;
- QDir m_currentTarget;
- ProjectExplorer::TaskHub *m_hub;
-};
-
-} // namespace Qt4ProjectExplorer
-
-#endif // SBSV2PARSER_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianidevice.cpp b/src/plugins/qt4projectmanager/qt-s60/symbianidevice.cpp
deleted file mode 100644
index b084ecdac6..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianidevice.cpp
+++ /dev/null
@@ -1,252 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "symbianidevice.h"
-
-#include "symbianideviceconfigwidget.h"
-#include "symbianidevicefactory.h"
-
-#include <symbianutils/symbiandevicemanager.h>
-
-#include <QCoreApplication>
-
-using namespace ProjectExplorer;
-
-namespace {
-const char SERIAL_PORT_NAME_KEY[] = "Qt4ProjectManager.S60DeployConfiguration.SerialPortName";
-const char DEVICE_ADDRESS_KEY[] = "Qt4ProjectManager.S60DeployConfiguration.DeviceAddress";
-const char DEVICE_PORT_KEY[] = "Qt4ProjectManager.S60DeployConfiguration.DevicePort";
-const char COMMUNICATION_CHANNEL_KEY[] = "Qt4ProjectManager.S60DeployConfiguration.CommunicationChannel";
-
-const char DEFAULT_CODA_TCP_PORT[] = "65029";
-} // namespace
-
-namespace Qt4ProjectManager {
-
-SymbianIDevice::SymbianIDevice() :
- IDevice(Internal::SymbianIDeviceFactory::deviceType(),
- IDevice::AutoDetected,
- IDevice::Hardware,
- Core::Id("Symbian Device")),
- m_port(QLatin1String(DEFAULT_CODA_TCP_PORT)),
- m_communicationChannel(CommunicationCodaSerialConnection)
-{
- setDisplayName("Symbian Device");
- updateState();
-}
-
-SymbianIDevice::SymbianIDevice(const QVariantMap &map)
-{
- fromMap(map);
-}
-
-IDevice::DeviceInfo SymbianIDevice::deviceInformation() const
-{
- IDevice::DeviceInfo result;
- switch (communicationChannel()) {
- case SymbianIDevice::CommunicationCodaSerialConnection: {
- const SymbianUtils::SymbianDeviceManager *sdm = SymbianUtils::SymbianDeviceManager::instance();
- const int deviceIndex = sdm->findByPortName(serialPortName());
- if (deviceIndex == -1) {
- result << IDevice::DeviceInfoItem(
- QCoreApplication::translate("Qt4ProjectManager::SymbianIDevice", "Device"),
- QCoreApplication::translate("Qt4ProjectManager::SymbianIDevice", "Not connected"));
- } else {
- // device connected
- const SymbianUtils::SymbianDevice device = sdm->devices().at(deviceIndex);
- result << IDevice::DeviceInfoItem(
- QCoreApplication::translate("Qt4ProjectManager::SymbianIDevice", "Device"),
- //: %1 device friendly name, %2 additional information
- QCoreApplication::translate("Qt4ProjectManager::SymbianIDevice", "%1, %2")
- .arg(device.friendlyName(), device.additionalInformation()));
- }
- }
- break;
- case SymbianIDevice::CommunicationCodaTcpConnection: {
- if (!address().isEmpty() && !port().isEmpty()) {
- result << IDevice::DeviceInfoItem(
- QCoreApplication::translate("Qt4ProjectManager::SymbianIDevice", "IP address"),
- QCoreApplication::translate("Qt4ProjectManager::SymbianIDevice", "%1:%2")
- .arg(address(), port()));
- }
- }
- break;
- default:
- break;
- }
- return result;
-}
-
-SymbianIDevice::SymbianIDevice(const SymbianIDevice &other) :
- IDevice(other)
-{
- m_address = other.m_address;
- m_communicationChannel = other.m_communicationChannel;
- m_port = other.m_port;
- m_serialPortName = other.m_serialPortName;
-}
-
-IDevice::Ptr SymbianIDevice::clone() const
-{
- return Ptr(new SymbianIDevice(*this));
-}
-
-QString SymbianIDevice::serialPortName() const
-{
- return m_serialPortName;
-}
-
-void SymbianIDevice::setSerialPortName(const QString &name)
-{
- const QString &candidate = name.trimmed();
- if (m_serialPortName == candidate)
- return;
- m_serialPortName = candidate;
- updateState();
-}
-
-QString SymbianIDevice::address() const
-{
- return m_address;
-}
-
-void SymbianIDevice::setAddress(const QString &address)
-{
- if (m_address != address) {
- m_address = address;
- setDeviceState(IDevice::DeviceStateUnknown);
- }
-}
-
-
-QString SymbianIDevice::port() const
-{
- return m_port;
-}
-
-void SymbianIDevice::setPort(const QString &port)
-{
- if (m_port != port) {
- if (port.isEmpty()) //setup the default CODA's port
- m_port = QLatin1String(DEFAULT_CODA_TCP_PORT);
- else
- m_port = port;
- setDeviceState(IDevice::DeviceStateUnknown);
- }
-}
-
-SymbianIDevice::CommunicationChannel SymbianIDevice::communicationChannel() const
-{
- return m_communicationChannel;
-}
-
-void SymbianIDevice::setCommunicationChannel(CommunicationChannel channel)
-{
- if (m_communicationChannel != channel) {
- m_communicationChannel = channel;
- setDeviceState(IDevice::DeviceStateUnknown);
- }
- updateState();
-}
-
-void SymbianIDevice::fromMap(const QVariantMap &map)
-{
- IDevice::fromMap(map);
- m_serialPortName = map.value(QLatin1String(SERIAL_PORT_NAME_KEY)).toString().trimmed();
- m_address = map.value(QLatin1String(DEVICE_ADDRESS_KEY)).toString();
- m_port = map.value(QLatin1String(DEVICE_PORT_KEY), QString(QLatin1String(DEFAULT_CODA_TCP_PORT))).toString();
- m_communicationChannel = static_cast<CommunicationChannel>(map.value(QLatin1String(COMMUNICATION_CHANNEL_KEY),
- QVariant(CommunicationCodaSerialConnection)).toInt());
- updateState();
-}
-
-QString SymbianIDevice::displayType() const
-{
- return QCoreApplication::translate("Qt4ProjectManager::SymbianIDevice", "Symbian Device");
-}
-
-IDeviceWidget *SymbianIDevice::createWidget()
-{
- return new Internal::SymbianIDeviceConfigurationWidget(sharedFromThis());
-}
-
-QList<Core::Id> SymbianIDevice::actionIds() const
-{
- return QList<Core::Id>();
-}
-
-QString SymbianIDevice::displayNameForActionId(Core::Id actionId) const
-{
- Q_UNUSED(actionId);
- return QString();
-}
-
-void SymbianIDevice::executeAction(Core::Id actionId, QWidget *parent) const
-{
- Q_UNUSED(actionId);
- Q_UNUSED(parent);
-}
-
-QVariantMap SymbianIDevice::toMap() const
-{
- QVariantMap map = IDevice::toMap();
- map.insert(QLatin1String(SERIAL_PORT_NAME_KEY), m_serialPortName);
- map.insert(QLatin1String(DEVICE_ADDRESS_KEY), QVariant(m_address));
- map.insert(QLatin1String(DEVICE_PORT_KEY), m_port);
- map.insert(QLatin1String(COMMUNICATION_CHANNEL_KEY), QVariant(m_communicationChannel));
- return map;
-}
-
-void SymbianIDevice::updateState()
-{
- if (m_communicationChannel == CommunicationCodaSerialConnection) {
- SymbianUtils::SymbianDeviceManager *sdm = SymbianUtils::SymbianDeviceManager::instance();
- if (m_serialPortName.isEmpty()) {
- // Find first port in use:
- SymbianUtils::SymbianDeviceManager::SymbianDeviceList deviceList
- = sdm->devices();
- foreach (const SymbianUtils::SymbianDevice &d, deviceList) {
- if (d.portName().isEmpty())
- continue;
-
- m_serialPortName = d.portName();
- break;
- }
- }
-
- setDeviceState(sdm->findByPortName(m_serialPortName) >= 0
- ? IDevice::DeviceReadyToUse
- : IDevice::DeviceDisconnected);
- } else {
- setDeviceState(IDevice::DeviceStateUnknown);
- }
-}
-
-} // namespace qt4projectmanager
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianidevice.h b/src/plugins/qt4projectmanager/qt-s60/symbianidevice.h
deleted file mode 100644
index 2a8ba273cf..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianidevice.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SYMBIANIDEVICE_H
-#define SYMBIANIDEVICE_H
-
-#include "../qt4projectmanager_global.h"
-
-#include <projectexplorer/devicesupport/idevice.h>
-
-namespace Qt4ProjectManager {
-namespace Internal { class S60Manager; }
-
-// TODO: Make the idevice interface powerful enough that this class is no longer
-// needed in other plugins and then move this into Internal namespace and
-// do not export it.
-class QT4PROJECTMANAGER_EXPORT SymbianIDevice : public ProjectExplorer::IDevice
-{
-public:
- typedef QSharedPointer<const SymbianIDevice> ConstPtr;
-
- enum CommunicationChannel {
- CommunicationCodaSerialConnection,
- CommunicationCodaTcpConnection
- };
-
- SymbianIDevice();
- SymbianIDevice(const QVariantMap &map);
-
- DeviceInfo deviceInformation() const;
-
- ProjectExplorer::IDevice::Ptr clone() const;
-
- QString serialPortName() const;
- void setSerialPortName(const QString &name);
-
- QString address() const;
- void setAddress(const QString &address);
-
- void setPort(const QString &port);
- QString port() const;
-
- void setCommunicationChannel(CommunicationChannel channel);
- CommunicationChannel communicationChannel() const;
-
- 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) const;
-
-protected:
- SymbianIDevice(const SymbianIDevice &other);
- SymbianIDevice &operator=(const SymbianIDevice &); // no impl.
-
- QVariantMap toMap() const;
-
-private:
- void updateState();
-
- QString m_serialPortName;
- QString m_address;
- QString m_port;
- CommunicationChannel m_communicationChannel;
-
- friend class Internal::S60Manager;
-};
-
-} // namespace Qt4ProjectManager
-
-#endif // SYMBIANIDEVICE_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianideviceconfigwidget.cpp b/src/plugins/qt4projectmanager/qt-s60/symbianideviceconfigwidget.cpp
deleted file mode 100644
index a906cd0d6e..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianideviceconfigwidget.cpp
+++ /dev/null
@@ -1,624 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "symbianideviceconfigwidget.h"
-
-#include "symbianidevice.h"
-
-#include <symbianutils/symbiandevicemanager.h>
-#include <codadevice.h>
-
-#include "codaruncontrol.h"
-
-#include <utils/detailswidget.h>
-#include <utils/ipaddresslineedit.h>
-#include <utils/qtcassert.h>
-#include <utils/pathchooser.h>
-
-#include <QTimer>
-#include <QLabel>
-#include <QLineEdit>
-#include <QComboBox>
-#include <QVBoxLayout>
-#include <QHBoxLayout>
-#include <QFormLayout>
-#include <QToolButton>
-#include <QStyle>
-#include <QApplication>
-#include <QSpacerItem>
-#include <QMessageBox>
-#include <QCheckBox>
-#include <QGroupBox>
-#include <QRadioButton>
-#include <QValidator>
-
-#include <QTcpSocket>
-
-Q_DECLARE_METATYPE(SymbianUtils::SymbianDevice)
-
-static const quint32 CODA_UID = 0x20021F96;
-
-static const quint32 QTMOBILITY_UID = 0x2002AC89;
-static const quint32 QTCOMPONENTS_UID = 0x200346DE;
-static const quint32 QMLVIEWER_UID = 0x20021317;
-
-static void startTable(QString &text)
-{
- const char startTableC[] = "<html></head><body><table>";
- if (!text.contains(QLatin1String(startTableC)))
- text.append(QLatin1String(startTableC));
-}
-
-static void finishTable(QString &text)
-{
- const QString stopTable = QLatin1String("</table></body></html>");
- text.remove(stopTable);
- text.append(stopTable);
-}
-
-static void addToTable(QTextStream &stream, const QString &key, const QString &value)
-{
- const char tableRowStartC[] = "<tr><td><b>";
- const char tableRowSeparatorC[] = "</b></td><td>";
- const char tableRowEndC[] = "</td></tr>";
- stream << tableRowStartC << key << tableRowSeparatorC << value << tableRowEndC;
-}
-
-static void addErrorToTable(QTextStream &stream, const QString &key, const QString &value)
-{
- const char tableRowStartC[] = "<tr><td><b>";
- const char tableRowSeparatorC[] = "</b></td><td>";
- const char tableRowEndC[] = "</td></tr>";
- const char errorSpanStartC[] = "<span style=\"font-weight:600; color:red; \">";
- const char errorSpanEndC[] = "</span>";
- stream << tableRowStartC << errorSpanStartC << key << tableRowSeparatorC << value << errorSpanEndC << tableRowEndC;
-}
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-SymbianIDeviceConfigurationWidget::SymbianIDeviceConfigurationWidget(const ProjectExplorer::IDevice::Ptr &device,
- QWidget *parent)
- : ProjectExplorer::IDeviceWidget(device, parent),
- m_detailsWidget(new Utils::DetailsWidget),
- m_serialPortsCombo(new QComboBox),
- m_deviceInfoButton(new QToolButton),
- m_deviceInfoDescriptionLabel(new QLabel(tr("Device:"))),
- m_deviceInfoLabel(new QLabel),
- m_serialRadioButton(new QRadioButton(tr("Serial:"))),
- m_wlanRadioButton(new QRadioButton(tr("WLAN:"))),
- m_ipAddress(new Utils::IpAddressLineEdit),
- m_codaTimeout(new QTimer(this))
-{
- m_detailsWidget->setState(Utils::DetailsWidget::NoSummary);
-
- QVBoxLayout *mainBoxLayout = new QVBoxLayout();
- mainBoxLayout->setMargin(0);
- setLayout(mainBoxLayout);
- mainBoxLayout->addWidget(m_detailsWidget);
- QWidget *detailsContainer = new QWidget;
- m_detailsWidget->setWidget(detailsContainer);
-
- QFormLayout *detailsLayout = new QFormLayout(detailsContainer);
-
- updateSerialDevices();
- connect(SymbianUtils::SymbianDeviceManager::instance(), SIGNAL(updated()),
- this, SLOT(updateSerialDevices()));
-
- bool usingTcp = symbianDevice()->communicationChannel() == SymbianIDevice::CommunicationCodaTcpConnection;
- m_serialRadioButton->setChecked(!usingTcp);
- m_wlanRadioButton->setChecked(usingTcp);
-
- detailsLayout->addRow(createCommunicationChannel());
-
- // Device Info with button. Widgets are enabled in above call to updateSerialDevices()
- QHBoxLayout *infoHBoxLayout = new QHBoxLayout;
- m_deviceInfoLabel->setWordWrap(true);
- m_deviceInfoLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
- m_deviceInfoLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
- infoHBoxLayout->addWidget(m_deviceInfoLabel);
- infoHBoxLayout->addWidget(m_deviceInfoButton);
- m_deviceInfoButton->setIcon(qApp->style()->standardIcon(QStyle::SP_MessageBoxInformation));
- m_deviceInfoButton->setToolTip(tr("Queries the device for information"));
- connect(m_deviceInfoButton, SIGNAL(clicked()), this, SLOT(updateDeviceInfo()));
- detailsLayout->addRow(m_deviceInfoDescriptionLabel, infoHBoxLayout);
-
- connect(this, SIGNAL(infoCollected()),
- this, SLOT(collectingInfoFinished()));
-
- m_codaTimeout->setSingleShot(true);
- connect(m_codaTimeout, SIGNAL(timeout()), this, SLOT(codaTimeout()));
-}
-
-SymbianIDeviceConfigurationWidget::~SymbianIDeviceConfigurationWidget()
-{ }
-
-QWidget *SymbianIDeviceConfigurationWidget::createCommunicationChannel()
-{
- m_serialPortsCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents);
- connect(m_serialPortsCombo, SIGNAL(activated(int)), this, SLOT(setSerialPort(int)));
- connect(m_serialRadioButton, SIGNAL(clicked()), this, SLOT(updateCommunicationChannel()));
- connect(m_wlanRadioButton, SIGNAL(clicked()), this, SLOT(updateCommunicationChannel()));
- connect(m_ipAddress, SIGNAL(validAddressChanged(QString)), this, SLOT(updateWlanAddress(QString)));
- connect(m_ipAddress, SIGNAL(invalidAddressChanged()), this, SLOT(cleanWlanAddress()));
-
- QHBoxLayout *serialPortHBoxLayout = new QHBoxLayout;
- serialPortHBoxLayout->addWidget(new QLabel(tr("Serial port:")));
- serialPortHBoxLayout->addWidget(m_serialPortsCombo);
- serialPortHBoxLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored));
-
-#if !defined(Q_OS_WIN) && !defined(Q_OS_MACX)
- // Update device list: only needed on linux.
- QToolButton *updateSerialDevicesButton(new QToolButton);
- updateSerialDevicesButton->setIcon(qApp->style()->standardIcon(QStyle::SP_BrowserReload));
- connect(updateSerialDevicesButton, SIGNAL(clicked()),
- SymbianUtils::SymbianDeviceManager::instance(), SLOT(update()));
- serialPortHBoxLayout->addWidget(updateSerialDevicesButton);
-#endif
-
- QGroupBox *communicationChannelGroupBox = new QGroupBox(tr("Communication Channel"));
- QGridLayout *communicationChannelGridLayout = new QGridLayout;
- communicationChannelGridLayout->addWidget(m_serialRadioButton, 0, 0);
- communicationChannelGridLayout->addWidget(m_wlanRadioButton, 1, 0);
-
- m_ipAddress->setMinimumWidth(30);
- m_ipAddress->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored);
-
- if (!symbianDevice()->address().isEmpty())
- m_ipAddress->setText(symbianDevice()->address() + QLatin1Char(':')
- + symbianDevice()->port());
-
- QHBoxLayout *wlanChannelLayout = new QHBoxLayout();
- wlanChannelLayout->addWidget(new QLabel(tr("Address:")));
- wlanChannelLayout->addWidget(m_ipAddress);
- wlanChannelLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored));
-
- communicationChannelGridLayout->addLayout(serialPortHBoxLayout, 0, 1);
- communicationChannelGridLayout->addLayout(wlanChannelLayout, 1, 1);
-
- communicationChannelGroupBox->setLayout(communicationChannelGridLayout);
-
- updateCommunicationChannelUi();
-
- return communicationChannelGroupBox;
-}
-
-void SymbianIDeviceConfigurationWidget::updateSerialDevices()
-{
- m_serialPortsCombo->clear();
- const QString previouPortName = symbianDevice()->serialPortName();
- const QList<SymbianUtils::SymbianDevice> devices = SymbianUtils::SymbianDeviceManager::instance()->devices();
- int newIndex = -1;
- for (int i = 0; i < devices.size(); ++i) {
- const SymbianUtils::SymbianDevice &device = devices.at(i);
- m_serialPortsCombo->addItem(device.friendlyName(), qVariantFromValue(device));
- if (device.portName() == previouPortName)
- newIndex = i;
- }
-
- if (symbianDevice()->communicationChannel()
- == SymbianIDevice::CommunicationCodaTcpConnection) {
- m_deviceInfoButton->setEnabled(true);
- return;
- }
-
- clearDeviceInfo();
- // Set new index: prefer to keep old or set to 0, if available.
- if (newIndex == -1 && !devices.empty())
- newIndex = 0;
- m_serialPortsCombo->setCurrentIndex(newIndex);
- if (newIndex == -1) {
- m_deviceInfoButton->setEnabled(false);
- symbianDevice()->setSerialPortName(QString());
- } else {
- m_deviceInfoButton->setEnabled(true);
- const QString newPortName = rawDevice(newIndex).portName();
- symbianDevice()->setSerialPortName(newPortName);
- }
-}
-
-SymbianUtils::SymbianDevice SymbianIDeviceConfigurationWidget::rawDevice(int i) const
-{
- const QVariant data = m_serialPortsCombo->itemData(i);
- if (data.isValid() && qVariantCanConvert<SymbianUtils::SymbianDevice>(data))
- return qVariantValue<SymbianUtils::SymbianDevice>(data);
- return SymbianUtils::SymbianDevice();
-}
-
-SymbianUtils::SymbianDevice SymbianIDeviceConfigurationWidget::currentRawDevice() const
-{
- return rawDevice(m_serialPortsCombo->currentIndex());
-}
-
-void SymbianIDeviceConfigurationWidget::setSerialPort(int index)
-{
- const SymbianUtils::SymbianDevice d = rawDevice(index);
- symbianDevice()->setSerialPortName(d.portName());
- m_deviceInfoButton->setEnabled(index >= 0);
- clearDeviceInfo();
-}
-
-void SymbianIDeviceConfigurationWidget::updateCommunicationChannelUi()
-{
- SymbianIDevice::CommunicationChannel channel = symbianDevice()->communicationChannel();
- if (channel == SymbianIDevice::CommunicationCodaTcpConnection) {
- m_ipAddress->setDisabled(false);
- m_serialPortsCombo->setDisabled(true);
- m_deviceInfoButton->setEnabled(true);
- } else {
- m_ipAddress->setDisabled(true);
- m_serialPortsCombo->setDisabled(false);
- updateSerialDevices();
- }
-}
-
-void SymbianIDeviceConfigurationWidget::updateCommunicationChannel()
-{
- if (!m_wlanRadioButton->isChecked() && !m_serialRadioButton->isChecked())
- m_serialRadioButton->setChecked(true);
-
- if (m_wlanRadioButton->isChecked()) {
- m_ipAddress->setDisabled(false);
- m_serialPortsCombo->setDisabled(true);
- symbianDevice()->setCommunicationChannel(SymbianIDevice::CommunicationCodaTcpConnection);
- m_deviceInfoButton->setEnabled(true);
- } else {
- m_ipAddress->setDisabled(true);
- m_serialPortsCombo->setDisabled(false);
- symbianDevice()->setCommunicationChannel(SymbianIDevice::CommunicationCodaSerialConnection);
- updateSerialDevices();
- }
-}
-
-void SymbianIDeviceConfigurationWidget::updateWlanAddress(const QString &address)
-{
- QStringList addressList = address.split(QLatin1String(":"), QString::SkipEmptyParts);
- if (addressList.count() > 0) {
- symbianDevice()->setAddress(addressList.at(0));
- if (addressList.count() > 1)
- symbianDevice()->setPort(addressList.at(1));
- else
- symbianDevice()->setPort(QString());
- }
-}
-
-void SymbianIDeviceConfigurationWidget::cleanWlanAddress()
-{
- if (!symbianDevice()->address().isEmpty())
- symbianDevice()->setAddress(QString());
-
- if (!symbianDevice()->port().isEmpty())
- symbianDevice()->setPort(QString());
-}
-
-void SymbianIDeviceConfigurationWidget::clearDeviceInfo()
-{
- // Restore text & color
- m_deviceInfoLabel->clear();
- m_deviceInfoLabel->setStyleSheet(QString());
-}
-
-void SymbianIDeviceConfigurationWidget::setDeviceInfoLabel(const QString &message, bool isError)
-{
- m_deviceInfoLabel->setStyleSheet(isError ?
- QString(QLatin1String("background-color: red;")) :
- QString());
- m_deviceInfoLabel->setText(message);
- m_deviceInfoLabel->adjustSize();
-}
-
-void SymbianIDeviceConfigurationWidget::updateDeviceInfo()
-{
- setDeviceInfoLabel(tr("Connecting"));
- if (symbianDevice()->communicationChannel() == SymbianIDevice::CommunicationCodaSerialConnection) {
- const SymbianUtils::SymbianDevice commDev = currentRawDevice();
- m_codaInfoDevice = SymbianUtils::SymbianDeviceManager::instance()->getCodaDevice(commDev.portName());
- if (m_codaInfoDevice.isNull()) {
- setDeviceInfoLabel(tr("Unable to create CODA connection. Please try again."), true);
- return;
- }
- if (!m_codaInfoDevice->device()->isOpen()) {
- setDeviceInfoLabel(m_codaInfoDevice->device()->errorString(), true);
- return;
- }
- //TODO error handling - for now just throw the command at coda
- m_codaInfoDevice->sendSymbianOsDataGetQtVersionCommand(Coda::CodaCallback(this, &SymbianIDeviceConfigurationWidget::getQtVersionCommandResult));
- m_deviceInfoButton->setEnabled(false);
- m_codaTimeout->start(1000);
- } else if (symbianDevice()->communicationChannel() == SymbianIDevice::CommunicationCodaTcpConnection) {
- // collectingInfoFinished, which deletes m_codaDevice, can get called from within a coda callback, so need to use deleteLater
- m_codaInfoDevice = QSharedPointer<Coda::CodaDevice>(new Coda::CodaDevice, &QObject::deleteLater);
- connect(m_codaInfoDevice.data(), SIGNAL(codaEvent(Coda::CodaEvent)), this, SLOT(codaEvent(Coda::CodaEvent)));
-
- const QSharedPointer<QTcpSocket> codaSocket(new QTcpSocket);
- m_codaInfoDevice->setDevice(codaSocket);
- codaSocket->connectToHost(symbianDevice()->address(),
- symbianDevice()->port().toInt());
- m_deviceInfoButton->setEnabled(false);
- m_codaTimeout->start(1500);
- } else
- setDeviceInfoLabel(tr("Currently there is no information about the device for this connection type."), true);
-}
-
-void SymbianIDeviceConfigurationWidget::codaEvent(const Coda::CodaEvent &event)
-{
- switch (event.type()) {
- case Coda::CodaEvent::LocatorHello: // Commands accepted now
- codaIncreaseProgress();
- if (m_codaInfoDevice)
- m_codaInfoDevice->sendSymbianOsDataGetQtVersionCommand(Coda::CodaCallback(this, &SymbianIDeviceConfigurationWidget::getQtVersionCommandResult));
- break;
- default:
- break;
- }
-}
-
-void SymbianIDeviceConfigurationWidget::getQtVersionCommandResult(const Coda::CodaCommandResult &result)
-{
- m_deviceInfo.clear();
- if (result.type == Coda::CodaCommandResult::FailReply) {
- setDeviceInfoLabel(tr("No device information available"), true);
- SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaInfoDevice);
- m_deviceInfoButton->setEnabled(true);
- m_codaTimeout->stop();
- return;
- } else if (result.type == Coda::CodaCommandResult::CommandErrorReply){
- startTable(m_deviceInfo);
- QTextStream str(&m_deviceInfo);
- addErrorToTable(str, tr("Qt version: "), tr("Not installed on device"));
- finishTable(m_deviceInfo);
- } else {
- if (result.values.count()) {
- QHash<QString, QVariant> obj = result.values[0].toVariant().toHash();
- QString ver = obj.value(QLatin1String("qVersion")).toString();
-
- startTable(m_deviceInfo);
- QTextStream str(&m_deviceInfo);
- addToTable(str, tr("Qt version:"), ver);
- QString systemVersion;
-
- const int symVer = obj.value(QLatin1String("symbianVersion")).toInt();
- // Ugh why won't QSysInfo define these on non-symbian builds...
- switch (symVer) {
- case 10:
- systemVersion.append(QLatin1String("Symbian OS v9.2"));
- break;
- case 20:
- systemVersion.append(QLatin1String("Symbian OS v9.3"));
- break;
- case 30:
- systemVersion.append(QLatin1String("Symbian OS v9.4 / Symbian^1"));
- break;
- case 40:
- systemVersion.append(QLatin1String("Symbian^2"));
- break;
- case 50:
- systemVersion.append(QLatin1String("Symbian^3"));
- break;
- case 60:
- systemVersion.append(QLatin1String("Symbian^4"));
- break;
- case 70:
- systemVersion.append(QLatin1String("Symbian^3")); // TODO: might change
- break;
- default:
- systemVersion.append(tr("Unrecognised Symbian version 0x%1").arg(symVer, 0, 16));
- break;
- }
- systemVersion.append(QLatin1String(", "));
- int s60Ver = obj.value(QLatin1String("s60Version")).toInt();
- switch (s60Ver) {
- case 10:
- systemVersion.append(QLatin1String("S60 3rd Edition Feature Pack 1"));
- break;
- case 20:
- systemVersion.append(QLatin1String("S60 3rd Edition Feature Pack 2"));
- break;
- case 30:
- systemVersion.append(QLatin1String("S60 5th Edition"));
- break;
- case 40:
- systemVersion.append(QLatin1String("S60 5th Edition Feature Pack 1"));
- break;
- case 50:
- systemVersion.append(QLatin1String("S60 5th Edition Feature Pack 2"));
- break;
- case 70:
- systemVersion.append(QLatin1String("S60 5th Edition Feature Pack 3")); // TODO: might change
- break;
- default:
- systemVersion.append(tr("Unrecognised S60 version 0x%1").arg(symVer, 0, 16));
- break;
- }
- addToTable(str, tr("OS version:"), systemVersion);
- finishTable(m_deviceInfo);
- }
- }
- codaIncreaseProgress();
- if (m_codaInfoDevice)
- m_codaInfoDevice->sendSymbianOsDataGetRomInfoCommand(Coda::CodaCallback(this, &SymbianIDeviceConfigurationWidget::getRomInfoResult));
-}
-
-void SymbianIDeviceConfigurationWidget::getRomInfoResult(const Coda::CodaCommandResult &result)
-{
- codaIncreaseProgress();
- if (result.type == Coda::CodaCommandResult::SuccessReply && result.values.count()) {
- startTable(m_deviceInfo);
- QTextStream str(&m_deviceInfo);
-
- QVariantHash obj = result.values[0].toVariant().toHash();
- QString romVersion = obj.value(QLatin1String("romVersion"), tr("unknown")).toString();
- romVersion.replace(QLatin1Char('\n'), QLatin1Char(' ')); // The ROM string is split across multiple lines, for some reason.
- addToTable(str, tr("ROM version:"), romVersion);
-
- QString pr = obj.value(QLatin1String("prInfo")).toString();
- if (pr.length())
- addToTable(str, tr("Release:"), pr);
- finishTable(m_deviceInfo);
- }
-
- QList<quint32> packagesOfInterest;
- packagesOfInterest.append(CODA_UID);
- packagesOfInterest.append(QTMOBILITY_UID);
- packagesOfInterest.append(QTCOMPONENTS_UID);
- packagesOfInterest.append(QMLVIEWER_UID);
- if (m_codaInfoDevice)
- m_codaInfoDevice->sendSymbianInstallGetPackageInfoCommand(Coda::CodaCallback(this, &SymbianIDeviceConfigurationWidget::getInstalledPackagesResult), packagesOfInterest);
-}
-
-void SymbianIDeviceConfigurationWidget::getInstalledPackagesResult(const Coda::CodaCommandResult &result)
-{
- codaIncreaseProgress();
- if (result.type == Coda::CodaCommandResult::SuccessReply && result.values.count()) {
- startTable(m_deviceInfo);
- QTextStream str(&m_deviceInfo);
-
- QVariantList resultsList = result.values[0].toVariant().toList();
- const QString uidKey = QLatin1String("uid");
- const QString errorKey = QLatin1String("error");
- const QString versionKey = QLatin1String("version");
- foreach (const QVariant &var, resultsList) {
- QVariantHash obj = var.toHash();
- bool ok = false;
- uint uid = obj.value(uidKey).toString().toUInt(&ok, 16);
- if (ok) {
- const bool error = !obj.value(errorKey).isNull();
- QString versionString;
- if (!error) {
- QVariantList version = obj.value(versionKey).toList();
- versionString = QString::fromLatin1("%1.%2.%3").arg(version[0].toInt())
- .arg(version[1].toInt())
- .arg(version[2].toInt());
- }
- switch (uid) {
- case CODA_UID: {
- if (error) {
- // How can coda not be installed? Presumably some UID wrongness...
- addErrorToTable(str, tr("CODA version: "), tr("Error reading CODA version"));
- } else
- addToTable(str, tr("CODA version: "), versionString);
- }
- break;
- case QTMOBILITY_UID: {
- if (error)
- addErrorToTable(str, tr("Qt Mobility version: "), tr("Error reading Qt Mobility version"));
- else
- addToTable(str, tr("Qt Mobility version: "), versionString);
- }
- break;
- case QTCOMPONENTS_UID: {
- addToTable(str, tr("Qt Quick components version: "), error ? tr("Not installed") : versionString);
- }
- break;
- case QMLVIEWER_UID: {
- addToTable(str, tr("QML Viewer version: "), error ? tr("Not installed") : versionString);
- }
- break;
- default: break;
- }
- }
- }
- finishTable(m_deviceInfo);
- }
-
- QStringList keys;
- keys << QLatin1String("EDisplayXPixels");
- keys << QLatin1String("EDisplayYPixels");
-
- if (m_codaInfoDevice)
- m_codaInfoDevice->sendSymbianOsDataGetHalInfoCommand(Coda::CodaCallback(this, &SymbianIDeviceConfigurationWidget::getHalResult), keys);
-}
-
-void SymbianIDeviceConfigurationWidget::getHalResult(const Coda::CodaCommandResult &result)
-{
- codaIncreaseProgress();
- if (result.type == Coda::CodaCommandResult::SuccessReply && result.values.count()) {
- QVariantList resultsList = result.values[0].toVariant().toList();
- int x = 0;
- int y = 0;
- const QString nameKey = QLatin1String("name");
- const QString valueKey = QLatin1String("value");
- foreach (const QVariant &var, resultsList) {
- QVariantHash obj = var.toHash();
- const QString name = obj.value(nameKey).toString();
- if (name == QLatin1String("EDisplayXPixels"))
- x = obj.value(valueKey).toInt();
- else if (name == QLatin1String("EDisplayYPixels"))
- y = obj.value(valueKey).toInt();
- }
- if (x && y) {
- startTable(m_deviceInfo);
- QTextStream str(&m_deviceInfo);
- addToTable(str, tr("Screen size:"), QString::number(x) + QLatin1Char('x') + QString::number(y));
- finishTable(m_deviceInfo);
- }
- }
-
- // Done with collecting info
- emit infoCollected();
-}
-
-void SymbianIDeviceConfigurationWidget::codaIncreaseProgress()
-{
- m_codaTimeout->start();
- setDeviceInfoLabel(m_deviceInfoLabel->text() + QLatin1Char('.'));
-}
-
-SymbianIDevice *SymbianIDeviceConfigurationWidget::symbianDevice() const
-{
- return dynamic_cast<SymbianIDevice *>(device().data());
-}
-
-void SymbianIDeviceConfigurationWidget::collectingInfoFinished()
-{
- m_codaTimeout->stop();
- emit codaConnected();
- m_deviceInfoButton->setEnabled(true);
- setDeviceInfoLabel(m_deviceInfo);
- SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaInfoDevice);
-}
-
-void SymbianIDeviceConfigurationWidget::codaTimeout()
-{
- QMessageBox *mb = CodaRunControl::createCodaWaitingMessageBox(this);
- connect(this, SIGNAL(codaConnected()), mb, SLOT(close()));
- connect(mb, SIGNAL(finished(int)), this, SLOT(codaCanceled()));
- mb->open();
-}
-
-void SymbianIDeviceConfigurationWidget::codaCanceled()
-{
- clearDeviceInfo();
- m_deviceInfoButton->setEnabled(true);
- SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(m_codaInfoDevice);
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianideviceconfigwidget.h b/src/plugins/qt4projectmanager/qt-s60/symbianideviceconfigwidget.h
deleted file mode 100644
index ece06eccc3..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianideviceconfigwidget.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SYMBIANIDEVICECONFIGURATIONWIDGET_H
-#define SYMBIANIDEVICECONFIGURATIONWIDGET_H
-
-#include <projectexplorer/devicesupport/idevicewidget.h>
-
-#include <QWidget>
-#include <QPointer>
-
-QT_BEGIN_NAMESPACE
-class QLabel;
-class QLineEdit;
-class QComboBox;
-class QToolButton;
-class QCheckBox;
-class QRadioButton;
-QT_END_NAMESPACE
-
-namespace Utils {
- class DetailsWidget;
- class IpAddressLineEdit;
-}
-
-namespace SymbianUtils {
-class SymbianDevice;
-}
-
-namespace Coda {
- class CodaDevice;
- class CodaEvent;
- struct CodaCommandResult;
-}
-
-namespace Qt4ProjectManager {
-
-class SymbianIDevice;
-
-namespace Internal {
-
-class SymbianIDeviceConfigurationWidget : public ProjectExplorer::IDeviceWidget
-{
- Q_OBJECT
-
-public:
- explicit SymbianIDeviceConfigurationWidget(const ProjectExplorer::IDevice::Ptr &rawDevice, QWidget *parent = 0);
- ~SymbianIDeviceConfigurationWidget();
-
-signals:
- void infoCollected();
- void codaConnected();
-
-private slots:
- void updateSerialDevices();
- void setSerialPort(int index);
- void updateDeviceInfo();
- void clearDeviceInfo();
- void updateCommunicationChannel();
- void updateCommunicationChannelUi();
- void updateWlanAddress(const QString &address);
- void cleanWlanAddress();
- void codaEvent(const Coda::CodaEvent &event);
- void collectingInfoFinished();
- void codaTimeout();
- void codaCanceled();
- void codaIncreaseProgress();
-
-private:
- SymbianIDevice *symbianDevice() const;
-
- inline SymbianUtils::SymbianDevice rawDevice(int i) const;
- inline SymbianUtils::SymbianDevice currentRawDevice() const;
-
- void setDeviceInfoLabel(const QString &message, bool isError = false);
-
- QWidget *createCommunicationChannel();
-
- void getQtVersionCommandResult(const Coda::CodaCommandResult &result);
- void getRomInfoResult(const Coda::CodaCommandResult &result);
- void getInstalledPackagesResult(const Coda::CodaCommandResult &result);
- void getHalResult(const Coda::CodaCommandResult &result);
-
- Utils::DetailsWidget *m_detailsWidget;
- QComboBox *m_serialPortsCombo;
- QToolButton *m_deviceInfoButton;
- QLabel *m_deviceInfoDescriptionLabel;
- QLabel *m_deviceInfoLabel;
- QRadioButton *m_serialRadioButton;
- QRadioButton *m_wlanRadioButton;
- Utils::IpAddressLineEdit *m_ipAddress;
- QSharedPointer<Coda::CodaDevice> m_codaInfoDevice;
- QString m_deviceInfo;
- QTimer *m_codaTimeout;
-};
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
-
-#endif // SYMBIANIDEVICECONFIGURATIONWIDGET_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianidevicefactory.cpp b/src/plugins/qt4projectmanager/qt-s60/symbianidevicefactory.cpp
deleted file mode 100644
index df4424ba2f..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianidevicefactory.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "symbianidevicefactory.h"
-
-#include "symbianidevice.h"
-
-#include <utils/qtcassert.h>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-SymbianIDeviceFactory::SymbianIDeviceFactory(QObject *parent) : IDeviceFactory(parent)
-{ }
-
-QString SymbianIDeviceFactory::displayNameForId(Core::Id type) const
-{
- if (type == deviceType())
- return tr("Symbian Device");
- return QString();
-}
-
-QList<Core::Id> SymbianIDeviceFactory::availableCreationIds() const
-{
- return QList<Core::Id>() << deviceType();
-}
-
-bool SymbianIDeviceFactory::canCreate() const
-{
- return false;
-}
-
-ProjectExplorer::IDevice::Ptr SymbianIDeviceFactory::create(Core::Id id) const
-{
- Q_UNUSED(id);
- return ProjectExplorer::IDevice::Ptr();
-}
-
-bool SymbianIDeviceFactory::canRestore(const QVariantMap &map) const
-{
- return ProjectExplorer::IDevice::typeFromMap(map) == deviceType();
-}
-
-ProjectExplorer::IDevice::Ptr SymbianIDeviceFactory::restore(const QVariantMap &map) const
-{
- QTC_ASSERT(canRestore(map), return ProjectExplorer::IDevice::Ptr());
- SymbianIDevice *dev = new SymbianIDevice(map);
- return ProjectExplorer::IDevice::Ptr(dev);
-}
-
-Core::Id SymbianIDeviceFactory::deviceType()
-{
- return Core::Id("Qt4ProjectManager.SymbianDevice");
-}
-
-} // namespace internal
-} // namespace qt4projectmanager
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianidevicefactory.h b/src/plugins/qt4projectmanager/qt-s60/symbianidevicefactory.h
deleted file mode 100644
index 5fe3edde32..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianidevicefactory.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SYMBIANIDEVICEFACTORY_H
-#define SYMBIANIDEVICEFACTORY_H
-
-#include <projectexplorer/devicesupport/idevicefactory.h>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class SymbianIDeviceFactory : public ProjectExplorer::IDeviceFactory
-{
- Q_OBJECT
-
-public:
- SymbianIDeviceFactory(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 Qt4ProjectManager
-
-#endif // SYMBIANIDEVICEFACTORY_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp
deleted file mode 100644
index c2c87bf19a..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp
+++ /dev/null
@@ -1,330 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "qt4projectmanagerconstants.h"
-#include "symbianqtversion.h"
-#include "qt-s60/sbsv2parser.h"
-#include "qt-s60/abldparser.h"
-
-#include <projectexplorer/gnumakeparser.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/toolchain.h>
-#include <projectexplorer/toolchainmanager.h>
-#include <qtsupport/qtsupportconstants.h>
-#include <utils/pathchooser.h>
-#include <utils/environment.h>
-#include <proparser/profileevaluator.h>
-
-#include <QCoreApplication>
-#include <QDir>
-#include <QSettings>
-#include <QLabel>
-#include <QFormLayout>
-
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-SymbianQtVersion::SymbianQtVersion()
- : BaseQtVersion()
-{
-}
-
-SymbianQtVersion::SymbianQtVersion(const Utils::FileName &path, bool isAutodetected, const QString &autodetectionSource)
- : BaseQtVersion(path, isAutodetected, autodetectionSource)
-{
-
-}
-
-SymbianQtVersion::~SymbianQtVersion()
-{
-
-}
-
-SymbianQtVersion *SymbianQtVersion::clone() const
-{
- return new SymbianQtVersion(*this);
-}
-
-bool SymbianQtVersion::equals(BaseQtVersion *other)
-{
- if (!BaseQtVersion::equals(other))
- return false;
- SymbianQtVersion *o = static_cast<SymbianQtVersion *>(other);
- return m_sbsV2Directory == o->m_sbsV2Directory;
-}
-
-QString SymbianQtVersion::type() const
-{
- return QLatin1String(QtSupport::Constants::SYMBIANQT);
-}
-
-bool SymbianQtVersion::isValid() const
-{
- if (!BaseQtVersion::isValid())
- return false;
- if (isBuildWithSymbianSbsV2() && (m_sbsV2Directory.isEmpty() || !QFileInfo(m_sbsV2Directory + QLatin1String("/sbs")).exists()))
- return false;
- return true;
-}
-
-QString SymbianQtVersion::invalidReason() const
-{
- QString tmp = BaseQtVersion::invalidReason();
- if (isBuildWithSymbianSbsV2()
- && (m_sbsV2Directory.isEmpty() || !QFileInfo(m_sbsV2Directory + QLatin1String("/sbs")).exists()))
- return QCoreApplication::translate("QtVersion", "SBS was not found.");
-
- return tmp;
-}
-
-void SymbianQtVersion::restoreLegacySettings(QSettings *s)
-{
- setSbsV2Directory(QDir::fromNativeSeparators(s->value(QLatin1String("SBSv2Directory")).toString()));
-}
-
-void SymbianQtVersion::fromMap(const QVariantMap &map)
-{
- BaseQtVersion::fromMap(map);
- setSbsV2Directory(QDir::fromNativeSeparators(map.value(QLatin1String("SBSv2Directory")).toString()));
-}
-
-QVariantMap SymbianQtVersion::toMap() const
-{
- QVariantMap result = BaseQtVersion::toMap();
- result.insert(QLatin1String("SBSv2Directory"), sbsV2Directory());
- return result;
-}
-
-QList<ProjectExplorer::Abi> SymbianQtVersion::detectQtAbis() const
-{
- return QList<ProjectExplorer::Abi>()
- << ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::SymbianOS,
- ProjectExplorer::Abi::UnknownFlavor,
- ProjectExplorer::Abi::ElfFormat,
- 32);
-}
-
-QString SymbianQtVersion::description() const
-{
- return QCoreApplication::translate("QtVersion", "Symbian", "Qt Version is meant for Symbian");
-}
-
-
-bool SymbianQtVersion::supportsShadowBuilds() const
-{
- return false;
-}
-
-bool SymbianQtVersion::supportsBinaryDebuggingHelper() const
-{
- return false;
-}
-
-static const char *S60_EPOC_HEADERS[] = {
- "include", "mkspecs/common/symbian", "epoc32/include",
- "epoc32/include/osextensions/stdapis", "epoc32/include/osextensions/stdapis/sys",
- "epoc32/include/stdapis", "epoc32/include/stdapis/sys",
- "epoc32/include/osextensions/stdapis/stlport", "epoc32/include/stdapis/stlport",
- "epoc32/include/oem", "epoc32/include/middleware", "epoc32/include/domain/middleware",
- "epoc32/include/osextensions", "epoc32/include/domain/osextensions",
- "epoc32/include/domain/osextensions/loc", "epoc32/include/domain/middleware/loc",
- "epoc32/include/domain/osextensions/loc/sc", "epoc32/include/domain/middleware/loc/sc",
- "epoc32/include/mw", "epoc32/include/app",
- "epoc32/include/platform", "epoc32/include/platform/mw",
- "epoc32/include/platform/app", "epoc32/include/platform/loc",
- "epoc32/include/platform/mw/loc", "epoc32/include/platform/app/loc",
- "epoc32/include/platform/loc/sc", "epoc32/include/platform/app/loc/sc",
- "epoc32/include/platform/mw/loc/sc"
-};
-
-void SymbianQtVersion::addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const
-{
- BaseQtVersion::addToEnvironment(p, env);
- // Generic Symbian environment:
- QString epocRootPath = ProjectExplorer::SysRootProfileInformation::sysRoot(p).toString();
- QDir epocDir(epocRootPath);
-
- // Clean up epoc root path for the environment:
- if (!epocRootPath.endsWith(QLatin1Char('/')))
- epocRootPath.append(QLatin1Char('/'));
- if (!isBuildWithSymbianSbsV2()) {
-#ifdef Q_OS_WIN
- if (epocRootPath.count() > 2
- && epocRootPath.at(0).toLower() >= QLatin1Char('a')
- && epocRootPath.at(0).toLower() <= QLatin1Char('z')
- && epocRootPath.at(1) == QLatin1Char(':')) {
- epocRootPath = epocRootPath.mid(2);
- }
-#endif
- }
- env.set(QLatin1String("EPOCROOT"), QDir::toNativeSeparators(epocRootPath));
-
- env.prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/tools"))); // e.g. make.exe
- // Windows only:
- if (ProjectExplorer::Abi::hostAbi().os() == ProjectExplorer::Abi::WindowsOS) {
- QString winDir = QLatin1String(qgetenv("WINDIR"));
- if (!winDir.isEmpty())
- env.prependOrSetPath(QDir(winDir).filePath(QLatin1String("system32")));
-
- if (epocDir.exists(QLatin1String("epoc32/gcc/bin")))
- env.prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/gcc/bin"))); // e.g. cpp.exe, *NOT* gcc.exe
- // Find perl in the special Symbian flavour:
- if (epocDir.exists(QLatin1String("../../tools/perl/bin"))) {
- epocDir.cd(QLatin1String("../../tools/perl/bin"));
- env.prependOrSetPath(epocDir.absolutePath());
- } else {
- env.prependOrSetPath(epocDir.filePath(QLatin1String("perl/bin")));
- }
- }
-
- // SBSv2:
- if (isBuildWithSymbianSbsV2()) {
- QString sbsHome(env.value(QLatin1String("SBS_HOME")));
- QString sbsConfig = sbsV2Directory();
- if (!sbsConfig.isEmpty()) {
- env.prependOrSetPath(sbsConfig);
- // SBS_HOME is the path minus the trailing /bin:
- env.set(QLatin1String("SBS_HOME"),
- QDir::toNativeSeparators(sbsConfig.left(sbsConfig.count() - 4))); // We need this for Qt 4.6.3 compatibility
- } else if (!sbsHome.isEmpty()) {
- env.prependOrSetPath(sbsHome + QLatin1String("/bin"));
- }
- }
-}
-
-QList<ProjectExplorer::HeaderPath> SymbianQtVersion::systemHeaderPathes(const ProjectExplorer::Profile *p) const
-{
- QList<ProjectExplorer::HeaderPath> result;
- QString root = ProjectExplorer::SysRootProfileInformation::sysRoot(p).toString() + QLatin1Char('/');
- const int count = sizeof(S60_EPOC_HEADERS) / sizeof(const char *);
- for (int i = 0; i < count; ++i) {
- const QDir dir(root + QLatin1String(S60_EPOC_HEADERS[i]));
- if (dir.exists())
- result.append(ProjectExplorer::HeaderPath(dir.absolutePath(),
- ProjectExplorer::HeaderPath::GlobalHeaderPath));
- }
- result.append(BaseQtVersion::systemHeaderPathes(p));
- return result;
-}
-
-ProjectExplorer::IOutputParser *SymbianQtVersion::createOutputParser() const
-{
- if (isBuildWithSymbianSbsV2()) {
- return new SbsV2Parser;
- } else {
- ProjectExplorer::IOutputParser *parser = new AbldParser;
- parser->appendOutputParser(new ProjectExplorer::GnuMakeParser);
- return parser;
- }
-}
-
-QString SymbianQtVersion::sbsV2Directory() const
-{
- return m_sbsV2Directory;
-}
-
-void SymbianQtVersion::setSbsV2Directory(const QString &directory)
-{
- QDir dir(directory);
- const QString sbs = QLatin1String("sbs");
- if (dir.exists(sbs)) {
- m_sbsV2Directory = dir.absolutePath();
- return;
- }
- dir.cd(QLatin1String("bin"));
- if (dir.exists(sbs)) {
- m_sbsV2Directory = dir.absolutePath();
- return;
- }
- m_sbsV2Directory = directory;
-}
-
-bool SymbianQtVersion::isBuildWithSymbianSbsV2() const
-{
- ensureMkSpecParsed();
- return m_isBuildUsingSbsV2;
-}
-
-void SymbianQtVersion::parseMkSpec(ProFileEvaluator *evaluator) const
-{
- QString makefileGenerator = evaluator->value(QLatin1String("MAKEFILE_GENERATOR"));
- m_isBuildUsingSbsV2 = (makefileGenerator == QLatin1String("SYMBIAN_SBSV2"));
- BaseQtVersion::parseMkSpec(evaluator);
-}
-
-Core::FeatureSet SymbianQtVersion::availableFeatures() const
-{
- Core::FeatureSet features = QtSupport::BaseQtVersion::availableFeatures();
- if (qtVersion() >= QtSupport::QtVersionNumber(4, 7, 4)) //no reliable test for components, yet.
- features |= Core::FeatureSet(QtSupport::Constants::FEATURE_QTQUICK_COMPONENTS_SYMBIAN);
- features |= Core::FeatureSet(QtSupport::Constants::FEATURE_MOBILE);
-
- return features;
-}
-
-QString SymbianQtVersion::platformName() const
-{
- return QLatin1String(QtSupport::Constants::SYMBIAN_PLATFORM);
-}
-
-QString SymbianQtVersion::platformDisplayName() const
-{
- return QLatin1String(QtSupport::Constants::SYMBIAN_PLATFORM_TR);
-}
-
-QtSupport::QtConfigWidget *SymbianQtVersion::createConfigurationWidget() const
-{
- return new SymbianQtConfigWidget(const_cast<SymbianQtVersion *>(this));
-}
-
-SymbianQtConfigWidget::SymbianQtConfigWidget(SymbianQtVersion *version)
- : m_version(version)
-{
- QFormLayout *fl = new QFormLayout();
- fl->setMargin(0);
- setLayout(fl);
-
- if (version->isBuildWithSymbianSbsV2()) {
- Utils::PathChooser *sbsV2Path = new Utils::PathChooser;
- sbsV2Path->setExpectedKind(Utils::PathChooser::ExistingDirectory);
- fl->addRow(tr("SBS v2 directory:"), sbsV2Path);
- sbsV2Path->setPath(QDir::toNativeSeparators(version->sbsV2Directory()));
- sbsV2Path->setEnabled(version->isBuildWithSymbianSbsV2());
- connect(sbsV2Path, SIGNAL(changed(QString)),
- this, SLOT(updateCurrentSbsV2Directory(QString)));
- }
-}
-
-void SymbianQtConfigWidget::updateCurrentSbsV2Directory(const QString &path)
-{
- m_version->setSbsV2Directory(QDir::fromNativeSeparators(path));
- emit changed();
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h
deleted file mode 100644
index c2ead8fb53..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SYMBIANQTVERSION_H
-#define SYMBIANQTVERSION_H
-
-#include <qtsupport/baseqtversion.h>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class SymbianQtVersion : public QtSupport::BaseQtVersion
-{
-public:
- SymbianQtVersion();
- SymbianQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
- SymbianQtVersion *clone() const;
- ~SymbianQtVersion();
-
- bool equals(BaseQtVersion *other);
-
- QString type() const;
-
- bool isValid() const;
- QString invalidReason() const;
-
- void restoreLegacySettings(QSettings *s);
- void fromMap(const QVariantMap &map);
- QVariantMap toMap() const;
-
- QList<ProjectExplorer::Abi> detectQtAbis() const;
-
- QString description() const;
-
- bool supportsShadowBuilds() const;
- bool supportsBinaryDebuggingHelper() const;
- void addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const;
- QList<ProjectExplorer::HeaderPath> systemHeaderPathes(const ProjectExplorer::Profile *p) const;
-
- ProjectExplorer::IOutputParser *createOutputParser() const;
-
- bool isBuildWithSymbianSbsV2() const;
-
- QString sbsV2Directory() const;
- void setSbsV2Directory(const QString &directory);
-
- QtSupport::QtConfigWidget *createConfigurationWidget() const;
-
- Core::FeatureSet availableFeatures() const;
- QString platformName() const;
- QString platformDisplayName() const;
-
-protected:
- void parseMkSpec(ProFileEvaluator *) const;
-private:
- QString m_sbsV2Directory;
- mutable bool m_isBuildUsingSbsV2;
-};
-
-class SymbianQtConfigWidget : public QtSupport::QtConfigWidget
-{
- Q_OBJECT
-
-public:
- SymbianQtConfigWidget(SymbianQtVersion *version);
-
-public slots:
- void updateCurrentSbsV2Directory(const QString &path);
-
-private:
- SymbianQtVersion *m_version;
-};
-
-}
-}
-
-#endif // SYMBIANQTVERSION_H
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.cpp b/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.cpp
deleted file mode 100644
index 3e3b524489..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "symbianqtversionfactory.h"
-
-#include "qt4projectmanagerconstants.h"
-#include "symbianqtversion.h"
-
-#include <qtsupport/profilereader.h>
-#include <qtsupport/qtsupportconstants.h>
-
-#include <QFileInfo>
-
-using namespace Qt4ProjectManager;
-using namespace Qt4ProjectManager::Internal;
-
-SymbianQtVersionFactory::SymbianQtVersionFactory(QObject *parent)
- : QtVersionFactory(parent)
-{
-
-}
-
-SymbianQtVersionFactory::~SymbianQtVersionFactory()
-{
-
-}
-
-bool SymbianQtVersionFactory::canRestore(const QString &type)
-{
- return type == QLatin1String(QtSupport::Constants::SYMBIANQT);
-}
-
-QtSupport::BaseQtVersion *SymbianQtVersionFactory::restore(const QString &type, const QVariantMap &data)
-{
- if (!canRestore(type))
- return 0;
- SymbianQtVersion *v = new SymbianQtVersion;
- v->fromMap(data);
- return v;
-}
-
-int SymbianQtVersionFactory::priority() const
-{
- return 50;
-}
-
-QtSupport::BaseQtVersion *SymbianQtVersionFactory::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;
-
- QString makefileGenerator = evaluator->value(QLatin1String("MAKEFILE_GENERATOR"));
- if (makefileGenerator == QLatin1String("SYMBIAN_ABLD") ||
- makefileGenerator == QLatin1String("SYMBIAN_SBSV2") ||
- makefileGenerator == QLatin1String("SYMBIAN_UNIX")) {
- return new SymbianQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
- }
-
- return 0;
-}
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.h b/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.h
deleted file mode 100644
index f44b1f1bac..0000000000
--- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversionfactory.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SYMBIANQTVERSIONFACTORY_H
-#define SYMBIANQTVERSIONFACTORY_H
-
-#include <qtsupport/qtversionfactory.h>
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-class SymbianQtVersionFactory : public QtSupport::QtVersionFactory
-{
-public:
- explicit SymbianQtVersionFactory(QObject *parent = 0);
- ~SymbianQtVersionFactory();
-
- 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());
-};
-
-} // Internal
-} // Qt4ProjectManager
-
-#endif // SYMBIANQTVERSION_H
diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
index 58d5984ed0..a72fb505a3 100644
--- a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
@@ -268,24 +268,14 @@ void Qt4BuildConfiguration::setShadowBuildAndDirectory(bool shadowBuild, const Q
emitEvaluateBuildSystem();
}
-static inline QString symbianMakeTarget(QtSupport::BaseQtVersion::QmakeBuildConfigs buildConfig,
- const QString &type)
-{
- QString rc = (buildConfig & QtSupport::BaseQtVersion::DebugBuild) ?
- QLatin1String("debug-") : QLatin1String("release-");
- rc += type;
- return rc;
-}
-
QString Qt4BuildConfiguration::defaultMakeTarget() const
{
ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
- if (!tc || !version || version->type() != QtSupport::Constants::SYMBIANQT)
+ if (!tc || !version)
return QString();
- const QtSupport::BaseQtVersion::QmakeBuildConfigs buildConfig = qmakeBuildConfiguration();
- return symbianMakeTarget(buildConfig, tc->defaultMakeTarget());
+ return tc->defaultMakeTarget();
}
QString Qt4BuildConfiguration::makefile() const
@@ -324,11 +314,6 @@ void Qt4BuildConfiguration::emitBuildDirectoryInitialized()
emit buildDirectoryInitialized();
}
-void Qt4BuildConfiguration::emitS60CreatesSmartInstallerChanged()
-{
- emit s60CreatesSmartInstallerChanged();
-}
-
QStringList Qt4BuildConfiguration::configCommandLineArguments() const
{
QStringList result;
diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.h b/src/plugins/qt4projectmanager/qt4buildconfiguration.h
index 92cddb898f..f99852f230 100644
--- a/src/plugins/qt4projectmanager/qt4buildconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.h
@@ -81,9 +81,6 @@ public:
// used by qmake step to notify that the build directory was initialized
// not really nice
void emitBuildDirectoryInitialized();
- // used by S60CreatePackageStep to notify that the smart installer property changed
- // not really nice
- void emitS60CreatesSmartInstallerChanged();
QStringList configCommandLineArguments() const;
@@ -133,8 +130,6 @@ signals:
/// emitted for setQMakeBuildConfig, not emitted for Qt version changes, even
/// if those change the qmakebuildconfig
void qmakeBuildConfigurationChanged();
- /// emitted when smart installer property of S60 create package step changes
- void s60CreatesSmartInstallerChanged();
private slots:
void profileChanged();
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index 2959f928d4..3d0a61171f 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -796,25 +796,6 @@ void Qt4PriFileNode::folderChanged(const QString &folder)
contents.updateSubFolders(this, this);
m_project->updateFileList();
m_project->updateCodeModels();
-
- // The files to be packaged are listed inside the symbian build system.
- // We need to regenerate that list by running qmake
- // Other platforms do not have a explicit list of files to package, but package
- // directories
- foreach (const ProjectExplorer::Target *target, m_project->targets()) {
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
- if (version && version->type() == QtSupport::Constants::SYMBIANQT) {
- foreach (ProjectExplorer::BuildConfiguration *bc, target->buildConfigurations()) {
- Qt4BuildConfiguration *qt4bc = qobject_cast<Qt4BuildConfiguration *>(bc);
- if (qt4bc) {
- QMakeStep *qmakeStep = qt4bc->qmakeStep();
- if (qmakeStep)
- qmakeStep->setForced(true);
- }
- }
- }
- }
-
}
bool Qt4PriFileNode::deploysFolder(const QString &folder) const
@@ -1414,49 +1395,6 @@ QString Qt4ProFileNode::makefile() const
return m_varValues[Makefile].first();
}
-QStringList Qt4ProFileNode::symbianCapabilities() const
-{
- QStringList lowerCasedResult;
-
- QStringList all;
- all << QLatin1String("LocalServices") << QLatin1String("UserEnvironment") << QLatin1String("NetworkServices")
- << QLatin1String("ReadUserData") << QLatin1String("WriteUserData") << QLatin1String("Location") << QLatin1String("SwEvent")
- << QLatin1String("SurroundingsDD") << QLatin1String("ProtServ") << QLatin1String("PowerMgmt") << QLatin1String("ReadDeviceData")
- << QLatin1String("WriteDeviceData") << QLatin1String("TrustedUI") << QLatin1String("NetworkControl")
- << QLatin1String("MultimediaDD")<< QLatin1String("CommDD") << QLatin1String("DiskAdmin") << QLatin1String("AllFiles")
- << QLatin1String("DRM") << QLatin1String("TCB");
-
- foreach (const QString &cap, m_varValues[SymbianCapabilities]) {
- QString capability = cap.toLower();
- if (capability.startsWith(QLatin1Char('-'))) {
- lowerCasedResult.removeAll(capability.mid(1));
- } else if (capability == QLatin1String("all")) {
- foreach (const QString &a, all)
- if (!lowerCasedResult.contains(a, Qt::CaseInsensitive))
- lowerCasedResult << a.toLower();
- } else {
- lowerCasedResult << cap;
- }
- }
- QStringList result; //let's make the result pretty
- int index = -1;
- foreach (const QString &lowerCase, lowerCasedResult) {
- for (int i = 0; i < all.count(); ++i) {
- index = -1;
- if (QString::compare(lowerCase, all.at(i),
- Qt::CaseInsensitive) == 0) {
- index = i;
- break;
- }
- }
- if (index != -1)
- result << all.at(index);
- else
- result << lowerCase; //strange capability!
- }
- return result;
-}
-
QString Qt4ProFileNode::objectExtension() const
{
if (m_varValues[ObjectExt].isEmpty()) {
@@ -2004,7 +1942,6 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
newVarValues[QmlImportPathVar] = m_readerExact->absolutePathValues(
QLatin1String("QML_IMPORT_PATH"), m_projectDir);
newVarValues[Makefile] = m_readerExact->values(QLatin1String("MAKEFILE"));
- newVarValues[SymbianCapabilities] = m_readerExact->values(QLatin1String("TARGET.CAPABILITY"));
newVarValues[QtVar] = m_readerExact->values(QLatin1String("QT"));
newVarValues[ObjectExt] = m_readerExact->values(QLatin1String("QMAKE_EXT_OBJ"));
newVarValues[ObjectsDir] = m_readerExact->values(QLatin1String("OBJECTS_DIR"));
diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h
index 11b456dbd4..ad1dcc38ba 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.h
+++ b/src/plugins/qt4projectmanager/qt4nodes.h
@@ -93,7 +93,6 @@ enum Qt4Variable {
QtVar,
QmlImportPathVar,
Makefile,
- SymbianCapabilities,
ObjectExt,
ObjectsDir
};
@@ -380,7 +379,6 @@ public:
ProjectVersion projectVersion() const { return m_projectVersion; }
QString makefile() const;
- QStringList symbianCapabilities() const;
QString objectExtension() const;
QString objectsDirectory() const;
QByteArray cxxDefines() const;
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.pro b/src/plugins/qt4projectmanager/qt4projectmanager.pro
index 158e8e001f..1cbefd10ae 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.pro
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.pro
@@ -143,7 +143,6 @@ FORMS += makestep.ui \
wizards/html5appwizardsourcespage.ui \
wizards/mobilelibrarywizardoptionpage.ui \
wizards/mobileappwizardgenericoptionspage.ui \
- wizards/mobileappwizardsymbianoptionspage.ui \
wizards/mobileappwizardmaemooptionspage.ui \
wizards/mobileappwizardharmattanoptionspage.ui \
wizards/qtquickcomponentsetoptionspage.ui
@@ -151,7 +150,6 @@ FORMS += makestep.ui \
RESOURCES += qt4projectmanager.qrc \
wizards/wizards.qrc
-include(qt-s60/qt-s60.pri)
include(qt-desktop/qt-desktop.pri)
include(customwidgetwizard/customwidgetwizard.pri)
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.qbs b/src/plugins/qt4projectmanager/qt4projectmanager.qbs
index 836195851a..0d83c6f951 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.qbs
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.qbs
@@ -11,7 +11,6 @@ QtcPlugin {
Depends { name: "QtSupport" }
Depends { name: "CppTools" }
Depends { name: "Debugger" }
- Depends { name: "symbianutils" }
Depends { name: "QmlJS" }
Depends { name: "Botan" }
Depends { name: "CPlusPlus" }
@@ -33,7 +32,6 @@ QtcPlugin {
"customwidgetwizard",
"../../libs",
"../../shared",
- "../../shared/symbianutils"
]
files: [
@@ -139,83 +137,6 @@ QtcPlugin {
"qt-desktop/simulatorqtversion.h",
"qt-desktop/simulatorqtversionfactory.cpp",
"qt-desktop/simulatorqtversionfactory.h",
- "qt-s60/abldparser.cpp",
- "qt-s60/abldparser.h",
- "qt-s60/certificatepathchooser.cpp",
- "qt-s60/certificatepathchooser.h",
- "qt-s60/gccetoolchain.cpp",
- "qt-s60/gccetoolchain.h",
- "qt-s60/passphraseforkeydialog.cpp",
- "qt-s60/passphraseforkeydialog.h",
- "qt-s60/rvctparser.cpp",
- "qt-s60/rvctparser.h",
- "qt-s60/rvcttoolchain.cpp",
- "qt-s60/rvcttoolchain.h",
- "qt-s60/s60certificatedetailsdialog.cpp",
- "qt-s60/s60certificatedetailsdialog.h",
- "qt-s60/s60certificatedetailsdialog.ui",
- "qt-s60/s60certificateinfo.cpp",
- "qt-s60/s60certificateinfo.h",
- "qt-s60/s60createpackageparser.cpp",
- "qt-s60/s60createpackageparser.h",
- "qt-s60/s60createpackagestep.cpp",
- "qt-s60/s60createpackagestep.h",
- "qt-s60/s60createpackagestep.ui",
- "qt-s60/s60deployconfiguration.cpp",
- "qt-s60/s60deployconfiguration.h",
- "qt-s60/s60deployconfigurationwidget.cpp",
- "qt-s60/s60deployconfigurationwidget.h",
- "qt-s60/s60devicerunconfiguration.cpp",
- "qt-s60/s60devicerunconfiguration.h",
- "qt-s60/s60devicerunconfigurationwidget.cpp",
- "qt-s60/s60devicerunconfigurationwidget.h",
- "qt-s60/s60manager.h",
- "qt-s60/s60publisherovi.cpp",
- "qt-s60/s60publisherovi.h",
- "qt-s60/s60publishingbuildsettingspageovi.cpp",
- "qt-s60/s60publishingbuildsettingspageovi.h",
- "qt-s60/s60publishingbuildsettingspageovi.ui",
- "qt-s60/s60publishingresultspageovi.cpp",
- "qt-s60/s60publishingresultspageovi.h",
- "qt-s60/s60publishingresultspageovi.ui",
- "qt-s60/s60publishingsissettingspageovi.cpp",
- "qt-s60/s60publishingsissettingspageovi.h",
- "qt-s60/s60publishingsissettingspageovi.ui",
- "qt-s60/s60publishingwizardfactories.cpp",
- "qt-s60/s60publishingwizardfactories.h",
- "qt-s60/s60publishingwizardovi.cpp",
- "qt-s60/s60publishingwizardovi.h",
- "qt-s60/s60symbiancertificate.cpp",
- "qt-s60/s60symbiancertificate.h",
- "qt-s60/sbsv2parser.cpp",
- "qt-s60/sbsv2parser.h",
- "qt-s60/symbianidevice.cpp",
- "qt-s60/symbianidevice.h",
- "qt-s60/symbianideviceconfigwidget.cpp",
- "qt-s60/symbianideviceconfigwidget.h",
- "qt-s60/symbianidevicefactory.cpp",
- "qt-s60/symbianidevicefactory.h",
- "qt-s60/symbianqtversion.cpp",
- "qt-s60/symbianqtversion.h",
- "qt-s60/symbianqtversionfactory.cpp",
- "qt-s60/symbianqtversionfactory.h",
- "qt-s60/symbianidevice.cpp",
- "qt-s60/symbianidevice.h",
- "qt-s60/symbianidevicefactory.cpp",
- "qt-s60/symbianidevicefactory.h",
- "qt-s60/symbianideviceconfigwidget.cpp",
- "qt-s60/symbianideviceconfigwidget.h",
- "qt-s60/codaruncontrol.cpp",
- "qt-s60/codaruncontrol.h",
- "qt-s60/s60deploystep.cpp",
- "qt-s60/s60deploystep.h",
- "qt-s60/s60devicedebugruncontrol.cpp",
- "qt-s60/s60devicedebugruncontrol.h",
- "qt-s60/s60manager.cpp",
- "qt-s60/s60runcontrolbase.cpp",
- "qt-s60/s60runcontrolbase.h",
- "qt-s60/s60runcontrolfactory.cpp",
- "qt-s60/s60runcontrolfactory.h",
"wizards/targetsetuppage.ui",
"wizards/testwizardpage.ui",
"wizards/wizards.qrc",
@@ -258,7 +179,6 @@ QtcPlugin {
"wizards/mobileappwizardmaemooptionspage.ui",
"wizards/mobileappwizardpages.cpp",
"wizards/mobileappwizardpages.h",
- "wizards/mobileappwizardsymbianoptionspage.ui",
"wizards/mobilelibraryparameters.cpp",
"wizards/mobilelibraryparameters.h",
"wizards/mobilelibrarywizardoptionpage.cpp",
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri b/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri
index a5cc9ca447..298cf1cb8a 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri
+++ b/src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri
@@ -2,6 +2,5 @@ include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/qtsupport/qtsupport.pri)
include(../../plugins/cpptools/cpptools.pri)
include(../../plugins/debugger/debugger.pri)
-include(../../libs/symbianutils/symbianutils.pri)
include(../../libs/qmljs/qmljs.pri)
include(../../libs/3rdparty/botan/botan.pri)
diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
index bfb96cd8d5..f59247e3c8 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
@@ -52,7 +52,6 @@
#include "profileeditor.h"
#include "externaleditors.h"
#include "profilecompletionassist.h"
-#include "qt-s60/s60manager.h"
#include "qt-desktop/qt4runconfiguration.h"
#include "qt-desktop/desktopqtversionfactory.h"
#include "qt-desktop/simulatorqtversionfactory.h"
@@ -161,8 +160,6 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
#endif
addAutoReleasedObject(new LinguistExternalEditor);
- addAutoReleasedObject(new S60Manager);
-
addAutoReleasedObject(new DesktopQtVersionFactory);
addAutoReleasedObject(new SimulatorQtVersionFactory);
addAutoReleasedObject(new WinCeQtVersionFactory);
@@ -308,7 +305,6 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
void Qt4ProjectManagerPlugin::extensionsInitialized()
{
m_qt4ProjectManager->init();
- S60Manager::instance()->extensionsInitialize();
}
void Qt4ProjectManagerPlugin::startupProjectChanged()
diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
index f16bccb725..478566c69f 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
+++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
@@ -76,12 +76,6 @@ private slots:
void buildStateChanged(ProjectExplorer::Project *pro);
#ifdef WITH_TESTS
- void testAbldOutputParsers_data();
- void testAbldOutputParsers();
- void testSbsV2OutputParsers_data();
- void testSbsV2OutputParsers();
- void testRvctOutputParser_data();
- void testRvctOutputParser();
void testQmakeOutputParsers_data();
void testQmakeOutputParsers();
#endif
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
index 2bfc698a9f..ae7dd00d23 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
@@ -64,24 +64,12 @@ AbstractMobileApp::AbstractMobileApp()
: QObject()
, m_canSupportMeegoBooster(false)
, m_orientation(ScreenOrientationAuto)
- , m_networkEnabled(true)
, m_supportsMeegoBooster(false)
{
}
AbstractMobileApp::~AbstractMobileApp() { }
-QString AbstractMobileApp::symbianUidForPath(const QString &path)
-{
- quint32 hash = 5381;
- for (int i = 0; i < path.size(); ++i) {
- const char c = path.at(i).toAscii();
- hash ^= c + ((c - i) << i % 20) + ((c + i) << (i + 5) % 20) + ((c - 2 * i) << (i + 10) % 20) + ((c + 2 * i) << (i + 15) % 20);
- }
- return QString::fromLatin1("0xE")
- + QString::fromLatin1("%1").arg(hash, 7, 16, QLatin1Char('0')).right(7).toUpper();
-}
-
void AbstractMobileApp::setOrientation(ScreenOrientation orientation)
{
m_orientation = orientation;
@@ -107,16 +95,6 @@ void AbstractMobileApp::setProjectPath(const QString &path)
m_projectPath.setFile(path);
}
-void AbstractMobileApp::setSymbianSvgIcon(const QString &icon)
-{
- m_symbianSvgIcon = icon;
-}
-
-QString AbstractMobileApp::symbianSvgIcon() const
-{
- return path(SymbianSvgIconOrigin);
-}
-
void AbstractMobileApp::setPngIcon64(const QString &icon)
{
m_pngIcon64 = icon;
@@ -137,33 +115,11 @@ QString AbstractMobileApp::pngIcon80() const
return path(PngIconOrigin80);
}
-void AbstractMobileApp::setSymbianTargetUid(const QString &uid)
-{
- m_symbianTargetUid = uid;
-}
-
-QString AbstractMobileApp::symbianTargetUid() const
-{
- return !m_symbianTargetUid.isEmpty() ? m_symbianTargetUid
- : symbianUidForPath(path(AppPro));
-}
-
-void AbstractMobileApp::setNetworkEnabled(bool enabled)
-{
- m_networkEnabled = enabled;
-}
-
-bool AbstractMobileApp::networkEnabled() const
-{
- return m_networkEnabled;
-}
-
QString AbstractMobileApp::path(int fileType) const
{
const QString originsRootApp = originsRoot();
const QString originsRootShared = templatesRoot() + QLatin1String("shared/");
const QString mainCppFileName = QLatin1String("main.cpp");
- const QString symbianIconFileName = QLatin1String("symbianicon.svg");
switch (fileType) {
case MainCpp: return outputPathBase() + mainCppFileName;
case MainCppOrigin: return originsRootApp + mainCppFileName;
@@ -175,9 +131,6 @@ QString AbstractMobileApp::path(int fileType) const
case DesktopOrigin: return originsRootShared + QLatin1String("app.desktop");
case DeploymentPri: return outputPathBase() + DeploymentPriFileName;
case DeploymentPriOrigin: return originsRootShared + DeploymentPriFileName;
- case SymbianSvgIcon: return outputPathBase() + m_projectName + QLatin1String(".svg");
- case SymbianSvgIconOrigin: return !m_symbianSvgIcon.isEmpty() ? m_symbianSvgIcon
- : originsRootShared + symbianIconFileName;
case PngIcon64: return outputPathBase() + m_projectName + QLatin1String("64.png");
case PngIconOrigin64: return !m_pngIcon64.isEmpty() ? m_pngIcon64
: originsRootShared + QLatin1String("icon64.png");
@@ -279,12 +232,7 @@ QByteArray AbstractMobileApp::generateProFile(QString *errorMessage) const
bool commentOutNextLine = false;
QString line;
while (!(line = in.readLine()).isNull()) {
- if (line.contains(QLatin1String("# TARGETUID3"))) {
- valueOnNextLine = symbianTargetUid();
- } else if (line.contains(QLatin1String("# NETWORKACCESS"))
- && !networkEnabled()) {
- commentOutNextLine = true;
- } else if (line.contains(QLatin1String("# DEPLOYMENTFOLDERS"))) {
+ if (line.contains(QLatin1String("# DEPLOYMENTFOLDERS"))) {
// Eat lines
QString nextLine;
while (!(nextLine = in.readLine()).isNull()
@@ -405,7 +353,6 @@ Core::GeneratedFiles AbstractMobileApp::generateFiles(QString *errorMessage) con
files << file(generateFile(AbstractGeneratedFileInfo::AppProFile, errorMessage), path(AppPro));
files.last().setAttributes(Core::GeneratedFile::OpenProjectAttribute);
files << file(generateFile(AbstractGeneratedFileInfo::MainCppFile, errorMessage), path(MainCpp));
- files << file(generateFile(AbstractGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon));
files << file(generateFile(AbstractGeneratedFileInfo::PngIcon64File, errorMessage), path(PngIcon64));
files << file(generateFile(AbstractGeneratedFileInfo::PngIcon80File, errorMessage), path(PngIcon80));
files << file(generateFile(AbstractGeneratedFileInfo::DesktopFremantleFile, errorMessage), path(DesktopFremantle));
@@ -458,9 +405,6 @@ QByteArray AbstractMobileApp::generateFile(int fileType,
data = generateProFile(errorMessage);
comment = ProFileComment;
break;
- case AbstractGeneratedFileInfo::SymbianSvgIconFile:
- data = readBlob(path(SymbianSvgIconOrigin), errorMessage);
- break;
case AbstractGeneratedFileInfo::PngIcon64File:
data = readBlob(path(PngIconOrigin64), errorMessage);
break;
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.h b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.h
index 5ec6573273..ae3986226c 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.h
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.h
@@ -54,7 +54,6 @@ struct
MainCppFile,
AppProFile,
DeploymentPriFile,
- SymbianSvgIconFile,
PngIcon64File,
PngIcon80File,
DesktopFremantleFile,
@@ -88,7 +87,7 @@ public:
ScreenOrientationLockLandscape,
ScreenOrientationLockPortrait,
ScreenOrientationAuto,
- ScreenOrientationImplicit // Don't set in application at all (used by Symbian components)
+ ScreenOrientationImplicit // Don't set in application at all
};
enum FileType {
@@ -102,8 +101,6 @@ public:
DesktopOrigin,
DeploymentPri,
DeploymentPriOrigin,
- SymbianSvgIcon,
- SymbianSvgIconOrigin,
PngIcon64,
PngIconOrigin64,
PngIcon80,
@@ -118,16 +115,10 @@ public:
void setProjectName(const QString &name);
QString projectName() const;
void setProjectPath(const QString &path);
- void setSymbianSvgIcon(const QString &icon);
- QString symbianSvgIcon() const;
void setPngIcon64(const QString &icon);
QString pngIcon64() const;
void setPngIcon80(const QString &icon);
QString pngIcon80() const;
- void setSymbianTargetUid(const QString &uid);
- QString symbianTargetUid() const;
- void setNetworkEnabled(bool enabled);
- bool networkEnabled() const;
QString path(int fileType) const;
QString error() const;
@@ -141,7 +132,6 @@ public:
bool generateFiles(QString *errorMessage) const;
#endif // CREATORLESSTEST
- static QString symbianUidForPath(const QString &path);
static int makeStubVersion(int minor);
QList<AbstractGeneratedFileInfo> fileUpdates(const QString &mainProFile) const;
bool updateFiles(const QList<AbstractGeneratedFileInfo> &list, QString &error) const;
@@ -192,12 +182,9 @@ private:
QString m_projectName;
QFileInfo m_projectPath;
- QString m_symbianSvgIcon;
QString m_pngIcon64;
QString m_pngIcon80;
- QString m_symbianTargetUid;
ScreenOrientation m_orientation;
- bool m_networkEnabled;
bool m_supportsMeegoBooster;
};
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
index ecaabb2c35..252102136b 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
@@ -56,14 +56,12 @@ AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent,
: ProjectExplorer::BaseProjectWizardDialog(parent, parameters)
, m_targetsPage(0)
, m_genericOptionsPageId(-1)
- , m_symbianOptionsPageId(-1)
, m_maemoOptionsPageId(-1)
, m_harmattanOptionsPageId(-1)
, m_targetsPageId(-1)
, m_ignoreGeneralOptions(false)
, m_targetItem(0)
, m_genericItem(0)
- , m_symbianItem(0)
, m_maemoItem(0)
, m_harmattanItem(0)
, m_profileIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_PROFILE_IDS).value<QList<Core::Id> >())
@@ -78,7 +76,6 @@ AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent,
}
m_genericOptionsPage = new Internal::MobileAppWizardGenericOptionsPage;
- m_symbianOptionsPage = new Internal::MobileAppWizardSymbianOptionsPage;
m_maemoOptionsPage = new Internal::MobileAppWizardMaemoOptionsPage;
m_harmattanOptionsPage = new Internal::MobileAppWizardHarmattanOptionsPage;
}
@@ -91,10 +88,7 @@ void AbstractMobileAppWizardDialog::addMobilePages()
}
const bool shouldAddGenericPage = m_targetsPage
- || (isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM) && !m_ignoreGeneralOptions)
|| isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM);
- const bool shouldAddSymbianPage = m_targetsPage
- || isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM);
const bool shouldAddMaemoPage = m_targetsPage
|| isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM);
const bool shouldAddHarmattanPage = m_targetsPage
@@ -106,12 +100,6 @@ void AbstractMobileAppWizardDialog::addMobilePages()
m_genericItem = wizardProgress()->item(m_genericOptionsPageId);
}
- if (shouldAddSymbianPage) {
- m_symbianOptionsPageId = addPageWithTitle(m_symbianOptionsPage,
- QLatin1String(" ") + tr("Symbian Specific"));
- m_symbianItem = wizardProgress()->item(m_symbianOptionsPageId);
- }
-
if (shouldAddMaemoPage) {
m_maemoOptionsPageId = addPageWithTitle(m_maemoOptionsPage,
QLatin1String(" ") + tr("Maemo5 And MeeGo Specific"));
@@ -144,26 +132,13 @@ int AbstractMobileAppWizardDialog::nextId() const
{
if (m_targetsPage) {
if (currentPage() == m_targetsPage) {
- if ((isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM) && !m_ignoreGeneralOptions) ||
- isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
+ if (isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
return m_genericOptionsPageId;
- // If Symbian target and Qt Quick components for Symbian, skip the mobile options page.
- else if (isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM) && m_ignoreGeneralOptions)
- return m_symbianOptionsPageId;
else if (isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
return m_harmattanOptionsPageId;
else
return idOfNextGenericPage();
} else if (currentPage() == m_genericOptionsPage) {
- if (isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM))
- return m_symbianOptionsPageId;
- else if (isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
- return m_maemoOptionsPageId;
- else if (isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
- return m_harmattanOptionsPageId;
- else
- return idOfNextGenericPage();
- } else if (currentPage() == m_symbianOptionsPage) {
if (isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
return m_maemoOptionsPageId;
else if (isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
@@ -185,20 +160,15 @@ void AbstractMobileAppWizardDialog::initializePage(int id)
if (m_targetItem) {
if (id == startId()) {
m_targetItem->setNextItems(QList<Utils::WizardProgressItem *>()
- << m_genericItem << m_symbianItem << m_maemoItem << m_harmattanItem << itemOfNextGenericPage());
+ << m_genericItem << m_maemoItem << m_harmattanItem << itemOfNextGenericPage());
m_genericItem->setNextItems(QList<Utils::WizardProgressItem *>()
- << m_symbianItem << m_maemoItem);
- m_symbianItem->setNextItems(QList<Utils::WizardProgressItem *>()
- << m_maemoItem << m_harmattanItem << itemOfNextGenericPage());
+ << m_maemoItem);
m_maemoItem->setNextItems(QList<Utils::WizardProgressItem *>()
<< m_harmattanItem << itemOfNextGenericPage());
} else if (id == m_genericOptionsPageId
- || id == m_symbianOptionsPageId
|| id == m_maemoOptionsPageId) {
QList<Utils::WizardProgressItem *> order;
order << m_genericItem;
- if (isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM))
- order << m_symbianItem;
if (isQtPlatformSelected(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
order << m_maemoItem;
if (isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
@@ -266,8 +236,6 @@ QWizard *AbstractMobileAppWizard::createWizardDialog(QWidget *parent,
= createWizardDialogInternal(parent, wizardDialogParameters);
wdlg->setProjectName(ProjectExplorer::BaseProjectWizardDialog::uniqueProjectName(wizardDialogParameters.defaultPath()));
wdlg->m_genericOptionsPage->setOrientation(app()->orientation());
- wdlg->m_symbianOptionsPage->setSvgIcon(app()->symbianSvgIcon());
- wdlg->m_symbianOptionsPage->setNetworkEnabled(app()->networkEnabled());
wdlg->m_maemoOptionsPage->setPngIcon(app()->pngIcon64());
wdlg->m_harmattanOptionsPage->setPngIcon(app()->pngIcon80());
wdlg->m_harmattanOptionsPage->setBoosterOptionEnabled(app()->canSupportMeegoBooster());
@@ -284,9 +252,6 @@ Core::GeneratedFiles AbstractMobileAppWizard::generateFiles(const QWizard *wizar
const AbstractMobileAppWizardDialog *wdlg
= qobject_cast<const AbstractMobileAppWizardDialog*>(wizard);
app()->setOrientation(wdlg->m_genericOptionsPage->orientation());
- app()->setSymbianTargetUid(wdlg->m_symbianOptionsPage->symbianUid());
- app()->setSymbianSvgIcon(wdlg->m_symbianOptionsPage->svgIcon());
- app()->setNetworkEnabled(wdlg->m_symbianOptionsPage->networkEnabled());
app()->setPngIcon64(wdlg->m_maemoOptionsPage->pngIcon());
app()->setPngIcon80(wdlg->m_harmattanOptionsPage->pngIcon());
if (wdlg->isQtPlatformSelected(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM))
@@ -326,7 +291,6 @@ bool AbstractMobileAppWizard::postGenerateFiles(const QWizard *w,
void AbstractMobileAppWizard::useProjectPath(const QString &projectName,
const QString &projectPath)
{
- wizardDialog()->m_symbianOptionsPage->setSymbianUid(app()->symbianUidForPath(projectPath + projectName));
app()->setProjectName(projectName);
app()->setProjectPath(projectPath);
if (wizardDialog()->m_targetsPage)
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
index 86c35c0da1..75c7667608 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
@@ -44,7 +44,6 @@ class TargetSetupPage;
namespace Internal {
class MobileAppWizardGenericOptionsPage;
-class MobileAppWizardSymbianOptionsPage;
class MobileAppWizardMaemoOptionsPage;
class MobileAppWizardHarmattanOptionsPage;
}
@@ -78,20 +77,17 @@ private:
QList<Core::Id> selectedProfiles() const;
Internal::MobileAppWizardGenericOptionsPage *m_genericOptionsPage;
- Internal::MobileAppWizardSymbianOptionsPage *m_symbianOptionsPage;
Internal::MobileAppWizardMaemoOptionsPage *m_maemoOptionsPage;
Internal::MobileAppWizardHarmattanOptionsPage *m_harmattanOptionsPage;
TargetSetupPage *m_targetsPage;
int m_genericOptionsPageId;
- int m_symbianOptionsPageId;
int m_maemoOptionsPageId;
int m_harmattanOptionsPageId;
int m_targetsPageId;
bool m_ignoreGeneralOptions; // If true, do not show generic mobile options page.
Utils::WizardProgressItem *m_targetItem;
Utils::WizardProgressItem *m_genericItem;
- Utils::WizardProgressItem *m_symbianItem;
Utils::WizardProgressItem *m_maemoItem;
Utils::WizardProgressItem *m_harmattanItem;
QList<Core::Id> m_profileIds;
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
index 33c80c24b2..b6fba3759d 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizard.cpp
@@ -53,11 +53,7 @@
static const char mainSourceFileC[] = "main";
static const char mainSourceShowC[] = " w.show();\n";
-static const char mainSourceMobilityShowC[] = "#if defined(Q_WS_S60)\n"
-" w.showMaximized();\n"
-"#else\n"
-" w.show();\n"
-"#endif\n";
+static const char mainSourceMobilityShowC[] = " w.show();\n";
static const char mainWindowUiContentsC[] =
"\n <widget class=\"QMenuBar\" name=\"menuBar\" />"
@@ -228,17 +224,9 @@ Core::GeneratedFiles GuiAppWizard::generateFiles(const QWizard *w,
if (params.designerForm)
proStr << "\n\nFORMS += " << QFileInfo(form->path()).fileName();
if (params.isMobileApplication) {
- // Generate a development Symbian UID for the application:
- QString uid3String = QLatin1String("0xe") + QUuid::createUuid().toString().mid(1, 7);
-
proStr << "\n\nCONFIG += mobility"
<< "\nMOBILITY = "
- << "\n\nsymbian {"
- << "\n TARGET.UID3 = " << uid3String
- << "\n # TARGET.CAPABILITY += "
- << "\n TARGET.EPOCSTACKSIZE = 0x14000"
- << "\n TARGET.EPOCHEAPSIZE = 0x020000 0x800000"
- << "\n}";
+ << "\n";
}
proStr << '\n';
}
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
index 21fc31d792..3a92ce9ebc 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
@@ -120,9 +120,6 @@ GuiAppParameters GuiAppWizardDialog::parameters() const
|| isQtPlatformSelected(QLatin1String(QtSupport::Constants::ANDROID_PLATFORM))) {
rc.widgetWidth = 800;
rc.widgetHeight = 480;
- } else if (isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM)) {
- rc.widgetWidth = 360;
- rc.widgetHeight = 640;
} else {
rc.isMobileApplication = false;
rc.widgetWidth = 400;
diff --git a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp b/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
index 71bbc5482a..8e02eb60d8 100644
--- a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
@@ -108,9 +108,7 @@ Core::BaseFileWizardParameters Html5AppWizard::parameters()
parameters.setDescription(tr("Creates an HTML5 application project that can contain "
"both HTML5 and C++ code and includes a WebKit view.\n\n"
"You can build the application and deploy it on desktop and "
- "mobile target platforms. For example, you can create signed "
- "Symbian Installation System (SIS) packages for this type of "
- "projects."));
+ "mobile target platforms."));
parameters.setCategory(QLatin1String(ProjectExplorer::Constants::QT_APPLICATION_WIZARD_CATEGORY));
parameters.setDisplayCategory(QLatin1String(ProjectExplorer::Constants::QT_APPLICATION_WIZARD_CATEGORY_DISPLAY));
return parameters;
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
index 0e642197e0..15ba5592ad 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
@@ -156,8 +156,6 @@ LibraryWizardDialog::LibraryWizardDialog(const QString &templateName,
if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS)) {
m_targetPageId = addTargetSetupPage();
m_mobilePageId = addPage(m_mobilePage);
- } else if (isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM)) {
- m_mobilePageId = addPage(m_mobilePage);
}
m_modulesPageId = addModulesPage();
@@ -176,7 +174,6 @@ LibraryWizardDialog::LibraryWizardDialog(const QString &templateName,
}
if (m_mobilePageId != -1) {
mobileItem = wizardProgress()->item(m_mobilePageId);
- mobileItem->setTitle(QLatin1String(" ") + tr("Symbian Specific"));
}
Utils::WizardProgressItem *modulesItem = wizardProgress()->item(m_modulesPageId);
Utils::WizardProgressItem *filesItem = wizardProgress()->item(m_filesPageId);
@@ -216,11 +213,6 @@ void LibraryWizardDialog::setLowerCaseFiles(bool l)
m_filesPage->setLowerCaseFiles(l);
}
-void LibraryWizardDialog::setSymbianUid(const QString &uid)
-{
- m_mobilePage->setSymbianUid(uid);
-}
-
QtProjectParameters::Type LibraryWizardDialog::type() const
{
return static_cast<const LibraryIntroPage*>(introPage())->type();
@@ -247,15 +239,6 @@ int LibraryWizardDialog::nextId() const
int next = m_modulesPageId;
- const bool symbianTargetEnabled = isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM);
-
- // If there was no Symbian target defined we omit "Symbian specific" step
- // We also omit this step if the library type is not dll
- if (symbianTargetEnabled
- && (type() == QtProjectParameters::SharedLibrary
- || type() == QtProjectParameters::Qt4Plugin))
- next = m_mobilePageId;
-
if (next == m_modulesPageId)
return skipModulesPageIfNeeded();
@@ -264,8 +247,6 @@ int LibraryWizardDialog::nextId() const
return skipModulesPageIfNeeded();
}
} else if (currentId() == startId()) {
- if (isQtPlatformSelected(QtSupport::Constants::SYMBIAN_PLATFORM))
- return m_mobilePageId;
return skipModulesPageIfNeeded();
} else if (currentId() == m_mobilePageId) {
return skipModulesPageIfNeeded();
@@ -328,8 +309,7 @@ void LibraryWizardDialog::slotCurrentIdChanged(int id)
if (id == m_filesPageId)
setupFilesPage();// Switching to files page: Set up base class accordingly (plugin)
else if (id == m_mobilePageId
- || (m_mobilePage->symbianUid().isEmpty()
- && currentPage() && currentPage()->isFinalPage()))
+ || (currentPage() && currentPage()->isFinalPage()))
setupMobilePage();
}
@@ -365,8 +345,6 @@ void LibraryWizardDialog::setupFilesPage()
void LibraryWizardDialog::setupMobilePage()
{
- m_mobilePage->setSymbianUid(AbstractMobileApp::symbianUidForPath(path()+projectName()));
-
if (type() == QtProjectParameters::Qt4Plugin)
m_mobilePage->setQtPluginDirectory(projectName());
m_mobilePage->setLibraryType(type());
@@ -392,14 +370,8 @@ MobileLibraryParameters LibraryWizardDialog::mobileLibraryParameters() const
mlp.libraryType = type();
mlp.fileName = projectName();
- //Symbian and Maemo stuff should always be added to pro file. Even if no mobile target is specified
- mlp.type |= MobileLibraryParameters::Symbian|MobileLibraryParameters::Maemo;
-
- if (mlp.type & MobileLibraryParameters::Symbian) {
- mlp.symbianUid = m_mobilePage->symbianUid();
- mlp.qtPluginDirectory = m_mobilePage->qtPluginDirectory();
- mlp.symbianCapabilities |= m_mobilePage->networkEnabled()?MobileLibraryParameters::NetworkServices:0;
- }
+ // Maemo stuff should always be added to pro file. Even if no mobile target is specified
+ mlp.type |= MobileLibraryParameters::Maemo;
return mlp;
}
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h
index e460019972..f7da19d120 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h
+++ b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.h
@@ -57,7 +57,6 @@ public:
void setSuffixes(const QString &header, const QString &source, const QString &form= QString());
void setLowerCaseFiles(bool);
- void setSymbianUid(const QString &uid);
QtProjectParameters parameters() const;
LibraryParameters libraryParameters() const;
diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp b/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp
index 9444da6b98..9265111eb7 100644
--- a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp
+++ b/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.cpp
@@ -32,7 +32,6 @@
#include "ui_mobileappwizardgenericoptionspage.h"
#include "ui_mobileappwizardmaemooptionspage.h"
#include "ui_mobileappwizardharmattanoptionspage.h"
-#include "ui_mobileappwizardsymbianoptionspage.h"
#include <coreplugin/coreconstants.h>
#include <utils/fileutils.h>
@@ -51,13 +50,6 @@ class MobileAppWizardGenericOptionsPagePrivate
friend class MobileAppWizardGenericOptionsPage;
};
-class MobileAppWizardSymbianOptionsPagePrivate
-{
- Ui::MobileAppWizardSymbianOptionsPage ui;
- QString svgIcon;
- friend class MobileAppWizardSymbianOptionsPage;
-};
-
class MobileAppWizardMaemoOptionsPagePrivate
{
Ui::MobileAppWizardMaemoOptionsPage ui;
@@ -111,69 +103,6 @@ AbstractMobileApp::ScreenOrientation MobileAppWizardGenericOptionsPage::orientat
}
-MobileAppWizardSymbianOptionsPage::MobileAppWizardSymbianOptionsPage(QWidget *parent)
- : QWizardPage(parent)
- , d(new MobileAppWizardSymbianOptionsPagePrivate)
-{
- d->ui.setupUi(this);
- const QIcon open = QApplication::style()->standardIcon(QStyle::SP_DirOpenIcon);
- d->ui.appIconLoadToolButton->setIcon(open);
- connect(d->ui.appIconLoadToolButton, SIGNAL(clicked()), SLOT(openSvgIcon()));
-}
-
-MobileAppWizardSymbianOptionsPage::~MobileAppWizardSymbianOptionsPage()
-{
- delete d;
-}
-
-QString MobileAppWizardSymbianOptionsPage::svgIcon() const
-{
- return d->svgIcon;
-}
-
-void MobileAppWizardSymbianOptionsPage::setSvgIcon(const QString &icon)
-{
- QPixmap iconPixmap(icon);
- if (!iconPixmap.isNull()) {
- const int symbianIconSize = 44;
- if (iconPixmap.height() > symbianIconSize || iconPixmap.width() > symbianIconSize)
- iconPixmap = iconPixmap.scaledToHeight(symbianIconSize, Qt::SmoothTransformation);
- d->ui.appIconPreview->setPixmap(iconPixmap);
- d->svgIcon = icon;
- }
-}
-
-QString MobileAppWizardSymbianOptionsPage::symbianUid() const
-{
- return d->ui.uid3LineEdit->text();
-}
-
-void MobileAppWizardSymbianOptionsPage::setSymbianUid(const QString &uid)
-{
- d->ui.uid3LineEdit->setText(uid);
-}
-
-void MobileAppWizardSymbianOptionsPage::setNetworkEnabled(bool enableIt)
-{
- d->ui.enableNetworkCheckBox->setChecked(enableIt);
-}
-
-bool MobileAppWizardSymbianOptionsPage::networkEnabled() const
-{
- return d->ui.enableNetworkCheckBox->isChecked();
-}
-
-void MobileAppWizardSymbianOptionsPage::openSvgIcon()
-{
- const QString svgIcon = QFileDialog::getOpenFileName(
- this,
- d->ui.appIconLabel->text(),
- QDesktopServices::storageLocation(QDesktopServices::PicturesLocation),
- QLatin1String("*.svg"));
- if (!svgIcon.isEmpty())
- setSvgIcon(svgIcon);
-}
-
MobileAppWizardMaemoOptionsPage::MobileAppWizardMaemoOptionsPage(QWidget *parent)
: QWizardPage(parent)
, d(new MobileAppWizardMaemoOptionsPagePrivate)
diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h b/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h
index f3757c45a6..c1070aa92f 100644
--- a/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h
+++ b/src/plugins/qt4projectmanager/wizards/mobileappwizardpages.h
@@ -53,28 +53,6 @@ private:
class MobileAppWizardGenericOptionsPagePrivate *d;
};
-class MobileAppWizardSymbianOptionsPage : public QWizardPage
-{
- Q_OBJECT
-
-public:
- explicit MobileAppWizardSymbianOptionsPage(QWidget *parent = 0);
- virtual ~MobileAppWizardSymbianOptionsPage();
-
- QString svgIcon() const;
- void setSvgIcon(const QString &icon);
- QString symbianUid() const;
- void setNetworkEnabled(bool enableIt);
- bool networkEnabled() const;
- void setSymbianUid(const QString &uid);
-
-private slots:
- void openSvgIcon(); // Via file open dialog
-
-private:
- class MobileAppWizardSymbianOptionsPagePrivate *d;
-};
-
class MobileAppWizardMaemoOptionsPage : public QWizardPage
{
Q_OBJECT
diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizardsymbianoptionspage.ui b/src/plugins/qt4projectmanager/wizards/mobileappwizardsymbianoptionspage.ui
deleted file mode 100644
index 2a900fc8bc..0000000000
--- a/src/plugins/qt4projectmanager/wizards/mobileappwizardsymbianoptionspage.ui
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qt4ProjectManager::Internal::MobileAppWizardSymbianOptionsPage</class>
- <widget class="QWizardPage" name="Qt4ProjectManager::Internal::MobileAppWizardSymbianOptionsPage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>315</width>
- <height>125</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>WizardPage</string>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="appIconLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Application icon (.svg):</string>
- </property>
- <property name="buddy">
- <cstring>appIconLoadToolButton</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="appIconPreview">
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>45</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>45</width>
- <height>45</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Sunken</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="appIconLoadToolButton">
- <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 row="1" column="0">
- <widget class="QLabel" name="symbianTargetUid3Label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Target UID3:</string>
- </property>
- <property name="buddy">
- <cstring>uid3LineEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLineEdit" name="uid3LineEdit"/>
- </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="2" column="0" colspan="2">
- <widget class="QCheckBox" name="enableNetworkCheckBox">
- <property name="text">
- <string>Enable network access</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp b/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp
index 875c83ad30..f2a2da4712 100644
--- a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp
+++ b/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp
@@ -37,88 +37,17 @@
namespace Qt4ProjectManager {
namespace Internal {
-struct SymbianCapability {
- const char *name;
- const int value;
-};
-
-static const SymbianCapability symbianCapability[] =
-{
- { "LocalServices", MobileLibraryParameters::LocalServices },
- { "Location", MobileLibraryParameters::Location },
- { "NetworkServices", MobileLibraryParameters::NetworkServices },
- { "ReadUserData", MobileLibraryParameters::ReadUserData },
- { "UserEnvironment", MobileLibraryParameters::UserEnvironment },
- { "WriteUserData", MobileLibraryParameters::WriteUserData },
- { "PowerMgmt", MobileLibraryParameters::PowerMgmt },
- { "ProtServ", MobileLibraryParameters::ProtServ },
- { "ReadDeviceData", MobileLibraryParameters::ReadDeviceData },
- { "SurroundingsDD", MobileLibraryParameters::SurroundingsDD },
- { "SwEvent", MobileLibraryParameters::SwEvent },
- { "TrustedUI", MobileLibraryParameters::TrustedUI },
- { "WriteDeviceData", MobileLibraryParameters::WriteDeviceData },
- { "CommDD", MobileLibraryParameters::CommDD },
- { "DiskAdmin", MobileLibraryParameters::DiskAdmin },
- { "NetworkControl", MobileLibraryParameters::NetworkControl },
- { "MultimediaDD", MobileLibraryParameters::MultimediaDD },
- { "AllFiles", MobileLibraryParameters::AllFiles },
- { "DRM", MobileLibraryParameters::DRM },
- { "TCB", MobileLibraryParameters::TCB },
-
-};
-
-QString generateCapabilitySet(uint capabilities)
-{
- const int capabilityCount = sizeof(symbianCapability)/sizeof(symbianCapability[0]);
- QString capabilitySet;
- for(int i = 0; i < capabilityCount; ++i)
- if (capabilities&symbianCapability[i].value)
- capabilitySet += QLatin1String(symbianCapability[i].name) + QLatin1Char(' ');
- return capabilitySet;
-}
-
MobileLibraryParameters::MobileLibraryParameters() :
- type(0), libraryType(TypeNone), symbianCapabilities(CapabilityNone)
+ type(0), libraryType(TypeNone)
{
}
void MobileLibraryParameters::writeProFile(QTextStream &str) const
{
- if (type&Symbian)
- writeSymbianProFile(str);
if (type&Maemo)
writeMaemoProFile(str);
}
-void MobileLibraryParameters::writeSymbianProFile(QTextStream &str) const
-{
- if (libraryType == QtProjectParameters::SharedLibrary) {
- str << "\n"
- "symbian {\n"
- " MMP_RULES += EXPORTUNFROZEN\n"
- " TARGET.UID3 = " << symbianUid << "\n"
- " TARGET.CAPABILITY = " << generateCapabilitySet(symbianCapabilities) << "\n"
- " TARGET.EPOCALLOWDLLDATA = 1\n"
- " addFiles.sources = " << fileName << ".dll\n"
- " addFiles.path = !:/sys/bin\n"
- " DEPLOYMENT += addFiles\n"
- "}\n";
- } else if (libraryType == QtProjectParameters::Qt4Plugin) {
- str << "\n"
- "symbian {\n"
- "# Load predefined include paths (e.g. QT_PLUGINS_BASE_DIR) to be used in the pro-files\n"
- " load(data_caging_paths)\n"
- " MMP_RULES += EXPORTUNFROZEN\n"
- " TARGET.UID3 = " << symbianUid << "\n"
- " TARGET.CAPABILITY = " << generateCapabilitySet(symbianCapabilities) << "\n"
- " TARGET.EPOCALLOWDLLDATA = 1\n"
- " pluginDeploy.sources = " << fileName << ".dll\n"
- " pluginDeploy.path = $$QT_PLUGINS_BASE_DIR/" << QDir::fromNativeSeparators(qtPluginDirectory) << "\n"
- " DEPLOYMENT += pluginDeploy\n"
- "}\n";
- }
-}
-
void MobileLibraryParameters::writeMaemoProFile(QTextStream &str) const
{
str << "\n"
diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.h b/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.h
index 00bdf42df8..bcc0f4bcb8 100644
--- a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.h
+++ b/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.h
@@ -43,46 +43,19 @@ namespace Internal {
// Additional parameters required for creating mobile
// libraries
struct MobileLibraryParameters {
- enum Type { TypeNone = 0, Symbian = 0x1, Maemo = 0x2 };
- enum Capability {
- CapabilityNone = 0,
- LocalServices = 1 << 0,
- Location = 1 << 1,
- NetworkServices = 1 << 2,
- ReadUserData = 1 << 3,
- UserEnvironment = 1 << 4,
- WriteUserData = 1 << 5,
- PowerMgmt = 1 << 6,
- ProtServ = 1 << 7,
- ReadDeviceData = 1 << 8,
- SurroundingsDD = 1 << 9,
- SwEvent = 1 << 10,
- TrustedUI = 1 << 11,
- WriteDeviceData = 1 << 12,
- CommDD = 1 << 13,
- DiskAdmin = 1 << 14,
- NetworkControl = 1 << 15,
- MultimediaDD = 1 << 16,
- AllFiles = 1 << 17,
- DRM = 1 << 18,
- TCB = 1 << 19
- };
+ enum Type { TypeNone = 0, Maemo = 0x1 };
MobileLibraryParameters();
void writeProFile(QTextStream &str) const;
private:
- void writeSymbianProFile(QTextStream &str) const;
void writeMaemoProFile(QTextStream &str) const;
public:
uint type;
uint libraryType;
QString fileName;
-
- QString symbianUid;
QString qtPluginDirectory;
- uint symbianCapabilities;
};
} // namespace Internal
diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.cpp b/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.cpp
index 703f23f9c2..f93fe50420 100644
--- a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.cpp
+++ b/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.cpp
@@ -61,26 +61,6 @@ MobileLibraryWizardOptionPage::~MobileLibraryWizardOptionPage()
delete d;
}
-QString MobileLibraryWizardOptionPage::symbianUid() const
-{
- return d->ui.symbianTargetUid3LineEdit->text();
-}
-
-void MobileLibraryWizardOptionPage::setSymbianUid(const QString &uid)
-{
- d->ui.symbianTargetUid3LineEdit->setText(uid);
-}
-
-void MobileLibraryWizardOptionPage::setNetworkEnabled(bool enableIt)
-{
- d->ui.symbianEnableNetworkCheckBox->setChecked(enableIt);
-}
-
-bool MobileLibraryWizardOptionPage::networkEnabled() const
-{
- return d->ui.symbianEnableNetworkCheckBox->isChecked();
-}
-
QString MobileLibraryWizardOptionPage::qtPluginDirectory() const
{
return d->ui.qtPluginLocationLineEdit->text();
@@ -98,9 +78,9 @@ void MobileLibraryWizardOptionPage::setLibraryType(int type)
if (type != QtProjectParameters::Qt4Plugin) {
d->ui.qtPluginLocationLineEdit->setVisible(false);
d->ui.qtPluginLocationLabel->setVisible(false);
- d->ui.formLayout_2->removeItem(d->ui.horizontalLayout_2);
- delete d->ui.horizontalLayout_2;
- d->ui.horizontalLayout_2 = 0;
+ d->ui.formLayout->removeItem(d->ui.horizontalLayout);
+ delete d->ui.horizontalLayout;
+ d->ui.horizontalLayout = 0;
}
}
diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.h b/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.h
index aeccc0415b..c1562fae34 100644
--- a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.h
+++ b/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.h
@@ -44,10 +44,6 @@ public:
explicit MobileLibraryWizardOptionPage(QWidget *parent = 0);
virtual ~MobileLibraryWizardOptionPage();
- void setSymbianUid(const QString &uid);
- QString symbianUid() const;
- void setNetworkEnabled(bool enableIt);
- bool networkEnabled() const;
QString qtPluginDirectory() const;
void setQtPluginDirectory(const QString &directory);
void setLibraryType(int type);
diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.ui b/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.ui
index 429b1face4..3708eebf85 100644
--- a/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.ui
+++ b/src/plugins/qt4projectmanager/wizards/mobilelibrarywizardoptionpage.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>404</width>
- <height>131</height>
+ <height>66</height>
</rect>
</property>
<property name="windowTitle">
@@ -22,82 +22,31 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
- <layout class="QFormLayout" name="formLayout_2">
- <item row="0" column="0">
- <widget class="QLabel" name="symbianTargetUid3Label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Target UID3:</string>
- </property>
- <property name="buddy">
- <cstring>symbianTargetUid3LineEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QLineEdit" name="symbianTargetUid3LineEdit"/>
- </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>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="qtPluginLocationLabel">
+ <property name="text">
+ <string>Plugin's directory name:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLineEdit" name="qtPluginLocationLineEdit"/>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="qtPluginLocationLabel">
- <property name="text">
- <string>Plugin's directory name:</string>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- </widget>
- </item>
- <item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_7">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLineEdit" name="qtPluginLocationLineEdit"/>
- </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>
- </layout>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="symbianEnableNetworkCheckBox">
- <property name="text">
- <string>Enable network access</string>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
</property>
- </widget>
+ </spacer>
</item>
</layout>
</item>
diff --git a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp b/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp
index 68e12e8c3d..91849d5ab3 100644
--- a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp
@@ -256,11 +256,6 @@ void QtQuickApp::handleCurrentProFileTemplateLine(const QString &line,
}
proFile << endl;
- } else if (line.contains(QLatin1String("# QTQUICKCOMPONENTS"))) {
- QString nextLine = proFileTemplate.readLine(); // eats '# CONFIG += qtquickcomponents'
- if (componentSet() == Symbian11Components)
- nextLine.remove(0, 2); // remove comment
- proFile << nextLine << endl;
} else if (line.contains(QLatin1String("# HARMATTAN_BOOSTABLE"))) {
QString nextLine = proFileTemplate.readLine(); // eats '# CONFIG += qdeclarative-boostable'
if (supportsMeegoBooster())
@@ -352,8 +347,7 @@ Core::GeneratedFiles QtQuickApp::generateFiles(QString *errorMessage) const
Core::GeneratedFiles files = AbstractMobileApp::generateFiles(errorMessage);
if (!useExistingMainQml()) {
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml)));
- if ((componentSet() == QtQuickApp::Symbian11Components)
- || (componentSet() == QtQuickApp::Meego10Components))
+ if ((componentSet() == QtQuickApp::Meego10Components))
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainPageQmlFile, errorMessage), path(MainPageQml)));
files.last().setAttributes(Core::GeneratedFile::OpenEditorAttribute);
}
@@ -453,8 +447,6 @@ QList<DeploymentFolder> QtQuickApp::deploymentFolders() const
QString QtQuickApp::componentSetDir(ComponentSet componentSet) const
{
switch (componentSet) {
- case Symbian11Components:
- return QLatin1String("symbian11");
case Meego10Components:
return QLatin1String("meego10");
case QtQuick10Components:
diff --git a/src/plugins/qt4projectmanager/wizards/qtquickapp.h b/src/plugins/qt4projectmanager/wizards/qtquickapp.h
index 3ea532d4ed..6696aafa49 100644
--- a/src/plugins/qt4projectmanager/wizards/qtquickapp.h
+++ b/src/plugins/qt4projectmanager/wizards/qtquickapp.h
@@ -115,7 +115,6 @@ public:
enum ComponentSet {
QtQuick10Components,
- Symbian11Components,
Meego10Components
};
diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
index 8d85f94ff1..f599a17d06 100644
--- a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
@@ -151,17 +151,6 @@ void QtQuickAppWizard::createInstances(ExtensionSystem::IPlugin *plugin)
list << parameter;
parameter = base;
- parameter.setDisplayName(tr("Qt Quick Application for Symbian"));
- parameter.setDescription(basicDescription + tr("The Qt Quick Components for Symbian are a set of "
- "ready-made components that are designed with specific "
- "native appearance for the Symbian platform.\n\nRequires "
- "<b>Qt 4.7.4</b> or newer, and the component set installed for "
- "your Qt version."));
- parameter.setRequiredFeatures(basicFeatures | Core::Feature(QtSupport::Constants::FEATURE_QTQUICK_COMPONENTS_SYMBIAN)
- | QtSupport::Constants::FEATURE_QT_QUICK_1_1);
- list << parameter;
-
- parameter = base;
parameter.setDisplayName(tr("Qt Quick Application for MeeGo Harmattan"));
parameter.setDescription(basicDescription + tr("The Qt Quick Components for MeeGo Harmattan are "
"a set of ready-made components that are designed "
@@ -184,7 +173,7 @@ void QtQuickAppWizard::createInstances(ExtensionSystem::IPlugin *plugin)
QList<QtQuickAppWizard*> wizardList = Core::createMultipleBaseFileWizardInstances<QtQuickAppWizard>(list, plugin);
- Q_ASSERT(wizardList.count() == 4);
+ Q_ASSERT(wizardList.count() == 3);
for (int i = 0; i < wizardList.count(); i++) {
wizardList.at(i)->setQtQuickKind(Kind(i));
@@ -212,10 +201,6 @@ AbstractMobileAppWizardDialog *QtQuickAppWizard::createWizardDialogInternal(QWid
d->app->setComponentSet(QtQuickApp::QtQuick10Components);
d->app->setMainQml(QtQuickApp::ModeGenerate);
break;
- case SymbianComponents:
- d->app->setComponentSet(QtQuickApp::Symbian11Components);
- d->app->setMainQml(QtQuickApp::ModeGenerate);
- break;
case MeegoComponents:
d->app->setComponentSet(QtQuickApp::Meego10Components);
d->app->setMainQml(QtQuickApp::ModeGenerate);
diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.h b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.h
index f1a5394d09..ae337b6912 100644
--- a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.h
+++ b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.h
@@ -43,9 +43,8 @@ public:
enum Kind {
QtQuick1_1 = 0,
- SymbianComponents = 1,
- MeegoComponents = 2,
- ImportQml = 3
+ MeegoComponents = 1,
+ ImportQml = 2
};
QtQuickAppWizard();
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index abe8d65b47..fbb33dd891 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -333,11 +333,6 @@ void BaseQtVersion::setId(int id)
m_id = id;
}
-void BaseQtVersion::restoreLegacySettings(QSettings *s)
-{
- Q_UNUSED(s);
-}
-
void BaseQtVersion::fromMap(const QVariantMap &map)
{
m_id = map.value(QLatin1String(QTVERSIONID)).toInt();
diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h
index 8051e6d147..36c833f76c 100644
--- a/src/plugins/qtsupport/baseqtversion.h
+++ b/src/plugins/qtsupport/baseqtversion.h
@@ -100,8 +100,6 @@ public:
virtual ~BaseQtVersion();
virtual void fromMap(const QVariantMap &map);
- // pre 2.3 settings, only used by SymbianQt
- virtual void restoreLegacySettings(QSettings *s);
virtual BaseQtVersion *clone() const = 0;
virtual bool equals(BaseQtVersion *other);
diff --git a/src/plugins/qtsupport/debugginghelperbuildtask.cpp b/src/plugins/qtsupport/debugginghelperbuildtask.cpp
index e180cc19ef..a8330b1c3e 100644
--- a/src/plugins/qtsupport/debugginghelperbuildtask.cpp
+++ b/src/plugins/qtsupport/debugginghelperbuildtask.cpp
@@ -98,14 +98,8 @@ DebuggingHelperBuildTask::DebuggingHelperBuildTask(const BaseQtVersion *version,
if (toolChain->targetAbi().os() == Abi::LinuxOS
&& Abi::hostAbi().os() == Abi::WindowsOS)
m_target = QLatin1String("-unix");
- if (toolChain->targetAbi().os() == Abi::SymbianOS) {
- m_makeArguments << QLatin1String("debug-") + toolChain->defaultMakeTarget();
- m_makeArguments << QLatin1String("release-") + toolChain->defaultMakeTarget();
- m_makeArguments << QLatin1String("-k");
- } else {
- m_makeArguments << QLatin1String("all")
- << QLatin1String("-k");
- }
+ m_makeArguments << QLatin1String("all")
+ << QLatin1String("-k");
m_qmakeCommand = version->qmakeCommand();
m_qmakeArguments = QStringList() << QLatin1String("-nocache");
if (toolChain->targetAbi().os() == Abi::MacOS
diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp
index 245d644358..aba338421a 100644
--- a/src/plugins/qtsupport/qtoptionspage.cpp
+++ b/src/plugins/qtsupport/qtoptionspage.cpp
@@ -371,9 +371,6 @@ QtOptionsPageWidget::ValidityInfo QtOptionsPageWidget::validInformation(const Ba
QStringList missingToolChains;
int abiCount = 0;
foreach (const ProjectExplorer::Abi &a, version->qtAbis()) {
- // Ignore symbian emulator since we do not support it.
- if (a.osFlavor() == ProjectExplorer::Abi::SymbianEmulatorFlavor)
- continue;
if (ProjectExplorer::ToolChainManager::instance()->findToolChains(a).isEmpty())
missingToolChains.append(a.toString());
++abiCount;
@@ -414,9 +411,6 @@ QList<ProjectExplorer::ToolChain*> QtOptionsPageWidget::toolChains(const BaseQtV
return toolChains.values();
foreach (const ProjectExplorer::Abi &a, version->qtAbis()) {
- // Ignore symbian emulator since we do not support it.
- if (a.osFlavor() == ProjectExplorer::Abi::SymbianEmulatorFlavor)
- continue;
foreach (ProjectExplorer::ToolChain *tc,
ProjectExplorer::ToolChainManager::instance()->findToolChains(a)) {
toolChains.insert(tc->id(), tc);
@@ -1113,13 +1107,6 @@ QString QtOptionsPageWidget::searchKeywords() const
<< sep << m_debuggingHelperUi->qmlDumpLabel->text()
<< sep << m_debuggingHelperUi->qmlObserverLabel->text();
- // Symbian specific, could be factored out to the factory
- // checking m_configurationWidget is not enough, we want them to be a keyword
- // regardless of which Qt versions configuration widget is currently active
- ts << sep << tr("S60 SDK:")
- << sep << tr("SBS v2 directory:");
-
-
rc.remove(QLatin1Char('&'));
return rc;
}
diff --git a/src/plugins/qtsupport/qtsupportconstants.h b/src/plugins/qtsupport/qtsupportconstants.h
index fbe4bf1e88..8034ed3eeb 100644
--- a/src/plugins/qtsupport/qtsupportconstants.h
+++ b/src/plugins/qtsupport/qtsupportconstants.h
@@ -39,7 +39,6 @@ const char QTVERSION_SETTINGS_PAGE_ID[] = "H.Qt Versions";
const char QTVERSION_SETTINGS_PAGE_NAME[] = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Versions");
// QtVersions
-const char SYMBIANQT[] = "Qt4ProjectManager.QtVersion.Symbian";
const char MAEMOQT[] = "Qt4ProjectManager.QtVersion.Maemo";
const char DESKTOPQT[] = "Qt4ProjectManager.QtVersion.Desktop";
const char SIMULATORQT[] = "Qt4ProjectManager.QtVersion.Simulator";
@@ -55,7 +54,6 @@ const char FEATURE_QT_QUICK_1_1[] = "QtSupport.Wizards.FeatureQtQuick.1.1";
const char FEATURE_QT_QUICK_2[] = "QtSupport.Wizards.FeatureQtQuick.2";
const char FEATURE_QT_WEBKIT[] = "QtSupport.Wizards.FeatureQtWebkit";
const char FEATURE_QT_CONSOLE[] = "QtSupport.Wizards.FeatureQtConsole";
-const char FEATURE_QTQUICK_COMPONENTS_SYMBIAN[] = "QtSupport.Wizards.FeatureQtQuickComponentsSymbian";
const char FEATURE_QTQUICK_COMPONENTS_MEEGO[] = "QtSupport.Wizards.FeatureQtQuickComponentsMeego";
const char FEATURE_MOBILE[] = "QtSupport.Wizards.FeatureMobile";
const char FEATURE_DESKTOP[] = "QtSupport.Wizards.FeatureDesktop";
@@ -63,7 +61,6 @@ const char FEATURE_DESKTOP[] = "QtSupport.Wizards.FeatureDesktop";
// Platforms
const char MEEGO_HARMATTAN_PLATFORM[] = "MeeGo/Harmattan";
const char MAEMO_FREMANTLE_PLATFORM[] = "Maemo/Fremantle";
-const char SYMBIAN_PLATFORM[] = "Symbian";
const char DESKTOP_PLATFORM[] = "Desktop";
const char EMBEDDED_LINUX_PLATFORM[] = "Embedded Linux";
const char WINDOWS_CE_PLATFORM[] = "Windows CE";
@@ -71,7 +68,6 @@ const char ANDROID_PLATFORM[] = "Android";
const char MEEGO_HARMATTAN_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "MeeGo/Harmattan");
const char MAEMO_FREMANTLE_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Maemo/Fremantle");
-const char SYMBIAN_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Symbian");
const char DESKTOP_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Desktop");
const char EMBEDDED_LINUX_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Embedded Linux");
const char WINDOWS_CE_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Windows CE");
diff --git a/src/plugins/qtsupport/qtversionfactory.cpp b/src/plugins/qtsupport/qtversionfactory.cpp
index 1587aa821c..8335c0e7d0 100644
--- a/src/plugins/qtsupport/qtversionfactory.cpp
+++ b/src/plugins/qtsupport/qtversionfactory.cpp
@@ -55,17 +55,6 @@ bool sortByPriority(QtVersionFactory *a, QtVersionFactory *b)
return a->priority() > b->priority();
}
-BaseQtVersion *QtVersionFactory::createQtVersionFromLegacySettings(const Utils::FileName &qmakePath, int id, QSettings *s)
-{
- BaseQtVersion *v = createQtVersionFromQMakePath(qmakePath);
- if (!v)
- return 0;
- v->setId(id);
- v->setDisplayName(s->value(QLatin1String("Name")).toString());
- v->restoreLegacySettings(s);
- return v;
-}
-
BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const Utils::FileName &qmakePath, bool isAutoDetected, const QString &autoDetectionSource)
{
QHash<QString, QString> versionInfo;
diff --git a/src/plugins/qtsupport/qtversionfactory.h b/src/plugins/qtsupport/qtversionfactory.h
index c9ee1c40aa..f826756d5f 100644
--- a/src/plugins/qtsupport/qtversionfactory.h
+++ b/src/plugins/qtsupport/qtversionfactory.h
@@ -64,7 +64,6 @@ public:
virtual BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()) = 0;
static BaseQtVersion *createQtVersionFromQMakePath(const Utils::FileName &qmakePath, bool isAutoDetected = false, const QString &autoDetectionSource = QString());
- static BaseQtVersion *createQtVersionFromLegacySettings(const Utils::FileName &qmakePath, int id, QSettings *s);
};
} // namespace QtSupport
diff --git a/src/plugins/qtsupport/qtversionmanager.cpp b/src/plugins/qtsupport/qtversionmanager.cpp
index 0139a3e8dc..43bd1b3de8 100644
--- a/src/plugins/qtsupport/qtversionmanager.cpp
+++ b/src/plugins/qtsupport/qtversionmanager.cpp
@@ -135,8 +135,6 @@ QtVersionManager::QtVersionManager() :
void QtVersionManager::extensionsInitialized()
{
bool success = restoreQtVersions();
- if (!success)
- success = legacyRestore();
updateFromInstaller();
if (!success) {
// We did neither restore our settings or upgraded
@@ -386,67 +384,6 @@ void QtVersionManager::findSystemQt()
m_versions.insert(version->uniqueId(), version);
}
-bool QtVersionManager::legacyRestore()
-{
- QSettings *s = Core::ICore::settings();
- const QString qtVersionSection = QLatin1String(QtVersionsSectionName);
- if (!s->contains(qtVersionSection + QLatin1String("/size")))
- return false;
- int size = s->beginReadArray(qtVersionSection);
- for (int i = 0; i < size; ++i) {
- s->setArrayIndex(i);
- // Find the right id
- // Either something saved or something generated
- // Note: This code assumes that either all ids are read from the settings
- // or generated on the fly.
- int id = s->value(QLatin1String("Id"), -1).toInt();
- if (id == -1)
- id = getUniqueId();
- else if (m_idcount < id)
- m_idcount = id + 1;
-
- Utils::FileName qmakePath = Utils::FileName::fromString(s->value(QLatin1String("QMakePath")).toString());
- if (qmakePath.isEmpty())
- continue; //skip this version
-
- BaseQtVersion *version = QtVersionFactory::createQtVersionFromLegacySettings(qmakePath, id, s);
- if (!version) // Likely to be a invalid version
- continue;
-
- if (m_versions.contains(version->uniqueId())) {
- // oh uh;
- delete version;
- } else {
- m_versions.insert(version->uniqueId(), version);
- }
- // Update from 2.1 or earlier:
- QString mingwDir = s->value(QLatin1String("MingwDirectory")).toString();
- if (!mingwDir.isEmpty()) {
- QFileInfo fi(mingwDir + QLatin1String("/bin/g++.exe"));
- if (fi.exists() && fi.isExecutable()) {
- ProjectExplorer::MingwToolChain *tc = createToolChain<ProjectExplorer::MingwToolChain>(QLatin1String(ProjectExplorer::Constants::MINGW_TOOLCHAIN_ID));
- if (tc) {
- tc->setCompilerCommand(Utils::FileName(fi));
- tc->setDisplayName(tr("MinGW from %1").arg(version->displayName()));
- // The debugger is set later in the autoDetect method of the MinGw tool chain factory
- // as the default debuggers are not yet registered.
- ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc);
- }
- }
- }
- const QString mwcDir = s->value(QLatin1String("MwcDirectory")).toString();
- if (!mwcDir.isEmpty())
- m_pendingMwcUpdates.append(mwcDir);
- const QString gcceDir = s->value(QLatin1String("GcceDirectory")).toString();
- if (!gcceDir.isEmpty())
- m_pendingGcceUpdates.append(gcceDir);
-
- }
- s->endArray();
- s->remove(qtVersionSection);
- return true;
-}
-
void QtVersionManager::addVersion(BaseQtVersion *version)
{
QTC_ASSERT(version != 0, return);
diff --git a/src/plugins/valgrind/valgrind.qbs b/src/plugins/valgrind/valgrind.qbs
index fbe239f0df..dfdc6d6582 100644
--- a/src/plugins/valgrind/valgrind.qbs
+++ b/src/plugins/valgrind/valgrind.qbs
@@ -11,7 +11,6 @@ QtcPlugin {
Depends { name: "ProjectExplorer" }
Depends { name: "TextEditor" }
Depends { name: "RemoteLinux" }
- Depends { name: "symbianutils"}
Depends { name: "CPlusPlus"}
Depends { name: "cpp" }
diff --git a/src/shared/json/json_global.h b/src/shared/json/json_global.h
index 93caeaac87..910bb0948b 100644
--- a/src/shared/json/json_global.h
+++ b/src/shared/json/json_global.h
@@ -41,4 +41,4 @@
# define JSON_EXPORT Q_DECL_IMPORT
#endif
-#endif // SYMBIANUTILS_GLOBAL_H
+#endif // JSON_GLOBAL_H
diff --git a/src/shared/proparser/spec_post.prf b/src/shared/proparser/spec_post.prf
index 7560f95c41..fcc7314ce5 100644
--- a/src/shared/proparser/spec_post.prf
+++ b/src/shared/proparser/spec_post.prf
@@ -15,11 +15,6 @@ isEmpty(QMAKE_PLATFORM) {
|equals(MAKEFILE_GENERATOR, XCODE)) {
} else:equals(MAKEFILE_GENERATOR, GBUILD) {
TARGET_PLATFORM = unix
- } else:if(equals(MAKEFILE_GENERATOR, SYMBIAN_ABLD) \
- |equals(MAKEFILE_GENERATOR, SYMBIAN_SBSV2) \
- |equals(MAKEFILE_GENERATOR, SYMBIAN_UNIX) \
- |equals(MAKEFILE_GENERATOR, SYMBIAN_MINGW)) {
- TARGET_PLATFORM = symbian
} else {
error("Qmake spec sets an invalid MAKEFILE_GENERATOR.")
}
@@ -30,8 +25,6 @@ isEmpty(QMAKE_PLATFORM) {
QMAKE_PLATFORM = mac macx unix
else:equals(TARGET_PLATFORM, win32): \
QMAKE_PLATFORM = win32
- else:equals(TARGET_PLATFORM, symbian): \
- QMAKE_PLATFORM = symbian unix
else: \
error("Qmake spec sets an invalid TARGET_PLATFORM.")
}
diff --git a/src/shared/symbianutils/callback.h b/src/shared/symbianutils/callback.h
deleted file mode 100644
index 40a8676925..0000000000
--- a/src/shared/symbianutils/callback.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef DEBUGGER_CALLBACK_H
-#define DEBUGGER_CALLBACK_H
-
-#include "symbianutils_global.h"
-
-namespace Coda {
-namespace Internal {
-
-/* Helper class for the 1-argument functor:
- * Cloneable base class for the implementation which is
- * invokeable with the argument. */
-template <class Argument>
-class CallbackImplBase
-{
- Q_DISABLE_COPY(CallbackImplBase)
-public:
- CallbackImplBase() {}
- virtual CallbackImplBase *clone() const = 0;
- virtual void invoke(Argument a) = 0;
- virtual ~CallbackImplBase() {}
-};
-
-/* Helper class for the 1-argument functor: Implementation for
- * a class instance with a member function pointer. */
-template <class Class, class Argument>
-class CallbackMemberPtrImpl : public CallbackImplBase<Argument>
-{
-public:
- typedef void (Class::*MemberFuncPtr)(Argument);
-
- CallbackMemberPtrImpl(Class *instance,
- MemberFuncPtr memberFunc) :
- m_instance(instance),
- m_memberFunc(memberFunc) {}
-
- virtual CallbackImplBase<Argument> *clone() const
- {
- return new CallbackMemberPtrImpl<Class, Argument>(m_instance, m_memberFunc);
- }
-
- virtual void invoke(Argument a)
- { (m_instance->*m_memberFunc)(a); }
-private:
- Class *m_instance;
- MemberFuncPtr m_memberFunc;
-};
-
-} // namespace Internal
-
-/* Default-constructible, copyable 1-argument functor providing an
- * operator()(Argument) that invokes a member function of a class:
- * \code
-class Foo {
-public:
- void print(const std::string &);
-};
-...
-Foo foo;
-Callback<const std::string &> f1(&foo, &Foo::print);
-f1("test");
-\endcode */
-
-template <class Argument>
-class Callback
-{
-public:
- Callback() : m_impl(0) {}
-
- template <class Class>
- Callback(Class *instance, void (Class::*memberFunc)(Argument)) :
- m_impl(new Internal::CallbackMemberPtrImpl<Class,Argument>(instance, memberFunc))
- {}
-
- ~Callback()
- {
- clean();
- }
-
- Callback(const Callback &rhs) :
- m_impl(0)
- {
- if (rhs.m_impl)
- m_impl = rhs.m_impl->clone();
- }
-
- Callback &operator=(const Callback &rhs)
- {
- if (this != &rhs) {
- clean();
- if (rhs.m_impl)
- m_impl = rhs.m_impl->clone();
- }
- return *this;
- }
-
- bool isNull() const { return m_impl == 0; }
- operator bool() const { return !isNull(); }
-
- void operator()(Argument a)
- {
- if (m_impl)
- m_impl->invoke(a);
- }
-
-private:
- void clean()
- {
- if (m_impl) {
- delete m_impl;
- m_impl = 0;
- }
- }
-
- Internal::CallbackImplBase<Argument> *m_impl;
-};
-
-} // namespace Coda
-
-#endif // DEBUGGER_CALLBACK_H
diff --git a/src/shared/symbianutils/codadevice.cpp b/src/shared/symbianutils/codadevice.cpp
deleted file mode 100644
index 3a22ec9ae1..0000000000
--- a/src/shared/symbianutils/codadevice.cpp
+++ /dev/null
@@ -1,1479 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "codadevice.h"
-#include "json.h"
-#include "codautils.h"
-
-#include <QAbstractSocket>
-#include <QDebug>
-#include <QVector>
-#include <QQueue>
-#include <QTextStream>
-#include <QDateTime>
-#include <QFileInfo>
-
-enum { debug = 0 };
-
-static const char tcpMessageTerminatorC[] = "\003\001";
-
-// Serial Ping: 0xfc,0x1f
-static const char serialPingC[] = "\xfc\x1f";
-// Serial Pong: 0xfc,0xf1, followed by version info
-static const char serialPongC[] = "\xfc\xf1";
-
-static const char locatorAnswerC[] = "E\0Locator\0Hello\0[\"Locator\"]";
-
-/* Serial messages > (1K - 2) have to chunked in order to pass the USB
- * router as '0xfe char(chunkCount - 1) data' ... '0x0 char(chunkCount - 2) data'
- * ... '0x0 0x0 last-data' */
-static const unsigned serialChunkLength = 0x400; // 1K max USB router
-static const int maxSerialMessageLength = 0x10000; // given chunking scheme
-
-static const char validProtocolIdStart = (char)0x90;
-static const char validProtocolIdEnd = (char)0x95;
-static const char codaProtocolId = (char)0x92;
-static const unsigned char serialChunkingStart = 0xfe;
-static const unsigned char serialChunkingContinuation = 0x0;
-enum { SerialChunkHeaderSize = 2 };
-
-// Create USB router frame
-static inline void encodeSerialFrame(const QByteArray &data, QByteArray *target, char protocolId)
-{
- target->append(char(0x01));
- target->append(protocolId);
- appendShort(target, ushort(data.size()), Coda::BigEndian);
- target->append(data);
-}
-
-// Split in chunks of 1K according to CODA protocol chunking
-static inline QByteArray encodeUsbSerialMessage(const QByteArray &dataIn)
-{
- // Reserve 2 header bytes
- static const int chunkSize = serialChunkLength - SerialChunkHeaderSize;
- const int size = dataIn.size();
- QByteArray frame;
- // Do we need to split?
- if (size < chunkSize) { // Nope, all happy.
- frame.reserve(size + 4);
- encodeSerialFrame(dataIn, &frame, codaProtocolId);
- return frame;
- }
- // Split.
- unsigned chunkCount = size / chunkSize;
- if (size % chunkSize)
- chunkCount++;
- if (debug)
- qDebug("Serial: Splitting message of %d bytes into %u chunks of %d", size, chunkCount, chunkSize);
-
- frame.reserve((4 + serialChunkLength) * chunkCount);
- int pos = 0;
- for (unsigned c = chunkCount - 1; pos < size ; c--) {
- QByteArray chunk; // chunk with long message start/continuation code
- chunk.reserve(serialChunkLength);
- chunk.append(pos ? serialChunkingContinuation : serialChunkingStart);
- chunk.append(char(static_cast<unsigned char>(c))); // Avoid any signedness issues.
- const int chunkEnd = qMin(pos + chunkSize, size);
- chunk.append(dataIn.mid(pos, chunkEnd - pos));
- encodeSerialFrame(chunk, &frame, codaProtocolId);
- pos = chunkEnd;
- }
- if (debug > 1)
- qDebug("Serial chunked:\n%s", qPrintable(Coda::formatData(frame)));
- return frame;
-}
-
-using namespace Json;
-namespace Coda {
-// ------------- CodaCommandError
-
-CodaCommandError::CodaCommandError() : timeMS(0), code(0), alternativeCode(0)
-{
-}
-
-void CodaCommandError::clear()
-{
- timeMS = 0;
- code = alternativeCode = 0;
- format.clear();
- alternativeOrganization.clear();
-}
-
-QDateTime CodaCommandResult::codaTimeToQDateTime(quint64 codaTimeMS)
-{
- const QDateTime time(QDate(1970, 1, 1));
- return time.addMSecs(codaTimeMS);
-}
-
-void CodaCommandError::write(QTextStream &str) const
-{
- if (isError()) {
- if (debug && timeMS)
- str << CodaCommandResult::codaTimeToQDateTime(timeMS).toString(Qt::ISODate) << ": ";
- str << "'" << format << '\'' //for symbian the format is the real error message
- << " Code: " << code;
- if (!alternativeOrganization.isEmpty())
- str << " ('" << alternativeOrganization << "', code: " << alternativeCode << ')';
- } else{
- str << "<No error>";
- }
-}
-
-QString CodaCommandError::toString() const
-{
- QString rc;
- QTextStream str(&rc);
- write(str);
- return rc;
-}
-
-bool CodaCommandError::isError() const
-{
- return timeMS != 0 || code != 0 || !format.isEmpty() || alternativeCode != 0;
-}
-
-/* {"Time":1277459762255,"Code":1,"AltCode":-6,"AltOrg":"POSIX","Format":"Unknown error: -6"} */
-bool CodaCommandError::parse(const QVector<JsonValue> &values)
-{
- // Parse an arbitrary hash (that could as well be a command response)
- // and check for error elements. It looks like sometimes errors are appended
- // to other values.
- unsigned errorKeyCount = 0;
- clear();
- do {
- if (values.isEmpty())
- break;
- // Errors are mostly appended, except for FileSystem::open, in which case
- // a string "null" file handle (sic!) follows the error.
- const int last = values.size() - 1;
- const int checkIndex = last == 1 && values.at(last).data() == "null" ?
- last - 1 : last;
- if (values.at(checkIndex).type() != JsonValue::Object)
- break;
- foreach (const JsonValue &c, values.at(checkIndex).children()) {
- if (c.name() == "Time") {
- timeMS = c.data().toULongLong();
- errorKeyCount++;
- } else if (c.name() == "Code") {
- code = c.data().toLongLong();
- errorKeyCount++;
- } else if (c.name() == "Format") {
- format = c.data();
- errorKeyCount++;
- } else if (c.name() == "AltCode") {
- alternativeCode = c.data().toULongLong();
- errorKeyCount++;
- } else if (c.name() == "AltOrg") {
- alternativeOrganization = c.data();
- errorKeyCount++;
- }
- }
- } while (false);
- const bool errorFound = errorKeyCount >= 2u; // Should be at least 'Time', 'Code'.
- if (!errorFound)
- clear();
- if (debug) {
- qDebug("CodaCommandError::parse: Found error %d (%u): ", errorFound, errorKeyCount);
- if (!values.isEmpty())
- qDebug() << values.back().toString();
- }
- return errorFound;
-}
-
-// ------------ CodaCommandResult
-
-CodaCommandResult::CodaCommandResult(Type t) :
- type(t), service(LocatorService)
-{
-}
-
-CodaCommandResult::CodaCommandResult(char typeChar, Services s,
- const QByteArray &r,
- const QVector<JsonValue> &v,
- const QVariant &ck) :
- type(FailReply), service(s), request(r), values(v), cookie(ck)
-{
- switch (typeChar) {
- case 'N':
- type = FailReply;
- break;
- case 'P':
- type = ProgressReply;
- break;
- case 'R':
- type = commandError.parse(values) ? CommandErrorReply : SuccessReply;
- break;
- default:
- qWarning("Unknown CODA's reply type '%c'", typeChar);
- }
-}
-
-QString CodaCommandResult::errorString() const
-{
- QString rc;
- QTextStream str(&rc);
-
- switch (type) {
- case SuccessReply:
- case ProgressReply:
- str << "<No error>";
- return rc;
- case FailReply:
- str << "NAK";
- return rc;
- case CommandErrorReply:
- commandError.write(str);
- break;
- }
- if (debug) {
- // Append the failed command for reference
- str << " (Command was: '";
- QByteArray printableRequest = request;
- printableRequest.replace('\0', '|');
- str << printableRequest << "')";
- }
- return rc;
-}
-
-QString CodaCommandResult::toString() const
-{
- QString rc;
- QTextStream str(&rc);
- str << "Command answer ";
- switch (type) {
- case SuccessReply:
- str << "[success]";
- break;
- case CommandErrorReply:
- str << "[command error]";
- break;
- case FailReply:
- str << "[fail (NAK)]";
- break;
- case ProgressReply:
- str << "[progress]";
- break;
- }
- str << ", " << values.size() << " values(s) to request: '";
- QByteArray printableRequest = request;
- printableRequest.replace('\0', '|');
- str << printableRequest << "' ";
- if (cookie.isValid())
- str << " cookie: " << cookie.toString();
- str << '\n';
- for (int i = 0, count = values.size(); i < count; i++)
- str << '#' << i << ' ' << values.at(i).toString() << '\n';
- if (type == CommandErrorReply)
- str << "Error: " << errorString();
- return rc;
-}
-
-CodaStatResponse::CodaStatResponse() : size(0)
-{
-}
-
-struct CodaSendQueueEntry
-{
- typedef CodaDevice::MessageType MessageType;
-
- explicit CodaSendQueueEntry(MessageType mt,
- int tok,
- Services s,
- const QByteArray &d,
- const CodaCallback &cb= CodaCallback(),
- const QVariant &ck = QVariant()) :
- messageType(mt), service(s), data(d), token(tok), cookie(ck), callback(cb) {}
-
- MessageType messageType;
- Services service;
- QByteArray data;
- int token;
- QVariant cookie;
- CodaCallback callback;
- unsigned specialHandling;
-};
-
-struct CodaDevicePrivate {
- typedef CodaDevice::IODevicePtr IODevicePtr;
- typedef QHash<int, CodaSendQueueEntry> TokenWrittenMessageMap;
-
- CodaDevicePrivate();
-
- const QByteArray m_tcpMessageTerminator;
-
- IODevicePtr m_device;
- unsigned m_verbose;
- QByteArray m_readBuffer;
- QByteArray m_serialBuffer; // for chunked messages
- int m_token;
- QQueue<CodaSendQueueEntry> m_sendQueue;
- TokenWrittenMessageMap m_writtenMessages;
- QVector<QByteArray> m_registerNames;
- QVector<QByteArray> m_fakeGetMRegisterValues;
- bool m_serialFrame;
- bool m_serialPingOnly;
-};
-
-CodaDevicePrivate::CodaDevicePrivate() :
- m_tcpMessageTerminator(tcpMessageTerminatorC),
- m_verbose(0), m_token(0), m_serialFrame(false), m_serialPingOnly(false)
-{
-}
-
-CodaDevice::CodaDevice(QObject *parent) :
- QObject(parent), d(new CodaDevicePrivate)
-{
- if (debug) setVerbose(true);
-}
-
-CodaDevice::~CodaDevice()
-{
- delete d;
-}
-
-QVector<QByteArray> CodaDevice::registerNames() const
-{
- return d->m_registerNames;
-}
-
-void CodaDevice::setRegisterNames(const QVector<QByteArray>& n)
-{
- d->m_registerNames = n;
- if (d->m_verbose) {
- QString msg;
- QTextStream str(&msg);
- const int count = n.size();
- str << "Registers (" << count << "): ";
- for (int i = 0; i < count; i++)
- str << '#' << i << '=' << n.at(i) << ' ';
- emitLogMessage(msg);
- }
-}
-
-CodaDevice::IODevicePtr CodaDevice::device() const
-{
- return d->m_device;
-}
-
-CodaDevice::IODevicePtr CodaDevice::takeDevice()
-{
- const IODevicePtr old = d->m_device;
- if (!old.isNull()) {
- old.data()->disconnect(this);
- d->m_device = IODevicePtr();
- }
- d->m_readBuffer.clear();
- d->m_token = 0;
- d->m_sendQueue.clear();
- return old;
-}
-
-void CodaDevice::setDevice(const IODevicePtr &dp)
-{
- if (dp.data() == d->m_device.data())
- return;
- if (dp.isNull()) {
- emitLogMessage(QLatin1String("Internal error: Attempt to set NULL device."));
- return;
- }
- takeDevice();
- d->m_device = dp;
- connect(dp.data(), SIGNAL(readyRead()), this, SLOT(slotDeviceReadyRead()));
- if (QAbstractSocket *s = qobject_cast<QAbstractSocket *>(dp.data())) {
- connect(s, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(slotDeviceError()));
- connect(s, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(slotDeviceSocketStateChanged()));
- }
-}
-
-void CodaDevice::slotDeviceError()
-{
- const QString message = d->m_device->errorString();
- emitLogMessage(message);
- emit error(message);
-}
-
-void CodaDevice::slotDeviceSocketStateChanged()
-{
- if (const QAbstractSocket *s = qobject_cast<const QAbstractSocket *>(d->m_device.data())) {
- const QAbstractSocket::SocketState st = s->state();
- switch (st) {
- case QAbstractSocket::UnconnectedState:
- emitLogMessage(QLatin1String("Unconnected"));
- break;
- case QAbstractSocket::HostLookupState:
- emitLogMessage(QLatin1String("HostLookupState"));
- break;
- case QAbstractSocket::ConnectingState:
- emitLogMessage(QLatin1String("Connecting"));
- break;
- case QAbstractSocket::ConnectedState:
- emitLogMessage(QLatin1String("Connected"));
- break;
- case QAbstractSocket::ClosingState:
- emitLogMessage(QLatin1String("Closing"));
- break;
- default:
- emitLogMessage(QString::fromLatin1("State %1").arg(st));
- break;
- }
- }
-}
-
-static inline QString debugMessage(QByteArray message, const char *prefix = 0)
-{
- const bool isBinary = !message.isEmpty() && message.at(0) < 0;
- if (isBinary) {
- message = message.toHex(); // Some serial special message
- } else {
- message.replace('\0', '|');
- }
- const QString messageS = QString::fromLatin1(message);
- return prefix ?
- (QLatin1String(prefix) + messageS) : messageS;
-}
-
-void CodaDevice::slotDeviceReadyRead()
-{
- const QByteArray newData = d->m_device->readAll();
- d->m_readBuffer += newData;
- if (debug)
- qDebug("ReadBuffer: %s", qPrintable(Coda::stringFromArray(newData)));
- if (d->m_serialFrame) {
- deviceReadyReadSerial();
- } else {
- deviceReadyReadTcp();
- }
-}
-
-// Find a serial header in input stream '0x1', '0x92', 'lenH', 'lenL'
-// and return message position and size.
-QPair<int, int> CodaDevice::findSerialHeader(QByteArray &in)
-{
- static const char header1 = 0x1;
- // Header should in theory always be at beginning of
- // buffer. Warn if there are bogus data in-between.
-
- while (in.size() >= 4) {
- if (in.at(0) == header1 && in.at(1) == codaProtocolId) {
- // Good packet
- const int length = Coda::extractShort(in.constData() + 2);
- return QPair<int, int>(4, length);
- } else if (in.at(0) == header1 && in.at(1) >= validProtocolIdStart && in.at(1) <= validProtocolIdEnd) {
- // We recognise it but it's not a CODA message - emit it for any interested party to handle
- const int length = Coda::extractShort(in.constData() + 2);
- if (4 + length <= in.size()) {
- // We have all the data
- QByteArray data(in.mid(4, length));
- emit unknownEvent(in.at(1), data);
- in.remove(0, 4+length);
- // and continue
- } else {
- // If we don't have all this packet, there can't be any data following it, so return now
- // and wait for more data
- return QPair<int, int>(-1, -1);
- }
- } else {
- // Bad data - log it, remove it, and go round again
- int nextHeader = in.indexOf(header1, 1);
- QByteArray bad = in.mid(0, nextHeader);
- qWarning("Bogus data received on serial line: %s\n"
- "Frame Header at: %d", qPrintable(Coda::stringFromArray(bad)), nextHeader);
- in.remove(0, bad.length());
- // and continue
- }
- }
- return QPair<int, int>(-1, -1); // No more data, or not enough for a complete header
-}
-
-void CodaDevice::deviceReadyReadSerial()
-{
- do {
- // Extract message (pos,len)
- const QPair<int, int> messagePos = findSerialHeader(d->m_readBuffer);
- if (messagePos.first < 0)
- break;
- // Do we have the complete message?
- const int messageEnd = messagePos.first + messagePos.second;
- if (messageEnd > d->m_readBuffer.size())
- break;
- processSerialMessage(d->m_readBuffer.mid(messagePos.first, messagePos.second));
- d->m_readBuffer.remove(0, messageEnd);
- } while (!d->m_readBuffer.isEmpty());
- checkSendQueue(); // Send off further messages
-}
-
-void CodaDevice::processSerialMessage(const QByteArray &message)
-{
- if (debug > 1)
- qDebug("Serial message: %s",qPrintable(Coda::stringFromArray(message)));
- if (message.isEmpty())
- return;
- // Is thing a ping/pong response
- const int size = message.size();
- if (message.startsWith(serialPongC)) {
- const QString version = QString::fromLatin1(message.mid(sizeof(serialPongC) - 1));
- emitLogMessage(QString::fromLatin1("Serial connection from '%1'").arg(version));
- emit serialPong(version);
- // Answer with locator.
- if (!d->m_serialPingOnly)
- writeMessage(QByteArray(locatorAnswerC, sizeof(locatorAnswerC)));
- return;
- }
- // Check for long message (see top, '0xfe #number, data' or '0x0 #number, data')
- // TODO: This is currently untested.
- const unsigned char *dataU = reinterpret_cast<const unsigned char *>(message.constData());
- const bool isLongMessageStart = size > SerialChunkHeaderSize
- && *dataU == serialChunkingStart;
- const bool isLongMessageContinuation = size > SerialChunkHeaderSize
- && *dataU == serialChunkingContinuation;
- if (isLongMessageStart || isLongMessageContinuation) {
- const unsigned chunkNumber = *++dataU;
- if (isLongMessageStart) { // Start new buffer
- d->m_serialBuffer.clear();
- d->m_serialBuffer.reserve( (chunkNumber + 1) * serialChunkLength);
- }
- d->m_serialBuffer.append(message.mid(SerialChunkHeaderSize, size - SerialChunkHeaderSize));
- // Last chunk? - Process
- if (!chunkNumber) {
- processMessage(d->m_serialBuffer);
- d->m_serialBuffer.clear();
- d->m_serialBuffer.squeeze();
- }
- } else {
- processMessage(message); // Normal, unchunked message
- }
-}
-
-void CodaDevice::deviceReadyReadTcp()
-{
- // Take complete message off front of readbuffer.
- do {
- const int messageEndPos = d->m_readBuffer.indexOf(d->m_tcpMessageTerminator);
- if (messageEndPos == -1)
- break;
- if (messageEndPos == 0) {
- // CODA 4.0.5 emits empty messages on errors.
- emitLogMessage(QString::fromLatin1("An empty CODA message has been received."));
- } else {
- processMessage(d->m_readBuffer.left(messageEndPos));
- }
- d->m_readBuffer.remove(0, messageEndPos + d->m_tcpMessageTerminator.size());
- } while (!d->m_readBuffer.isEmpty());
- checkSendQueue(); // Send off further messages
-}
-
-void CodaDevice::processMessage(const QByteArray &message)
-{
- if (debug)
- qDebug("Read %d bytes:\n%s", message.size(), qPrintable(formatData(message)));
- if (const int errorCode = parseMessage(message)) {
- emitLogMessage(QString::fromLatin1("Parse error %1 : %2").
- arg(errorCode).arg(debugMessage(message)));
- if (debug)
- qDebug("Parse error %d for %d bytes:\n%s", errorCode,
- message.size(), qPrintable(formatData(message)));
- }
-}
-
-// Split \0-terminated message into tokens, skipping the initial type character
-static inline QVector<QByteArray> splitMessage(const QByteArray &message)
-{
- QVector<QByteArray> tokens;
- tokens.reserve(7);
- const int messageSize = message.size();
- for (int pos = 2; pos < messageSize; ) {
- const int nextPos = message.indexOf('\0', pos);
- if (nextPos == -1)
- break;
- tokens.push_back(message.mid(pos, nextPos - pos));
- pos = nextPos + 1;
- }
- return tokens;
-}
-
-int CodaDevice::parseMessage(const QByteArray &message)
-{
- if (d->m_verbose)
- emitLogMessage(debugMessage(message, "CODA ->"));
- // Special JSON parse error message or protocol format error.
- // The port is usually closed after receiving it.
- // "\3\2{"Time":1276096098255,"Code":3,"Format": "Protocol format error"}"
- if (message.startsWith("\003\002")) {
- QByteArray text = message.mid(2);
- const QString errorMessage = QString::fromLatin1("Parse error received: %1").arg(QString::fromAscii(text));
- emit error(errorMessage);
- return 0;
- }
- if (message.size() < 4 || message.at(1) != '\0')
- return 1;
- // Split into tokens
- const char type = message.at(0);
- const QVector<QByteArray> tokens = splitMessage(message);
- switch (type) {
- case 'E':
- return parseCodaEvent(tokens);
- case 'R': // Command replies
- case 'N':
- case 'P':
- return parseCodaCommandReply(type, tokens);
- default:
- emitLogMessage(QString::fromLatin1("Unhandled message type: %1").arg(debugMessage(message)));
- return 756;
- }
- return 0;
-}
-
-int CodaDevice::parseCodaCommandReply(char type, const QVector<QByteArray> &tokens)
-{
- typedef CodaDevicePrivate::TokenWrittenMessageMap::iterator TokenWrittenMessageMapIterator;
- // Find the corresponding entry in the written messages hash.
- const int tokenCount = tokens.size();
- if (tokenCount < 1)
- return 234;
- bool tokenOk;
- const int token = tokens.at(0).toInt(&tokenOk);
- if (!tokenOk)
- return 235;
- const TokenWrittenMessageMapIterator it = d->m_writtenMessages.find(token);
- if (it == d->m_writtenMessages.end()) {
- qWarning("CodaDevice: Internal error: token %d not found for '%s'",
- token, qPrintable(joinByteArrays(tokens)));
- return 236;
- }
-
- CodaSendQueueEntry entry = it.value(); // FIXME: const?
- d->m_writtenMessages.erase(it);
-
- // No callback: remove entry from map, happy
- const unsigned specialHandling = entry.specialHandling;
- if (!entry.callback && specialHandling == 0u)
- return 0;
-
- // Parse values into JSON
- QVector<JsonValue> values;
- values.reserve(tokenCount);
- for (int i = 1; i < tokenCount; i++) {
- if (!tokens.at(i).isEmpty()) { // Strange: Empty tokens occur.
- const JsonValue value(tokens.at(i));
- if (value.isValid()) {
- values.push_back(value);
- } else {
- qWarning("JSON parse error for reply to command token %d: #%d '%s'",
- token, i, tokens.at(i).constData());
- return -1;
- }
- }
- }
- // Construct result and invoke callback, remove entry from map.
- CodaCommandResult result(type, entry.service, entry.data, values, entry.cookie);
- if (entry.callback)
- entry.callback(result);
-
- return 0;
-}
-
-int CodaDevice::parseCodaEvent(const QVector<QByteArray> &tokens)
-{
- // Event: Ignore the periodical heartbeat event, answer 'Hello',
- // emit signal for the rest
- if (tokens.size() < 3)
- return 433;
- const Services service = serviceFromName(tokens.at(0).constData());
- if (service == LocatorService && tokens.at(1) == "peerHeartBeat")
- return 0;
- QVector<JsonValue> values;
- for (int i = 2; i < tokens.size(); i++) {
- const JsonValue value(tokens.at(i));
- if (!value.isValid())
- return 434;
- values.push_back(value);
- }
- // Parse known events, emit signals
- QScopedPointer<CodaEvent> knownEvent(CodaEvent::parseEvent(service, tokens.at(1), values));
- if (!knownEvent.isNull()) {
- // Answer hello event (WLAN)
- if (knownEvent->type() == CodaEvent::LocatorHello)
- if (!d->m_serialFrame)
- writeMessage(QByteArray(locatorAnswerC, sizeof(locatorAnswerC)));
- emit codaEvent(*knownEvent);
- }
- emit genericCodaEvent(service, tokens.at(1), values);
-
- if (debug || d->m_verbose) {
- QString msg;
- QTextStream str(&msg);
- if (knownEvent.isNull()) {
- str << "Event: " << tokens.at(0) << ' ' << tokens.at(1) << '\n';
- foreach(const JsonValue &val, values)
- str << " " << val.toString() << '\n';
- } else {
- str << knownEvent->toString();
- }
- emitLogMessage(msg);
- }
-
- return 0;
-}
-
-unsigned CodaDevice::verbose() const
-{
- return d->m_verbose;
-}
-
-bool CodaDevice::serialFrame() const
-{
- return d->m_serialFrame;
-}
-
-void CodaDevice::setSerialFrame(bool s)
-{
- d->m_serialFrame = s;
-}
-
-void CodaDevice::setVerbose(unsigned v)
-{
- d->m_verbose = v;
-}
-
-void CodaDevice::emitLogMessage(const QString &m)
-{
- if (debug)
- qWarning("%s", qPrintable(m));
- emit logMessage(m);
-}
-
-bool CodaDevice::checkOpen()
-{
- if (d->m_device.isNull()) {
- emitLogMessage(QLatin1String("Internal error: No device set on CodaDevice."));
- return false;
- }
- if (!d->m_device->isOpen()) {
- emitLogMessage(QLatin1String("Internal error: Device not open in CodaDevice."));
- return false;
- }
- return true;
-}
-
-void CodaDevice::sendSerialPing(bool pingOnly)
-{
- if (!checkOpen())
- return;
-
- d->m_serialPingOnly = pingOnly;
- setSerialFrame(true);
- writeMessage(QByteArray(serialPingC, qstrlen(serialPingC)), false);
- if (d->m_verbose)
- emitLogMessage(QLatin1String("Ping..."));
-}
-
-void CodaDevice::sendCodaMessage(MessageType mt, Services service, const char *command,
- const char *commandParameters, // may contain '\0'
- int commandParametersLength,
- const CodaCallback &callBack,
- const QVariant &cookie)
-
-{
- if (!checkOpen())
- return;
- // Format the message
- const int token = d->m_token++;
- QByteArray data;
- data.reserve(30 + commandParametersLength);
- data.append('C');
- data.append('\0');
- data.append(QByteArray::number(token));
- data.append('\0');
- data.append(serviceName(service));
- data.append('\0');
- data.append(command);
- data.append('\0');
- if (commandParametersLength)
- data.append(commandParameters, commandParametersLength);
- const CodaSendQueueEntry entry(mt, token, service, data, callBack, cookie);
- d->m_sendQueue.enqueue(entry);
- checkSendQueue();
-}
-
-void CodaDevice::sendCodaMessage(MessageType mt, Services service, const char *command,
- const QByteArray &commandParameters,
- const CodaCallback &callBack,
- const QVariant &cookie)
-{
- sendCodaMessage(mt, service, command, commandParameters.constData(), commandParameters.size(),
- callBack, cookie);
-}
-
-// Enclose in message frame and write.
-void CodaDevice::writeMessage(QByteArray data, bool ensureTerminating0)
-{
- if (!checkOpen())
- return;
-
- if (d->m_serialFrame && data.size() > maxSerialMessageLength) {
- qCritical("Attempt to send large message (%d bytes) exceeding the "
- "limit of %d bytes over serial channel. Skipping.",
- data.size(), maxSerialMessageLength);
- return;
- }
-
- if (d->m_verbose)
- emitLogMessage(debugMessage(data, "CODA <-"));
-
- // Ensure \0-termination which easily gets lost in QByteArray CT.
- if (ensureTerminating0 && !data.endsWith('\0'))
- data.append('\0');
- if (d->m_serialFrame) {
- data = encodeUsbSerialMessage(data);
- } else {
- data += d->m_tcpMessageTerminator;
- }
-
- if (debug > 1)
- qDebug("Writing:\n%s", qPrintable(formatData(data)));
-
- int result = d->m_device->write(data);
- if (result < data.length())
- qWarning("Failed to write all data! result=%d", result);
- if (QAbstractSocket *as = qobject_cast<QAbstractSocket *>(d->m_device.data()))
- as->flush();
-}
-
-void CodaDevice::writeCustomData(char protocolId, const QByteArray &data)
-{
- if (!checkOpen())
- return;
-
- if (!d->m_serialFrame) {
- qWarning("Ignoring request to send data to non-serial CodaDevice");
- return;
- }
- if (data.length() > 0xFFFF) {
- qWarning("Ignoring request to send too large packet, of size %d", data.length());
- return;
- }
- QByteArray framedData;
- encodeSerialFrame(data, &framedData, protocolId);
- device()->write(framedData);
-}
-
-void CodaDevice::checkSendQueue()
-{
- // Fire off messages or invoke noops until a message with reply is found
- // and an entry to writtenMessages is made.
- while (d->m_writtenMessages.empty()) {
- if (d->m_sendQueue.isEmpty())
- break;
- CodaSendQueueEntry entry = d->m_sendQueue.dequeue();
- switch (entry.messageType) {
- case MessageWithReply:
- d->m_writtenMessages.insert(entry.token, entry);
- writeMessage(entry.data);
- break;
- case MessageWithoutReply:
- writeMessage(entry.data);
- break;
- case NoopMessage: // Invoke the noop-callback for synchronization
- if (entry.callback) {
- CodaCommandResult noopResult(CodaCommandResult::SuccessReply);
- noopResult.cookie = entry.cookie;
- entry.callback(noopResult);
- }
- break;
- }
- }
-}
-
-// Fix slashes
-static inline QString fixFileName(QString in)
-{
- in.replace(QLatin1Char('/'), QLatin1Char('\\'));
- return in;
-}
-
-// Start a process (consisting of a non-reply setSettings and start).
-void CodaDevice::sendProcessStartCommand(const CodaCallback &callBack,
- const QString &binaryIn,
- unsigned uid,
- QStringList arguments,
- QString workingDirectory,
- bool debugControl,
- const QStringList &additionalLibraries,
- const QVariant &cookie)
-{
- // Obtain the bin directory, expand by c:/sys/bin if missing
- const QChar backSlash('\\');
- int slashPos = binaryIn.lastIndexOf(QLatin1Char('/'));
- if (slashPos == -1)
- slashPos = binaryIn.lastIndexOf(backSlash);
- const QString sysBin = QLatin1String("c:/sys/bin");
- const QString binaryFileName = slashPos == -1 ? binaryIn : binaryIn.mid(slashPos + 1);
-
- if (workingDirectory.isEmpty())
- workingDirectory = sysBin;
-
- // Format settings with empty dummy parameter
- QByteArray setData;
- JsonInputStream setStr(setData);
- setStr << "" << '\0'
- << '[' << "exeToLaunch" << ',' << "addExecutables" << ',' << "addLibraries" << ',' << "logUserTraces" << ',' << "attachAllWithLibraries" << ']'
- << '\0' << '['
- << binaryFileName << ','
- << '{' << binaryFileName << ':' << QString::number(uid, 16) << '}' << ','
- << additionalLibraries << ',' << true << ',' << false
- << ']';
- sendCodaMessage(
-#if 1
- MessageWithReply, // CODA 4.0.5 onwards
-#else
- MessageWithoutReply, // CODA 4.0.2
-#endif
- SettingsService, "set", setData);
-
- QByteArray startData;
- JsonInputStream startStr(startData);
- startStr << "" //We don't really know the drive of the working dir
- << '\0' << binaryFileName << '\0' << arguments << '\0'
- << QStringList() << '\0' // Env is an array ["PATH=value"] (non-standard)
- << debugControl;
- sendCodaMessage(MessageWithReply, ProcessesService, "start", startData, callBack, cookie);
-}
-
-void CodaDevice::sendRunProcessCommand(const CodaCallback &callBack,
- const QString &processName,
- QStringList arguments,
- const QVariant &cookie)
-{
- QByteArray startData;
- JsonInputStream startStr(startData);
- startStr << "" //We don't really know the drive of the working dir
- << '\0' << processName << '\0' << arguments << '\0'
- << QStringList() << '\0' // Env is an array ["PATH=value"] (non-standard)
- << false; // Don't attach debugger
- sendCodaMessage(MessageWithReply, ProcessesService, "start", startData, callBack, cookie);
-}
-
-void CodaDevice::sendSettingsEnableLogCommand()
-{
-
- QByteArray setData;
- JsonInputStream setStr(setData);
- setStr << "" << '\0'
- << '[' << "logUserTraces" << ']'
- << '\0' << '['
- << true
- << ']';
- sendCodaMessage(
-#if 1
- MessageWithReply, // CODA 4.0.5 onwards
-#else
- MessageWithoutReply, // CODA 4.0.2
-#endif
- SettingsService, "set", setData);
-}
-
-void CodaDevice::sendProcessTerminateCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << id;
- sendCodaMessage(MessageWithReply, ProcessesService, "terminate", data, callBack, cookie);
-}
-
-void CodaDevice::sendRunControlTerminateCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << id;
- sendCodaMessage(MessageWithReply, RunControlService, "terminate", data, callBack, cookie);
-}
-
-// Non-standard: Remove executable from settings
-void CodaDevice::sendSettingsRemoveExecutableCommand(const QString &binaryIn,
- unsigned uid,
- const QStringList &additionalLibraries,
- const QVariant &cookie)
-{
- QByteArray setData;
- JsonInputStream setStr(setData);
- setStr << "" << '\0'
- << '[' << "removedExecutables" << ',' << "removedLibraries" << ']'
- << '\0' << '['
- << '{' << QFileInfo(binaryIn).fileName() << ':' << QString::number(uid, 16) << '}' << ','
- << additionalLibraries
- << ']';
- sendCodaMessage(MessageWithoutReply, SettingsService, "set", setData, CodaCallback(), cookie);
-}
-
-void CodaDevice::sendRunControlResumeCommand(const CodaCallback &callBack,
- const QByteArray &id,
- RunControlResumeMode mode,
- unsigned count,
- quint64 rangeStart,
- quint64 rangeEnd,
- const QVariant &cookie)
-{
- QByteArray resumeData;
- JsonInputStream str(resumeData);
- str << id << '\0' << int(mode) << '\0' << count;
- switch (mode) {
- case RM_STEP_OVER_RANGE:
- case RM_STEP_INTO_RANGE:
- case RM_REVERSE_STEP_OVER_RANGE:
- case RM_REVERSE_STEP_INTO_RANGE:
- str << '\0' << '{' << "RANGE_START" << ':' << rangeStart
- << ',' << "RANGE_END" << ':' << rangeEnd << '}';
- break;
- default:
- break;
- }
- sendCodaMessage(MessageWithReply, RunControlService, "resume", resumeData, callBack, cookie);
-}
-
-void CodaDevice::sendRunControlSuspendCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << id;
- sendCodaMessage(MessageWithReply, RunControlService, "suspend", data, callBack, cookie);
-}
-
-void CodaDevice::sendRunControlResumeCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie)
-{
- sendRunControlResumeCommand(callBack, id, RM_RESUME, 1, 0, 0, cookie);
-}
-
-void CodaDevice::sendBreakpointsAddCommand(const CodaCallback &callBack,
- const Breakpoint &bp,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << bp;
- sendCodaMessage(MessageWithReply, BreakpointsService, "add", data, callBack, cookie);
-}
-
-void CodaDevice::sendBreakpointsRemoveCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie)
-{
- sendBreakpointsRemoveCommand(callBack, QVector<QByteArray>(1, id), cookie);
-}
-
-void CodaDevice::sendBreakpointsRemoveCommand(const CodaCallback &callBack,
- const QVector<QByteArray> &ids,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << ids;
- sendCodaMessage(MessageWithReply, BreakpointsService, "remove", data, callBack, cookie);
-}
-
-void CodaDevice::sendBreakpointsEnableCommand(const CodaCallback &callBack,
- const QByteArray &id,
- bool enable,
- const QVariant &cookie)
-{
- sendBreakpointsEnableCommand(callBack, QVector<QByteArray>(1, id), enable, cookie);
-}
-
-void CodaDevice::sendBreakpointsEnableCommand(const CodaCallback &callBack,
- const QVector<QByteArray> &ids,
- bool enable,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << ids;
- sendCodaMessage(MessageWithReply, BreakpointsService,
- enable ? "enable" : "disable",
- data, callBack, cookie);
-}
-
-void CodaDevice::sendMemorySetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- quint64 start, const QByteArray& data,
- const QVariant &cookie)
-{
- QByteArray getData;
- JsonInputStream str(getData);
- // start/word size/mode. Mode should ideally be 1 (continue on error?)
- str << contextId << '\0' << start << '\0' << 1 << '\0' << data.size() << '\0' << 1
- << '\0' << data.toBase64();
- sendCodaMessage(MessageWithReply, MemoryService, "set", getData, callBack, cookie);
-}
-
-void CodaDevice::sendMemoryGetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- quint64 start, quint64 size,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- // start/word size/mode. Mode should ideally be 1 (continue on error?)
- str << contextId << '\0' << start << '\0' << 1 << '\0' << size << '\0' << 1;
- sendCodaMessage(MessageWithReply, MemoryService, "get", data, callBack, cookie);
-}
-
-QByteArray CodaDevice::parseMemoryGet(const CodaCommandResult &r)
-{
- if (r.type != CodaCommandResult::SuccessReply || r.values.size() < 1)
- return QByteArray();
- const JsonValue &memoryV = r.values.front();
-
- if (memoryV.type() != JsonValue::String || memoryV.data().size() < 2
- || !memoryV.data().endsWith('='))
- return QByteArray();
- // Catch errors reported as hash:
- // R.4."TlVMTA==".{"Time":1276786871255,"Code":1,"AltCode":-38,"AltOrg":"POSIX","Format":"BadDescriptor"}
- // Not sure what to make of it.
- if (r.values.size() >= 2 && r.values.at(1).type() == JsonValue::Object)
- qWarning("CodaDevice::parseMemoryGet(): Error retrieving memory: %s", r.values.at(1).toString(false).constData());
- // decode
- const QByteArray memory = QByteArray::fromBase64(memoryV.data());
- if (memory.isEmpty())
- qWarning("Base64 decoding of %s failed.", memoryV.data().constData());
- if (debug)
- qDebug("CodaDevice::parseMemoryGet: received %d bytes", memory.size());
- return memory;
-}
-
-// Parse register children (array of names)
-QVector<QByteArray> CodaDevice::parseRegisterGetChildren(const CodaCommandResult &r)
-{
- QVector<QByteArray> rc;
- if (!r || r.values.size() < 1 || r.values.front().type() != JsonValue::Array)
- return rc;
- const JsonValue &front = r.values.front();
- rc.reserve(front.childCount());
- foreach(const JsonValue &v, front.children())
- rc.push_back(v.data());
- return rc;
-}
-
-CodaStatResponse CodaDevice::parseStat(const CodaCommandResult &r)
-{
- CodaStatResponse rc;
- if (!r || r.values.size() < 1 || r.values.front().type() != JsonValue::Object)
- return rc;
- foreach(const JsonValue &v, r.values.front().children()) {
- if (v.name() == "Size") {
- rc.size = v.data().toULongLong();
- } else if (v.name() == "ATime") {
- if (const quint64 atime = v.data().toULongLong())
- rc.accessTime = CodaCommandResult::codaTimeToQDateTime(atime);
- } else if (v.name() == "MTime") {
- if (const quint64 mtime = v.data().toULongLong())
- rc.modTime = CodaCommandResult::codaTimeToQDateTime(mtime);
- }
- }
- return rc;
-}
-
-void CodaDevice::sendRegistersGetChildrenCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << contextId;
- sendCodaMessage(MessageWithReply, RegistersService, "getChildren", data, callBack, cookie);
-}
-
-// Format id of register get request (needs contextId containing process and thread)
-static inline QByteArray registerId(const QByteArray &contextId, QByteArray id)
-{
- QByteArray completeId = contextId;
- if (!completeId.isEmpty())
- completeId.append('.');
- completeId.append(id);
- return completeId;
-}
-
-// Format parameters of register get request
-static inline QByteArray registerGetData(const QByteArray &contextId, QByteArray id)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << registerId(contextId, id);
- return data;
-}
-
-void CodaDevice::sendRegistersGetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- QByteArray id,
- const QVariant &cookie)
-{
- sendCodaMessage(MessageWithReply, RegistersService, "get",
- registerGetData(contextId, id), callBack, cookie);
-}
-
-void CodaDevice::sendRegistersGetMCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- const QVector<QByteArray> &ids,
- const QVariant &cookie)
-{
- // Format the register ids as a JSON list
- QByteArray data;
- JsonInputStream str(data);
- str << '[';
- const int count = ids.size();
- for (int r = 0; r < count; r++) {
- if (r)
- str << ',';
- // TODO: When 8-byte floating-point registers are supported, query for register length based on register id
- str << '[' << registerId(contextId, ids.at(r)) << ',' << '0' << ',' << '4' << ']';
- }
- str << ']';
- sendCodaMessage(MessageWithReply, RegistersService, "getm", data, callBack, cookie);
-}
-
-void CodaDevice::sendRegistersGetMRangeCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- unsigned start, unsigned count)
-{
- const unsigned end = start + count;
- if (end > (unsigned)d->m_registerNames.size()) {
- qWarning("CodaDevice: No register name set for index %u (size: %d).", end, d->m_registerNames.size());
- return;
- }
-
- QVector<QByteArray> ids;
- ids.reserve(count);
- for (unsigned i = start; i < end; ++i)
- ids.push_back(d->m_registerNames.at(i));
- sendRegistersGetMCommand(callBack, contextId, ids, QVariant(start));
-}
-
-// Set register
-void CodaDevice::sendRegistersSetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- QByteArray id,
- const QByteArray &value,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- if (!contextId.isEmpty()) {
- id.prepend('.');
- id.prepend(contextId);
- }
- str << id << '\0' << value.toBase64();
- sendCodaMessage(MessageWithReply, RegistersService, "set", data, callBack, cookie);
-}
-
-// Set register
-void CodaDevice::sendRegistersSetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- unsigned registerNumber,
- const QByteArray &value,
- const QVariant &cookie)
-{
- if (registerNumber >= (unsigned)d->m_registerNames.size()) {
- qWarning("CodaDevice: No register name set for index %u (size: %d).", registerNumber, d->m_registerNames.size());
- return;
- }
- sendRegistersSetCommand(callBack, contextId,
- d->m_registerNames[registerNumber],
- value, cookie);
-}
-
-static const char outputListenerIDC[] = "ProgramOutputConsoleLogger";
-
-void CodaDevice::sendLoggingAddListenerCommand(const CodaCallback &callBack,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << outputListenerIDC;
- sendCodaMessage(MessageWithReply, LoggingService, "addListener", data, callBack, cookie);
-}
-
-void CodaDevice::sendSymbianUninstallCommand(const Coda::CodaCallback &callBack,
- const quint32 package,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- QString string = QString::number(package, 16);
- str << string;
- sendCodaMessage(MessageWithReply, SymbianInstallService, "uninstall", data, callBack, cookie);
-}
-
-void CodaDevice::sendSymbianOsDataGetThreadsCommand(const CodaCallback &callBack,
- const QVariant &cookie)
-{
- QByteArray data;
- sendCodaMessage(MessageWithReply, SymbianOSData, "getThreads", data, callBack, cookie);
-}
-
-void CodaDevice::sendSymbianOsDataFindProcessesCommand(const CodaCallback &callBack,
- const QByteArray &processName,
- const QByteArray &uid,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << processName << '\0' << uid;
- sendCodaMessage(MessageWithReply, SymbianOSData, "findRunningProcesses", data, callBack, cookie);
-}
-
-void CodaDevice::sendSymbianOsDataGetQtVersionCommand(const CodaCallback &callBack,
- const QVariant &cookie)
-{
- sendCodaMessage(MessageWithReply, SymbianOSData, "getQtVersion", QByteArray(), callBack, cookie);
-}
-
-void CodaDevice::sendSymbianOsDataGetRomInfoCommand(const CodaCallback &callBack,
- const QVariant &cookie)
-{
- sendCodaMessage(MessageWithReply, SymbianOSData, "getRomInfo", QByteArray(), callBack, cookie);
-}
-
-void CodaDevice::sendSymbianOsDataGetHalInfoCommand(const CodaCallback &callBack,
- const QStringList &keys,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << '[';
- for (int i = 0; i < keys.count(); ++i) {
- if (i)
- str << ',';
- str << keys[i];
- }
- str << ']';
- sendCodaMessage(MessageWithReply, SymbianOSData, "getHalInfo", data, callBack, cookie);
-}
-
-void Coda::CodaDevice::sendFileSystemOpenCommand(const Coda::CodaCallback &callBack,
- const QByteArray &name,
- unsigned flags,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << name << '\0' << flags << '\0' << '{' << '}';
- sendCodaMessage(MessageWithReply, FileSystemService, "open", data, callBack, cookie);
-}
-
-void Coda::CodaDevice::sendFileSystemFstatCommand(const CodaCallback &callBack,
- const QByteArray &handle,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << handle;
- sendCodaMessage(MessageWithReply, FileSystemService, "fstat", data, callBack, cookie);
-}
-
-void Coda::CodaDevice::sendFileSystemWriteCommand(const Coda::CodaCallback &callBack,
- const QByteArray &handle,
- const QByteArray &dataIn,
- unsigned offset,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << handle << '\0' << offset << '\0' << dataIn.toBase64();
- sendCodaMessage(MessageWithReply, FileSystemService, "write", data, callBack, cookie);
-}
-
-void Coda::CodaDevice::sendFileSystemCloseCommand(const Coda::CodaCallback &callBack,
- const QByteArray &handle,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << handle;
- sendCodaMessage(MessageWithReply, FileSystemService, "close", data, callBack, cookie);
-}
-
-void Coda::CodaDevice::sendSymbianInstallSilentInstallCommand(const Coda::CodaCallback &callBack,
- const QByteArray &file,
- const QByteArray &targetDrive,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << file << '\0' << targetDrive;
- sendCodaMessage(MessageWithReply, SymbianInstallService, "install", data, callBack, cookie);
-}
-
-void Coda::CodaDevice::sendSymbianInstallUIInstallCommand(const Coda::CodaCallback &callBack,
- const QByteArray &file,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << file;
- sendCodaMessage(MessageWithReply, SymbianInstallService, "installWithUI", data, callBack, cookie);
-}
-
-void Coda::CodaDevice::sendSymbianInstallGetPackageInfoCommand(const Coda::CodaCallback &callBack,
- const QList<quint32> &packages,
- const QVariant &cookie)
-{
- QByteArray data;
- JsonInputStream str(data);
- str << '[';
- for (int i = 0; i < packages.count(); ++i) {
- if (i)
- str << ',';
- QString pkgString;
- pkgString.setNum(packages[i], 16);
- str << pkgString;
- }
- str << ']';
- sendCodaMessage(MessageWithReply, SymbianInstallService, "getPackageInfo", data, callBack, cookie);
-}
-
-void Coda::CodaDevice::sendDebugSessionControlSessionStartCommand(const Coda::CodaCallback &callBack,
- const QVariant &cookie)
-{
- sendCodaMessage(MessageWithReply, DebugSessionControl, "sessionStart", QByteArray(), callBack, cookie);
-}
-
-void Coda::CodaDevice::sendDebugSessionControlSessionEndCommand(const Coda::CodaCallback &callBack,
- const QVariant &cookie)
-{
- sendCodaMessage(MessageWithReply, DebugSessionControl, "sessionEnd ", QByteArray(), callBack, cookie);
-}
-
-} // namespace Coda
diff --git a/src/shared/symbianutils/codadevice.h b/src/shared/symbianutils/codadevice.h
deleted file mode 100644
index 9a49cd527c..0000000000
--- a/src/shared/symbianutils/codadevice.h
+++ /dev/null
@@ -1,432 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef CODAENGINE_H
-#define CODAENGINE_H
-
-#include "symbianutils_global.h"
-#include "codamessage.h"
-#include "callback.h"
-#include "json.h"
-
-#include <QObject>
-#include <QSharedPointer>
-#include <QVector>
-#include <QVariant>
-#include <QStringList>
-#include <QDateTime>
-
-QT_BEGIN_NAMESPACE
-class QIODevice;
-class QTextStream;
-QT_END_NAMESPACE
-
-namespace Coda {
-
-struct CodaDevicePrivate;
-struct Breakpoint;
-
-/* Command error handling in CODA:
- * 1) 'Severe' errors (JSON format, parameter format): Coda emits a
- * nonstandard message (\3\2 error parameters) and closes the connection.
- * 2) Protocol errors: 'N' without error message is returned.
- * 3) Errors in command execution: 'R' with a CODA error hash is returned
- * (see CodaCommandError). */
-
-/* Error code return in 'R' reply to command
- * (see top of 'Services' documentation). */
-struct SYMBIANUTILS_EXPORT CodaCommandError {
- CodaCommandError();
- void clear();
- bool isError() const;
- operator bool() const { return isError(); }
- QString toString() const;
- void write(QTextStream &str) const;
- bool parse(const QVector<Json::JsonValue> &values);
-
- quint64 timeMS; // Since 1.1.1970
- qint64 code;
- QByteArray format; // message
- // 'Alternative' meaning, like altOrg="POSIX"/altCode=<some errno>
- QByteArray alternativeOrganization;
- qint64 alternativeCode;
-};
-
-/* Answer to a CODA command passed to the callback. */
-struct SYMBIANUTILS_EXPORT CodaCommandResult {
- enum Type
- {
- SuccessReply, // 'R' and no error -> all happy.
- CommandErrorReply, // 'R' with CodaCommandError received
- ProgressReply, // 'P', progress indicator
- FailReply // 'N' Protocol NAK, severe error
- };
-
- explicit CodaCommandResult(Type t = SuccessReply);
- explicit CodaCommandResult(char typeChar, Services service,
- const QByteArray &request,
- const QVector<Json::JsonValue> &values,
- const QVariant &cookie);
-
- QString toString() const;
- QString errorString() const;
- operator bool() const { return type == SuccessReply || type == ProgressReply; }
-
- static QDateTime codaTimeToQDateTime(quint64 codaTimeMS);
-
- Type type;
- Services service;
- QByteArray request;
- CodaCommandError commandError;
- QVector<Json::JsonValue> values;
- QVariant cookie;
-};
-
-// Response to stat/fstat
-struct SYMBIANUTILS_EXPORT CodaStatResponse
-{
- CodaStatResponse();
-
- quint64 size;
- QDateTime modTime;
- QDateTime accessTime;
-};
-
-typedef Coda::Callback<const CodaCommandResult &> CodaCallback;
-
-/* CodaDevice: CODA communication helper using an asynchronous QIODevice
- * implementing the CODA protocol according to:
-http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/docs/TCF%20Specification.html
-http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk/docs/TCF%20Services.html
- * Commands can be sent along with callbacks that are passed a
- * CodaCommandResult and an opaque QVariant cookie. In addition, events are emitted.
- *
- * CODA notes:
- * - Commands are accepted only after receiving the Locator Hello event
- * - Serial communication initiation sequence:
- * Send serial ping from host sendSerialPing() -> receive pong response with
- * version information -> Send Locator Hello Event -> Receive Locator Hello Event
- * -> Commands are accepted.
- * - WLAN communication initiation sequence:
- * Receive Locator Hello Event from CODA -> Commands are accepted.
- */
-
-class SYMBIANUTILS_EXPORT CodaDevice : public QObject
-{
- Q_PROPERTY(unsigned verbose READ verbose WRITE setVerbose)
- Q_PROPERTY(bool serialFrame READ serialFrame WRITE setSerialFrame)
- Q_OBJECT
-public:
- // Flags for FileSystem:open
- enum FileSystemOpenFlags
- {
- FileSystem_TCF_O_READ = 0x00000001,
- FileSystem_TCF_O_WRITE = 0x00000002,
- FileSystem_TCF_O_APPEND = 0x00000004,
- FileSystem_TCF_O_CREAT = 0x00000008,
- FileSystem_TCF_O_TRUNC = 0x00000010,
- FileSystem_TCF_O_EXCL = 0x00000020
- };
-
- enum MessageType
- {
- MessageWithReply,
- MessageWithoutReply, /* Non-standard: "Settings:set" command does not reply */
- NoopMessage
- };
-
- typedef QSharedPointer<QIODevice> IODevicePtr;
-
- explicit CodaDevice(QObject *parent = 0);
- virtual ~CodaDevice();
-
- unsigned verbose() const;
- bool serialFrame() const;
- void setSerialFrame(bool);
-
- // Mapping of register names to indices for multi-requests.
- // Register names can be retrieved via 'Registers:getChildren' (requires
- // context id to be stripped).
- QVector<QByteArray> registerNames() const;
- void setRegisterNames(const QVector<QByteArray>& n);
-
- IODevicePtr device() const;
- IODevicePtr takeDevice();
- void setDevice(const IODevicePtr &dp);
-
- // Serial Only: Initiate communication. Will emit serialPong() signal with version.
- void sendSerialPing(bool pingOnly = false);
-
- // Send with parameters from string (which may contain '\0').
- void sendCodaMessage(MessageType mt, Services service, const char *command,
- const char *commandParameters, int commandParametersLength,
- const CodaCallback &callBack = CodaCallback(),
- const QVariant &cookie = QVariant());
-
- void sendCodaMessage(MessageType mt, Services service, const char *command,
- const QByteArray &commandParameters,
- const CodaCallback &callBack = CodaCallback(),
- const QVariant &cookie = QVariant());
-
- // Convenience messages: Start a process
- void sendProcessStartCommand(const CodaCallback &callBack,
- const QString &binary,
- unsigned uid,
- QStringList arguments = QStringList(),
- QString workingDirectory = QString(),
- bool debugControl = true,
- const QStringList &additionalLibraries = QStringList(),
- const QVariant &cookie = QVariant());
-
- // Just launch a process, don't attempt to attach the debugger to it
- void sendRunProcessCommand(const CodaCallback &callBack,
- const QString &processName,
- QStringList arguments = QStringList(),
- const QVariant &cookie = QVariant());
-
- // Preferred over Processes:Terminate by CODA.
- void sendRunControlTerminateCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie = QVariant());
-
- // TODO: In CODA 4.1.13 the Terminate option does order CODA to kill
- // a process and CODA reports contextRemoved but does not kill the process
- void sendProcessTerminateCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie = QVariant());
-
- // Non-standard: Remove executable from settings.
- // Probably needs to be called after stopping. This command has no response.
- void sendSettingsRemoveExecutableCommand(const QString &binaryIn,
- unsigned uid,
- const QStringList &additionalLibraries = QStringList(),
- const QVariant &cookie = QVariant());
-
- void sendRunControlSuspendCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie = QVariant());
-
- // Resume / Step (see RunControlResumeMode).
- void sendRunControlResumeCommand(const CodaCallback &callBack,
- const QByteArray &id,
- RunControlResumeMode mode,
- unsigned count /* = 1, currently ignored. */,
- quint64 rangeStart, quint64 rangeEnd,
- const QVariant &cookie = QVariant());
-
- // Convenience to resume a suspended process
- void sendRunControlResumeCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie = QVariant());
-
- void sendBreakpointsAddCommand(const CodaCallback &callBack,
- const Breakpoint &b,
- const QVariant &cookie = QVariant());
-
- void sendBreakpointsRemoveCommand(const CodaCallback &callBack,
- const QByteArray &id,
- const QVariant &cookie = QVariant());
-
- void sendBreakpointsRemoveCommand(const CodaCallback &callBack,
- const QVector<QByteArray> &id,
- const QVariant &cookie = QVariant());
-
- void sendBreakpointsEnableCommand(const CodaCallback &callBack,
- const QByteArray &id,
- bool enable,
- const QVariant &cookie = QVariant());
-
- void sendBreakpointsEnableCommand(const CodaCallback &callBack,
- const QVector<QByteArray> &id,
- bool enable,
- const QVariant &cookie = QVariant());
-
-
- void sendMemoryGetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- quint64 start, quint64 size,
- const QVariant &cookie = QVariant());
-
- void sendMemorySetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- quint64 start, const QByteArray& data,
- const QVariant &cookie = QVariant());
-
- // Get register names (children of context).
- // It is possible to recurse from thread id down to single registers.
- void sendRegistersGetChildrenCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- const QVariant &cookie = QVariant());
-
- // Register get
- void sendRegistersGetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- QByteArray id,
- const QVariant &cookie);
-
- void sendRegistersGetMCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- const QVector<QByteArray> &ids,
- const QVariant &cookie = QVariant());
-
- // Convenience to get a range of register "R0" .. "R<n>".
- // Cookie will be an int containing "start".
- void sendRegistersGetMRangeCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- unsigned start, unsigned count);
-
- // Set register
- void sendRegistersSetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- QByteArray ids,
- const QByteArray &value, // binary value
- const QVariant &cookie = QVariant());
- // Set register
- void sendRegistersSetCommand(const CodaCallback &callBack,
- const QByteArray &contextId,
- unsigned registerNumber,
- const QByteArray &value, // binary value
- const QVariant &cookie = QVariant());
-
- // File System
- void sendFileSystemOpenCommand(const CodaCallback &callBack,
- const QByteArray &name,
- unsigned flags = FileSystem_TCF_O_READ,
- const QVariant &cookie = QVariant());
-
- void sendFileSystemFstatCommand(const CodaCallback &callBack,
- const QByteArray &handle,
- const QVariant &cookie = QVariant());
-
- void sendFileSystemWriteCommand(const CodaCallback &callBack,
- const QByteArray &handle,
- const QByteArray &data,
- unsigned offset = 0,
- const QVariant &cookie = QVariant());
-
- void sendFileSystemCloseCommand(const CodaCallback &callBack,
- const QByteArray &handle,
- const QVariant &cookie = QVariant());
-
- // Symbian Install
- void sendSymbianInstallSilentInstallCommand(const CodaCallback &callBack,
- const QByteArray &file,
- const QByteArray &targetDrive,
- const QVariant &cookie = QVariant());
-
- void sendSymbianInstallUIInstallCommand(const CodaCallback &callBack,
- const QByteArray &file,
- const QVariant &cookie = QVariant());
-
- void sendSymbianInstallGetPackageInfoCommand(const Coda::CodaCallback &callBack,
- const QList<quint32> &packages,
- const QVariant &cookie = QVariant());
-
- void sendLoggingAddListenerCommand(const CodaCallback &callBack,
- const QVariant &cookie = QVariant());
-
- void sendSymbianUninstallCommand(const Coda::CodaCallback &callBack,
- const quint32 package,
- const QVariant &cookie = QVariant());
-
- // SymbianOs Data
- void sendSymbianOsDataGetThreadsCommand(const CodaCallback &callBack,
- const QVariant &cookie = QVariant());
-
- void sendSymbianOsDataFindProcessesCommand(const CodaCallback &callBack,
- const QByteArray &processName,
- const QByteArray &uid,
- const QVariant &cookie = QVariant());
-
- void sendSymbianOsDataGetQtVersionCommand(const CodaCallback &callBack,
- const QVariant &cookie = QVariant());
-
- void sendSymbianOsDataGetRomInfoCommand(const CodaCallback &callBack,
- const QVariant &cookie = QVariant());
-
- void sendSymbianOsDataGetHalInfoCommand(const CodaCallback &callBack,
- const QStringList &keys = QStringList(),
- const QVariant &cookie = QVariant());
-
- // DebugSessionControl
- void sendDebugSessionControlSessionStartCommand(const CodaCallback &callBack,
- const QVariant &cookie = QVariant());
-
- void sendDebugSessionControlSessionEndCommand(const CodaCallback &callBack,
- const QVariant &cookie = QVariant());
-
- // Settings
- void sendSettingsEnableLogCommand();
-
- void writeCustomData(char protocolId, const QByteArray &aData);
-
- static QByteArray parseMemoryGet(const CodaCommandResult &r);
- static QVector<QByteArray> parseRegisterGetChildren(const CodaCommandResult &r);
- static CodaStatResponse parseStat(const CodaCommandResult &r);
-
-signals:
- void genericCodaEvent(int service, const QByteArray &name, const QVector<Json::JsonValue> &value);
- void codaEvent(const Coda::CodaEvent &knownEvent);
- void unknownEvent(uchar protocolId, const QByteArray& data);
- void serialPong(const QString &codaVersion);
-
- void logMessage(const QString &);
- void error(const QString &);
-
-public slots:
- void setVerbose(unsigned v);
-
-private slots:
- void slotDeviceError();
- void slotDeviceSocketStateChanged();
- void slotDeviceReadyRead();
-
-private:
- void deviceReadyReadSerial();
- void deviceReadyReadTcp();
-
- bool checkOpen();
- void checkSendQueue();
- void writeMessage(QByteArray data, bool ensureTerminating0 = true);
- void emitLogMessage(const QString &);
- inline int parseMessage(const QByteArray &);
- void processMessage(const QByteArray &message);
- inline void processSerialMessage(const QByteArray &message);
- int parseCodaCommandReply(char type, const QVector<QByteArray> &tokens);
- int parseCodaEvent(const QVector<QByteArray> &tokens);
-
-private:
- QPair<int, int> findSerialHeader(QByteArray &in);
- CodaDevicePrivate *d;
-};
-
-} // namespace Coda
-
-#endif // CODAENGINE_H
diff --git a/src/shared/symbianutils/codamessage.cpp b/src/shared/symbianutils/codamessage.cpp
deleted file mode 100644
index e680eb5ed8..0000000000
--- a/src/shared/symbianutils/codamessage.cpp
+++ /dev/null
@@ -1,592 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "codamessage.h"
-#include "json.h"
-
-#include <QString>
-#include <QTextStream>
-
-// Names matching the enum
-static const char *serviceNamesC[] =
-{ "Locator", "RunControl", "Processes", "Memory", "Settings", "Breakpoints",
- "Registers", "Logging", "FileSystem", "SymbianInstall", "SymbianOSData",
- "DebugSessionControl",
- "UnknownService"};
-
-using namespace Json;
-namespace Coda {
-
-SYMBIANUTILS_EXPORT QString joinByteArrays(const QVector<QByteArray> &a, char sep)
-{
- QString rc;
- const int count = a.size();
- for (int i = 0; i < count; i++) {
- if (i)
- rc += QLatin1Char(sep);
- rc += QString::fromUtf8(a.at(i));
- }
- return rc;
-}
-
-static inline bool jsonToBool(const JsonValue& js)
-{
- return js.type() == JsonValue::Boolean && js.data() == "true";
-}
-
-SYMBIANUTILS_EXPORT const char *serviceName(Services s)
-{
- return serviceNamesC[s];
-}
-
-SYMBIANUTILS_EXPORT Services serviceFromName(const char *n)
-{
- const int count = sizeof(serviceNamesC)/sizeof(char *);
- for (int i = 0; i < count; i++)
- if (!qstrcmp(serviceNamesC[i], n))
- return static_cast<Services>(i);
- return UnknownService;
-}
-
-SYMBIANUTILS_EXPORT QString formatData(const QByteArray &a)
-{
- const int columns = 16;
- QString rc;
- QTextStream str(&rc);
- str.setIntegerBase(16);
- str.setPadChar(QLatin1Char('0'));
- const unsigned char *start = reinterpret_cast<const unsigned char *>(a.constData());
- const unsigned char *end = start + a.size();
- for (const unsigned char *p = start; p < end ; ) {
- str << "0x";
- str.setFieldWidth(4);
- str << (p - start);
- str.setFieldWidth(0);
- str << ' ';
- QString asc;
- int c = 0;
- for ( ; c < columns && p < end; c++, p++) {
- const unsigned u = *p;
- str.setFieldWidth(2);
- str << u;
- str.setFieldWidth(0);
- str << ' ';
- switch (u) {
- case '\n':
- asc += QLatin1String("\\n");
- break;
- case '\r':
- asc += QLatin1String("\\r");
- break;
- case '\t':
- asc += QLatin1String("\\t");
- break;
- default:
- if (u >= 32 && u < 128) {
- asc += QLatin1Char(' ');
- asc += QLatin1Char(u);
- } else {
- asc += QLatin1String(" .");
- }
- break;
- }
- }
- if (const int remainder = columns - c)
- str << QString(3 * remainder, QLatin1Char(' '));
- str << ' ' << asc << '\n';
- }
- return rc;
-}
-
-// ----------- RunControlContext
-RunControlContext::RunControlContext() :
- flags(0), resumeFlags(0)
-{
-}
-
-void RunControlContext::clear()
-{
- flags =0;
- resumeFlags = 0;
- id.clear();
- osid.clear();
- parentId.clear();
-}
-
-RunControlContext::Type RunControlContext::typeFromCodaId(const QByteArray &id)
-{
- // "p12" or "p12.t34"?
- return id.contains(".t") ? Thread : Process;
-}
-
-unsigned RunControlContext::processId() const
-{
- return processIdFromTcdfId(id);
-}
-
-unsigned RunControlContext::threadId() const
-{
- return threadIdFromTcdfId(id);
-}
-
-unsigned RunControlContext::processIdFromTcdfId(const QByteArray &id)
-{
- // Cut out process id from "p12" or "p12.t34"?
- if (!id.startsWith('p'))
- return 0;
- const int dotPos = id.indexOf('.');
- const int pLen = dotPos == -1 ? id.size() : dotPos;
- return id.mid(1, pLen - 1).toUInt();
-}
-
-unsigned RunControlContext::threadIdFromTcdfId(const QByteArray &id)
-{
- const int tPos = id.indexOf(".t");
- return tPos != -1 ? id.mid(tPos + 2).toUInt() : uint(0);
-}
-
-QByteArray RunControlContext::codaId(unsigned processId, unsigned threadId /* = 0 */)
-{
- QByteArray rc("p");
- rc += QByteArray::number(processId);
- if (threadId) {
- rc += ".t";
- rc += QByteArray::number(threadId);
- }
- return rc;
-}
-
-RunControlContext::Type RunControlContext::type() const
-{
- return RunControlContext::typeFromCodaId(id);
-}
-
-bool RunControlContext::parse(const JsonValue &val)
-{
- clear();
- if (val.type() != JsonValue::Object)
- return false;
- foreach(const JsonValue &c, val.children()) {
- if (c.name() == "ID") {
- id = c.data();
- } else if (c.name() == "OSID") {
- osid = c.data();
- } else if (c.name() == "ParentID") {
- parentId = c.data();
- } else if (c.name() == "IsContainer") {
- if (jsonToBool(c))
- flags |= Container;
- } else if (c.name() == "CanTerminate") {
- if (jsonToBool(c))
- flags |= CanTerminate;
- } else if (c.name() == "CanResume") {
- resumeFlags = c.data().toUInt();
- } else if (c.name() == "HasState") {
- if (jsonToBool(c))
- flags |= HasState;
- } else if (c.name() == "CanSuspend") {
- if (jsonToBool(c))
- flags |= CanSuspend;
- }
- }
- return true;
-}
-
-QString RunControlContext::toString() const
-{
- QString rc;
- QTextStream str(&rc);
- format(str);
- return rc;
-}
-
-void RunControlContext::format(QTextStream &str) const
-{
- str << " id='" << id << "' osid='" << osid
- << "' parentId='" << parentId <<"' ";
- if (flags & Container)
- str << "[container] ";
- if (flags & HasState)
- str << "[has state] ";
- if (flags & CanSuspend)
- str << "[can suspend] ";
- if (flags & CanSuspend)
- str << "[can terminate] ";
- str.setIntegerBase(16);
- str << " resume_flags: 0x" << resumeFlags;
- str.setIntegerBase(10);
-}
-
-// ------ ModuleLoadEventInfo
-ModuleLoadEventInfo::ModuleLoadEventInfo() :
- loaded(false), codeAddress(0), dataAddress(0), requireResume(false)
-{
-}
-
-void ModuleLoadEventInfo::clear()
-{
- loaded = requireResume = false;
- codeAddress = dataAddress =0;
-}
-
-bool ModuleLoadEventInfo::parse(const JsonValue &val)
-{
- clear();
- if (val.type() != JsonValue::Object)
- return false;
- foreach(const JsonValue &c, val.children()) {
- if (c.name() == "Name") {
- name = c.data();
- } else if (c.name() == "File") {
- file = c.data();
- } else if (c.name() == "CodeAddress") {
- codeAddress = c.data().toULongLong();
- } else if (c.name() == "DataAddress") {
- dataAddress = c.data().toULongLong();
- } else if (c.name() == "Loaded") {
- loaded = jsonToBool(c);
- } else if (c.name() == "RequireResume") {
- requireResume =jsonToBool(c);
- }
- }
- return true;
-}
-void ModuleLoadEventInfo::format(QTextStream &str) const
-{
- str << "name='" << name << "' file='" << file << "' " <<
- (loaded ? "[loaded] " : "[not loaded] ");
- if (requireResume)
- str << "[requires resume] ";
- str.setIntegerBase(16);
- str << " code: 0x" << codeAddress << " data: 0x" << dataAddress;
- str.setIntegerBase(10);
-}
-
-// ---------------------- Breakpoint
-
-// Types matching enum
-static const char *breakPointTypesC[] = {"Software", "Hardware", "Auto"};
-
-Breakpoint::Breakpoint(quint64 loc) :
- type(Auto), enabled(true), ignoreCount(0), location(loc), size(1), thumb(true)
-{
- if (loc)
- id = idFromLocation(location);
-}
-
-void Breakpoint::setContextId(unsigned processId, unsigned threadId)
-{
- contextIds = QVector<QByteArray>(1, RunControlContext::codaId(processId, threadId));
-}
-
-QByteArray Breakpoint::idFromLocation(quint64 loc)
-{
- return QByteArray("BP_0x") + QByteArray::number(loc, 16);
-}
-
-QString Breakpoint::toString() const
-{
- QString rc;
- QTextStream str(&rc);
- str.setIntegerBase(16);
- str << "Breakpoint '" << id << "' " << breakPointTypesC[type] << " for contexts '"
- << joinByteArrays(contextIds, ',') << "' at 0x" << location;
- str.setIntegerBase(10);
- str << " size " << size;
- if (enabled)
- str << " [enabled]";
- if (thumb)
- str << " [thumb]";
- if (ignoreCount)
- str << " IgnoreCount " << ignoreCount;
- return rc;
-}
-
-JsonInputStream &operator<<(JsonInputStream &str, const Breakpoint &b)
-{
- if (b.contextIds.isEmpty())
- qWarning("Coda::Breakpoint: No context ids specified");
-
- str << '{' << "ID" << ':' << QString::fromUtf8(b.id) << ','
- << "BreakpointType" << ':' << breakPointTypesC[b.type] << ','
- << "Enabled" << ':' << b.enabled << ','
- << "IgnoreCount" << ':' << b.ignoreCount << ','
- << "ContextIds" << ':' << b.contextIds << ','
- << "Location" << ':' << QString::number(b.location) << ','
- << "Size" << ':' << b.size << ','
- << "THUMB_BREAKPOINT" << ':' << b.thumb
- << '}';
- return str;
-}
-
-// --- Events
-CodaEvent::CodaEvent(Type type) : m_type(type)
-{
-}
-
-CodaEvent::~CodaEvent()
-{
-}
-
-CodaEvent::Type CodaEvent::type() const
-{
- return m_type;
-}
-
-QString CodaEvent::toString() const
-{
- return QString();
-}
-
-static const char sharedLibrarySuspendReasonC[] = "Shared Library";
-
-CodaEvent *CodaEvent::parseEvent(Services s, const QByteArray &nameBA, const QVector<JsonValue> &values)
-{
- switch (s) {
- case LocatorService:
- if (nameBA == "Hello" && values.size() == 1 && values.front().type() == JsonValue::Array) {
- QStringList services;
- foreach (const JsonValue &jv, values.front().children())
- services.push_back(QString::fromUtf8(jv.data()));
- return new CodaLocatorHelloEvent(services);
- }
- break;
- case RunControlService:
- if (values.empty())
- return 0;
- // "id/PC/Reason/Data"
- if (nameBA == "contextSuspended" && values.size() == 4) {
- const QByteArray idBA = values.at(0).data();
- const quint64 pc = values.at(1).data().toULongLong();
- const QByteArray reasonBA = values.at(2).data();
- QByteArray messageBA;
- // Module load: Special
- if (reasonBA == sharedLibrarySuspendReasonC) {
- ModuleLoadEventInfo info;
- if (!info.parse(values.at(3)))
- return 0;
- return new CodaRunControlModuleLoadContextSuspendedEvent(idBA, reasonBA, pc, info);
- } else {
- // hash containing a 'message'-key with a verbose crash message.
- if (values.at(3).type() == JsonValue::Object && values.at(3).childCount()
- && values.at(3).children().at(0).type() == JsonValue::String)
- messageBA = values.at(3).children().at(0).data();
- }
- return new CodaRunControlContextSuspendedEvent(idBA, reasonBA, messageBA, pc);
- } // "contextSuspended"
- if (nameBA == "contextAdded")
- return CodaRunControlContextAddedEvent::parseEvent(values);
- if (nameBA == "contextRemoved" && values.front().type() == JsonValue::Array) {
- QVector<QByteArray> ids;
- foreach(const JsonValue &c, values.front().children())
- ids.push_back(c.data());
- return new CodaRunControlContextRemovedEvent(ids);
- }
- break;
- case LoggingService:
- if ((nameBA == "writeln" || nameBA == "write" /*not yet used*/) && values.size() >= 2)
- return new CodaLoggingWriteEvent(values.at(0).data(), values.at(1).data());
- break;
- case ProcessesService:
- if (nameBA == "exited" && values.size() >= 2)
- return new CodaProcessExitedEvent(values.at(0).data());
- break;
- default:
- break;
- }
- return 0;
-}
-
-// -------------- CodaServiceHelloEvent
-CodaLocatorHelloEvent::CodaLocatorHelloEvent(const QStringList &s) :
- CodaEvent(LocatorHello),
- m_services(s)
-{
-}
-
-QString CodaLocatorHelloEvent::toString() const
-{
- return QLatin1String("ServiceHello: ") + m_services.join(QLatin1String(", "));
-}
-
-// -------------- Logging event
-
-CodaLoggingWriteEvent::CodaLoggingWriteEvent(const QByteArray &console, const QByteArray &message) :
- CodaEvent(LoggingWriteEvent), m_console(console), m_message(message)
-{
-}
-
-QString CodaLoggingWriteEvent::toString() const
-{
- return QString::fromUtf8(m_message);
-}
-
-// -------------- CodaIdEvent
-CodaIdEvent::CodaIdEvent(Type t, const QByteArray &id) :
- CodaEvent(t), m_id(id)
-{
-}
-
-// ---------- CodaIdsEvent
-CodaIdsEvent::CodaIdsEvent(Type t, const QVector<QByteArray> &ids) :
- CodaEvent(t), m_ids(ids)
-{
-}
-
-QString CodaIdsEvent::joinedIdString(const char sep) const
-{
- return joinByteArrays(m_ids, sep);
-}
-
-// ---------------- CodaRunControlContextAddedEvent
-CodaRunControlContextAddedEvent::CodaRunControlContextAddedEvent(const RunControlContexts &c) :
- CodaEvent(RunControlContextAdded), m_contexts(c)
-{
-}
-
-CodaRunControlContextAddedEvent
- *CodaRunControlContextAddedEvent::parseEvent(const QVector<JsonValue> &values)
-{
- // Parse array of contexts
- if (values.size() < 1 || values.front().type() != JsonValue::Array)
- return 0;
-
- RunControlContexts contexts;
- foreach (const JsonValue &v, values.front().children()) {
- RunControlContext context;
- if (context.parse(v))
- contexts.push_back(context);
- }
- return new CodaRunControlContextAddedEvent(contexts);
-}
-
-QString CodaRunControlContextAddedEvent::toString() const
-{
- QString rc;
- QTextStream str(&rc);
- str << "RunControl: " << m_contexts.size() << " context(s) "
- << (type() == RunControlContextAdded ? "added" : "removed")
- << '\n';
- foreach (const RunControlContext &c, m_contexts) {
- c.format(str);
- str << '\n';
- }
- return rc;
-}
-
-// --------------- CodaRunControlContextRemovedEvent
-CodaRunControlContextRemovedEvent::CodaRunControlContextRemovedEvent(const QVector<QByteArray> &ids) :
- CodaIdsEvent(RunControlContextRemoved, ids)
-{
-}
-
-QString CodaRunControlContextRemovedEvent::toString() const
-{
- return QLatin1String("RunControl: Removed contexts '") + joinedIdString() + ("'.");
-}
-
-// --------------- CodaRunControlContextSuspendedEvent
-CodaRunControlContextSuspendedEvent::CodaRunControlContextSuspendedEvent(const QByteArray &id,
- const QByteArray &reason,
- const QByteArray &message,
- quint64 pc) :
- CodaIdEvent(RunControlSuspended, id), m_pc(pc), m_reason(reason), m_message(message)
-{
-}
-
-CodaRunControlContextSuspendedEvent::CodaRunControlContextSuspendedEvent(Type t,
- const QByteArray &id,
- const QByteArray &reason,
- quint64 pc) :
- CodaIdEvent(t, id), m_pc(pc), m_reason(reason)
-{
-}
-
-void CodaRunControlContextSuspendedEvent::format(QTextStream &str) const
-{
- str.setIntegerBase(16);
- str << "RunControl: '" << idString() << "' suspended at 0x"
- << m_pc << ": '" << m_reason << "'.";
- str.setIntegerBase(10);
- if (!m_message.isEmpty())
- str << " (" <<m_message << ')';
-}
-
-QString CodaRunControlContextSuspendedEvent::toString() const
-{
- QString rc;
- QTextStream str(&rc);
- format(str);
- return rc;
-}
-
-CodaRunControlContextSuspendedEvent::Reason CodaRunControlContextSuspendedEvent::reason() const
-{
- if (m_reason == sharedLibrarySuspendReasonC)
- return ModuleLoad;
- if (m_reason == "Breakpoint")
- return BreakPoint;
- // 'Data abort exception'/'Thread has panicked' ... unfortunately somewhat unspecific.
- if (m_reason.contains("Exception") || m_reason.contains("panick"))
- return Crash;
- return Other;
-}
-
-CodaRunControlModuleLoadContextSuspendedEvent::CodaRunControlModuleLoadContextSuspendedEvent(const QByteArray &id,
- const QByteArray &reason,
- quint64 pc,
- const ModuleLoadEventInfo &mi) :
- CodaRunControlContextSuspendedEvent(RunControlModuleLoadSuspended, id, reason, pc),
- m_mi(mi)
-{
-}
-
-QString CodaRunControlModuleLoadContextSuspendedEvent::toString() const
-{
- QString rc;
- QTextStream str(&rc);
- CodaRunControlContextSuspendedEvent::format(str);
- str << ' ';
- m_mi.format(str);
- return rc;
-}
-
-// -------------- CodaIdEvent
-CodaProcessExitedEvent::CodaProcessExitedEvent(const QByteArray &id) :
- CodaEvent(ProcessExitedEvent), m_id(id)
-{
-}
-
-QString CodaProcessExitedEvent::toString() const
-{
- return QString("Process \"%1\" exited").arg(idString());
-}
-
-} // namespace Coda
diff --git a/src/shared/symbianutils/codamessage.h b/src/shared/symbianutils/codamessage.h
deleted file mode 100644
index 27a106c239..0000000000
--- a/src/shared/symbianutils/codamessage.h
+++ /dev/null
@@ -1,327 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef CODAMESSAGE_H
-#define CODAMESSAGE_H
-
-#include "symbianutils_global.h"
-#include "json_global.h"
-
-#include <QStringList>
-#include <QVector>
-
-QT_BEGIN_NAMESPACE
-class QTextStream;
-QT_END_NAMESPACE
-
-namespace Json {
-class JsonValue;
-class JsonInputStream;
-}
-
-namespace Coda {
-
-enum Services {
- LocatorService,
- RunControlService,
- ProcessesService,
- MemoryService,
- SettingsService, // non-standard, CODA specific
- BreakpointsService,
- RegistersService,
- LoggingService, // non-standard, CODA specific
- FileSystemService,
- SymbianInstallService, // non-standard, CODA specific
- SymbianOSData, // non-standard, CODA specific
- DebugSessionControl, // non-standard, CODA specific
- UnknownService
-}; // Note: Check string array 'serviceNamesC' of same size when modifying this.
-
-// Modes of RunControl/'Resume' (see EDF documentation).
-// As of 24.6.2010, RM_RESUME, RM_STEP_OVER, RM_STEP_INTO,
-// RM_STEP_OVER_RANGE, RM_STEP_INTO_RANGE are supported with
-// RANG_START/RANGE_END parameters.
-enum RunControlResumeMode {
- RM_RESUME = 0,
- RM_STEP_OVER = 1, RM_STEP_INTO = 2,
- RM_STEP_OVER_LINE = 3, RM_STEP_INTO_LINE = 4,
- RM_STEP_OUT = 5, RM_REVERSE_RESUME = 6,
- RM_REVERSE_STEP_OVER = 7, RM_REVERSE_STEP_INTO = 8,
- RM_REVERSE_STEP_OVER_LINE = 9, RM_REVERSE_STEP_INTO_LINE = 10,
- RM_REVERSE_STEP_OUT = 11, RM_STEP_OVER_RANGE = 12,
- RM_STEP_INTO_RANGE = 13, RM_REVERSE_STEP_OVER_RANGE = 14,
- RM_REVERSE_STEP_INTO_RANGE = 15
-};
-
-SYMBIANUTILS_EXPORT const char *serviceName(Services s);
-SYMBIANUTILS_EXPORT Services serviceFromName(const char *);
-
-// Debug helpers
-SYMBIANUTILS_EXPORT QString formatData(const QByteArray &a);
-SYMBIANUTILS_EXPORT QString joinByteArrays(const QVector<QByteArray> &a, char sep = ',');
-
-// Context used in 'RunControl contextAdded' events and in reply
-// to 'Processes start'. Could be thread or process.
-struct SYMBIANUTILS_EXPORT RunControlContext {
- enum Flags {
- Container = 0x1, HasState = 0x2, CanSuspend = 0x4,
- CanTerminate = 0x8
- };
- enum Type { Process, Thread };
-
- RunControlContext();
- Type type() const;
- unsigned processId() const;
- unsigned threadId() const;
-
- void clear();
- bool parse(const Json::JsonValue &v);
- void format(QTextStream &str) const;
- QString toString() const;
-
- // Helper for converting the CODA ids ("p12" or "p12.t34")
- static Type typeFromCodaId(const QByteArray &id);
- static unsigned processIdFromTcdfId(const QByteArray &id);
- static unsigned threadIdFromTcdfId(const QByteArray &id);
- static QByteArray codaId(unsigned processId, unsigned threadId = 0);
-
- unsigned flags;
- unsigned resumeFlags;
- QByteArray id; // "p434.t699"
- QByteArray osid; // Non-standard: Process or thread id
- QByteArray parentId; // Parent process id of a thread.
-};
-
-// Module load information occurring with 'RunControl contextSuspended' events
-struct SYMBIANUTILS_EXPORT ModuleLoadEventInfo {
- ModuleLoadEventInfo();
- void clear();
- bool parse(const Json::JsonValue &v);
- void format(QTextStream &str) const;
-
- QByteArray name;
- QByteArray file;
- bool loaded;
- quint64 codeAddress;
- quint64 dataAddress;
- bool requireResume;
-};
-
-// Breakpoint as supported by Coda source June 2010
-// TODO: Add watchpoints,etc once they are implemented
-struct SYMBIANUTILS_EXPORT Breakpoint {
- enum Type { Software, Hardware, Auto };
-
- explicit Breakpoint(quint64 loc = 0);
- void setContextId(unsigned processId, unsigned threadId = 0);
- QString toString() const;
-
- static QByteArray idFromLocation(quint64 loc); // Automagically determine from location
-
- Type type;
- bool enabled;
- int ignoreCount;
- QVector<QByteArray> contextIds; // Process or thread ids.
- QByteArray id; // Id of the breakpoint;
- quint64 location;
- unsigned size;
- bool thumb;
-};
-
-Json::JsonInputStream &operator<<(Json::JsonInputStream &str, const Breakpoint &b);
-
-// Event hierarchy
-class SYMBIANUTILS_EXPORT CodaEvent
-{
- Q_DISABLE_COPY(CodaEvent)
-
-public:
- enum Type { None,
- LocatorHello,
- RunControlContextAdded,
- RunControlContextRemoved,
- RunControlSuspended,
- RunControlBreakpointSuspended,
- RunControlModuleLoadSuspended,
- RunControlResumed,
- LoggingWriteEvent, // Non-standard
- ProcessExitedEvent // Non-standard
- };
-
- virtual ~CodaEvent();
-
- Type type() const;
- virtual QString toString() const;
-
- static CodaEvent *parseEvent(Services s, const QByteArray &name, const QVector<Json::JsonValue> &val);
-
-protected:
- explicit CodaEvent(Type type = None);
-
-private:
- const Type m_type;
-};
-
-// ServiceHello
-class SYMBIANUTILS_EXPORT CodaLocatorHelloEvent : public CodaEvent {
-public:
- explicit CodaLocatorHelloEvent(const QStringList &);
-
- const QStringList &services() const { return m_services; }
- virtual QString toString() const;
-
-private:
- QStringList m_services;
-};
-
-// Logging event (non-standard, CODA specific)
-class SYMBIANUTILS_EXPORT CodaLoggingWriteEvent : public CodaEvent {
-public:
- explicit CodaLoggingWriteEvent(const QByteArray &console, const QByteArray &message);
-
- QByteArray message() const { return m_message; }
- QByteArray console() const { return m_console; }
-
- virtual QString toString() const;
-
-private:
- const QByteArray m_console;
- const QByteArray m_message;
-};
-
-// Base for events that just have one id as parameter
-// (simple suspend)
-class SYMBIANUTILS_EXPORT CodaIdEvent : public CodaEvent {
-protected:
- explicit CodaIdEvent(Type t, const QByteArray &id);
-public:
- QByteArray id() const { return m_id; }
- QString idString() const { return QString::fromUtf8(m_id); }
-
-private:
- const QByteArray m_id;
-};
-
-// Base for events that just have some ids as parameter
-// (context removed)
-class SYMBIANUTILS_EXPORT CodaIdsEvent : public CodaEvent {
-protected:
- explicit CodaIdsEvent(Type t, const QVector<QByteArray> &ids);
-
-public:
- QVector<QByteArray> ids() const { return m_ids; }
- QString joinedIdString(const char sep = ',') const;
-
-private:
- const QVector<QByteArray> m_ids;
-};
-
-// RunControlContextAdded
-class SYMBIANUTILS_EXPORT CodaRunControlContextAddedEvent : public CodaEvent {
-public:
- typedef QVector<RunControlContext> RunControlContexts;
-
- explicit CodaRunControlContextAddedEvent(const RunControlContexts &c);
-
- const RunControlContexts &contexts() const { return m_contexts; }
- virtual QString toString() const;
-
- static CodaRunControlContextAddedEvent *parseEvent(const QVector<Json::JsonValue> &val);
-
-private:
- const RunControlContexts m_contexts;
-};
-
-// RunControlContextRemoved
-class SYMBIANUTILS_EXPORT CodaRunControlContextRemovedEvent : public CodaIdsEvent {
-public:
- explicit CodaRunControlContextRemovedEvent(const QVector<QByteArray> &id);
- virtual QString toString() const;
-};
-
-// Simple RunControlContextSuspended (process/thread)
-class SYMBIANUTILS_EXPORT CodaRunControlContextSuspendedEvent : public CodaIdEvent {
-public:
- enum Reason { BreakPoint, ModuleLoad, Crash, Other } ;
-
- explicit CodaRunControlContextSuspendedEvent(const QByteArray &id,
- const QByteArray &reason,
- const QByteArray &message,
- quint64 pc = 0);
- virtual QString toString() const;
-
- quint64 pc() const { return m_pc; }
- QByteArray reasonID() const { return m_reason; }
- Reason reason() const;
- QByteArray message() const { return m_message; }
-
-protected:
- explicit CodaRunControlContextSuspendedEvent(Type t,
- const QByteArray &id,
- const QByteArray &reason,
- quint64 pc = 0);
- void format(QTextStream &str) const;
-
-private:
- const quint64 m_pc;
- const QByteArray m_reason;
- const QByteArray m_message;
-};
-
-// RunControlContextSuspended due to module load
-class SYMBIANUTILS_EXPORT CodaRunControlModuleLoadContextSuspendedEvent : public CodaRunControlContextSuspendedEvent {
-public:
- explicit CodaRunControlModuleLoadContextSuspendedEvent(const QByteArray &id,
- const QByteArray &reason,
- quint64 pc,
- const ModuleLoadEventInfo &mi);
-
- virtual QString toString() const;
- const ModuleLoadEventInfo &info() const { return m_mi; }
-
-private:
- const ModuleLoadEventInfo m_mi;
-};
-
-// Process exited event
-class SYMBIANUTILS_EXPORT CodaProcessExitedEvent : public CodaEvent {
-public:
- explicit CodaProcessExitedEvent(const QByteArray &id);
-
- QByteArray id() const { return m_id; }
- QString idString() const { return QString::fromUtf8(m_id); }
- virtual QString toString() const;
-
-private:
- const QByteArray m_id;
-};
-
-} // namespace Coda
-#endif // CODAMESSAGE_H
diff --git a/src/shared/symbianutils/codautils.cpp b/src/shared/symbianutils/codautils.cpp
deleted file mode 100644
index b8588542ea..0000000000
--- a/src/shared/symbianutils/codautils.cpp
+++ /dev/null
@@ -1,591 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "codautils.h"
-#include <ctype.h>
-
-#include <QCoreApplication>
-#include <QDebug>
-#include <QDate>
-#include <QDateTime>
-#include <QTime>
-
-#define logMessage(s) do { qDebug() << "CODACLIENT: " << s; } while (0)
-
-namespace Coda {
-
-Library::Library() : codeseg(0), dataseg(0), pid(0)
-{
-}
-
-Library::Library(const CodaResult &result) : codeseg(0), dataseg(0), pid(0)
-{
- if (result.data.size() < 20) {
- qWarning("Invalid CODA creation notification received.");
- return;
- }
-
- const char *data = result.data.constData();
- pid = extractInt(data + 2);
- codeseg = extractInt(data + 10);
- dataseg = extractInt(data + 14);
- const uint len = extractShort(data + 18);
- name = result.data.mid(20, len);
-}
-
-CodaAppVersion::CodaAppVersion()
-{
- reset();
-}
-
-void CodaAppVersion::reset()
-{
- codaMajor = codaMinor = protocolMajor = protocolMinor = 0;
-}
-
-Session::Session()
-{
- reset();
-}
-
-void Session::reset()
-{
- cpuMajor = 0;
- cpuMinor = 0;
- bigEndian = 0;
- defaultTypeSize = 0;
- fpTypeSize = 0;
- extended1TypeSize = 0;
- extended2TypeSize = 0;
- pid = 0;
- mainTid = 0;
- tid = 0;
- codeseg = 0;
- dataseg = 0;
-
- libraries.clear();
- codaAppVersion.reset();
-}
-
-static QString formatCpu(int major, int minor)
-{
- //: CPU description of an S60 device
- //: %1 major verison, %2 minor version
- //: %3 real name of major verison, %4 real name of minor version
- const QString str = QCoreApplication::translate("Coda::Session", "CPU: v%1.%2%3%4");
- QString majorStr;
- QString minorStr;
- switch (major) {
- case 0x04:
- majorStr = " ARM";
- break;
- }
- switch (minor) {
- case 0x00:
- minorStr = " 920T";
- break;
- }
- return str.arg(major).arg(minor).arg(majorStr).arg(minorStr);
- }
-
-QString formatCodaVersion(const CodaAppVersion &version)
-{
- QString str = QCoreApplication::translate("Coda::Session",
- "CODA: v%1.%2 CODA protocol: v%3.%4");
- str = str.arg(version.codaMajor).arg(version.codaMinor);
- return str.arg(version.protocolMajor).arg(version.protocolMinor);
-}
-
-QString Session::deviceDescription(unsigned verbose) const
-{
- if (!cpuMajor)
- return QString();
-
- //: s60description
- //: description of an S60 device
- //: %1 CPU description, %2 endianness
- //: %3 default type size (if any), %4 float size (if any)
- //: %5 Coda version
- QString msg = QCoreApplication::translate("Coda::Session", "%1, %2%3%4, %5");
- QString endianness = bigEndian
- ? QCoreApplication::translate("Coda::Session", "big endian")
- : QCoreApplication::translate("Coda::Session", "little endian");
- msg = msg.arg(formatCpu(cpuMajor, cpuMinor)).arg(endianness);
- QString defaultTypeSizeStr;
- QString fpTypeSizeStr;
- if (verbose && defaultTypeSize)
- //: will be inserted into s60description
- defaultTypeSizeStr = QCoreApplication::translate("Coda::Session", ", type size: %1").arg(defaultTypeSize);
- if (verbose && fpTypeSize)
- //: will be inserted into s60description
- fpTypeSizeStr = QCoreApplication::translate("Coda::Session", ", float size: %1").arg(fpTypeSize);
- msg = msg.arg(defaultTypeSizeStr).arg(fpTypeSizeStr);
- return msg.arg(formatCodaVersion(codaAppVersion));
-}
-
-QByteArray Session::gdbLibraryList() const
-{
- const int count = libraries.size();
- QByteArray response = "l<library-list>";
- for (int i = 0; i != count; ++i) {
- const Coda::Library &lib = libraries.at(i);
- response += "<library name=\"";
- response += lib.name;
- response += "\">";
- response += "<section address=\"0x";
- response += Coda::hexNumber(lib.codeseg);
- response += "\"/>";
- response += "<section address=\"0x";
- response += Coda::hexNumber(lib.dataseg);
- response += "\"/>";
- response += "<section address=\"0x";
- response += Coda::hexNumber(lib.dataseg);
- response += "\"/>";
- response += "</library>";
- }
- response += "</library-list>";
- return response;
-}
-
-QByteArray Session::gdbQsDllInfo(int start, int count) const
-{
- // Happens with gdb 6.4.50.20060226-cvs / CodeSourcery.
- // Never made it into FSF gdb that got qXfer:libraries:read instead.
- // http://sourceware.org/ml/gdb/2007-05/msg00038.html
- // Name=hexname,TextSeg=textaddr[,DataSeg=dataaddr]
- const int libraryCount = libraries.size();
- const int end = count < 0 ? libraryCount : qMin(libraryCount, start + count);
- QByteArray response(1, end == libraryCount ? 'l' : 'm');
- for (int i = start; i < end; ++i) {
- if (i != start)
- response += ';';
- const Library &lib = libraries.at(i);
- response += "Name=";
- response += lib.name.toHex();
- response += ",TextSeg=";
- response += hexNumber(lib.codeseg);
- response += ",DataSeg=";
- response += hexNumber(lib.dataseg);
- }
- return response;
-}
-
-QString Session::toString() const
-{
- QString rc;
- QTextStream str(&rc);
- str << "Session: " << deviceDescription(false) << '\n'
- << "pid: " << pid << "main thread: " << mainTid
- << " current thread: " << tid << ' ';
- str.setIntegerBase(16);
- str << " code: 0x" << codeseg << " data: 0x" << dataseg << '\n';
- if (const int libCount = libraries.size()) {
- str << "Libraries:\n";
- for (int i = 0; i < libCount; i++)
- str << " #" << i << ' ' << libraries.at(i).name
- << " code: 0x" << libraries.at(i).codeseg
- << " data: 0x" << libraries.at(i).dataseg << '\n';
- }
- if (const int moduleCount = modules.size()) {
- str << "Modules:\n";
- for (int i = 0; i < moduleCount; i++)
- str << " #" << i << ' ' << modules.at(i) << '\n';
- }
- str.setIntegerBase(10);
- if (!addressToBP.isEmpty()) {
- typedef QHash<uint, uint>::const_iterator BP_ConstIterator;
- str << "Breakpoints:\n";
- const BP_ConstIterator cend = addressToBP.constEnd();
- for (BP_ConstIterator it = addressToBP.constBegin(); it != cend; ++it) {
- str.setIntegerBase(16);
- str << " 0x" << it.key();
- str.setIntegerBase(10);
- str << ' ' << it.value() << '\n';
- }
- }
-
- return rc;
-}
-
-// --------------
-
-QByteArray decode7d(const QByteArray &ba)
-{
- QByteArray res;
- res.reserve(ba.size());
- for (int i = 0; i < ba.size(); ++i) {
- byte c = byte(ba.at(i));
- if (c == 0x7d) {
- ++i;
- c = 0x20 ^ byte(ba.at(i));
- }
- res.append(c);
- }
- return res;
-}
-
-QByteArray encode7d(const QByteArray &ba)
-{
- QByteArray res;
- res.reserve(ba.size() + 2);
- for (int i = 0; i < ba.size(); ++i) {
- byte c = byte(ba.at(i));
- if (c == 0x7e || c == 0x7d) {
- res.append(0x7d);
- res.append(0x20 ^ c);
- } else {
- res.append(c);
- }
- }
- return res;
-}
-
-// FIXME: Use the QByteArray based version below?
-static inline QString stringFromByte(byte c)
-{
- return QString::fromLatin1("%1").arg(c, 2, 16, QChar('0'));
-}
-
-SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen)
-{
- QString str;
- QString ascii;
- const int size = maxLen == -1 ? ba.size() : qMin(ba.size(), maxLen);
- for (int i = 0; i < size; ++i) {
- const int c = byte(ba.at(i));
- str += QString::fromAscii("%1 ").arg(c, 2, 16, QChar('0'));
- ascii += QChar(c).isPrint() ? QChar(c) : QChar('.');
- }
- if (size != ba.size()) {
- str += QLatin1String("...");
- ascii += QLatin1String("...");
- }
- return str + QLatin1String(" ") + ascii;
-}
-
-SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits)
-{
- QByteArray ba = QByteArray::number(n, 16);
- if (digits == 0 || ba.size() == digits)
- return ba;
- return QByteArray(digits - ba.size(), '0') + ba;
-}
-
-SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits)
-{
- return "0x" + hexNumber(n, digits);
-}
-
-CodaResult::CodaResult() :
- code(0),
- token(0),
- isDebugOutput(false)
-{
-}
-
-void CodaResult::clear()
-{
- code = token= 0;
- isDebugOutput = false;
- data.clear();
- cookie = QVariant();
-}
-
-QString CodaResult::toString() const
-{
- QString res = stringFromByte(code);
- res += QLatin1String(" [");
- res += stringFromByte(token);
- res += QLatin1Char(']');
- res += QLatin1Char(' ');
- res += stringFromArray(data);
- return res;
-}
-
-QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame)
-{
- byte s = command + token;
- for (int i = 0; i != data.size(); ++i)
- s += data.at(i);
- byte checksum = 255 - (s & 0xff);
- //int x = s + ~s;
- //logMessage("check: " << s << checksum << x;
-
- QByteArray response;
- response.reserve(data.size() + 3);
- response.append(char(command));
- response.append(char(token));
- response.append(data);
- response.append(char(checksum));
-
- QByteArray encodedData = encode7d(response);
-
- QByteArray ba;
- ba.reserve(encodedData.size() + 6);
- if (serialFrame) {
- ba.append(char(0x01));
- ba.append(char(0x90));
- const ushort encodedSize = encodedData.size() + 2; // 2 x 0x7e
- appendShort(&ba, encodedSize, BigEndian);
- }
- ba.append(char(0x7e));
- ba.append(encodedData);
- ba.append(char(0x7e));
-
- return ba;
-}
-
-/* returns 0 if array doesn't represent a result,
-otherwise returns the length of the result data */
-ushort isValidCodaResult(const QByteArray &buffer, bool serialFrame, ushort& mux)
-{
- if (serialFrame) {
- // Serial protocol with length info
- if (buffer.length() < 4)
- return 0;
- mux = extractShort(buffer.data());
- const ushort len = extractShort(buffer.data() + 2);
- return (buffer.size() >= len + 4) ? len : ushort(0);
- }
- // Frameless protocol without length info
- const char delimiter = char(0x7e);
- const int firstDelimiterPos = buffer.indexOf(delimiter);
- // Regular message delimited by 0x7e..0x7e
- if (firstDelimiterPos == 0) {
- mux = MuxCoda;
- const int endPos = buffer.indexOf(delimiter, firstDelimiterPos + 1);
- return endPos != -1 ? endPos + 1 - firstDelimiterPos : 0;
- }
- // Some ASCII log message up to first delimiter or all
- return firstDelimiterPos != -1 ? firstDelimiterPos : buffer.size();
-}
-
-bool extractResult(QByteArray *buffer, bool serialFrame, CodaResult *result, bool &linkEstablishmentMode, QByteArray *rawData)
-{
- result->clear();
- if(rawData)
- rawData->clear();
- ushort len = isValidCodaResult(*buffer, serialFrame, result->multiplex);
- // handle receiving application output, which is not a regular command
- const int delimiterPos = serialFrame ? 4 : 0;
- if (linkEstablishmentMode) {
- //when "hot connecting" a device, we can receive partial frames.
- //this code resyncs by discarding data until a CODA frame is found
- while (buffer->length() > delimiterPos
- && result->multiplex != MuxTextTrace
- && !(result->multiplex == MuxCoda && buffer->at(delimiterPos) == 0x7e)) {
- buffer->remove(0,1);
- len = isValidCodaResult(*buffer, serialFrame, result->multiplex);
- }
- }
- if (!len)
- return false;
- if (buffer->at(delimiterPos) != 0x7e) {
- result->isDebugOutput = true;
- result->data = buffer->mid(delimiterPos, len);
- buffer->remove(0, delimiterPos + len);
- return true;
- }
- // FIXME: what happens if the length contains 0xfe?
- // Assume for now that it passes unencoded!
- const QByteArray data = decode7d(buffer->mid(delimiterPos + 1, len - 2));
- if(rawData)
- *rawData = data;
- buffer->remove(0, delimiterPos + len);
-
- byte sum = 0;
- for (int i = 0; i < data.size(); ++i) // 3 = 2 * 0xfe + sum
- sum += byte(data.at(i));
- if (sum != 0xff)
- logMessage("*** CHECKSUM ERROR: " << byte(sum));
-
- result->code = data.at(0);
- result->token = data.at(1);
- result->data = data.mid(2, data.size() - 3);
- //logMessage(" REST BUF: " << stringFromArray(*buffer));
- //logMessage(" CURR DATA: " << stringFromArray(data));
- //QByteArray prefix = "READ BUF: ";
- //logMessage((prefix + "HEADER: " + stringFromArray(header).toLatin1()).data());
- linkEstablishmentMode = false; //have received a good CODA packet, therefore in sync
- return true;
-}
-
-SYMBIANUTILS_EXPORT ushort extractShort(const char *data)
-{
- return byte(data[0]) * 256 + byte(data[1]);
-}
-
-SYMBIANUTILS_EXPORT uint extractInt(const char *data)
-{
- uint res = byte(data[0]);
- res *= 256; res += byte(data[1]);
- res *= 256; res += byte(data[2]);
- res *= 256; res += byte(data[3]);
- return res;
-}
-
-SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data)
-{
- quint64 res = byte(data[0]);
- res <<= 8; res += byte(data[1]);
- res <<= 8; res += byte(data[2]);
- res <<= 8; res += byte(data[3]);
- res <<= 8; res += byte(data[4]);
- res <<= 8; res += byte(data[5]);
- res <<= 8; res += byte(data[6]);
- res <<= 8; res += byte(data[7]);
- return res;
-}
-
-SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba)
-{
- QString res;
- char buf[10];
- for (int i = 0, n = ba.size(); i != n; ++i) {
- const byte c = ba.at(i);
- if (isprint(c)) {
- res += c;
- } else {
- qsnprintf(buf, sizeof(buf) - 1, "\\%x", int(c));
- res += buf;
- }
- }
- return res;
-}
-
-SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness endian)
-{
- if (endian == BigEndian) {
- ba->append(s / 256);
- ba->append(s % 256);
- } else {
- ba->append(s % 256);
- ba->append(s / 256);
- }
-}
-
-SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness endian)
-{
- const uchar b3 = i % 256; i /= 256;
- const uchar b2 = i % 256; i /= 256;
- const uchar b1 = i % 256; i /= 256;
- const uchar b0 = i;
- ba->reserve(ba->size() + 4);
- if (endian == BigEndian) {
- ba->append(b0);
- ba->append(b1);
- ba->append(b2);
- ba->append(b3);
- } else {
- ba->append(b3);
- ba->append(b2);
- ba->append(b1);
- ba->append(b0);
- }
-}
-
-void appendString(QByteArray *ba, const QByteArray &str, Endianness endian, bool appendNullTerminator)
-{
- const int fullSize = str.size() + (appendNullTerminator ? 1 : 0);
- appendShort(ba, fullSize, endian); // count the terminating \0
- ba->append(str);
- if (appendNullTerminator)
- ba->append('\0');
-}
-
-void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness endian)
-{
- // convert the QDateTime to UTC and append its representation to QByteArray
- // format is the same as in FAT file system
- dateTime = dateTime.toUTC();
- const QTime utcTime = dateTime.time();
- const QDate utcDate = dateTime.date();
- uint fatDateTime = (utcTime.hour() << 11 | utcTime.minute() << 5 | utcTime.second()/2) << 16;
- fatDateTime |= (utcDate.year()-1980) << 9 | utcDate.month() << 5 | utcDate.day();
- appendInt(ba, fatDateTime, endian);
-}
-
-QByteArray errorMessage(byte code)
-{
- switch (code) {
- case 0x00: return "No error";
- case 0x01: return "Generic error in CWDS message";
- case 0x02: return "Unexpected packet size in send msg";
- case 0x03: return "Internal error occurred in CWDS";
- case 0x04: return "Escape followed by frame flag";
- case 0x05: return "Bad FCS in packet";
- case 0x06: return "Packet too long";
- case 0x07: return "Sequence ID not expected (gap in sequence)";
-
- case 0x10: return "Command not supported";
- case 0x11: return "Command param out of range";
- case 0x12: return "An option was not supported";
- case 0x13: return "Read/write to invalid memory";
- case 0x14: return "Read/write invalid registers";
- case 0x15: return "Exception occurred in CWDS";
- case 0x16: return "Targeted system or thread is running";
- case 0x17: return "Breakpoint resources (HW or SW) exhausted";
- case 0x18: return "Requested breakpoint conflicts with existing one";
-
- case 0x20: return "General OS-related error";
- case 0x21: return "Request specified invalid process";
- case 0x22: return "Request specified invalid thread";
- }
- return "Unknown error";
-}
-
-uint swapEndian(uint in)
-{
- return (in>>24) | ((in<<8) & 0x00FF0000) | ((in>>8) & 0x0000FF00) | (in<<24);
-}
-
-int CodaResult::errorCode() const
-{
- // NAK means always error, else data sized 1 with a non-null element
- const bool isNAK = code == 0xff;
- if (data.size() != 1 && !isNAK)
- return 0;
- if (const int errorCode = data.at(0))
- return errorCode;
- return isNAK ? 0xff : 0;
-}
-
-QString CodaResult::errorString() const
-{
- // NAK means always error, else data sized 1 with a non-null element
- if (code == 0xff)
- return "NAK";
- if (data.size() < 1)
- return "Unknown error packet";
- return errorMessage(data.at(0));
-}
-
-} // namespace Coda
-
diff --git a/src/shared/symbianutils/codautils.h b/src/shared/symbianutils/codautils.h
deleted file mode 100644
index c1f1d86243..0000000000
--- a/src/shared/symbianutils/codautils.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef DEBUGGER_CODA_UTILS
-#define DEBUGGER_CODA_UTILS
-
-#include "symbianutils_global.h"
-
-#include <QByteArray>
-#include <QHash>
-#include <QStringList>
-#include <QVariant>
-
-QT_BEGIN_NAMESPACE
-class QDateTime;
-QT_END_NAMESPACE
-
-namespace Coda {
-
-typedef unsigned char byte;
-struct CodaResult;
-
-enum SerialMultiplexor {
- MuxRaw = 0,
- MuxTextTrace = 0x0102,
- MuxCoda = 0x0190
-};
-
-inline byte extractByte(const char *data) { return *data; }
-SYMBIANUTILS_EXPORT ushort extractShort(const char *data);
-SYMBIANUTILS_EXPORT uint extractInt(const char *data);
-SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data);
-
-SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba);
-
-// produces "xx xx xx "
-SYMBIANUTILS_EXPORT QString stringFromArray(const QByteArray &ba, int maxLen = - 1);
-
-enum Endianness
-{
- LittleEndian,
- BigEndian,
- TargetByteOrder = BigEndian
-};
-
-SYMBIANUTILS_EXPORT void appendShort(QByteArray *ba, ushort s, Endianness = TargetByteOrder);
-SYMBIANUTILS_EXPORT void appendInt(QByteArray *ba, uint i, Endianness = TargetByteOrder);
-SYMBIANUTILS_EXPORT void appendString(QByteArray *ba, const QByteArray &str, Endianness = TargetByteOrder, bool appendNullTerminator = true);
-
-struct SYMBIANUTILS_EXPORT Library
-{
- Library();
- explicit Library(const CodaResult &r);
-
- QByteArray name;
- uint codeseg;
- uint dataseg;
- //library addresses are valid for a given process (depending on memory model, they might be loaded at the same address in all processes or not)
- uint pid;
-};
-
-struct SYMBIANUTILS_EXPORT CodaAppVersion
-{
- CodaAppVersion();
- void reset();
-
- int codaMajor;
- int codaMinor;
- int protocolMajor;
- int protocolMinor;
-};
-
-struct SYMBIANUTILS_EXPORT Session
-{
- Session();
- void reset();
- QString deviceDescription(unsigned verbose) const;
- QString toString() const;
- // Answer to qXfer::libraries
- QByteArray gdbLibraryList() const;
- // Answer to qsDllInfo, can be sent chunk-wise.
- QByteArray gdbQsDllInfo(int start = 0, int count = -1) const;
-
- // CODA feedback
- byte cpuMajor;
- byte cpuMinor;
- byte bigEndian;
- byte defaultTypeSize;
- byte fpTypeSize;
- byte extended1TypeSize;
- byte extended2TypeSize;
- CodaAppVersion codaAppVersion;
- uint pid;
- uint mainTid;
- uint tid;
- uint codeseg;
- uint dataseg;
- QHash<uint, uint> addressToBP;
-
- typedef QList<Library> Libraries;
- Libraries libraries;
-
- // Gdb request
- QStringList modules;
-};
-
-struct SYMBIANUTILS_EXPORT CodaResult
-{
- CodaResult();
- void clear();
- QString toString() const;
- // 0 for no error.
- int errorCode() const;
- QString errorString() const;
-
- ushort multiplex;
- byte code;
- byte token;
- QByteArray data;
- QVariant cookie;
- bool isDebugOutput;
-};
-
-SYMBIANUTILS_EXPORT QByteArray errorMessage(byte code);
-SYMBIANUTILS_EXPORT QByteArray hexNumber(uint n, int digits = 0);
-SYMBIANUTILS_EXPORT QByteArray hexxNumber(uint n, int digits = 0); // prepends '0x', too
-SYMBIANUTILS_EXPORT uint swapEndian(uint in);
-
-} // namespace Coda
-
-#endif // DEBUGGER_CODA_UTILS
diff --git a/src/shared/symbianutils/codautils_p.h b/src/shared/symbianutils/codautils_p.h
deleted file mode 100644
index 8466ba314b..0000000000
--- a/src/shared/symbianutils/codautils_p.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef DEBUGGER_CODA_PRIVATE_UTILS
-#define DEBUGGER_CODA_PRIVATE_UTILS
-
-#include "codautils.h"
-#include "symbianutils_global.h"
-
-QT_BEGIN_NAMESPACE
-class QDateTime;
-QT_END_NAMESPACE
-
-namespace Coda {
-
-void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness = TargetByteOrder);
-// returns a QByteArray containing optionally
-// the serial frame [0x01 0x90 <len>] and 0x7e encoded7d(ba) 0x7e
-QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame);
-bool extractResult(QByteArray *buffer, bool serialFrame, CodaResult *r, bool& linkEstablishmentMode, QByteArray *rawData = 0);
-
-} // namespace Coda
-
-#endif // DEBUGGER_CODA_PRIVATE_UTILS
diff --git a/src/shared/symbianutils/symbiandevicemanager.cpp b/src/shared/symbianutils/symbiandevicemanager.cpp
deleted file mode 100644
index dca77825ef..0000000000
--- a/src/shared/symbianutils/symbiandevicemanager.cpp
+++ /dev/null
@@ -1,804 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "symbiandevicemanager.h"
-#include "codadevice.h"
-#include "virtualserialdevice.h"
-
-#include <QCoreApplication>
-#include <QEvent>
-#include <QSettings>
-#include <QStringList>
-#include <QFileInfo>
-#include <QDebug>
-#include <QTextStream>
-#include <QSharedData>
-#include <QScopedPointer>
-#include <QSignalMapper>
-#include <QThread>
-#include <QWaitCondition>
-#include <QTimer>
-
-#ifdef Q_OS_MACX
-#include <CoreFoundation/CoreFoundation.h>
-#include <IOKit/IOKitLib.h>
-#include <IOKit/serial/IOSerialKeys.h>
-#include <IOKit/usb/USBSpec.h>
-
-// 10.5 doesn't have kUSBProductString or kUSBVendorString
-#ifndef kUSBProductString
-#define kUSBProductString "USB Product Name"
-#endif
-#ifndef kUSBVendorString
-#define kUSBVendorString "USB Vendor Name"
-#endif
-
-#if defined(MAC_OS_X_VERSION_10_3) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3)
-#include <IOKit/serial/ioss.h>
-#endif
-#include <IOKit/IOBSD.h>
-#endif
-
-namespace SymbianUtils {
-
-enum { debug = 0 };
-
-static const char REGKEY_CURRENT_CONTROL_SET[] = "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet";
-static const char USBSER[] = "Services/usbser/Enum";
-
-const char *SymbianDeviceManager::linuxBlueToothDeviceRootC = "/dev/rfcomm";
-
-// ------------- SymbianDevice
-class SymbianDeviceData : public QSharedData {
-public:
- SymbianDeviceData();
- ~SymbianDeviceData();
-
- bool isOpen() const;
- void forcedClose();
-
- QString portName;
- QString friendlyName;
- QString deviceDesc;
- QString manufacturer;
- QString additionalInformation;
-
- DeviceCommunicationType type;
- QSharedPointer<Coda::CodaDevice> codaDevice;
- int deviceAcquired;
-};
-
-SymbianDeviceData::SymbianDeviceData() :
- type(SerialPortCommunication),
- deviceAcquired(0)
-{
-}
-
-bool SymbianDeviceData::isOpen() const
-{
- return codaDevice && codaDevice->device()->isOpen();
-}
-
-SymbianDeviceData::~SymbianDeviceData()
-{
- forcedClose();
-}
-
-void SymbianDeviceData::forcedClose()
-{
- // Close the device when unplugging. Should devices be in 'acquired' state,
- // their owners should hit on write failures.
- // Apart from the <shared item> destructor, also called by the devicemanager
- // to ensure it also happens if other shared instances are still around.
- if (isOpen()) {
- if (deviceAcquired)
- qWarning("Device on '%s' unplugged while an operation is in progress.",
- qPrintable(portName));
- codaDevice->device()->close();
- }
-}
-
-SymbianDevice::SymbianDevice(SymbianDeviceData *data) :
- m_data(data)
-{
-}
-
-SymbianDevice::SymbianDevice() :
- m_data(new SymbianDeviceData)
-{
-}
-SymbianDevice::SymbianDevice(const SymbianDevice &rhs) :
- m_data(rhs.m_data)
-{
-}
-
-SymbianDevice &SymbianDevice::operator=(const SymbianDevice &rhs)
-{
- if (this != &rhs)
- m_data = rhs.m_data;
- return *this;
-}
-
-SymbianDevice::~SymbianDevice()
-{
-}
-
-void SymbianDevice::forcedClose()
-{
- m_data->forcedClose();
-}
-
-QString SymbianDevice::portName() const
-{
- return m_data->portName;
-}
-
-QString SymbianDevice::friendlyName() const
-{
- return m_data->friendlyName;
-}
-
-QString SymbianDevice::additionalInformation() const
-{
- return m_data->additionalInformation;
-}
-
-void SymbianDevice::setAdditionalInformation(const QString &a)
-{
- m_data->additionalInformation = a;
-}
-
-QString SymbianDevice::deviceDesc() const
-{
- return m_data->deviceDesc;
-}
-
-QString SymbianDevice::manufacturer() const
-{
- return m_data->manufacturer;
-}
-
-DeviceCommunicationType SymbianDevice::type() const
-{
- return m_data->type;
-}
-
-bool SymbianDevice::isNull() const
-{
- return m_data->portName.isEmpty();
-}
-
-bool SymbianDevice::isOpen() const
-{
- return m_data->isOpen();
-}
-
-QString SymbianDevice::toString() const
-{
- QString rc;
- QTextStream str(&rc);
- format(str);
- return rc;
-}
-
-void SymbianDevice::format(QTextStream &str) const
-{
- str << (m_data->type == BlueToothCommunication ? "Bluetooth: " : "Serial: ")
- << m_data->portName;
- if (!m_data->friendlyName.isEmpty()) {
- str << " (" << m_data->friendlyName;
- if (!m_data->deviceDesc.isEmpty())
- str << " / " << m_data->deviceDesc;
- str << ')';
- }
- if (!m_data->manufacturer.isEmpty())
- str << " [" << m_data->manufacturer << ']';
-}
-
-// Compare by port and friendly name
-int SymbianDevice::compare(const SymbianDevice &rhs) const
-{
- if (const int prc = m_data->portName.compare(rhs.m_data->portName))
- return prc;
- if (const int frc = m_data->friendlyName.compare(rhs.m_data->friendlyName))
- return frc;
- return 0;
-}
-
-SYMBIANUTILS_EXPORT QDebug operator<<(QDebug d, const SymbianDevice &cd)
-{
- d.nospace() << cd.toString();
- return d;
-}
-
-// ------------- SymbianDeviceManagerPrivate
-struct SymbianDeviceManagerPrivate {
- SymbianDeviceManagerPrivate() :
- m_initialized(false),
- m_devicesLock(QMutex::Recursive)
- {
-#ifdef Q_OS_MACX
- m_deviceListChangedNotification = 0;
-#endif
- }
-
- bool m_initialized;
- SymbianDeviceManager::SymbianDeviceList m_devices;
- QMutex m_devicesLock; // Used for protecting access to m_devices and serialising getCodaDevice/delayedClosePort
- // The following 2 variables are needed to manage requests for a CODA port not coming from the main thread
- int m_constructCodaPortEventType;
- QMutex m_codaPortWaitMutex;
-#ifdef Q_OS_MACX
- IONotificationPortRef m_deviceListChangedNotification;
-#endif
-};
-
-class QConstructCodaPortEvent : public QEvent
-{
-public:
- QConstructCodaPortEvent(QEvent::Type eventId, const QString &portName, CodaDevicePtr *device, QWaitCondition *waiter) :
- QEvent(eventId), m_portName(portName), m_device(device), m_waiter(waiter)
- {}
-
- QString m_portName;
- CodaDevicePtr* m_device;
- QWaitCondition *m_waiter;
-};
-
-
-SymbianDeviceManager::SymbianDeviceManager(QObject *parent) :
- QObject(parent),
- d(new SymbianDeviceManagerPrivate)
-{
- d->m_constructCodaPortEventType = QEvent::registerEventType();
-}
-
-SymbianDeviceManager::~SymbianDeviceManager()
-{
-#ifdef Q_OS_MACX
- if (d && d->m_deviceListChangedNotification)
- IONotificationPortDestroy(d->m_deviceListChangedNotification);
-#endif
- delete d;
-}
-
-SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::devices() const
-{
- ensureInitialized();
- QMutexLocker lock(&d->m_devicesLock);
- return d->m_devices;
-}
-
-QString SymbianDeviceManager::toString() const
-{
- QMutexLocker lock(&d->m_devicesLock);
- QString rc;
- QTextStream str(&rc);
- str << d->m_devices.size() << " devices:\n";
- const int count = d->m_devices.size();
- for (int i = 0; i < count; i++) {
- str << '#' << i << ' ';
- d->m_devices.at(i).format(str);
- str << '\n';
- }
- return rc;
-}
-
-int SymbianDeviceManager::findByPortName(const QString &p) const
-{
- ensureInitialized();
- const int count = d->m_devices.size();
- for (int i = 0; i < count; i++)
- if (d->m_devices.at(i).portName() == p)
- return i;
- return -1;
-}
-
-QString SymbianDeviceManager::friendlyNameForPort(const QString &port) const
-{
- QMutexLocker lock(&d->m_devicesLock);
- const int idx = findByPortName(port);
- return idx == -1 ? QString() : d->m_devices.at(idx).friendlyName();
-}
-
-CodaDevicePtr SymbianDeviceManager::getCodaDevice(const QString &port)
-{
- ensureInitialized();
- QMutexLocker lock(&d->m_devicesLock);
- const int idx = findByPortName(port);
- if (idx == -1) {
- qWarning("Attempt to acquire device '%s' that does not exist.", qPrintable(port));
- if (debug)
- qDebug() << *this;
- return CodaDevicePtr();
- }
- SymbianDevice& device = d->m_devices[idx];
- CodaDevicePtr& devicePtr = device.m_data->codaDevice;
- if (devicePtr.isNull() || !devicePtr->device()->isOpen()) {
- // Check we instanciate in the correct thread - we can't afford to create the CodaDevice (and more specifically, open the VirtualSerialDevice) in a thread that isn't guaranteed to be long-lived.
- // Therefore, if we're not in SymbianDeviceManager's thread, rejig things so it's opened in the main thread
- if (QThread::currentThread() != thread()) {
- // SymbianDeviceManager is owned by the main thread
- d->m_codaPortWaitMutex.lock();
- QWaitCondition waiter;
- QCoreApplication::postEvent(this, new QConstructCodaPortEvent((QEvent::Type)d->m_constructCodaPortEventType, port, &devicePtr, &waiter));
- waiter.wait(&d->m_codaPortWaitMutex);
- // When the wait returns (due to the wakeAll in SymbianDeviceManager::customEvent), the CodaDevice will be fully set up
- d->m_codaPortWaitMutex.unlock();
- } else {
- // We're in the main thread, just set it up directly
- constructCodaPort(devicePtr, port);
- }
- // We still carry on in the case we failed to open so the client can access the IODevice's errorString()
- }
- if (devicePtr->device()->isOpen())
- device.m_data->deviceAcquired++;
- return devicePtr;
-}
-
-void SymbianDeviceManager::constructCodaPort(CodaDevicePtr& device, const QString& portName)
-{
- QMutexLocker locker(&d->m_codaPortWaitMutex);
- if (device.isNull()) {
- device = QSharedPointer<Coda::CodaDevice>(new Coda::CodaDevice);
- const QSharedPointer<SymbianUtils::VirtualSerialDevice> serialDevice(new SymbianUtils::VirtualSerialDevice(portName));
- device->setSerialFrame(true);
- device->setDevice(serialDevice);
- }
- if (!device->device()->isOpen()) {
- bool ok = device->device().staticCast<SymbianUtils::VirtualSerialDevice>()->open(QIODevice::ReadWrite);
- if (!ok && debug) {
- qDebug("SymbianDeviceManager: Failed to open port %s", qPrintable(portName));
- }
- }
-}
-
-void SymbianDeviceManager::customEvent(QEvent *event)
-{
- if (event->type() == d->m_constructCodaPortEventType) {
- QConstructCodaPortEvent* constructEvent = static_cast<QConstructCodaPortEvent*>(event);
- constructCodaPort(*constructEvent->m_device, constructEvent->m_portName);
- constructEvent->m_waiter->wakeAll(); // Should only ever be one thing waiting on this
- }
-}
-
-void SymbianDeviceManager::releaseCodaDevice(CodaDevicePtr &port)
-{
- if (port) {
- QMutexLocker(&d->m_devicesLock);
- // Check if this was the last reference to the port, if so close it after a short delay
- foreach (const SymbianDevice& device, d->m_devices) {
- if (device.m_data->codaDevice.data() == port.data()) {
- if (device.m_data->deviceAcquired > 0)
- device.m_data->deviceAcquired--;
- if (device.m_data->deviceAcquired == 0) {
- if (debug)
- qDebug("Starting timer to close port %s", qPrintable(device.m_data->portName));
- QTimer::singleShot(1000, this, SLOT(delayedClosePort()));
- }
- break;
- }
- }
- port.clear();
- }
-}
-
-void SymbianDeviceManager::delayedClosePort()
-{
- // Find any coda ports that are still open but have a reference count of zero, and delete them
- QMutexLocker(&d->m_devicesLock);
- foreach (const SymbianDevice& device, d->m_devices) {
- Coda::CodaDevice* codaDevice = device.m_data->codaDevice.data();
- if (codaDevice && device.m_data->deviceAcquired == 0 && codaDevice->device()->isOpen()) {
- if (debug)
- qDebug("Closing device %s", qPrintable(device.m_data->portName));
- device.m_data->codaDevice->device()->close();
- }
- }
-}
-
-void SymbianDeviceManager::update()
-{
- update(true);
-}
-
-void SymbianDeviceManager::setAdditionalInformation(const QString &port, const QString &ai)
-{
- const int idx = findByPortName(port);
- if (idx != -1)
- d->m_devices[idx].setAdditionalInformation(ai);
-}
-
-void SymbianDeviceManager::ensureInitialized() const
-{
- if (!d->m_initialized) // Flag is set in update()
- const_cast<SymbianDeviceManager*>(this)->update(false);
-}
-
-void SymbianDeviceManager::update(bool emitSignals)
-{
- QMutexLocker lock(&d->m_devicesLock);
-
- static int n = 0;
- typedef SymbianDeviceList::iterator SymbianDeviceListIterator;
-
- if (debug)
- qDebug(">SerialDeviceLister::update(#%d, signals=%d)\n%s", n++, int(emitSignals),
- qPrintable(toString()));
-
- d->m_initialized = true;
- // Get ordered new list
- SymbianDeviceList newDevices = serialPorts() + blueToothDevices();
- if (newDevices.size() > 1)
- qStableSort(newDevices.begin(), newDevices.end());
- if (d->m_devices == newDevices) { // Happy, nothing changed.
- if (debug)
- qDebug("<SerialDeviceLister::update: unchanged\n");
- return;
- }
- // Merge the lists and emit the respective added/removed signals, assuming
- // no one can plug a different device on the same port at the speed of lightning
- SymbianDeviceList removedDevices;
- if (!d->m_devices.isEmpty()) {
- // Find deleted devices
- for (SymbianDeviceListIterator oldIt = d->m_devices.begin(); oldIt != d->m_devices.end(); ) {
- if (newDevices.contains(*oldIt)) {
- ++oldIt;
- } else {
- SymbianDevice toBeDeleted = *oldIt;
- toBeDeleted.forcedClose();
- oldIt = d->m_devices.erase(oldIt);
- removedDevices.append(toBeDeleted);
- }
- }
- }
- SymbianDeviceList addedDevices;
- if (!newDevices.isEmpty()) {
- // Find new devices and insert in order
- foreach(const SymbianDevice &newDevice, newDevices) {
- if (!d->m_devices.contains(newDevice)) {
- d->m_devices.append(newDevice);
- addedDevices.append(newDevice);
- }
- }
- if (d->m_devices.size() > 1)
- qStableSort(d->m_devices.begin(), d->m_devices.end());
- }
-
- lock.unlock();
- if (emitSignals) {
- foreach (const SymbianDevice &device, removedDevices) {
- emit deviceRemoved(device);
- }
- foreach (const SymbianDevice &device, addedDevices) {
- emit deviceAdded(device);
- }
- emit updated();
- }
-
- if (debug)
- qDebug("<SerialDeviceLister::update\n%s\n", qPrintable(toString()));
-}
-
-#ifdef Q_OS_MACX
-QString CFStringToQString(CFStringRef cfstring)
-{
- QString result;
- int len = CFStringGetLength(cfstring);
- result.resize(len);
- CFStringGetCharacters(cfstring, CFRangeMake(0, len), reinterpret_cast<UniChar *>(result.data()));
- return result;
-}
-
-void deviceListChanged(void *refCon, io_iterator_t iter)
-{
- // The way we're structured, it's easier to rescan rather than take advantage of the finer-grained device addition and removal info that OS X gives us
- io_object_t obj;
- while ((obj = IOIteratorNext(iter))) IOObjectRelease(obj);
- static_cast<SymbianDeviceManager *>(refCon)->update();
-}
-
-#endif
-
-SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::serialPorts() const
-{
- SymbianDeviceList rc;
-#if defined(Q_OS_WIN)
- const QSettings registry(REGKEY_CURRENT_CONTROL_SET, QSettings::NativeFormat);
- const QString usbSerialRootKey = QLatin1String(USBSER) + QLatin1Char('/');
- const int count = registry.value(usbSerialRootKey + QLatin1String("Count")).toInt();
- for (int i = 0; i < count; ++i) {
- QString driver = registry.value(usbSerialRootKey + QString::number(i)).toString();
- if (driver.contains(QLatin1String("JAVACOMM"))) {
- driver.replace(QLatin1Char('\\'), QLatin1Char('/'));
- const QString driverRootKey = QLatin1String("Enum/") + driver + QLatin1Char('/');
- if (debug > 1)
- qDebug() << "SerialDeviceLister::serialPorts(): Checking " << i << count
- << REGKEY_CURRENT_CONTROL_SET << usbSerialRootKey << driverRootKey;
- QScopedPointer<SymbianDeviceData> device(new SymbianDeviceData);
- device->type = SerialPortCommunication;
- device->friendlyName = registry.value(driverRootKey + QLatin1String("FriendlyName")).toString();
- device->portName = registry.value(driverRootKey + QLatin1String("Device Parameters/PortName")).toString();
- device->deviceDesc = registry.value(driverRootKey + QLatin1String("DeviceDesc")).toString();
- device->manufacturer = registry.value(driverRootKey + QLatin1String("Mfg")).toString();
- rc.append(SymbianDevice(device.take()));
- }
- }
-#elif defined(Q_OS_MACX)
- CFMutableDictionaryRef classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue);
- if (!classesToMatch) return rc;
-
- CFDictionarySetValue(classesToMatch,
- CFSTR(kIOSerialBSDTypeKey),
- CFSTR(kIOSerialBSDAllTypes));
-
- // Setup notifier if necessary
- if (d->m_deviceListChangedNotification == 0) {
- d->m_deviceListChangedNotification = IONotificationPortCreate(kIOMasterPortDefault);
- if (d->m_deviceListChangedNotification) {
- CFRunLoopSourceRef runloopSource = IONotificationPortGetRunLoopSource(d->m_deviceListChangedNotification);
- CFRunLoopAddSource(CFRunLoopGetCurrent(), runloopSource, kCFRunLoopDefaultMode);
- // IOServiceAddMatchingNotification eats a reference each time we call it, so make sure it's still valid for the IOServiceGetMatchingServices later
- CFRetain(classesToMatch);
- CFRetain(classesToMatch);
- io_iterator_t devicesAddedIterator;
- io_iterator_t devicesRemovedIterator;
- IOServiceAddMatchingNotification(d->m_deviceListChangedNotification, kIOMatchedNotification, classesToMatch, &deviceListChanged, (void*)this, &devicesAddedIterator);
- IOServiceAddMatchingNotification(d->m_deviceListChangedNotification, kIOTerminatedNotification, classesToMatch, &deviceListChanged, (void*)this, &devicesRemovedIterator);
- // Arm the iterators - we're not interested in the lists at this point, and the API rather expects that we will be
- io_object_t obj;
- while ((obj = IOIteratorNext(devicesAddedIterator))) IOObjectRelease(obj);
- while ((obj = IOIteratorNext(devicesRemovedIterator))) IOObjectRelease(obj);
- }
- }
- io_iterator_t matchingServices;
- kern_return_t kernResult = IOServiceGetMatchingServices(kIOMasterPortDefault, classesToMatch, &matchingServices);
- if (kernResult != KERN_SUCCESS) {
- if (debug)
- qDebug("IOServiceGetMatchingServices returned %d", kernResult);
- return rc;
- }
-
- io_object_t serialPort;
- kernResult = KERN_FAILURE;
- while ((serialPort = IOIteratorNext(matchingServices))) {
- // Check if it's Bluetooth or USB, and if so we can apply additional filters to weed out things that definitely aren't valid ports
- io_object_t parent, grandparent;
- kernResult = IORegistryEntryGetParentEntry(serialPort, kIOServicePlane, &parent);
- bool match = true;
- DeviceCommunicationType deviceType = SerialPortCommunication;
- CFStringRef name = NULL;
- if (kernResult == KERN_SUCCESS) {
- kernResult = IORegistryEntryGetParentEntry(parent, kIOServicePlane, &grandparent);
- if (kernResult == KERN_SUCCESS) {
- CFStringRef className = IOObjectCopyClass(grandparent);
- if (CFStringCompare(className, CFSTR("IOBluetoothSerialClient"), 0) == 0) {
- // CODA doesn't support bluetooth
- match = false;
- }
- else if (CFStringCompare(className, CFSTR("AppleUSBCDCACMData"), 0) == 0) {
- match = false;
- CFNumberRef interfaceNumber = (CFNumberRef)IORegistryEntrySearchCFProperty(grandparent, kIOServicePlane, CFSTR(kUSBInterfaceNumber), kCFAllocatorDefault, kIORegistryIterateParents | kIORegistryIterateRecursively);
- if (interfaceNumber) {
- int val;
- if (CFNumberGetValue(interfaceNumber, kCFNumberIntType, &val) && val == 4) match = true;
- CFRelease(interfaceNumber);
- }
- if (match) {
- CFStringRef deviceName = (CFStringRef)IORegistryEntrySearchCFProperty(grandparent, kIOServicePlane, CFSTR(kUSBProductString), kCFAllocatorDefault, kIORegistryIterateParents | kIORegistryIterateRecursively);
- CFStringRef vendorName = (CFStringRef)IORegistryEntrySearchCFProperty(grandparent, kIOServicePlane, CFSTR(kUSBVendorString), kCFAllocatorDefault, kIORegistryIterateParents | kIORegistryIterateRecursively);
- if (deviceName && vendorName) name = CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ %@"), vendorName, deviceName);
- if (deviceName) CFRelease(deviceName);
- if (vendorName) CFRelease(vendorName);
- }
- }
- else {
- // We don't expect CODA on any other type of serial port
- match = false;
- }
- CFRelease(className);
- IOObjectRelease(grandparent);
- }
- IOObjectRelease(parent);
- }
-
- if (match) {
- CFStringRef devPath = (CFStringRef)IORegistryEntryCreateCFProperty(serialPort, CFSTR(kIODialinDeviceKey), kCFAllocatorDefault, 0);
- if (name == NULL)
- name = (CFStringRef)IORegistryEntryCreateCFProperty(serialPort, CFSTR(kIOTTYBaseNameKey), kCFAllocatorDefault, 0);
- QScopedPointer<SymbianDeviceData> device(new SymbianDeviceData);
- device->type = deviceType;
- device->friendlyName = CFStringToQString(name);
- device->portName = CFStringToQString(devPath);
-
- CFRelease(devPath);
- CFRelease(name);
- rc.append(SymbianDevice(device.take()));
- }
- IOObjectRelease(serialPort);
- }
- IOObjectRelease(matchingServices);
-#endif
- return rc;
-}
-
-SymbianDeviceManager::SymbianDeviceList SymbianDeviceManager::blueToothDevices() const
-{
- SymbianDeviceList rc;
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
- // Bluetooth devices are created on connection. List the existing ones
- // or at least the first one.
- const QString prefix = QLatin1String(linuxBlueToothDeviceRootC);
- const QString blueToothfriendlyFormat = QLatin1String("Bluetooth device (%1)");
- for (int d = 0; d < 4; d++) {
- QScopedPointer<SymbianDeviceData> device(new SymbianDeviceData);
- device->type = BlueToothCommunication;
- device->portName = prefix + QString::number(d);
- if (d == 0 || QFileInfo(device->portName).exists()) {
- device->friendlyName = blueToothfriendlyFormat.arg(device->portName);
- rc.push_back(SymbianDevice(device.take()));
- }
- }
- // New kernel versions support /dev/ttyUSB0, /dev/ttyUSB1.
- static const char *usbTtyDevices[] = {
- "/dev/ttyUSB3", "/dev/ttyUSB2", "/dev/ttyUSB1", "/dev/ttyUSB0",
- "/dev/ttyACM3", "/dev/ttyACM2", "/dev/ttyACM1", "/dev/ttyACM0"};
- const int usbTtyCount = sizeof(usbTtyDevices)/sizeof(const char *);
- for (int d = 0; d < usbTtyCount; d++) {
- const QString ttyUSBDevice = QLatin1String(usbTtyDevices[d]);
- if (QFileInfo(ttyUSBDevice).exists()) {
- SymbianDeviceData *device = new SymbianDeviceData;
- device->type = SerialPortCommunication;
- device->portName = ttyUSBDevice;
- device->friendlyName = QString::fromLatin1("USB/Serial device (%1)").arg(device->portName);
- rc.push_back(SymbianDevice(device));
- }
- }
-#endif
- return rc;
-}
-
-Q_GLOBAL_STATIC(SymbianDeviceManager, symbianDeviceManager)
-
-SymbianDeviceManager *SymbianDeviceManager::instance()
-{
- return symbianDeviceManager();
-}
-
-SYMBIANUTILS_EXPORT QDebug operator<<(QDebug d, const SymbianDeviceManager &sdm)
-{
- d.nospace() << sdm.toString();
- return d;
-}
-
-OstChannel *SymbianDeviceManager::getOstChannel(const QString &port, uchar channelId)
-{
- CodaDevicePtr coda = getCodaDevice(port);
- if (coda.isNull() || !coda->device()->isOpen())
- return 0;
- return new OstChannel(coda, channelId);
-}
-
-struct OstChannelPrivate
-{
- CodaDevicePtr m_codaPtr;
- QByteArray m_dataBuffer;
- uchar m_channelId;
- bool m_hasReceivedData;
-};
-
-OstChannel::OstChannel(const CodaDevicePtr &codaPtr, uchar channelId)
- : d(new OstChannelPrivate)
-{
- d->m_codaPtr = codaPtr;
- d->m_channelId = channelId;
- d->m_hasReceivedData = false;
- connect(codaPtr.data(), SIGNAL(unknownEvent(uchar,QByteArray)), this, SLOT(ostDataReceived(uchar,QByteArray)));
- connect(codaPtr->device().data(), SIGNAL(aboutToClose()), this, SLOT(deviceAboutToClose()));
- QIODevice::open(ReadWrite|Unbuffered);
-}
-
-void OstChannel::close()
-{
- QIODevice::close();
- if (d && d->m_codaPtr.data()) {
- disconnect(d->m_codaPtr.data(), 0, this, 0);
- SymbianDeviceManager::instance()->releaseCodaDevice(d->m_codaPtr);
- }
-}
-
-OstChannel::~OstChannel()
-{
- close();
- delete d;
-}
-
-void OstChannel::flush()
-{
- //TODO d->m_codaPtr->device()-
-}
-
-qint64 OstChannel::bytesAvailable() const
-{
- return d->m_dataBuffer.size();
-}
-
-bool OstChannel::isSequential() const
-{
- return true;
-}
-
-qint64 OstChannel::readData(char *data, qint64 maxSize)
-{
- qint64 amount = qMin(maxSize, (qint64)d->m_dataBuffer.size());
- qMemCopy(data, d->m_dataBuffer.constData(), amount);
- d->m_dataBuffer.remove(0, amount);
- return amount;
-}
-
-qint64 OstChannel::writeData(const char *data, qint64 maxSize)
-{
- static const qint64 KMaxOstPayload = 1024;
- // If necessary, split the packet up
- qint64 remainder = maxSize;
- while (remainder) {
- QByteArray dataBuf = QByteArray::fromRawData(data, qMin(KMaxOstPayload, remainder));
- d->m_codaPtr->writeCustomData(d->m_channelId, dataBuf);
- data += dataBuf.length();
- remainder -= dataBuf.length();
- }
- return maxSize;
-}
-
-void OstChannel::ostDataReceived(uchar channelId, const QByteArray &aData)
-{
- if (channelId == d->m_channelId) {
- d->m_hasReceivedData = true;
- d->m_dataBuffer.append(aData);
- emit readyRead();
- }
-}
-
-Coda::CodaDevice& OstChannel::codaDevice() const
-{
- return *d->m_codaPtr;
-}
-
-bool OstChannel::hasReceivedData() const
-{
- return isOpen() && d->m_hasReceivedData;
-}
-
-void OstChannel::deviceAboutToClose()
-{
- close();
-}
-
-} // namespace SymbianUtils
diff --git a/src/shared/symbianutils/symbiandevicemanager.h b/src/shared/symbianutils/symbiandevicemanager.h
deleted file mode 100644
index e3d257e439..0000000000
--- a/src/shared/symbianutils/symbiandevicemanager.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SYMBIANDEVICEMANAGER_H
-#define SYMBIANDEVICEMANAGER_H
-
-#include "symbianutils_global.h"
-
-#include <QIODevice>
-#include <QExplicitlySharedDataPointer>
-#include <QSharedPointer>
-
-QT_BEGIN_NAMESPACE
-class QDebug;
-class QTextStream;
-QT_END_NAMESPACE
-
-namespace Coda {
- class CodaDevice;
-}
-
-namespace SymbianUtils {
-
-struct SymbianDeviceManagerPrivate;
-class SymbianDeviceData;
-class OstChannel;
-
-enum DeviceCommunicationType {
- SerialPortCommunication = 0,
- BlueToothCommunication = 1
-};
-
-typedef QSharedPointer<Coda::CodaDevice> CodaDevicePtr;
-
-// SymbianDevice: Explicitly shared device data and a CodaDevice
-// instance that can be acquired (exclusively) for use.
-// A device removal from the manager will result in the
-// device being closed.
-class SYMBIANUTILS_EXPORT SymbianDevice {
- explicit SymbianDevice(SymbianDeviceData *data);
- friend class SymbianDeviceManager;
-
-public:
- SymbianDevice();
- SymbianDevice(const SymbianDevice &rhs);
- SymbianDevice &operator=(const SymbianDevice &rhs);
- ~SymbianDevice();
- int compare(const SymbianDevice &rhs) const;
-
- DeviceCommunicationType type() const;
- bool isNull() const;
- QString portName() const;
- QString friendlyName() const;
- QString additionalInformation() const;
- void setAdditionalInformation(const QString &);
-
- bool isOpen() const;
-
- // Windows only.
- QString deviceDesc() const;
- QString manufacturer() const;
-
- void format(QTextStream &str) const;
- QString toString() const;
-
-private:
- void forcedClose();
-
- QExplicitlySharedDataPointer<SymbianDeviceData> m_data;
-};
-
-SYMBIANUTILS_EXPORT QDebug operator<<(QDebug d, const SymbianDevice &);
-
-inline bool operator==(const SymbianDevice &d1, const SymbianDevice &d2)
- { return d1.compare(d2) == 0; }
-inline bool operator!=(const SymbianDevice &d1, const SymbianDevice &d2)
- { return d1.compare(d2) != 0; }
-inline bool operator<(const SymbianDevice &d1, const SymbianDevice &d2)
- { return d1.compare(d2) < 0; }
-
-/* SymbianDeviceManager: Singleton that maintains a list of Symbian devices.
- * and emits change signals.
- * On Windows, the update slot must be connected to a [delayed] signal
- * emitted from an event handler listening for WM_DEVICECHANGE.
- * Device removal will result in the device being closed. */
-class SYMBIANUTILS_EXPORT SymbianDeviceManager : public QObject
-{
- Q_OBJECT
-public:
- typedef QList<SymbianDevice> SymbianDeviceList;
-
- static const char *linuxBlueToothDeviceRootC;
-
- // Do not use this constructor, it is just public for Q_GLOBAL_STATIC
- explicit SymbianDeviceManager(QObject *parent = 0);
- virtual ~SymbianDeviceManager();
-
- // Singleton access.
- static SymbianDeviceManager *instance();
-
- SymbianDeviceList devices() const;
- QString toString() const;
-
- //// The CODA code prefers to set up the CodaDevice object itself, so we let it and just handle opening the underlying QIODevice and keeping track of the CodaDevice
- //// Returns true if port was opened successfully.
-
- // Gets the CodaDevice, which may or may not be open depending on what other clients have already acquired it.
- // Therefore once clients have set up any signals and slots they required, they should check CodaDevice::device()->isOpen()
- // and if false, the open failed and they should check device()->errorString() if required.
- // Caller should call releaseCodaDevice if they want the port to auto-close itself
- CodaDevicePtr getCodaDevice(const QString &port);
-
- // Note this function makes no guarantee that someone else isn't already listening on this channel id, or that there is anything on the other end
- // Returns NULL if the port couldn't be opened
- OstChannel *getOstChannel(const QString &port, uchar channelId);
-
- // Caller is responsible for disconnecting any signals from aPort - do not assume the CodaDevice will be deleted as a result of this call. On return aPort will be clear()ed.
- void releaseCodaDevice(CodaDevicePtr &aPort);
-
- int findByPortName(const QString &p) const;
- QString friendlyNameForPort(const QString &port) const;
-
-public slots:
- void update();
- void setAdditionalInformation(const QString &port, const QString &ai);
-
-signals:
- void deviceRemoved(const SymbianUtils::SymbianDevice &d);
- void deviceAdded(const SymbianUtils::SymbianDevice &d);
- void updated();
-
-private slots:
- void delayedClosePort();
-
-private:
- void ensureInitialized() const;
- void update(bool emitSignals);
- SymbianDeviceList serialPorts() const;
- SymbianDeviceList blueToothDevices() const;
- void customEvent(QEvent *event);
- void constructCodaPort(CodaDevicePtr& device, const QString& portName);
-
- SymbianDeviceManagerPrivate *d;
-};
-
-SYMBIANUTILS_EXPORT QDebug operator<<(QDebug d, const SymbianDeviceManager &);
-
-struct OstChannelPrivate;
-
-class SYMBIANUTILS_EXPORT OstChannel : public QIODevice
-{
- Q_OBJECT
-
-public:
- void close();
- ~OstChannel();
- void flush();
-
- qint64 bytesAvailable() const;
- bool isSequential() const;
- bool hasReceivedData() const;
-
- Coda::CodaDevice &codaDevice() const;
-
-private slots:
- void ostDataReceived(uchar channelId, const QByteArray &aData);
- void deviceAboutToClose();
-
-private:
- OstChannel(const CodaDevicePtr &codaPtr, uchar channelId);
- qint64 readData(char *data, qint64 maxSize);
- qint64 writeData(const char *data, qint64 maxSize);
-
-private:
- OstChannelPrivate *d;
- friend class SymbianDeviceManager;
-};
-
-} // namespace SymbianUtils
-
-#endif // SYMBIANDEVICEMANAGER_H
diff --git a/src/shared/symbianutils/symbianutils.pri b/src/shared/symbianutils/symbianutils.pri
deleted file mode 100644
index 0bcddde981..0000000000
--- a/src/shared/symbianutils/symbianutils.pri
+++ /dev/null
@@ -1,42 +0,0 @@
-INCLUDEPATH *= $$PWD
-
-QT += network
-win32 {
- greaterThan(QT_MAJOR_VERSION, 4) {
- QT += core-private
- } else {
- include(../../private_headers.pri)
- }
-}
-
-# Input
-HEADERS += $$PWD/symbianutils_global.h \
- $$PWD/callback.h \
- $$PWD/codautils.h \
- $$PWD/codautils_p.h \
- $$PWD/symbiandevicemanager.h \
- $$PWD/codadevice.h \
- $$PWD/codamessage.h \
- $$PWD/virtualserialdevice.h
-
-SOURCES += $$PWD/codautils.cpp \
- $$PWD/symbiandevicemanager.cpp \
- $$PWD/codadevice.cpp \
- $$PWD/codamessage.cpp \
- $$PWD/virtualserialdevice.cpp
-
-DEFINES += HAS_SERIALPORT
-win32:SOURCES += $$PWD/virtualserialdevice_win.cpp
-unix:SOURCES += $$PWD/virtualserialdevice_posix.cpp
-
-macx:LIBS += -framework IOKit -framework CoreFoundation
-include(../../shared/json/json.pri)
-
-DEFINES += JSON_INCLUDE_PRI
-
-contains(CONFIG, dll) {
- DEFINES += SYMBIANUTILS_BUILD_LIB
-} else {
- DEFINES += SYMBIANUTILS_BUILD_STATIC_LIB
-}
-
diff --git a/src/shared/symbianutils/symbianutils_global.h b/src/shared/symbianutils/symbianutils_global.h
deleted file mode 100644
index fa9b02a433..0000000000
--- a/src/shared/symbianutils/symbianutils_global.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef SYMBIANUTILS_GLOBAL_H
-#define SYMBIANUTILS_GLOBAL_H
-
-#include <qglobal.h>
-
-#if defined(SYMBIANUTILS_BUILD_LIB)
-# define SYMBIANUTILS_EXPORT Q_DECL_EXPORT
-#elif defined(SYMBIANUTILS_BUILD_STATIC_LIB) || defined(SYMBIANUTILS_INCLUDE_PRI)
-# define SYMBIANUTILS_EXPORT
-#else
-# define SYMBIANUTILS_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // SYMBIANUTILS_GLOBAL_H
diff --git a/src/shared/symbianutils/virtualserialdevice.cpp b/src/shared/symbianutils/virtualserialdevice.cpp
deleted file mode 100644
index 64007eb3c7..0000000000
--- a/src/shared/symbianutils/virtualserialdevice.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "virtualserialdevice.h"
-#include <QThread>
-#include <QWaitCondition>
-
-namespace SymbianUtils {
-
-bool VirtualSerialDevice::isSequential() const
-{
- return true;
-}
-
-VirtualSerialDevice::VirtualSerialDevice(const QString &aPortName, QObject *parent) :
- QIODevice(parent), portName(aPortName), lock(QMutex::NonRecursive), emittingBytesWritten(false), waiterForBytesWritten(NULL)
-{
- platInit();
-}
-
-const QString& VirtualSerialDevice::getPortName() const
-{
- return portName;
-}
-
-void VirtualSerialDevice::close()
-{
- if (isOpen()) {
- QMutexLocker locker(&lock);
- delete waiterForBytesWritten;
- waiterForBytesWritten = NULL;
- QIODevice::close();
- platClose();
- }
-}
-
-void VirtualSerialDevice::emitBytesWrittenIfNeeded(QMutexLocker& locker, qint64 len)
-{
- if (waiterForBytesWritten) {
- waiterForBytesWritten->wakeAll();
- }
- if (!emittingBytesWritten) {
- emittingBytesWritten = true;
- locker.unlock();
- emit bytesWritten(len);
- locker.relock();
- emittingBytesWritten = false;
- }
-}
-
-} // namespace SymbianUtils
diff --git a/src/shared/symbianutils/virtualserialdevice.h b/src/shared/symbianutils/virtualserialdevice.h
deleted file mode 100644
index a4e295cecb..0000000000
--- a/src/shared/symbianutils/virtualserialdevice.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef VIRTUALSERIALPORT_H
-#define VIRTUALSERIALPORT_H
-
-#include <QIODevice>
-#include <QString>
-#include <QMutex>
-
-QT_BEGIN_NAMESPACE
-class QWaitCondition;
-QT_END_NAMESPACE
-
-#include "symbianutils_global.h"
-
-namespace SymbianUtils {
-
-class VirtualSerialDevicePrivate;
-
-class SYMBIANUTILS_EXPORT VirtualSerialDevice : public QIODevice
-{
- Q_OBJECT
-public:
- explicit VirtualSerialDevice(const QString &name, QObject *parent = 0);
- ~VirtualSerialDevice();
-
- bool open(OpenMode mode);
- void close();
- const QString &getPortName() const;
- void flush();
-
- qint64 bytesAvailable() const;
- bool isSequential() const;
- bool waitForBytesWritten(int msecs);
- bool waitForReadyRead(int msecs);
-
-protected:
- qint64 readData(char *data, qint64 maxSize);
- qint64 writeData(const char *data, qint64 maxSize);
-
-private:
- void platInit();
- void platClose();
- void emitBytesWrittenIfNeeded(QMutexLocker &locker, qint64 len);
-
-private:
- QString portName;
- mutable QMutex lock;
- QList<QByteArray> pendingWrites;
- bool emittingBytesWritten;
- QWaitCondition* waiterForBytesWritten;
- VirtualSerialDevicePrivate *d;
-
-// Platform-specific stuff
-#ifdef Q_OS_WIN
-private:
- qint64 writeNextBuffer(QMutexLocker &locker);
- void doWriteCompleted(QMutexLocker &locker);
-private slots:
- void writeCompleted();
- void commEventOccurred();
-#endif
-
-#ifdef Q_OS_UNIX
-private:
- bool tryWrite(const char *data, qint64 maxSize, qint64 &bytesWritten);
- enum FlushPendingOption {
- NothingSpecial = 0,
- StopAfterWritingOneBuffer = 1,
- EmitBytesWrittenAsync = 2 // Needed so we don't emit bytesWritten signal directly from writeBytes
- };
- Q_DECLARE_FLAGS(FlushPendingOptions, FlushPendingOption)
- bool tryFlushPendingBuffers(QMutexLocker& locker, FlushPendingOptions flags = NothingSpecial);
-
-private slots:
- void writeHasUnblocked(int fileHandle);
-
-signals:
- void AsyncCall_emitBytesWrittenIfNeeded(qint64 len);
-
-#endif
-
-};
-
-} // namespace SymbianUtils
-
-#endif // VIRTUALSERIALPORT_H
diff --git a/src/shared/symbianutils/virtualserialdevice_posix.cpp b/src/shared/symbianutils/virtualserialdevice_posix.cpp
deleted file mode 100644
index a51f059e5d..0000000000
--- a/src/shared/symbianutils/virtualserialdevice_posix.cpp
+++ /dev/null
@@ -1,338 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <QSocketNotifier>
-#include <QTimer>
-#include <QThread>
-#include <QWaitCondition>
-#include "virtualserialdevice.h"
-
-namespace SymbianUtils {
-
-class VirtualSerialDevicePrivate
-{
-public:
- int portHandle;
- QSocketNotifier* readNotifier;
- QSocketNotifier* writeUnblockedNotifier;
-};
-
-void VirtualSerialDevice::platInit()
-{
- d = new VirtualSerialDevicePrivate;
- d->portHandle = -1;
- d->readNotifier = NULL;
- d->writeUnblockedNotifier = NULL;
- connect(this, SIGNAL(AsyncCall_emitBytesWrittenIfNeeded(qint64)), this, SIGNAL(bytesWritten(qint64)), Qt::QueuedConnection);
-}
-
-bool VirtualSerialDevice::open(OpenMode mode)
-{
- if (isOpen()) return true;
-
- d->portHandle = ::open(portName.toAscii().constData(), O_RDWR | O_NONBLOCK | O_NOCTTY);
- if (d->portHandle == -1) {
- setErrorString(tr("The port %1 could not be opened: %2 (POSIX error %3)").
- arg(portName, QString::fromLocal8Bit(strerror(errno))).arg(errno));
- return false;
- }
-
- struct termios termInfo;
- if (tcgetattr(d->portHandle, &termInfo) < 0) {
- setErrorString(tr("Unable to retrieve terminal settings of port %1: %2 (POSIX error %3)").
- arg(portName, QString::fromLocal8Bit(strerror(errno))).arg(errno));
- close();
- return false;
- }
- cfmakeraw(&termInfo);
- // Turn off terminal echo as not get messages back, among other things
- termInfo.c_cflag |= CREAD|CLOCAL;
- termInfo.c_cc[VTIME] = 0;
- termInfo.c_lflag &= (~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ISIG));
- termInfo.c_iflag &= (~(INPCK|IGNPAR|PARMRK|ISTRIP|ICRNL|IXANY|IXON|IXOFF));
- termInfo.c_oflag &= (~OPOST);
- termInfo.c_cc[VMIN] = 0;
- termInfo.c_cc[VINTR] = _POSIX_VDISABLE;
- termInfo.c_cc[VQUIT] = _POSIX_VDISABLE;
- termInfo.c_cc[VSTART] = _POSIX_VDISABLE;
- termInfo.c_cc[VSTOP] = _POSIX_VDISABLE;
- termInfo.c_cc[VSUSP] = _POSIX_VDISABLE;
-
- if (tcsetattr(d->portHandle, TCSAFLUSH, &termInfo) < 0) {
- setErrorString(tr("Unable to apply terminal settings to port %1: %2 (POSIX error %3)").
- arg(portName, QString::fromLocal8Bit(strerror(errno))).arg(errno));
- close();
- return false;
- }
-
- d->readNotifier = new QSocketNotifier(d->portHandle, QSocketNotifier::Read);
- connect(d->readNotifier, SIGNAL(activated(int)), this, SIGNAL(readyRead()));
-
- d->writeUnblockedNotifier = new QSocketNotifier(d->portHandle, QSocketNotifier::Write);
- d->writeUnblockedNotifier->setEnabled(false);
- connect(d->writeUnblockedNotifier, SIGNAL(activated(int)), this, SLOT(writeHasUnblocked(int)));
-
- bool ok = QIODevice::open(mode | QIODevice::Unbuffered);
- if (!ok) close();
- return ok;
-}
-
-void VirtualSerialDevice::platClose()
-{
- delete d->readNotifier;
- d->readNotifier = NULL;
-
- delete d->writeUnblockedNotifier;
- d->writeUnblockedNotifier = NULL;
-
- ::close(d->portHandle);
- d->portHandle = -1;
-}
-
-VirtualSerialDevice::~VirtualSerialDevice()
-{
- close();
- delete d;
-}
-
-qint64 VirtualSerialDevice::bytesAvailable() const
-{
- QMutexLocker locker(&lock);
- if (!isOpen()) return 0;
-
- int avail = 0;
- d->readNotifier->setEnabled(false);
- int res = ioctl(d->portHandle, FIONREAD, &avail);
- d->readNotifier->setEnabled(true);
- if (res == -1) {
- return 0;
- }
- return (qint64)avail + QIODevice::bytesAvailable();
-}
-
-qint64 VirtualSerialDevice::readData(char *data, qint64 maxSize)
-{
- QMutexLocker locker(&lock);
- d->readNotifier->setEnabled(false);
- int result = ::read(d->portHandle, data, maxSize);
- d->readNotifier->setEnabled(true);
- if (result == -1 && errno == EAGAIN)
- result = 0; // To Qt, 0 here means nothing ready right now, and -1 is reserved for permanent errors
- return result;
-}
-
-qint64 VirtualSerialDevice::writeData(const char *data, qint64 maxSize)
-{
- QMutexLocker locker(&lock);
- qint64 bytesWritten;
- bool needToWait = tryFlushPendingBuffers(locker, EmitBytesWrittenAsync);
- if (!needToWait) {
- needToWait = tryWrite(data, maxSize, bytesWritten);
- if (needToWait && bytesWritten > 0) {
- // Wrote some of the buffer, adjust pointers to point to the remainder that needs queueing
- data += bytesWritten;
- maxSize -= bytesWritten;
- }
- }
-
- if (needToWait) {
- pendingWrites.append(QByteArray(data, maxSize));
- d->writeUnblockedNotifier->setEnabled(true);
- // Now wait for the writeUnblocked signal or for a call to waitForBytesWritten
- return bytesWritten + maxSize;
- } else {
- //emitBytesWrittenIfNeeded(locker, bytesWritten);
- // Can't emit bytesWritten directly from writeData - means clients end up recursing
- emit AsyncCall_emitBytesWrittenIfNeeded(bytesWritten);
- return bytesWritten;
- }
-}
-
-/* Returns true if EAGAIN encountered.
- * if error occurred (other than EAGAIN) returns -1 in bytesWritten
- * lock must be held. Doesn't emit signals or set notifiers.
- */
-bool VirtualSerialDevice::tryWrite(const char *data, qint64 maxSize, qint64& bytesWritten)
-{
- // Must be locked
- bytesWritten = 0;
- while (maxSize > 0) {
- int result = ::write(d->portHandle, data, maxSize);
- if (result == -1) {
- if (errno == EAGAIN)
- return true; // Need to wait
- setErrorString(tr("Cannot write to port %1: %2 (POSIX error %3)").
- arg(portName, QString::fromLocal8Bit(strerror(errno))).arg(errno));
-
- bytesWritten = -1;
- return false;
- } else {
- if (result == 0)
- qWarning("%s: Zero bytes written to port %s!", Q_FUNC_INFO, qPrintable(portName));
- bytesWritten += result;
- maxSize -= result;
- data += result;
- }
- }
- return false; // If we reach here we've successfully written all the data without blocking
-}
-
-/* Returns true if EAGAIN encountered. Emits (or queues) bytesWritten for any buffers written.
- * If stopAfterWritingOneBuffer is true, return immediately if a single buffer is written, rather than
- * attempting to drain the whole queue.
- * Doesn't modify notifier.
- */
-bool VirtualSerialDevice::tryFlushPendingBuffers(QMutexLocker& locker, FlushPendingOptions flags)
-{
- while (pendingWrites.count() > 0) {
- // Try writing everything we've got, until we hit EAGAIN
- const QByteArray& data = pendingWrites[0];
- qint64 bytesWritten;
- bool needToWait = tryWrite(data.constData(), data.size(), bytesWritten);
- if (needToWait) {
- if (bytesWritten > 0) {
- // We wrote some of the data, update the pending queue
- QByteArray remainder = data.mid(bytesWritten);
- pendingWrites.removeFirst();
- pendingWrites.insert(0, remainder);
- }
- return needToWait;
- } else {
- pendingWrites.removeFirst();
- if (flags & EmitBytesWrittenAsync) {
- emit AsyncCall_emitBytesWrittenIfNeeded(bytesWritten);
- } else {
- emitBytesWrittenIfNeeded(locker, bytesWritten);
- }
- if (flags & StopAfterWritingOneBuffer) return false;
- // Otherwise go round loop again
- }
- }
- return false; // no EAGAIN encountered
-}
-
-void VirtualSerialDevice::writeHasUnblocked(int fileHandle)
-{
- Q_ASSERT(fileHandle == d->portHandle);
- (void)fileHandle; // Compiler shutter-upper
- d->writeUnblockedNotifier->setEnabled(false);
-
- QMutexLocker locker(&lock);
- bool needToWait = tryFlushPendingBuffers(locker);
- if (needToWait) d->writeUnblockedNotifier->setEnabled(true);
-}
-
-// Copy of qt_safe_select from /qt/src/corelib/kernel/qeventdispatcher_unix.cpp
-// But without the timeout correction
-int safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
- const struct timeval *orig_timeout)
-{
- if (!orig_timeout) {
- // no timeout -> block forever
- register int ret;
- do {
- ret = select(nfds, fdread, fdwrite, fdexcept, 0);
- } while (ret == -1 && errno == EINTR);
- return ret;
- }
-
- timeval timeout = *orig_timeout;
-
- int ret;
- forever {
- ret = ::select(nfds, fdread, fdwrite, fdexcept, &timeout);
- if (ret != -1 || errno != EINTR)
- return ret;
- }
-}
-
-bool VirtualSerialDevice::waitForBytesWritten(int msecs)
-{
- QMutexLocker locker(&lock);
- if (pendingWrites.count() == 0) return false;
-
- if (QThread::currentThread() != thread()) {
- // Wait for signal from main thread
- unsigned long timeout = msecs;
- if (msecs == -1) timeout = ULONG_MAX;
- if (waiterForBytesWritten == NULL)
- waiterForBytesWritten = new QWaitCondition;
- return waiterForBytesWritten->wait(&lock, timeout);
- }
-
- d->writeUnblockedNotifier->setEnabled(false);
- forever {
- fd_set writeSet;
- FD_ZERO(&writeSet);
- FD_SET(d->portHandle, &writeSet);
-
- struct timeval timeout;
- if (msecs != -1) {
- timeout.tv_sec = msecs / 1000;
- timeout.tv_usec = (msecs % 1000) * 1000;
- }
- int ret = safe_select(d->portHandle+1, NULL, &writeSet, NULL, msecs == -1 ? NULL : &timeout);
-
- if (ret == 0) {
- // Timeout
- return false;
- } else if (ret < 0) {
- setErrorString(tr("The function select() returned an error on port %1: %2 (POSIX error %3)").
- arg(portName, QString::fromLocal8Bit(strerror(errno))).arg(errno));
- return false;
- } else {
- bool needToWait = tryFlushPendingBuffers(locker, StopAfterWritingOneBuffer);
- if (needToWait) {
- // go round the select again
- } else {
- return true;
- }
- }
- }
-}
-
-void VirtualSerialDevice::flush()
-{
- while (waitForBytesWritten(-1)) { /* loop */ }
- tcflush(d->portHandle, TCIOFLUSH);
-}
-
-bool VirtualSerialDevice::waitForReadyRead(int msecs)
-{
- return QIODevice::waitForReadyRead(msecs); //TODO
-}
-
-} // namespace SymbianUtils
diff --git a/src/shared/symbianutils/virtualserialdevice_win.cpp b/src/shared/symbianutils/virtualserialdevice_win.cpp
deleted file mode 100644
index de528d7c89..0000000000
--- a/src/shared/symbianutils/virtualserialdevice_win.cpp
+++ /dev/null
@@ -1,362 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "virtualserialdevice.h"
-#include <windows.h>
-#if QT_VERSION >= 0x050000
-# include <QWinEventNotifier>
-#else
-# include <private/qwineventnotifier_p.h>
-#endif
-#include <QThread>
-#include <QWaitCondition>
-
-namespace SymbianUtils {
-
-class VirtualSerialDevicePrivate
-{
-public:
- HANDLE portHandle;
- OVERLAPPED writeOverlapped;
- OVERLAPPED commEventOverlapped;
- DWORD commEventMask;
- QWinEventNotifier *writeCompleteNotifier;
- QWinEventNotifier *commEventNotifier;
-};
-
-void VirtualSerialDevice::platInit()
-{
- d = new VirtualSerialDevicePrivate;
- d->portHandle = INVALID_HANDLE_VALUE;
- d->writeCompleteNotifier = NULL;
- memset(&d->writeOverlapped, 0, sizeof(OVERLAPPED));
- d->commEventNotifier = NULL;
- memset(&d->commEventOverlapped, 0, sizeof(OVERLAPPED));
-}
-
-QString windowsPortName(const QString& port)
-{
- // Add the \\.\ to the name if it's a COM port and doesn't already have it
- QString winPortName(port);
- if (winPortName.startsWith(QLatin1String("COM"))) {
- winPortName.prepend("\\\\.\\");
- }
- return winPortName;
-}
-
-// Copied from \creator\src\libs\utils\winutils.cpp
-QString winErrorMessage(unsigned long error)
-{
- // Some of the windows error messages are a bit too obscure
- switch (error)
- {
- case ERROR_FILE_NOT_FOUND:
- case ERROR_NOT_FOUND:
- return VirtualSerialDevice::tr("Port not found");
- break;
- case ERROR_ACCESS_DENIED:
- return VirtualSerialDevice::tr("Port in use");
- case ERROR_SEM_TIMEOUT: // Bluetooth ports sometimes return this
- return VirtualSerialDevice::tr("Timed out");
- case ERROR_NETWORK_UNREACHABLE:
- return VirtualSerialDevice::tr("Port unreachable"); // I don't know what this error indicates... from observation, that the windows Bluetooth stack has got itself into a state and needs resetting
- default:
- break;
- }
-
- QString rc = QString::fromLatin1("#%1: ").arg(error);
- ushort *lpMsgBuf;
-
- const int len = FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL, error, 0, (LPTSTR)&lpMsgBuf, 0, NULL);
- if (len) {
- rc = QString::fromUtf16(lpMsgBuf, len);
- LocalFree(lpMsgBuf);
- } else {
- rc += QString::fromLatin1("<unknown error>");
- }
- return rc.trimmed();
-}
-
-bool VirtualSerialDevice::open(OpenMode mode)
-{
- Q_ASSERT(QThread::currentThread() == thread());
- if (isOpen()) return true;
-
- d->portHandle = CreateFileA(windowsPortName(portName).toAscii(), GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
- if (d->portHandle == INVALID_HANDLE_VALUE) {
- setErrorString(tr("The port %1 could not be opened: %2").
- arg(portName, winErrorMessage(GetLastError())));
- return false;
- }
-
- DCB commState;
- memset(&commState, 0, sizeof(DCB));
- commState.DCBlength = sizeof(DCB);
- bool ok = GetCommState(d->portHandle, &commState);
- if (ok) {
- commState.BaudRate = CBR_115200;
- commState.fBinary = TRUE;
- commState.fParity = FALSE;
- commState.fOutxCtsFlow = FALSE;
- commState.fOutxDsrFlow = FALSE;
- commState.fInX = FALSE;
- commState.fOutX = FALSE;
- commState.fNull = FALSE;
- commState.fAbortOnError = FALSE;
- commState.fDsrSensitivity = FALSE;
- commState.fDtrControl = DTR_CONTROL_DISABLE;
- commState.ByteSize = 8;
- commState.Parity = NOPARITY;
- commState.StopBits = ONESTOPBIT;
- ok = SetCommState(d->portHandle, &commState);
- }
- if (!ok) {
- qWarning("%s setting comm state", qPrintable(winErrorMessage(GetLastError())));
- }
-
- // http://msdn.microsoft.com/en-us/library/aa363190(v=vs.85).aspx says this means
- // "the read operation is to return immediately with the bytes that have already been received, even if no bytes have been received"
- COMMTIMEOUTS timeouts;
- timeouts.ReadIntervalTimeout = MAXDWORD;
- timeouts.ReadTotalTimeoutMultiplier = 0;
- timeouts.ReadTotalTimeoutConstant = 0;
- timeouts.WriteTotalTimeoutMultiplier = 0;
- timeouts.WriteTotalTimeoutConstant = 0;
- SetCommTimeouts(d->portHandle, &timeouts);
-
- d->writeOverlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- d->writeCompleteNotifier = new QWinEventNotifier(d->writeOverlapped.hEvent, this);
- connect(d->writeCompleteNotifier, SIGNAL(activated(HANDLE)), this, SLOT(writeCompleted()));
-
- // This is how we implement readyRead notifications
- d->commEventOverlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- d->commEventNotifier = new QWinEventNotifier(d->commEventOverlapped.hEvent, this);
- connect(d->commEventNotifier, SIGNAL(activated(HANDLE)), this, SLOT(commEventOccurred()));
-
- if (!SetCommMask(d->portHandle, EV_RXCHAR)) {
- // What to do?
- qWarning("%s: Could not set comm mask, err=%d", Q_FUNC_INFO, (int)GetLastError());
- }
- bool result = WaitCommEvent(d->portHandle, &d->commEventMask, &d->commEventOverlapped);
- Q_ASSERT(result == false); // Can't see how it would make sense to be anything else...
- (void)result; // For release build
- if (GetLastError() != ERROR_IO_PENDING) {
- setErrorString(tr("An error occurred while waiting for read notifications from %1: %2").
- arg(portName, winErrorMessage(GetLastError())));
- close();
- return false;
- }
-
- ok = QIODevice::open(mode);
- if (!ok) close();
- return ok;
-}
-
-void VirtualSerialDevice::platClose()
-{
- delete d->writeCompleteNotifier;
- d->writeCompleteNotifier = NULL;
- CloseHandle(d->writeOverlapped.hEvent);
- d->writeOverlapped.hEvent = INVALID_HANDLE_VALUE;
-
- delete d->commEventNotifier;
- d->commEventNotifier = NULL;
- d->commEventOverlapped.hEvent = INVALID_HANDLE_VALUE;
-
- CloseHandle(d->portHandle);
- d->portHandle = INVALID_HANDLE_VALUE;
-}
-
-VirtualSerialDevice::~VirtualSerialDevice()
-{
- close();
- delete d;
-}
-
-qint64 VirtualSerialDevice::bytesAvailable() const
-{
- QMutexLocker locker(&lock);
- if (!isOpen()) return 0;
-
- qint64 avail = 0;
- COMSTAT Status;
- if (ClearCommError(d->portHandle, NULL, &Status)) {
- avail = Status.cbInQue;
- }
- return avail + QIODevice::bytesAvailable();
-}
-
-void VirtualSerialDevice::commEventOccurred()
-{
- DWORD event = d->commEventMask;
- if (event & EV_RXCHAR) {
- emit readyRead();
- }
- ResetEvent(d->commEventOverlapped.hEvent);
- WaitCommEvent(d->portHandle, &d->commEventMask, &d->commEventOverlapped);
-}
-
-qint64 VirtualSerialDevice::readData(char *data, qint64 maxSize)
-{
- QMutexLocker locker(&lock);
- // We do our reads synchronously
- OVERLAPPED readOverlapped;
- memset(&readOverlapped, 0, sizeof(OVERLAPPED));
- DWORD bytesRead;
- BOOL done = ReadFile(d->portHandle, data, maxSize, &bytesRead, &readOverlapped);
- if (done) return (qint64)bytesRead;
-
- if (GetLastError() == ERROR_IO_PENDING) {
- // Note the TRUE to wait for the read to complete
- done = GetOverlappedResult(d->portHandle, &readOverlapped, &bytesRead, TRUE);
- if (done) return (qint64)bytesRead;
- }
-
- // If we reach here an error has occurred
- setErrorString(tr("An error occurred while reading from %1: %2").
- arg(portName, winErrorMessage(GetLastError())));
- return -1;
-}
-
-
-qint64 VirtualSerialDevice::writeData(const char *data, qint64 maxSize)
-{
- QMutexLocker locker(&lock);
-
- pendingWrites.append(QByteArray(data, maxSize)); // Can't see a way of doing async io safely without having to copy here...
- if (pendingWrites.count() == 1) {
- return writeNextBuffer(locker);
- } else {
- return maxSize;
- }
-}
-
-qint64 VirtualSerialDevice::writeNextBuffer(QMutexLocker& locker)
-{
- Q_UNUSED(locker)
- // Must be locked on entry
- qint64 bufLen = pendingWrites[0].length();
- BOOL ok = WriteFile(d->portHandle, pendingWrites[0].constData(), bufLen, NULL, &d->writeOverlapped);
- if (ok || GetLastError() == ERROR_IO_PENDING) {
- // Apparently it can return true for a small asynchronous write...
- // Hopefully it still gets signalled in the same way!
-
- // Wait for signal via writeCompleted
- return bufLen;
- }
- else {
- setErrorString(tr("An error occurred while writing to %1: %2").
- arg(portName, winErrorMessage(GetLastError())));
- pendingWrites.removeFirst();
- return -1;
- }
-}
-
-void VirtualSerialDevice::writeCompleted()
-{
- QMutexLocker locker(&lock);
- if (pendingWrites.count() == 0) {
- qWarning("%s: writeCompleted called when there are no pending writes on %s!",
- Q_FUNC_INFO, qPrintable(portName));
- return;
- }
-
- doWriteCompleted(locker);
-}
-
-void VirtualSerialDevice::doWriteCompleted(QMutexLocker &locker)
-{
- // Must be locked on entry
- ResetEvent(d->writeOverlapped.hEvent);
-
- qint64 len = pendingWrites.first().length();
- pendingWrites.removeFirst();
-
- if (pendingWrites.count() > 0) {
- // Get the next write started before notifying in case client calls waitForBytesWritten in their slot
- writeNextBuffer(locker);
- }
-
- emitBytesWrittenIfNeeded(locker, len);
-}
-
-bool VirtualSerialDevice::waitForBytesWritten(int msecs)
-{
- QMutexLocker locker(&lock);
- if (pendingWrites.count() == 0) return false;
-
- if (QThread::currentThread() != thread()) {
- // Wait for signal from main thread
- unsigned long timeout = msecs;
- if (msecs == -1) timeout = ULONG_MAX;
- if (waiterForBytesWritten == NULL)
- waiterForBytesWritten = new QWaitCondition;
- return waiterForBytesWritten->wait(&lock, timeout);
- }
-
- DWORD waitTime = msecs;
- if (msecs == -1) waitTime = INFINITE; // Ok these are probably bitwise the same, but just to prove I've thought about it...
- DWORD result = WaitForSingleObject(d->writeOverlapped.hEvent, waitTime); // Do I need WaitForSingleObjectEx and worry about alertable states?
- if (result == WAIT_TIMEOUT) {
- return false;
- }
- else if (result == WAIT_OBJECT_0) {
- DWORD bytesWritten;
- BOOL ok = GetOverlappedResult(d->portHandle, &d->writeOverlapped, &bytesWritten, TRUE);
- if (!ok) {
- setErrorString(tr("An error occurred while syncing on waitForBytesWritten for %1: %2").
- arg(portName, winErrorMessage(GetLastError())));
- return false;
- }
- Q_ASSERT(bytesWritten == (DWORD)pendingWrites.first().length());
-
- doWriteCompleted(locker);
- return true;
- }
- else {
- setErrorString(QString("An error occurred in waitForBytesWritten() for %1: %2").
- arg(portName, winErrorMessage(GetLastError())));
- return false;
- }
-}
-
-void VirtualSerialDevice::flush()
-{
- while (waitForBytesWritten(-1)) { /* loop */ }
-}
-
-bool VirtualSerialDevice::waitForReadyRead(int msecs)
-{
- return QIODevice::waitForReadyRead(msecs); //TODO
-}
-
-} // namespace SymbianUtils
diff --git a/tests/auto/debugger/dumpers.pro b/tests/auto/debugger/dumpers.pro
index 8e1d66f27b..ed83ea9621 100644
--- a/tests/auto/debugger/dumpers.pro
+++ b/tests/auto/debugger/dumpers.pro
@@ -1,6 +1,5 @@
greaterThan(QT_MAJOR_VERSION, 4): QT += core-private
include(../qttest.pri)
-include($$IDE_SOURCE_TREE/src/libs/symbianutils/symbianutils.pri)
include($$IDE_SOURCE_TREE/src/shared/json/json.pri)
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
DEFINES += JSON_INCLUDE_PRI
diff --git a/tests/auto/qttest.pri b/tests/auto/qttest.pri
index 21be797385..4394b933a2 100644
--- a/tests/auto/qttest.pri
+++ b/tests/auto/qttest.pri
@@ -5,13 +5,6 @@ isEmpty(TEMPLATE):TEMPLATE=app
CONFIG += qt warn_on console depend_includepath testcase qtestlib
CONFIG -= app_bundle
-symbian:{
- TARGET.EPOCHEAPSIZE = 0x100000 0x2000000
-# DEFINES += QTEST_NO_SPECIALIZATIONS
- TARGET.CAPABILITY="None"
- RSS_RULES ="group_name=\"QtTests\";"
-}
-
# prefix test binary with tst_
!contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_")
diff --git a/tests/manual/appwizards/helpers.cpp b/tests/manual/appwizards/helpers.cpp
index b9c09f5dbe..3ce7ad6cc8 100644
--- a/tests/manual/appwizards/helpers.cpp
+++ b/tests/manual/appwizards/helpers.cpp
@@ -53,7 +53,6 @@ bool QtQuickApp::generateFiles(QString *errorMessage) const
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppViewerPriFile, errorMessage), path(AppViewerPri))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppViewerCppFile, errorMessage), path(AppViewerCpp))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH))
- && writeFile(generateFile(QtQuickAppGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::PngIcon64File, errorMessage), path(PngIcon64))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::PngIcon80File, errorMessage), path(PngIcon80))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::DesktopFremantleFile, errorMessage), path(DesktopFremantle))
@@ -68,7 +67,6 @@ bool Html5App::generateFiles(QString *errorMessage) const
&& writeFile(generateFile(Html5AppGeneratedFileInfo::AppViewerPriFile, errorMessage), path(AppViewerPri))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::AppViewerCppFile, errorMessage), path(AppViewerCpp))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH))
- && writeFile(generateFile(Html5AppGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::PngIcon64File, errorMessage), path(PngIcon64))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::PngIcon80File, errorMessage), path(PngIcon80))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::DesktopFremantleFile, errorMessage), path(DesktopFremantle))
diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp
index 8c108aad3a..011f12482f 100644
--- a/tests/manual/debugger/simple/simple_test_app.cpp
+++ b/tests/manual/debugger/simple/simple_test_app.cpp
@@ -2115,9 +2115,6 @@ namespace plugin {
#ifdef Q_OS_WIN
QLibrary lib(dir + "/debug/simple_test_plugin.dll");
#endif
- #ifdef Q_OS_SYMBIAN
- QLibrary lib(dir + "/libsimple_test_plugin.dll");
- #endif
BREAK_HERE;
// CheckType dir QString.
// Check lib "" QLibrary.
diff --git a/tests/system/settings/windows/Nokia/qtcreator/qtversion.xml b/tests/system/settings/windows/Nokia/qtcreator/qtversion.xml
index 74daf86d74..83ca6e82cf 100644
--- a/tests/system/settings/windows/Nokia/qtcreator/qtversion.xml
+++ b/tests/system/settings/windows/Nokia/qtcreator/qtversion.xml
@@ -93,39 +93,6 @@
</valuemap>
</data>
<data>
- <variable>QtVersion.7</variable>
- <valuemap type="QVariantMap">
- <value type="int" key="Id">11</value>
- <value type="QString" key="Name">Qt 4.7.4 for Symbian Belle (Qt SDK)</value>
- <value type="QString" key="QMakePath">c:/qtsdk/symbian/sdks/symbiansr1qt474/bin/qmake.exe</value>
- <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Symbian</value>
- <value type="QString" key="SBSv2Directory">C:/QtSDK/Symbian/tools/sbs/bin</value>
- <value type="bool" key="isAutodetected">false</value>
- </valuemap>
- </data>
- <data>
- <variable>QtVersion.8</variable>
- <valuemap type="QVariantMap">
- <value type="int" key="Id">12</value>
- <value type="QString" key="Name">Qt 4.7.4 for Symbian Anna (Qt SDK)</value>
- <value type="QString" key="QMakePath">c:/qtsdk/symbian/sdks/symbian3qt474/bin/qmake.exe</value>
- <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Symbian</value>
- <value type="QString" key="SBSv2Directory">C:/QtSDK/Symbian/tools/sbs/bin</value>
- <value type="bool" key="isAutodetected">false</value>
- </valuemap>
- </data>
- <data>
- <variable>QtVersion.9</variable>
- <valuemap type="QVariantMap">
- <value type="int" key="Id">13</value>
- <value type="QString" key="Name">Qt 4.7.3 for S60 5th Edition (Qt SDK)</value>
- <value type="QString" key="QMakePath">c:/qtsdk/symbian/sdks/symbian1qt473/bin/qmake.exe</value>
- <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Symbian</value>
- <value type="QString" key="SBSv2Directory"></value>
- <value type="bool" key="isAutodetected">false</value>
- </valuemap>
- </data>
- <data>
<variable>Version</variable>
<value type="int">1</value>
</data>
diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py
index f981982bbe..2147455b4a 100644
--- a/tests/system/shared/classes.py
+++ b/tests/system/shared/classes.py
@@ -2,24 +2,20 @@
class QtQuickConstants:
class Components:
BUILTIN = 1
- SYMBIAN = 2
- MEEGO_HARMATTAN = 4
- EXISTING_QML = 8
+ MEEGO_HARMATTAN = 2
+ EXISTING_QML = 4
class Targets:
DESKTOP = 1
SIMULATOR = 2
- SYMBIAN = 4
- MAEMO5 = 8
- HARMATTAN = 16
- EMBEDDED_LINUX = 32
+ MAEMO5 = 4
+ HARMATTAN = 8
+ EMBEDDED_LINUX = 16
@staticmethod
def getStringForComponents(components):
if components==QtQuickConstants.Components.BUILTIN:
return "Built-in elements only (for all platforms)"
- elif components==QtQuickConstants.Components.SYMBIAN:
- return "Qt Quick Components for Symbian"
elif components==QtQuickConstants.Components.MEEGO_HARMATTAN:
return "Qt Quick Components for Meego/Harmattan"
elif components==QtQuickConstants.Components.EXISTING_QML:
@@ -31,8 +27,6 @@ class QtQuickConstants:
def getStringForTarget(target):
if target==QtQuickConstants.Targets.DESKTOP:
return "Desktop"
- elif target==QtQuickConstants.Targets.SYMBIAN:
- return "Symbian Device"
elif target==QtQuickConstants.Targets.MAEMO5:
return "Maemo5"
elif target==QtQuickConstants.Targets.SIMULATOR:
@@ -48,7 +42,7 @@ class QtQuickConstants:
def getAllTargets():
return [QtQuickConstants.Targets.DESKTOP, QtQuickConstants.Targets.HARMATTAN,
QtQuickConstants.Targets.MAEMO5, QtQuickConstants.Targets.SIMULATOR,
- QtQuickConstants.Targets.SYMBIAN, QtQuickConstants.Targets.EMBEDDED_LINUX]
+ QtQuickConstants.Targets.EMBEDDED_LINUX]
@staticmethod
def getAllTargetStrings():
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py
index f0a7d4f1f1..8b83d19c6f 100644
--- a/tests/system/shared/project.py
+++ b/tests/system/shared/project.py
@@ -263,7 +263,6 @@ def __chooseTargets__(targets=QtQuickConstants.Targets.DESKTOP, availableTargets
QtQuickConstants.Targets.MAEMO5, QtQuickConstants.Targets.EMBEDDED_LINUX,
QtQuickConstants.Targets.SIMULATOR, QtQuickConstants.Targets.HARMATTAN]
if platform.system() in ('Windows', 'Microsoft'):
- available += [QtQuickConstants.Targets.SYMBIAN]
available.remove(QtQuickConstants.Targets.EMBEDDED_LINUX)
for current in available:
mustCheck = targets & current == current
@@ -426,16 +425,11 @@ def __getSupportedPlatforms__(text, getAsStrings=False):
result.append(QtQuickConstants.Targets.HARMATTAN)
result.append(QtQuickConstants.Targets.MAEMO5)
addSimulator = True
- if 'Symbian' in supports:
- result.append(QtQuickConstants.Targets.SYMBIAN)
- addSimulator = True
if len(result) == 0 or addSimulator:
result.append(QtQuickConstants.Targets.SIMULATOR)
elif 'Platform independent' in text:
result = [QtQuickConstants.Targets.DESKTOP, QtQuickConstants.Targets.MAEMO5,
QtQuickConstants.Targets.SIMULATOR, QtQuickConstants.Targets.HARMATTAN]
- if platform.system() in ('Microsoft', 'Windows'):
- result.append(QtQuickConstants.Targets.SYMBIAN)
else:
test.warning("Returning None (__getSupportedPlatforms__())",
"Parsed text: '%s'" % text)
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py
index b58cc7e086..8e11a04d7e 100644
--- a/tests/system/shared/utils.py
+++ b/tests/system/shared/utils.py
@@ -292,8 +292,6 @@ def getCorrectlyConfiguredTargets():
# Dialog sometimes differs from targets' names
if target == "Maemo":
target = "Maemo5"
- elif target == "Symbian":
- target = "Symbian Device"
implicitTargets = [target]
if target == "Desktop" and platform.system() in ("Linux", "Darwin"):
implicitTargets.append("Embedded Linux")
diff --git a/tests/system/suite_general/tst_openqt_creator/testdata/projecttree_creator.tsv b/tests/system/suite_general/tst_openqt_creator/testdata/projecttree_creator.tsv
index f663b08bda..0b3ce9afa8 100644
--- a/tests/system/suite_general/tst_openqt_creator/testdata/projecttree_creator.tsv
+++ b/tests/system/suite_general/tst_openqt_creator/testdata/projecttree_creator.tsv
@@ -178,7 +178,6 @@
"MainPage.qml" "5"
"qtquick10" "4"
"main.qml" "5"
-"symbian11" "4"
"main.qml" "5"
"MainPage.qml" "5"
"welcomescreen" "3"
@@ -343,7 +342,6 @@
"deviceorientation.h" "5"
"deviceorientation_harmattan.cpp" "5"
"deviceorientation_maemo5.cpp" "5"
-"deviceorientation_symbian.cpp" "5"
"LGPL_EXCEPTION.TXT" "5"
"LICENSE.LGPL" "5"
"loggerwidget.cpp" "5"
@@ -738,7 +736,6 @@
"icon64.png" "5"
"icon80.png" "5"
"manifest.aegis" "5"
-"symbianicon.svg" "5"
"wizards" "4"
"helloworld" "5"
"console.png" "6"
@@ -2214,18 +2211,8 @@
"symbianutils.pri" "4"
"Headers" "4"
"callback.h" "5"
-"codadevice.h" "5"
-"codamessage.h" "5"
-"codautils.h" "5"
-"codautils_p.h" "5"
-"symbiandevicemanager.h" "5"
-"symbianutils_global.h" "5"
"virtualserialdevice.h" "5"
"Sources" "4"
-"codadevice.cpp" "5"
-"codamessage.cpp" "5"
-"codautils.cpp" "5"
-"symbiandevicemanager.cpp" "5"
"virtualserialdevice.cpp" "5"
"virtualserialdevice_posix.cpp" "5"
"virtualserialdevice_win.cpp" "5"
@@ -3591,7 +3578,6 @@
"abstractgdbprocess.h" "5"
"abstractplaingdbadapter.h" "5"
"attachgdbadapter.h" "5"
-"codagdbadapter.h" "5"
"coregdbadapter.h" "5"
"gdbengine.h" "5"
"gdbmi.h" "5"
@@ -3609,7 +3595,6 @@
"abstractplaingdbadapter.cpp" "5"
"attachgdbadapter.cpp" "5"
"classicgdbengine.cpp" "5"
-"codagdbadapter.cpp" "5"
"coregdbadapter.cpp" "5"
"gdbengine.cpp" "5"
"gdbmi.cpp" "5"
@@ -5905,8 +5890,6 @@
"Other files" "5"
"plugins/qmldesigner" "6"
"QmlDesigner.pluginspec.in" "7"
-"qts60stylethemeio" "4"
-"qts60stylethemeio.pri" "5"
"qtsupport" "4"
"qtsupport.pri" "5"
"qtsupport_dependencies" "4"
@@ -6313,7 +6296,6 @@
"utils_dependencies.pri" "4"
"Headers" "3"
"abstractqmlprofilerrunner.h" "4"
-"codaqmlprofilerrunner.h" "4"
"localqmlprofilerrunner.h" "4"
"qmlprofiler_global.h" "4"
"qmlprofilerattachdialog.h" "4"
@@ -6325,7 +6307,6 @@
"qmlprofilertool.h" "4"
"remotelinuxqmlprofilerrunner.h" "4"
"Sources" "3"
-"codaqmlprofilerrunner.cpp" "4"
"localqmlprofilerrunner.cpp" "4"
"qmlprofilerattachdialog.cpp" "4"
"qmlprofilerdetailsrewriter.cpp" "4"
@@ -6558,81 +6539,17 @@
"qt4simulatortargetfactory.cpp" "5"
"simulatorqtversion.cpp" "5"
"simulatorqtversionfactory.cpp" "5"
-"qt-s60" "3"
-"qt-s60.pri" "4"
"Headers" "4"
-"abldparser.h" "5"
"certificatepathchooser.h" "5"
-"codaruncontrol.h" "5"
"gccetoolchain.h" "5"
"passphraseforkeydialog.h" "5"
-"qt4symbiantarget.h" "5"
-"qt4symbiantargetfactory.h" "5"
-"rvctparser.h" "5"
-"rvcttoolchain.h" "5"
-"s60certificatedetailsdialog.h" "5"
-"s60certificateinfo.h" "5"
-"s60createpackageparser.h" "5"
-"s60createpackagestep.h" "5"
-"s60deployconfiguration.h" "5"
-"s60deployconfigurationwidget.h" "5"
-"s60deploystep.h" "5"
-"s60devicedebugruncontrol.h" "5"
-"s60devicerunconfiguration.h" "5"
-"s60devicerunconfigurationwidget.h" "5"
-"s60manager.h" "5"
-"s60publisherovi.h" "5"
-"s60publishingbuildsettingspageovi.h" "5"
-"s60publishingresultspageovi.h" "5"
-"s60publishingsissettingspageovi.h" "5"
-"s60publishingwizardfactories.h" "5"
-"s60publishingwizardovi.h" "5"
-"s60runcontrolbase.h" "5"
-"s60runcontrolfactory.h" "5"
-"s60symbiancertificate.h" "5"
-"sbsv2parser.h" "5"
-"symbianqtversion.h" "5"
-"symbianqtversionfactory.h" "5"
"Sources" "4"
-"abldparser.cpp" "5"
"certificatepathchooser.cpp" "5"
-"codaruncontrol.cpp" "5"
"gccetoolchain.cpp" "5"
"passphraseforkeydialog.cpp" "5"
"qt4symbiantarget.cpp" "5"
"qt4symbiantargetfactory.cpp" "5"
-"rvctparser.cpp" "5"
-"rvcttoolchain.cpp" "5"
-"s60certificatedetailsdialog.cpp" "5"
-"s60certificateinfo.cpp" "5"
-"s60createpackageparser.cpp" "5"
-"s60createpackagestep.cpp" "5"
-"s60deployconfiguration.cpp" "5"
-"s60deployconfigurationwidget.cpp" "5"
-"s60deploystep.cpp" "5"
-"s60devicedebugruncontrol.cpp" "5"
-"s60devicerunconfiguration.cpp" "5"
-"s60devicerunconfigurationwidget.cpp" "5"
-"s60manager.cpp" "5"
-"s60publisherovi.cpp" "5"
-"s60publishingbuildsettingspageovi.cpp" "5"
-"s60publishingresultspageovi.cpp" "5"
-"s60publishingsissettingspageovi.cpp" "5"
-"s60publishingwizardfactories.cpp" "5"
-"s60publishingwizardovi.cpp" "5"
-"s60runcontrolbase.cpp" "5"
-"s60runcontrolfactory.cpp" "5"
-"s60symbiancertificate.cpp" "5"
-"sbsv2parser.cpp" "5"
-"symbianqtversion.cpp" "5"
-"symbianqtversionfactory.cpp" "5"
"Forms" "4"
-"rvcttoolchainconfigwidget.ui" "5"
-"s60certificatedetailsdialog.ui" "5"
-"s60createpackagestep.ui" "5"
-"s60publishingbuildsettingspageovi.ui" "5"
-"s60publishingresultspageovi.ui" "5"
-"s60publishingsissettingspageovi.ui" "5"
"qt4projectmanager_dependencies" "3"
"qt4projectmanager_dependencies.pri" "4"
"qtcreator" "3"
@@ -6646,8 +6563,6 @@
"qtsupport.pri" "4"
"qtsupport_dependencies" "3"
"qtsupport_dependencies.pri" "4"
-"symbianutils" "3"
-"symbianutils.pri" "4"
"texteditor" "3"
"texteditor.pri" "4"
"texteditor_dependencies" "3"
@@ -6787,7 +6702,6 @@
"mobileappwizardgenericoptionspage.ui" "5"
"mobileappwizardharmattanoptionspage.ui" "5"
"mobileappwizardmaemooptionspage.ui" "5"
-"mobileappwizardsymbianoptionspage.ui" "5"
"mobilelibrarywizardoptionpage.ui" "5"
"qtquickcomponentsetoptionspage.ui" "5"
"targetsetuppage.ui" "5"
@@ -6983,8 +6897,6 @@
"qtsupport_dependencies.pri" "4"
"remotelinux_dependencies" "3"
"remotelinux_dependencies.pri" "4"
-"symbianutils" "3"
-"symbianutils.pri" "4"
"texteditor" "3"
"texteditor.pri" "4"
"texteditor_dependencies" "3"
@@ -7783,8 +7695,6 @@
"remotelinux.pri" "4"
"remotelinux_dependencies" "3"
"remotelinux_dependencies.pri" "4"
-"symbianutils" "3"
-"symbianutils.pri" "4"
"texteditor" "3"
"texteditor.pri" "4"
"texteditor_dependencies" "3"
diff --git a/tests/tools/codaclient/codaclient.pro b/tests/tools/codaclient/codaclient.pro
deleted file mode 100644
index 4aeebeec88..0000000000
--- a/tests/tools/codaclient/codaclient.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINES += SYMBIANUTILS_INCLUDE_PRI
-
-QT += network
-
-include(../../../qtcreator.pri)
-include(../../../src/shared/symbianutils/symbianutils.pri)
-
-TARGET = codaclient
-TEMPLATE = app
-CONFIG += console
-
-SOURCES += main.cpp \
- codaclientapplication.cpp
-
-HEADERS += codaclientapplication.h
diff --git a/tests/tools/codaclient/codaclientapplication.cpp b/tests/tools/codaclient/codaclientapplication.cpp
deleted file mode 100644
index 0f911448f0..0000000000
--- a/tests/tools/codaclient/codaclientapplication.cpp
+++ /dev/null
@@ -1,608 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "codaclientapplication.h"
-#include "virtualserialdevice.h"
-
-
-#include "codadevice.h"
-#include <QTcpSocket>
-#include <QFile>
-#include <QFileInfo>
-
-#include <cstdio>
-
-static const char usageC[] =
-"\n%1 v0.1 built " __DATE__ "\n\n"
-"Test client for Symbian CODA\n\n"
-"Usage:\n"
-"%1 ping connection Note: For serial connections ONLY.\n"
-"%1 launch [-d] connection binary uid [--] [arguments]\n"
-"%1 install[-s] connection remote-sis-file [targetdrive]\n"
-"%1 uninstall connection packageUID\n"
-"%1 put [c size] connection local-file remote-file\n"
-"%1 stat connection remote-file\n\n"
-"'connection': address[:port] or serial-port\n\n"
-"Options:\n"
-"-d Launch: Launch under Debug control (wait for termination)\n"
-"-c [size] Put: Chunk size in KB (default %2KB)\n"
-"-s Install: Silent installation\n\n"
-"Notes:\n"
-"UIDs take the form '0xfdaa278'. The target directory for sis-files on a\n"
-"device typically is 'c:\\data'. CODA's default port is %3.\n\n"
-"Example session:\n"
-"%1 put 192.168.0.42 test.sis c:\\data\\test.sis\n"
-"%1 stat 192.168.0.42 c:\\data\\test.sis\n"
-"%1 install 192.168.0.42 c:\\data\\test.sis c:\n"
-"%1 launch 192.168.0.42 c:\\sys\\bin\\test.exe 0x34f2b\n"
-"%1 ping /dev/ttyUSB1\n";
-
-static const unsigned short defaultPort = 65029;
-static const quint64 defaultChunkSize = 10240;
-
-static inline bool isSerialPort(const QString &address)
-{
- return address.startsWith(QLatin1String("/dev"))
- || address.startsWith(QLatin1String("com"), Qt::CaseInsensitive)
- || address.startsWith(QLatin1String("tty"), Qt::CaseInsensitive)
- || address.startsWith(QLatin1Char('\\'));
-}
-
-static inline QString fixSlashes(QString s)
-{
- s.replace(QLatin1Char('/'), QLatin1Char('\\'));
- return s;
-}
-
-CodaClientApplication::CodaClientApplication(int &argc, char **argv) :
- QCoreApplication(argc, argv),
- m_mode(Invalid),
- m_port(defaultPort),
- m_launchUID(0),
- m_launchDebug(false),
- m_uninstallPackage(0),
- m_installTargetDrive(QLatin1String("C:")),
- m_installSilently(false),
- m_putWriteOk(false),
- m_statFstatOk(false),
- m_putLastChunkSize(0),
- m_putChunkSize(defaultChunkSize),
- m_verbose(0)
-{
- setApplicationName(QLatin1String("codaclient"));
-}
-
-CodaClientApplication::~CodaClientApplication()
-{
-}
-
-QString CodaClientApplication::usage()
-{
- return QString::fromLatin1(usageC)
- .arg(QCoreApplication::applicationName())
- .arg(defaultChunkSize / 1024).arg(defaultPort);
-}
-
-static inline CodaClientApplication::Mode modeArg(const QString &a)
-{
- if (a == QLatin1String("launch"))
- return CodaClientApplication::Launch;
- if (a == QLatin1String("ping"))
- return CodaClientApplication::Ping;
- if (a == QLatin1String("install"))
- return CodaClientApplication::Install;
- if (a == QLatin1String("uninstall"))
- return CodaClientApplication::Uninstall;
- if (a == QLatin1String("put"))
- return CodaClientApplication::Put;
- if (a == QLatin1String("stat"))
- return CodaClientApplication::Stat;
- return CodaClientApplication::Invalid;
-}
-
-bool CodaClientApplication::parseArgument(const QString &a, int argNumber, QString *errorMessage)
-{
- switch (argNumber) {
- case 1:
- m_mode = modeArg(a);
- if (m_mode == Invalid) {
- *errorMessage = QLatin1String("Invalid mode");
- return false;
- }
- return true;
- case 2: { // Address/port
- m_address = a;
- const int colonPos = m_address.indexOf(':');
- if (colonPos != -1) {
- m_port = m_address.mid(colonPos + 1).toUInt();
- m_address.truncate(colonPos);
- }
- }
- break;
- case 3:
- switch (m_mode) {
- case Launch:
- m_launchBinary = fixSlashes(a);
- break;
- case Install:
- m_installSisFile = a;
- break;
- case Uninstall:
- m_uninstallPackage = a.toUInt(0, 0);
- if (!m_uninstallPackage) {
- *errorMessage = QLatin1String("Invalid UID");
- return false;
- }
- break;
- case Put:
- m_putLocalFile = a;
- break;
- case Stat:
- m_statRemoteFile = fixSlashes(a);
- break;
- default:
- break;
- }
- return true;
- case 4:
- switch (m_mode) {
- case Launch:
- m_launchUID = a.toUInt(0, 0);
- if (!m_launchUID) {
- *errorMessage = QLatin1String("Invalid UID");
- return false;
- }
- break;
- case Install:
- m_installTargetDrive = a;
- break;
- case Put:
- m_putRemoteFile = fixSlashes(a);
- break;
- default:
- break;
- }
- return true;
-
- default:
- if (m_mode == Launch)
- m_launchArgs.push_back(a);
- break;
- }
- return true;
-}
-
-CodaClientApplication::ParseArgsResult CodaClientApplication::parseArguments(QString *errorMessage)
-{
- int argNumber = 1;
- const QStringList args = QCoreApplication::arguments();
- const QStringList::const_iterator cend = args.constEnd();
- QStringList::const_iterator it = args.constBegin();
- bool optionsEnd = false;
- for (++it; it != cend; ++it) {
- if (!optionsEnd && *it == QLatin1String("--")) {
- optionsEnd = true;
- continue;
- }
- if (!optionsEnd && it->startsWith(QLatin1Char('-')) && it->size() == 2) {
- switch (it->at(1).toAscii()) {
- case 'v':
- m_verbose++;
- break;
- case 'd':
- m_launchDebug = true;
- break;
- case 's':
- m_installSilently = true;
- break;
- case 'c':
- if (++it == cend) {
- *errorMessage = QString::fromLatin1("Parameter missing for -c");
- return ParseArgsError;
- }
- m_putChunkSize = it->toULongLong() * 1024;
- if (!m_putChunkSize) {
- *errorMessage = QString::fromLatin1("Invalid chunk size.");
- return ParseArgsError;
- }
- break;
- default:
- *errorMessage = QString::fromLatin1("Invalid option %1").arg(*it);
- return ParseArgsError;
- }
- } else {
- if (!parseArgument(*it, argNumber++, errorMessage))
- return ParseArgsError;
- }
- } //for loop
- // Basic Check & init
- switch (m_mode) {
- case Invalid:
- return ParseArgsError;
- case Launch:
- if (m_address.isEmpty() || !m_launchUID || m_launchBinary.isEmpty()) {
- *errorMessage = QString::fromLatin1("Not enough parameters for launch.");
- return ParseInitError;
- }
- break;
- case Ping:
- if (m_address.isEmpty()) {
- *errorMessage = QString::fromLatin1("Not enough parameters for ping.");
- return ParseInitError;
- }
- if (!isSerialPort(m_address)) {
- *errorMessage = QString::fromLatin1("'ping' not supported for TCP/IP.");
- return ParseInitError;
- }
- break;
- case Install:
- if (m_address.isEmpty() || m_installSisFile.isEmpty()) {
- *errorMessage = QString::fromLatin1("Not enough parameters for install.");
- return ParseInitError;
- }
- break;
- case Uninstall:
- if (!m_uninstallPackage) {
- *errorMessage = QString::fromLatin1("Not enough parameters for uninstall.");
- return ParseInitError;
- }
- break;
- case Put: {
- if (m_address.isEmpty() || m_putLocalFile.isEmpty() || m_putRemoteFile.isEmpty()) {
- *errorMessage = QString::fromLatin1("Not enough parameters for put.");
- return ParseInitError;
- }
- const QFileInfo fi(m_putLocalFile);
- if (!fi.isFile() || !fi.isReadable()) {
- *errorMessage = QString::fromLatin1("Local file '%1' not readable.").arg(m_putLocalFile);
- return ParseInitError;
- }
- }
- break;
- default:
- break;
- }
- return ParseArgsOk;
-}
-
-bool CodaClientApplication::start()
-{
- m_startTime.start();
- switch (m_mode) {
- case Ping:
- break;
- case Launch: {
- const QString args = m_launchArgs.join(QString(QLatin1Char(' ')));
- std::printf("Launching 0x%x '%s '%s' (debug: %d)\n",
- m_launchUID, qPrintable(m_launchBinary),
- qPrintable(args), m_launchDebug);
- }
- break;
- case Install:
- std::printf("Installing '%s' to '%s'\n",
- qPrintable(m_installSisFile), qPrintable(m_installTargetDrive));
- break;
- case Uninstall:
- std::printf("Uninstalling 0x%x'\n",
- m_uninstallPackage);
- break;
- case Put:
- std::printf("Copying '%s' to '%s' in chunks of %lluKB\n",
- qPrintable(m_putLocalFile), qPrintable(m_putRemoteFile),
- m_putChunkSize / 1024);
- break;
- case Stat:
- std::printf("Retrieving attributes of '%s'\n", qPrintable(m_statRemoteFile));
- break;
- case Invalid:
- break;
- }
- // Start connection
- m_trkDevice.reset(new Coda::CodaDevice);
- m_trkDevice->setVerbose(m_verbose);
- connect(m_trkDevice.data(), SIGNAL(error(QString)),
- this, SLOT(slotError(QString)));
- connect(m_trkDevice.data(), SIGNAL(logMessage(QString)),
- this, SLOT(slotTrkLogMessage(QString)));
- connect(m_trkDevice.data(), SIGNAL(codaEvent(Coda::CodaEvent)),
- this, SLOT(slotCodaEvent(Coda::CodaEvent)));
- connect(m_trkDevice.data(), SIGNAL(serialPong(QString)),
- this, SLOT(slotSerialPong(QString)));
- if (isSerialPort(m_address)) {
- // Serial
- const QSharedPointer<QIODevice> serialPort(new SymbianUtils::VirtualSerialDevice(m_address));
- std::printf("Opening port %s...\n", qPrintable(m_address));
- m_trkDevice->setSerialFrame(true);
- m_trkDevice->setDevice(serialPort); // Grab all data from start
- if (!serialPort->open(QIODevice::ReadWrite)) {
- std::fprintf(stderr, "Cannot open port: %s", qPrintable(serialPort->errorString()));
- return false;
- }
- // Initiate communication
- m_trkDevice->sendSerialPing(m_mode == Ping);
- } else {
- // TCP/IP
- const QSharedPointer<QTcpSocket> codaSocket(new QTcpSocket);
- m_trkDevice->setDevice(codaSocket);
- codaSocket->connectToHost(m_address, m_port);
- std::printf("Connecting to %s:%hu...\n", qPrintable(m_address), m_port);
- }
- return true;
-}
-
-void CodaClientApplication::slotError(const QString &e)
-{
- std::fprintf(stderr, "Error: %s\n", qPrintable(e));
- doExit(-1);
-}
-
-void CodaClientApplication::slotTrkLogMessage(const QString &m)
-{
- printTimeStamp();
- std::printf("%s\n", qPrintable(m));
-}
-
-void CodaClientApplication::handleCreateProcess(const Coda::CodaCommandResult &result)
-{
- const bool ok = result.type == Coda::CodaCommandResult::SuccessReply;
- if (ok) {
- printTimeStamp();
- std::printf("Launch succeeded: %s\n", qPrintable(result.toString()));
- if (!m_launchDebug)
- doExit(0);
- } else {
- std::fprintf(stderr, "Launch failed: %s\n", qPrintable(result.toString()));
- doExit(-1);
- }
-}
-
-void CodaClientApplication::handleFileSystemOpen(const Coda::CodaCommandResult &result)
-{
- if (result.type != Coda::CodaCommandResult::SuccessReply) {
- std::fprintf(stderr, "Open remote file failed: %s\n", qPrintable(result.toString()));
- doExit(-1);
- return;
- }
-
- if (result.values.size() < 1 || result.values.at(0).data().isEmpty()) {
- std::fprintf(stderr, "Internal error: No filehandle obtained\n");
- doExit(-1);
- return;
- }
-
- m_remoteFileHandle = result.values.at(0).data();
-
- if (m_mode == Stat) {
- m_trkDevice->sendFileSystemFstatCommand(Coda::CodaCallback(this, &CodaClientApplication::handleFileSystemFStat),
- m_remoteFileHandle);
- return;
- }
- // Put.
- m_putFile.reset(new QFile(m_putLocalFile));
- if (!m_putFile->open(QIODevice::ReadOnly)) { // Should not fail, was checked before
- std::fprintf(stderr, "Open local file failed: %s\n", qPrintable(m_putFile->errorString()));
- doExit(-1);
- return;
- }
- putSendNextChunk();
-}
-
-void CodaClientApplication::putSendNextChunk()
-{
- // Read and send off next chunk
- const quint64 pos = m_putFile->pos();
- const QByteArray data = m_putFile->read(m_putChunkSize);
- if (data.isEmpty()) {
- m_putWriteOk = true;
- closeRemoteFile();
- } else {
- m_putLastChunkSize = data.size();
- printTimeStamp();
- std::printf("Writing %llu bytes to remote file '%s' at %llu\n",
- m_putLastChunkSize,
- m_remoteFileHandle.constData(), pos);
- m_trkDevice->sendFileSystemWriteCommand(Coda::CodaCallback(this, &CodaClientApplication::handleFileSystemWrite),
- m_remoteFileHandle, data, unsigned(pos));
- }
-}
-
-void CodaClientApplication::closeRemoteFile()
-{
- m_trkDevice->sendFileSystemCloseCommand(Coda::CodaCallback(this, &CodaClientApplication::handleFileSystemClose),
- m_remoteFileHandle);
-}
-
-void CodaClientApplication::handleFileSystemWrite(const Coda::CodaCommandResult &result)
-{
- // Close remote file even if copy fails
- m_putWriteOk = result;
- if (!m_putWriteOk)
- std::fprintf(stderr, "Writing data failed: %s\n", qPrintable(result.toString()));
- if (!m_putWriteOk || m_putLastChunkSize < m_putChunkSize) {
- closeRemoteFile();
- } else {
- putSendNextChunk();
- }
-}
-
-void CodaClientApplication::handleFileSystemFStat(const Coda::CodaCommandResult &result)
-{
- m_statFstatOk = result.type == Coda::CodaCommandResult::SuccessReply;
- // Close remote file even if copy fails
- if (m_statFstatOk) {
- const Coda::CodaStatResponse statr = Coda::CodaDevice::parseStat(result);
- printTimeStamp();
- std::printf("File: %s\nSize: %llu bytes\nAccessed: %s\nModified: %s\n",
- qPrintable(m_statRemoteFile), statr.size,
- qPrintable(statr.accessTime.toString(Qt::LocalDate)),
- qPrintable(statr.modTime.toString(Qt::LocalDate)));
- } else {
- std::fprintf(stderr, "FStat failed: %s\n", qPrintable(result.toString()));
- }
- closeRemoteFile();
-}
-
-void CodaClientApplication::handleFileSystemClose(const Coda::CodaCommandResult &result)
-{
- if (result.type == Coda::CodaCommandResult::SuccessReply) {
- printTimeStamp();
- std::printf("File closed.\n");
- const bool ok = m_mode == Put ? m_putWriteOk : m_statFstatOk;
- doExit(ok ? 0 : -1);
- } else {
- std::fprintf(stderr, "File close failed: %s\n", qPrintable(result.toString()));
- doExit(-1);
- }
-}
-
-void CodaClientApplication::handleSymbianInstall(const Coda::CodaCommandResult &result)
-{
- if (result.type == Coda::CodaCommandResult::SuccessReply) {
- printTimeStamp();
- std::printf("Installation succeeded\n.");
- doExit(0);
- } else {
- std::fprintf(stderr, "Installation failed: %s\n", qPrintable(result.toString()));
- doExit(-1);
- }
-}
-
-void CodaClientApplication::handleUninstall(const Coda::CodaCommandResult &result)
-{
- if (result.type == Coda::CodaCommandResult::SuccessReply) {
- printTimeStamp();
- std::printf("Uninstallation succeeded\n.");
- doExit(0);
- } else {
- std::fprintf(stderr, "Uninstallation failed: %s\n", qPrintable(result.toString()));
- doExit(-1);
- }
-}
-
-void CodaClientApplication::slotCodaEvent (const Coda::CodaEvent &ev)
-{
- printTimeStamp();
- std::printf("Event: %s\n", qPrintable(ev.toString()));
- switch (ev.type()) {
- case Coda::CodaEvent::LocatorHello: // Commands accepted now
- switch (m_mode) {
- case Ping:
- break;
- case Launch:
- m_trkDevice->sendProcessStartCommand(Coda::CodaCallback(this, &CodaClientApplication::handleCreateProcess),
- m_launchBinary, m_launchUID, m_launchArgs, QString(), m_launchDebug);
- break;
- case Install:
- if (m_installSilently) {
- m_trkDevice->sendSymbianInstallSilentInstallCommand(Coda::CodaCallback(this, &CodaClientApplication::handleSymbianInstall),
- m_installSisFile.toAscii(), m_installTargetDrive.toAscii());
- } else {
- m_trkDevice->sendSymbianInstallUIInstallCommand(Coda::CodaCallback(this, &CodaClientApplication::handleSymbianInstall),
- m_installSisFile.toAscii());
- }
- break;
- case Uninstall:
- m_trkDevice->sendSymbianUninstallCommand(Coda::CodaCallback(this, &CodaClientApplication::handleUninstall),
- m_uninstallPackage);
- break;
- case Put: {
- const unsigned flags =
- Coda::CodaDevice::FileSystem_TCF_O_WRITE
- |Coda::CodaDevice::FileSystem_TCF_O_CREAT
- |Coda::CodaDevice::FileSystem_TCF_O_TRUNC;
- m_putWriteOk = false;
- m_trkDevice->sendFileSystemOpenCommand(Coda::CodaCallback(this, &CodaClientApplication::handleFileSystemOpen),
- m_putRemoteFile.toAscii(), flags);
- }
- break;
- case Stat: {
- const unsigned flags = Coda::CodaDevice::FileSystem_TCF_O_READ;
- m_statFstatOk = false;
- m_trkDevice->sendFileSystemOpenCommand(Coda::CodaCallback(this, &CodaClientApplication::handleFileSystemOpen),
- m_statRemoteFile.toAscii(), flags);
- }
- break;
- case Invalid:
- break;
- }
- break;
- case Coda::CodaEvent::RunControlModuleLoadSuspended: {
- // Debug mode start: Continue:
- const Coda::CodaRunControlModuleLoadContextSuspendedEvent &me =
- static_cast<const Coda::CodaRunControlModuleLoadContextSuspendedEvent &>(ev);
- if (me.info().requireResume) {
- printTimeStamp();
- std::printf("Continuing...\n");
- m_trkDevice->sendRunControlResumeCommand(Coda::CodaCallback(), me.id());
- }
- }
- break;
- case Coda::CodaEvent::RunControlContextRemoved: // App terminated in debug mode
- doExit(0);
- break;
- default:
- break;
- }
-}
-
-void CodaClientApplication::slotSerialPong(const QString &v)
-{
- printTimeStamp();
- std::printf("Pong from '%s'\n", qPrintable(v));
- if (m_mode == Ping)
- doExit(0);
-}
-
-void CodaClientApplication::doExit(int ex)
-{
- if (!m_trkDevice.isNull()) {
- const QSharedPointer<QIODevice> dev = m_trkDevice->device();
- if (!dev.isNull()) {
- if (QAbstractSocket *socket = qobject_cast<QAbstractSocket *>(dev.data())) {
- if (socket->state() == QAbstractSocket::ConnectedState)
- socket->disconnectFromHost();
- } else {
- if (dev->isOpen())
- dev->close();
- }
- }
- }
- printTimeStamp();
- std::printf("Exiting (%d)\n", ex);
- exit(ex);
-}
-
-void CodaClientApplication::printTimeStamp()
-{
- const int elapsedMS = m_startTime.elapsed();
- const int secs = elapsedMS / 1000;
- const int msecs = elapsedMS % 1000;
- std::printf("%4d.%03ds: ", secs, msecs);
-}
diff --git a/tests/tools/codaclient/codaclientapplication.h b/tests/tools/codaclient/codaclientapplication.h
deleted file mode 100644
index 08afa10aa0..0000000000
--- a/tests/tools/codaclient/codaclientapplication.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#ifndef CODACLIENTAPPLICATION_H
-#define CODACLIENTAPPLICATION_H
-
-#include <QCoreApplication>
-#include <QStringList>
-#include <QSharedPointer>
-#include <QTime>
-
-QT_FORWARD_DECLARE_CLASS(QFile)
-
-namespace Coda {
- struct CodaCommandResult;
- class CodaDevice;
- class CodaEvent;
-}
-
-class CodaClientApplication : public QCoreApplication
-{
- Q_OBJECT
-public:
- enum Mode { Invalid, Ping, Launch, Put, Stat, Install, Uninstall };
-
- explicit CodaClientApplication(int &argc, char **argv);
- ~CodaClientApplication();
-
- enum ParseArgsResult { ParseArgsOk, ParseArgsError, ParseInitError, ParseArgsHelp };
- ParseArgsResult parseArguments(QString *errorMessage);
-
- bool start();
-
- static QString usage();
-
-private slots:
- void slotError(const QString &);
- void slotTrkLogMessage(const QString &);
- void slotCodaEvent(const Coda::CodaEvent &);
- void slotSerialPong(const QString &);
-
-private:
- void printTimeStamp();
- bool parseArgument(const QString &a, int argNumber, QString *errorMessage);
- void handleCreateProcess(const Coda::CodaCommandResult &result);
- void handleFileSystemOpen(const Coda::CodaCommandResult &result);
- void handleFileSystemWrite(const Coda::CodaCommandResult &result);
- void handleFileSystemClose(const Coda::CodaCommandResult &result);
- void handleFileSystemFStat(const Coda::CodaCommandResult &result);
- void handleSymbianInstall(const Coda::CodaCommandResult &result);
- void handleUninstall(const Coda::CodaCommandResult &result);
- void doExit(int ex);
- void putSendNextChunk();
- void closeRemoteFile();
-
- Mode m_mode;
- QString m_address;
- unsigned short m_port;
- QString m_launchBinary;
- QStringList m_launchArgs;
- unsigned m_launchUID;
- bool m_launchDebug;
- unsigned m_uninstallPackage;
- QString m_installSisFile;
- QString m_installTargetDrive;
- bool m_installSilently;
- QString m_putLocalFile;
- QString m_putRemoteFile;
- bool m_putWriteOk;
- bool m_statFstatOk;
- QScopedPointer<QFile> m_putFile;
- quint64 m_putLastChunkSize;
- QString m_statRemoteFile;
- QByteArray m_remoteFileHandle;
- quint64 m_putChunkSize;
- unsigned m_verbose;
- QTime m_startTime;
- QScopedPointer<Coda::CodaDevice> m_trkDevice;
-};
-
-#endif // CODACLIENTAPPLICATION_H
diff --git a/tests/tools/codaclient/main.cpp b/tests/tools/codaclient/main.cpp
deleted file mode 100644
index e8f1e66d55..0000000000
--- a/tests/tools/codaclient/main.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: http://www.qt-project.org/
-**
-**
-** GNU Lesser General Public License Usage
-**
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**************************************************************************/
-
-#include "codaclientapplication.h"
-
-#include <cstdio>
-
-int main(int argc, char *argv[])
-{
- CodaClientApplication app(argc, argv);
-
- QString errorMessage;
- const CodaClientApplication::ParseArgsResult ar = app.parseArguments(&errorMessage);
- if (!errorMessage.isEmpty())
- std::fprintf(stderr, "\nError: %s\n\n", qPrintable(errorMessage));
- switch (ar) {
- case CodaClientApplication::ParseArgsError:
- std::printf("%s", qPrintable(CodaClientApplication::usage()));
- return -1;
- case CodaClientApplication::ParseArgsHelp:
- std::printf("%s", qPrintable(CodaClientApplication::usage()));
- return 0;
- case CodaClientApplication::ParseInitError:
- return -1;
- case CodaClientApplication::ParseArgsOk:
- break;
- }
- return app.start() ? app.exec() : 0;
-}
diff --git a/tests/tools/tools.pro b/tests/tools/tools.pro
index 6f140cacb0..f8339cd1f8 100644
--- a/tests/tools/tools.pro
+++ b/tests/tools/tools.pro
@@ -2,5 +2,4 @@ TEMPLATE=subdirs
SUBDIRS= \
cplusplus-dump \
-qml-ast2dot \
-codaclient
+qml-ast2dot