summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@nokia.com>2012-09-04 18:04:16 +0200
committerEike Ziller <eike.ziller@nokia.com>2012-09-04 18:04:16 +0200
commit887456e38a4bc1e9dce203204a025d83662d1ab9 (patch)
tree8e894cae0ce579d51ac51ff8da513daa8ce3b9ac
parent139d08b143e51ec17fd14eb26fd474e719addd3e (diff)
parent489132640fabd0f26ec5b677a20caba9b48f91df (diff)
downloadqt-creator-887456e38a4bc1e9dce203204a025d83662d1ab9.tar.gz
Merge remote-tracking branch 'origin/2.6'
Conflicts: src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/madde/maemoglobal.cpp src/plugins/madde/maemoinstalltosysrootstep.cpp src/plugins/madde/maemopublisherfremantlefree.cpp src/plugins/madde/qt4maemodeployconfiguration.cpp src/plugins/qt4projectmanager/librarydetailscontroller.cpp src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp src/plugins/qt4projectmanager/qt4buildconfiguration.cpp src/plugins/qt4projectmanager/qt4project.cpp src/plugins/qtsupport/baseqtversion.cpp src/plugins/remotelinux/abstractremotelinuxdeployservice.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp src/plugins/remotelinux/remotelinuxrunconfiguration.cpp src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp Change-Id: I2560b528596f284e7b45a2260d8d3037891c5d17
-rw-r--r--doc/api/first-plugin.qdoc10
-rw-r--r--doc/api/images/firstplugin-kitselection.png (renamed from doc/api/images/firstplugin-target.png)bin99925 -> 99925 bytes
-rw-r--r--doc/images/qtcreator-kit-selector.png (renamed from doc/images/qtcreator-target-selector.png)bin7679 -> 7679 bytes
-rw-r--r--doc/src/analyze/creator-valgrind-overview.qdoc4
-rw-r--r--doc/src/analyze/creator-valgrind.qdoc12
-rw-r--r--doc/src/analyze/qtquick-profiler.qdoc2
-rw-r--r--doc/src/android/androiddev.qdoc6
-rw-r--r--doc/src/debugger/creator-debugger-setup.qdoc27
-rw-r--r--doc/src/debugger/creator-debugger.qdoc11
-rw-r--r--doc/src/debugger/qtquick-debugging.qdoc2
-rw-r--r--doc/src/howto/creator-keyboard-shortcuts.qdoc2
-rw-r--r--doc/src/howto/creator-ui.qdoc4
-rw-r--r--doc/src/linux-mobile/creator-deployment-madde.qdoc11
-rw-r--r--doc/src/linux-mobile/creator-madde-emulator.qdoc7
-rw-r--r--doc/src/linux-mobile/creator-projects-settings-run-linux.qdocinc9
-rw-r--r--doc/src/linux-mobile/creator-publish-maemo-extras-devel.qdoc3
-rw-r--r--doc/src/linux-mobile/linuxdev.qdoc27
-rw-r--r--doc/src/overview/creator-deployment-overview.qdoc8
-rw-r--r--doc/src/overview/creator-getting-started.qdoc2
-rw-r--r--doc/src/overview/creator-glossary.qdoc34
-rw-r--r--doc/src/overview/creator-issues.qdoc2
-rw-r--r--doc/src/overview/creator-mobile-targets.qdoc3
-rw-r--r--doc/src/overview/creator-overview.qdoc5
-rw-r--r--doc/src/projects/creator-projects-build-run-tutorial.qdoc8
-rw-r--r--doc/src/projects/creator-projects-building-running.qdoc20
-rw-r--r--doc/src/projects/creator-projects-building.qdoc15
-rw-r--r--doc/src/projects/creator-projects-compilers.qdoc10
-rw-r--r--doc/src/projects/creator-projects-creating.qdoc16
-rw-r--r--doc/src/projects/creator-projects-opening.qdoc15
-rw-r--r--doc/src/projects/creator-projects-qt-versions.qdoc7
-rw-r--r--doc/src/projects/creator-projects-running-desktop.qdocinc4
-rw-r--r--doc/src/projects/creator-projects-running-simulator.qdocinc2
-rw-r--r--doc/src/projects/creator-projects-settings-build.qdoc9
-rw-r--r--doc/src/projects/creator-projects-settings-overview.qdoc19
-rw-r--r--doc/src/projects/creator-projects-settings-run-analyze.qdocinc3
-rw-r--r--doc/src/projects/creator-projects-settings-run-desktop.qdocinc2
-rw-r--r--doc/src/projects/creator-projects-settings-run.qdoc6
-rw-r--r--doc/src/projects/creator-projects-targets.qdoc25
-rw-r--r--doc/src/qtcreator.qdoc2
-rw-r--r--doc/src/qtquick/creator-projects-settings-run-qtquick.qdocinc2
-rw-r--r--doc/src/qtquick/qtquick-app-tutorial.qdoc10
-rw-r--r--doc/src/qtquick/qtquick-creating.qdoc14
-rw-r--r--doc/src/widgets/qtdesigner-app-tutorial.qdoc10
-rw-r--r--qtcreator.pro3
-rw-r--r--src/libs/cplusplus/FindUsages.cpp29
-rw-r--r--src/libs/cplusplus/FindUsages.h2
-rw-r--r--src/libs/cplusplus/LookupContext.cpp71
-rw-r--r--src/libs/cplusplus/LookupContext.h5
-rw-r--r--src/libs/cplusplus/ResolveExpression.cpp21
-rw-r--r--src/libs/cplusplus/ResolveExpression.h9
-rw-r--r--src/libs/cplusplus/TypeOfExpression.cpp38
-rw-r--r--src/libs/cplusplus/TypeOfExpression.h7
-rw-r--r--src/libs/utils/persistentsettings.cpp20
-rw-r--r--src/libs/utils/persistentsettings.h6
-rw-r--r--src/plugins/analyzerbase/ianalyzertool.cpp2
-rw-r--r--src/plugins/analyzerbase/startremotedialog.cpp22
-rw-r--r--src/plugins/android/addnewavddialog.ui2
-rw-r--r--src/plugins/android/androiddebugsupport.cpp14
-rw-r--r--src/plugins/android/androiddeployconfiguration.cpp8
-rw-r--r--src/plugins/android/androiddeploystep.cpp4
-rw-r--r--src/plugins/android/androiddeploystepfactory.cpp2
-rw-r--r--src/plugins/android/androidmanager.cpp10
-rw-r--r--src/plugins/android/androidpackageinstallationfactory.cpp2
-rw-r--r--src/plugins/android/androidrunconfiguration.cpp8
-rw-r--r--src/plugins/android/androidrunfactories.cpp4
-rw-r--r--src/plugins/android/androidtoolchain.cpp4
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp6
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsproject.cpp12
-rw-r--r--src/plugins/autotoolsprojectmanager/makestep.cpp8
-rw-r--r--src/plugins/clearcase/clearcase.pro28
-rw-r--r--src/plugins/clearcase/clearcase.qbs4
-rw-r--r--src/plugins/clearcase/clearcasecontrol.cpp10
-rw-r--r--src/plugins/clearcase/clearcasecontrol.h3
-rw-r--r--src/plugins/clearcase/clearcaseplugin.cpp179
-rw-r--r--src/plugins/clearcase/clearcaseplugin.h14
-rw-r--r--src/plugins/clearcase/clearcasesettings.cpp1
-rw-r--r--src/plugins/clearcase/clearcasesettings.h1
-rw-r--r--src/plugins/clearcase/clearcasesync.cpp125
-rw-r--r--src/plugins/clearcase/clearcasesync.h28
-rw-r--r--src/plugins/clearcase/settingspage.cpp27
-rw-r--r--src/plugins/clearcase/settingspage.ui58
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp12
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp28
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp12
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/makestep.cpp8
-rw-r--r--src/plugins/coreplugin/coreplugin.pro3
-rw-r--r--src/plugins/coreplugin/coreplugin.qbs1
-rw-r--r--src/plugins/coreplugin/documentmanager.cpp13
-rw-r--r--src/plugins/coreplugin/iversioncontrol.cpp45
-rw-r--r--src/plugins/coreplugin/iversioncontrol.h10
-rw-r--r--src/plugins/debugger/debugger.pro8
-rw-r--r--src/plugins/debugger/debugger.qbs8
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp56
-rw-r--r--src/plugins/debugger/debuggerdialogs.h8
-rw-r--r--src/plugins/debugger/debuggerkitconfigwidget.cpp (renamed from src/plugins/debugger/debuggerprofileconfigwidget.cpp)47
-rw-r--r--src/plugins/debugger/debuggerkitconfigwidget.h (renamed from src/plugins/debugger/debuggerprofileconfigwidget.h)28
-rw-r--r--src/plugins/debugger/debuggerkitinformation.cpp (renamed from src/plugins/debugger/debuggerprofileinformation.cpp)42
-rw-r--r--src/plugins/debugger/debuggerkitinformation.h (renamed from src/plugins/debugger/debuggerprofileinformation.h)24
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp155
-rw-r--r--src/plugins/debugger/debuggerrunner.cpp8
-rw-r--r--src/plugins/debugger/debuggerstartparameters.h4
-rw-r--r--src/plugins/debugger/gdb/startgdbserverdialog.cpp14
-rw-r--r--src/plugins/debugger/gdb/startgdbserverdialog.h2
-rw-r--r--src/plugins/debugger/loadcoredialog.cpp40
-rw-r--r--src/plugins/debugger/loadcoredialog.h6
-rw-r--r--src/plugins/debugger/moduleshandler.cpp5
-rw-r--r--src/plugins/debugger/watchdata.cpp26
-rw-r--r--src/plugins/genericprojectmanager/genericbuildconfiguration.cpp6
-rw-r--r--src/plugins/genericprojectmanager/genericmakestep.cpp8
-rw-r--r--src/plugins/genericprojectmanager/genericproject.cpp12
-rw-r--r--src/plugins/madde/debianmanager.cpp8
-rw-r--r--src/plugins/madde/maddeqemustartstep.cpp4
-rw-r--r--src/plugins/madde/maddeuploadandinstallpackagesteps.cpp4
-rw-r--r--src/plugins/madde/maemodeploymentmounter.cpp10
-rw-r--r--src/plugins/madde/maemodeploymentmounter.h6
-rw-r--r--src/plugins/madde/maemodeploystepfactory.cpp6
-rw-r--r--src/plugins/madde/maemodeviceconfigwizard.cpp4
-rw-r--r--src/plugins/madde/maemoglobal.cpp24
-rw-r--r--src/plugins/madde/maemoglobal.h10
-rw-r--r--src/plugins/madde/maemoinstalltosysrootstep.cpp16
-rw-r--r--src/plugins/madde/maemopackagecreationfactory.cpp2
-rw-r--r--src/plugins/madde/maemopackagecreationstep.cpp8
-rw-r--r--src/plugins/madde/maemopackagecreationwidget.cpp10
-rw-r--r--src/plugins/madde/maemopublisherfremantlefree.cpp10
-rw-r--r--src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp4
-rw-r--r--src/plugins/madde/maemopublishingwizardfactories.cpp4
-rw-r--r--src/plugins/madde/maemoqemumanager.cpp20
-rw-r--r--src/plugins/madde/maemoqtversion.cpp8
-rw-r--r--src/plugins/madde/maemoqtversion.h2
-rw-r--r--src/plugins/madde/maemorunconfiguration.cpp10
-rw-r--r--src/plugins/madde/maemorunconfigurationwidget.cpp6
-rw-r--r--src/plugins/madde/maemorunfactories.cpp10
-rw-r--r--src/plugins/madde/qt4maemodeployconfiguration.cpp14
-rw-r--r--src/plugins/perforce/perforceversioncontrol.cpp10
-rw-r--r--src/plugins/perforce/perforceversioncontrol.h2
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp14
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.h4
-rw-r--r--src/plugins/projectexplorer/buildsettingspropertiespage.cpp2
-rw-r--r--src/plugins/projectexplorer/codestylesettingspropertiespage.cpp4
-rw-r--r--src/plugins/projectexplorer/deployconfiguration.cpp6
-rw-r--r--src/plugins/projectexplorer/devicesupport/devicemanager.cpp5
-rw-r--r--src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp22
-rw-r--r--src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.h6
-rw-r--r--src/plugins/projectexplorer/editorsettingspropertiespage.cpp4
-rw-r--r--src/plugins/projectexplorer/kit.cpp (renamed from src/plugins/projectexplorer/profile.cpp)120
-rw-r--r--src/plugins/projectexplorer/kit.h (renamed from src/plugins/projectexplorer/profile.h)38
-rw-r--r--src/plugins/projectexplorer/kitchooser.cpp (renamed from src/plugins/projectexplorer/profilechooser.cpp)48
-rw-r--r--src/plugins/projectexplorer/kitchooser.h (renamed from src/plugins/projectexplorer/profilechooser.h)26
-rw-r--r--src/plugins/projectexplorer/kitconfigwidget.h (renamed from src/plugins/projectexplorer/profileconfigwidget.h)12
-rw-r--r--src/plugins/projectexplorer/kitinformation.cpp (renamed from src/plugins/projectexplorer/profileinformation.cpp)180
-rw-r--r--src/plugins/projectexplorer/kitinformation.h (renamed from src/plugins/projectexplorer/profileinformation.h)112
-rw-r--r--src/plugins/projectexplorer/kitinformationconfigwidget.cpp (renamed from src/plugins/projectexplorer/profileinformationconfigwidget.cpp)58
-rw-r--r--src/plugins/projectexplorer/kitinformationconfigwidget.h (renamed from src/plugins/projectexplorer/profileinformationconfigwidget.h)34
-rw-r--r--src/plugins/projectexplorer/kitmanager.cpp478
-rw-r--r--src/plugins/projectexplorer/kitmanager.h171
-rw-r--r--src/plugins/projectexplorer/kitmanagerconfigwidget.cpp (renamed from src/plugins/projectexplorer/profilemanagerconfigwidget.cpp)42
-rw-r--r--src/plugins/projectexplorer/kitmanagerconfigwidget.h (renamed from src/plugins/projectexplorer/profilemanagerconfigwidget.h)20
-rw-r--r--src/plugins/projectexplorer/kitmodel.cpp (renamed from src/plugins/projectexplorer/profilemodel.cpp)276
-rw-r--r--src/plugins/projectexplorer/kitmodel.h (renamed from src/plugins/projectexplorer/profilemodel.h)70
-rw-r--r--src/plugins/projectexplorer/kitoptionspage.cpp (renamed from src/plugins/projectexplorer/profileoptionspage.cpp)126
-rw-r--r--src/plugins/projectexplorer/kitoptionspage.h (renamed from src/plugins/projectexplorer/profileoptionspage.h)40
-rw-r--r--src/plugins/projectexplorer/miniprojecttargetselector.cpp462
-rw-r--r--src/plugins/projectexplorer/miniprojecttargetselector.h19
-rw-r--r--src/plugins/projectexplorer/profilemanager.cpp477
-rw-r--r--src/plugins/projectexplorer/profilemanager.h171
-rw-r--r--src/plugins/projectexplorer/project.cpp32
-rw-r--r--src/plugins/projectexplorer/project.h12
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp32
-rw-r--r--src/plugins/projectexplorer/projectexplorer.pro34
-rw-r--r--src/plugins/projectexplorer/projectexplorer.qbs34
-rw-r--r--src/plugins/projectexplorer/projectexplorerconstants.h4
-rw-r--r--src/plugins/projectexplorer/projectwindow.cpp8
-rw-r--r--src/plugins/projectexplorer/projectwindow.h2
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp9
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h1
-rw-r--r--src/plugins/projectexplorer/session.cpp18
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.cpp174
-rw-r--r--src/plugins/projectexplorer/target.cpp52
-rw-r--r--src/plugins/projectexplorer/target.h14
-rw-r--r--src/plugins/projectexplorer/targetsettingspanel.cpp38
-rw-r--r--src/plugins/projectexplorer/targetsettingswidget.cpp4
-rw-r--r--src/plugins/projectexplorer/toolchainmanager.cpp11
-rw-r--r--src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp6
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp12
-rw-r--r--src/plugins/qmlprofiler/remotelinuxqmlprofilerrunner.cpp4
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.cpp22
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.h2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp6
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp12
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp2
-rw-r--r--src/plugins/qnx/blackberryapplicationrunner.cpp2
-rw-r--r--src/plugins/qnx/blackberryconnect.cpp2
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestep.cpp6
-rw-r--r--src/plugins/qnx/blackberrycreatepackagestepfactory.cpp4
-rw-r--r--src/plugins/qnx/blackberrydeployconfiguration.cpp8
-rw-r--r--src/plugins/qnx/blackberrydeployconfigurationfactory.cpp4
-rw-r--r--src/plugins/qnx/blackberrydeployinformation.cpp4
-rw-r--r--src/plugins/qnx/blackberrydeploystepfactory.cpp4
-rw-r--r--src/plugins/qnx/blackberrydeviceconfiguration.cpp6
-rw-r--r--src/plugins/qnx/blackberrydeviceconfiguration.h4
-rw-r--r--src/plugins/qnx/blackberryrunconfiguration.cpp2
-rw-r--r--src/plugins/qnx/blackberryrunconfigurationfactory.cpp6
-rw-r--r--src/plugins/qnx/blackberryruncontrolfactory.cpp16
-rw-r--r--src/plugins/qnx/qnxabstractqtversion.cpp2
-rw-r--r--src/plugins/qnx/qnxabstractqtversion.h2
-rw-r--r--src/plugins/qnx/qnxdebugsupport.cpp4
-rw-r--r--src/plugins/qnx/qnxdeployconfigurationfactory.cpp4
-rw-r--r--src/plugins/qnx/qnxdeploystepfactory.cpp4
-rw-r--r--src/plugins/qnx/qnxrunconfigurationfactory.cpp4
-rw-r--r--src/plugins/qnx/qnxruncontrolfactory.cpp18
-rw-r--r--src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp18
-rw-r--r--src/plugins/qt4projectmanager/externaleditors.cpp4
-rw-r--r--src/plugins/qt4projectmanager/librarydetailscontroller.cpp4
-rw-r--r--src/plugins/qt4projectmanager/makestep.cpp14
-rw-r--r--src/plugins/qt4projectmanager/qmakekitconfigwidget.cpp (renamed from src/plugins/qt4projectmanager/qmakeprofileconfigwidget.cpp)29
-rw-r--r--src/plugins/qt4projectmanager/qmakekitconfigwidget.h (renamed from src/plugins/qt4projectmanager/qmakeprofileconfigwidget.h)16
-rw-r--r--src/plugins/qt4projectmanager/qmakekitinformation.cpp (renamed from src/plugins/qt4projectmanager/qmakeprofileinformation.cpp)64
-rw-r--r--src/plugins/qt4projectmanager/qmakekitinformation.h (renamed from src/plugins/qt4projectmanager/qmakeprofileinformation.h)28
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.cpp28
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp28
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h4
-rw-r--r--src/plugins/qt4projectmanager/qt4buildconfiguration.cpp41
-rw-r--r--src/plugins/qt4projectmanager/qt4buildconfiguration.h4
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.h2
-rw-r--r--src/plugins/qt4projectmanager/qt4project.cpp73
-rw-r--r--src/plugins/qt4projectmanager/qt4project.h10
-rw-r--r--src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp6
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanager.cpp6
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanager.pro9
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanager.qbs9
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp6
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanagerplugin.h2
-rw-r--r--src/plugins/qt4projectmanager/qt4targetsetupwidget.cpp62
-rw-r--r--src/plugins/qt4projectmanager/qt4targetsetupwidget.h18
-rw-r--r--src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp6
-rw-r--r--src/plugins/qt4projectmanager/unconfiguredprojectpanel.cpp61
-rw-r--r--src/plugins/qt4projectmanager/unconfiguredprojectpanel.h5
-rw-r--r--src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp32
-rw-r--r--src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h4
-rw-r--r--src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtwizard.cpp34
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtwizard.h4
-rw-r--r--src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp369
-rw-r--r--src/plugins/qt4projectmanager/wizards/targetsetuppage.h53
-rw-r--r--src/plugins/qt4projectmanager/wizards/targetsetuppage.ui110
-rw-r--r--src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp2
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp22
-rw-r--r--src/plugins/qtsupport/baseqtversion.h8
-rw-r--r--src/plugins/qtsupport/customexecutablerunconfiguration.cpp2
-rw-r--r--src/plugins/qtsupport/qtkitconfigwidget.cpp (renamed from src/plugins/qtsupport/qtprofileconfigwidget.cpp)49
-rw-r--r--src/plugins/qtsupport/qtkitconfigwidget.h (renamed from src/plugins/qtsupport/qtprofileconfigwidget.h)16
-rw-r--r--src/plugins/qtsupport/qtkitinformation.cpp (renamed from src/plugins/qtsupport/qtprofileinformation.cpp)55
-rw-r--r--src/plugins/qtsupport/qtkitinformation.h (renamed from src/plugins/qtsupport/qtprofileinformation.h)50
-rw-r--r--src/plugins/qtsupport/qtsupport.pro8
-rw-r--r--src/plugins/qtsupport/qtsupport.qbs8
-rw-r--r--src/plugins/qtsupport/qtsupportplugin.cpp6
-rw-r--r--src/plugins/qtsupport/qtversionmanager.cpp10
-rw-r--r--src/plugins/qtsupport/qtversionmanager.h2
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp28
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxdeployservice.h4
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp2
-rw-r--r--src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp4
-rw-r--r--src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp2
-rw-r--r--src/plugins/remotelinux/remotelinuxcheckforfreediskspaceservice.cpp11
-rw-r--r--src/plugins/remotelinux/remotelinuxdebugsupport.cpp16
-rw-r--r--src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp8
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentreader.cpp8
-rw-r--r--src/plugins/remotelinux/remotelinuxenvironmentreader.h4
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfiguration.cpp2
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp6
-rw-r--r--src/plugins/remotelinux/remotelinuxruncontrol.cpp4
-rw-r--r--src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp4
-rw-r--r--src/plugins/remotelinux/typespecificdeviceconfigurationlistmodel.cpp6
-rw-r--r--src/plugins/texteditor/basetexteditor.cpp57
-rw-r--r--src/plugins/texteditor/basetexteditor.h1
-rw-r--r--src/plugins/texteditor/codestylepool.cpp8
-rw-r--r--src/plugins/valgrind/valgrindtool.cpp4
-rw-r--r--src/shared/proparser/profileevaluator.cpp5
-rw-r--r--src/shared/proparser/profileevaluator.h2
-rw-r--r--tests/system/objects.map2
-rw-r--r--tests/system/settings/unix/Nokia/qtcreator/devices.xml46
-rw-r--r--tests/system/settings/unix/Nokia/qtcreator/profiles.xml22
-rw-r--r--tests/system/settings/unix/Nokia/qtcreator/toolchains.xml15
-rw-r--r--tests/system/settings/windows/Nokia/qtcreator/devices.xml46
-rw-r--r--tests/system/settings/windows/Nokia/qtcreator/profiles.xml22
-rw-r--r--tests/system/settings/windows/Nokia/qtcreator/toolchains.xml15
-rw-r--r--tests/system/shared/classes.py2
-rw-r--r--tests/system/shared/project.py8
-rw-r--r--tests/system/shared/utils.py50
-rw-r--r--tests/system/suite_APTW/objects.map2
-rw-r--r--tests/system/suite_general/tst_create_proj_wizard/test.py13
-rw-r--r--tests/system/suite_general/tst_openqt_creator/testdata/projecttree_creator.tsv90
300 files changed, 4255 insertions, 3425 deletions
diff --git a/doc/api/first-plugin.qdoc b/doc/api/first-plugin.qdoc
index 928103bf78..e2f9162f14 100644
--- a/doc/api/first-plugin.qdoc
+++ b/doc/api/first-plugin.qdoc
@@ -39,7 +39,7 @@
your plugin with.
\list 1
- \o Select \gui{File > New File or Project > Other Qt Project > Qt Creator Plugin > Choose}.
+ \o Select \gui{File > New File or Project > Libraries > Qt Creator Plugin > Choose}.
\image firstplugin-wizard.png "Choose the \QC Plugin Wizard"
@@ -52,12 +52,12 @@
from the project name. You will choose that name later in the wizard.
Continue to the next page.
- The \gui{Target Setup} dialog opens.
+ The \gui{Kit Selection} dialog opens.
- \image firstplugin-target.png "Choose the Desktop Target and Matching Qt"
+ \image firstplugin-kitselection.png "Choose the kit to build and run your project with"
- \o Select the target and Qt version to build your project with.
- For a \QC plugin this needs to be the \gui{Desktop} target,
+ \o Select the \l{glossary-buildandrun-kit}{kit} to build and run your project with.
+ For a \QC plugin this needs to be a kit with \gui{Desktop} device type,
and a Qt version that is compatible with the Qt version that your
\QC was built with (in the best case the exact same build).
If you use an incompatible Qt version to build your plugin, you
diff --git a/doc/api/images/firstplugin-target.png b/doc/api/images/firstplugin-kitselection.png
index b8e741b4a1..b8e741b4a1 100644
--- a/doc/api/images/firstplugin-target.png
+++ b/doc/api/images/firstplugin-kitselection.png
Binary files differ
diff --git a/doc/images/qtcreator-target-selector.png b/doc/images/qtcreator-kit-selector.png
index 62ac377e9b..62ac377e9b 100644
--- a/doc/images/qtcreator-target-selector.png
+++ b/doc/images/qtcreator-kit-selector.png
Binary files differ
diff --git a/doc/src/analyze/creator-valgrind-overview.qdoc b/doc/src/analyze/creator-valgrind-overview.qdoc
index 7d4db5c742..2b525a570e 100644
--- a/doc/src/analyze/creator-valgrind-overview.qdoc
+++ b/doc/src/analyze/creator-valgrind-overview.qdoc
@@ -37,8 +37,8 @@
to use them from \QC.
To run the Valgrind tools on a remote host over SSH, select \gui {Analyze
- > Valgrind Analyze Memory (Remote)} or \gui {Valgrind Function Profile
- (Remote)}.
+ > Valgrind Analyze Memory (External)} or \gui {Valgrind Function Profile
+ (External)}.
To stop the currently running analyzer, select \gui {Analyze
> Stop}.
diff --git a/doc/src/analyze/creator-valgrind.qdoc b/doc/src/analyze/creator-valgrind.qdoc
index a25fbdbfd4..6ec02400da 100644
--- a/doc/src/analyze/creator-valgrind.qdoc
+++ b/doc/src/analyze/creator-valgrind.qdoc
@@ -252,15 +252,13 @@
\list 1
- \o Select \gui {Analyze > Valgrind Analyze Memory (Remote)} or
- \gui {Valgrind Function Profile (Remote)}.
+ \o Select \gui {Analyze > Valgrind Analyze Memory (External)} or
+ \gui {Valgrind Function Profile (External)}.
- \image qtcreator-valgrind-remote-settings.png "Start Debugger dialog"
+ \image qtcreator-valgrind-remote-settings.png "Start Analyzer dialog"
- \o In the \gui Remote group, specify the connection to the remote host.
-
- \o In the \gui Target group, specify the application to run and analyze
- on the remote host.
+ \o Specify the application to run and analyze, and the \l{glossary-buildandrun-kit}{kit}
+ to use.
\endlist
diff --git a/doc/src/analyze/qtquick-profiler.qdoc b/doc/src/analyze/qtquick-profiler.qdoc
index 45f0b53915..916b6dfc28 100644
--- a/doc/src/analyze/qtquick-profiler.qdoc
+++ b/doc/src/analyze/qtquick-profiler.qdoc
@@ -87,7 +87,7 @@
\section1 Attaching to Running Qt Quick Applications
To profile Qt Quick applications that are not launched by \QC, select
- \gui {Analyze > QML Profiler (Remote)}. You must enable QML debugging for
+ \gui {Analyze > QML Profiler (External)}. You must enable QML debugging for
the application in the project build settings. For more information, see
\l{Setting Up QML Debugging}.
diff --git a/doc/src/android/androiddev.qdoc b/doc/src/android/androiddev.qdoc
index 48bb265603..ab9d0a9162 100644
--- a/doc/src/android/androiddev.qdoc
+++ b/doc/src/android/androiddev.qdoc
@@ -32,8 +32,10 @@
and analyze applications on them from \QC.
If you have a tool chain for building applications for Android devices
- installed on the development PC, you can add it to \QC. You can then select
- the \gui {Android} target to run applications on Android devices.
+ installed on the development PC, you can add it to \QC. You can then add a
+ \l{glossary-buildandrun-kit}{kit}
+ with the Android device type, the tool chain, and the Qt version for Android,
+ to build and run applications on Android devices.
\section1 Requirements
diff --git a/doc/src/debugger/creator-debugger-setup.qdoc b/doc/src/debugger/creator-debugger-setup.qdoc
index 016b21c9c3..ea369f2800 100644
--- a/doc/src/debugger/creator-debugger-setup.qdoc
+++ b/doc/src/debugger/creator-debugger-setup.qdoc
@@ -32,10 +32,10 @@
\title Setting Up Debugger
- The main debugger settings are associated with the build
- \l{glossary-development-target}{target} of your project. To specify the
- debugger and compiler to use for each build target, select \gui Tools >
- \gui Options > \gui {Build and Run} > \gui Targets.
+ The main debugger settings are associated with the
+ \l{glossary-buildandrun-kit}{kit} you build and run your project with. To specify the
+ debugger and compiler to use for each kit, select \gui Tools >
+ \gui Options > \gui {Build and Run} > \gui Kits.
You need to set up the debugger only if the automatic setup
fails, because the native debugger is missing (as is usually the
@@ -45,8 +45,9 @@
want to use a locally installed replacement instead).
\note If you need to change the debugger to use for an automatically
- detected target, you can \gui{Clone} the target and change the parameters in
- the clone. Make sure to select the cloned target for your project.
+ detected \l{glossary-buildandrun-kit}{kit},
+ you can \gui{Clone} the kit and change the parameters in
+ the clone. Make sure to select the cloned kit for your project.
\note To use the debugging tools for Windows, you must install them
and add the Symbol Server provided by Microsoft to the symbol search
@@ -54,7 +55,7 @@
Server in Windows}.
\note To use the Free Software Foundation (FSF) version of GDB on
- Mac OS, you must sign it and modify your target settings.
+ Mac OS, you must sign it and modify your \l{glossary-buildandrun-kit}{kit} settings.
This section explains the options you have for debugging C++ code
and provides installation notes for the supported native debuggers.
@@ -185,8 +186,7 @@
\o On Linux and Windows, use the Python-enabled GDB versions that
are installed when you install \QC and Qt SDK. On Mac OS X,
use the GDB provided with Xcode.
- For a custom \l{glossary-development-target}{target}, you can
- build your own Python-enabled GDB. Follow the instructions in
+ You can also build your own Python-enabled GDB. Follow the instructions in
\l{http://developer.qt.nokia.com/wiki/QtCreatorBuildGdb}
{Building GDB}.
@@ -234,7 +234,7 @@
supports Python from
\l{ftp://ftp.qt.nokia.com/misc/gdb/7.2/gdb72_mac_platform.tar.bz2}.
To use FSF GDB on Mac OS, you must sign it and add it to the \QC
- targets. For more information, see
+ \l{glossary-buildandrun-kit}{kits}. For more information, see
\l{Setting up FSF GDB for Mac OS}.
\note The Mac OS X Snow Leopard (10.6) has a bug that might cause the
@@ -272,7 +272,8 @@
\section1 Setting up FSF GDB for Mac OS
- To use FSF GDB on Mac OS, you must sign it and add it to the \QC targets.
+ To use FSF GDB on Mac OS, you must sign it and add it to the \QC
+ \l{glossary-buildandrun-kit}{kits}.
\list 1
@@ -313,13 +314,13 @@
\endcode
\o In \QC, select \gui {Qt Creator > Preferences > Build & Run >
- Targets} > \gui Add to create a build target that uses FSF GDB.
+ Kits} > \gui Add to create a kit that uses FSF GDB.
\o In the \gui Debugger field, specify the path to FSF GDB
(\c $HOME/gdb72/bin/fsfgdb, but with an explicit value for
\c $HOME).
- \o To use the debugger, add the target in the \gui {Build Settings}
+ \o To use the debugger, add the kit in the \gui {Build Settings}
of the project.
\endlist
diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc
index 9386f794d2..284608e9b3 100644
--- a/doc/src/debugger/creator-debugger.qdoc
+++ b/doc/src/debugger/creator-debugger.qdoc
@@ -252,9 +252,9 @@
While this setup might look daunting, it is mostly invisible to
the user of \QC. To start debugging on a remote target with the
- necessary helper processes running, select the target in
- \gui{Projects > Build Settings}
- or in the \gui{Debug > Start Debugging} menu.
+ necessary helper processes running, select the corresponding
+ \l{glossary-buildandrun-kit}{kit} in
+ \gui{Projects > Build & Run} or in the \gui{Debug > Start Debugging} menu.
Special use cases, such as attaching to a running process on the
target, might still require manual setup.
@@ -693,8 +693,7 @@
which may contain both release and debug versions of the library. When you run
applications on the Mac OS desktop, the release version of Frameworks is used
by default. To step into Frameworks, select the \gui {Use debug versions of
- Frameworks} option in the project run settings for \gui Desktop and
- \gui {\QS} targets.
+ Frameworks} option in the project run settings.
\section2 Viewing Threads
@@ -792,7 +791,7 @@
To give the user simple access also to these items, \QC employs
so-called Debugging Helpers. Debugging Helpers come in two varieties,
compiled, and Python based, depending on the selected
- \l{glossary-development-target}{target}.
+ \l{glossary-buildandrun-kit}{kit}.
By default, Debugging Helpers are automatically and transparently used.
To disable them, select \gui Tools > \gui Options > \gui Debugger >
diff --git a/doc/src/debugger/qtquick-debugging.qdoc b/doc/src/debugger/qtquick-debugging.qdoc
index 6acdbed000..36740492bf 100644
--- a/doc/src/debugger/qtquick-debugging.qdoc
+++ b/doc/src/debugger/qtquick-debugging.qdoc
@@ -89,7 +89,7 @@
\o To debug applications on devices, check that Qt 4.7.4, or later,
libraries are installed on the device and
- \l{Running on Multiple Targets}{select the device as the target}
+ \l{Running on Multiple Targets}{select the corresponding kit for the device}
before you start debugging.
\endlist
diff --git a/doc/src/howto/creator-keyboard-shortcuts.qdoc b/doc/src/howto/creator-keyboard-shortcuts.qdoc
index b19ad8c398..3b5403f1f8 100644
--- a/doc/src/howto/creator-keyboard-shortcuts.qdoc
+++ b/doc/src/howto/creator-keyboard-shortcuts.qdoc
@@ -549,7 +549,7 @@
\o Open project
\o Ctrl+Shift+O
\row
- \o Select build and run target
+ \o Select the \l{glossary-buildandrun-kit}{kit} to build and run your project with
\o Ctrl+T
\row
\o Run
diff --git a/doc/src/howto/creator-ui.qdoc b/doc/src/howto/creator-ui.qdoc
index 17c9d9d3f9..30d7e9f369 100644
--- a/doc/src/howto/creator-ui.qdoc
+++ b/doc/src/howto/creator-ui.qdoc
@@ -51,8 +51,8 @@
You can use the mode selector (1) to change to another \QC mode.
- You can use the target selector (2) to select the
- \l{glossary-development-target}{target} for running (3), debugging (4), or
+ You can use the kit selector (2) to select the
+ \l{glossary-buildandrun-kit}{kit} for running (3), debugging (4), or
building (5) the application. Output from these actions is displayed in the
output panes (7).
diff --git a/doc/src/linux-mobile/creator-deployment-madde.qdoc b/doc/src/linux-mobile/creator-deployment-madde.qdoc
index 08ab88c6ac..5974f11172 100644
--- a/doc/src/linux-mobile/creator-deployment-madde.qdoc
+++ b/doc/src/linux-mobile/creator-deployment-madde.qdoc
@@ -54,8 +54,8 @@
\image qtcreator-embedded-linux-deployment.png "Deploy to embedded Linux"
- When you run the application on the \gui {Embedded Linux} target, \QC
- deploys the application as specified by the deploy steps. By default,
+ When you run the application on the \gui {Embedded Linux} device,
+ \QC deploys the application as specified by the deploy steps. By default,
\QC copies the application files to the device by using the SSH file
transfer protocol (SFTP), as specified by the \gui {Upload files via SFTP}
step.
@@ -91,7 +91,7 @@
\section1 Creating Debian Installation Packages
- When you run the application on the \gui{Maemo5} or \gui Harmattan target,
+ When you run the application on the \gui{Maemo5} or \gui Harmattan device,
\QC generates a Debian installation package in the build directory by
default. You can deliver the installation package to users for installation
on devices that are of the same type and run the same firmware as the
@@ -117,8 +117,9 @@
\note \QC automates this process for you.
\QC provides templates for a set of files that must be included in Debian
- packages. When you create a \gui Maemo5 or \gui Harmattan target for a
- project, \QC asks whether packaging files are to be added to the project and
+ packages. When you start using a \l{glossary-buildandrun-kit}{kit} with
+ \gui Maemo5 or \gui Harmattan device type
+ for a project, \QC asks whether packaging files are to be added to the project and
to version control. If you plan to edit the packaging files, add them to
version control.
diff --git a/doc/src/linux-mobile/creator-madde-emulator.qdoc b/doc/src/linux-mobile/creator-madde-emulator.qdoc
index eac6fead5f..692908edd4 100644
--- a/doc/src/linux-mobile/creator-madde-emulator.qdoc
+++ b/doc/src/linux-mobile/creator-madde-emulator.qdoc
@@ -57,9 +57,10 @@
\section1 Starting the Emulator
The \gui {Start MeeGo Emulator} button is visible if you have a project
- open in \QC for which you have added the Maemo or MeeGo Harmattan
- build target. It starts the Maemo or MeeGo Harmattan emulator, depending
- on the selected target.
+ open in \QC for which you have added a \l{glossary-buildandrun-kit}{kit}
+ with Maemo or MeeGo Harmattan device type.
+ It starts the Maemo or MeeGo Harmattan emulator, depending
+ on the selected kit.
To start the emulator, click
\inlineimage qtcreator-maemo-emulator-button.png "Start MeeGo Emulator button"
diff --git a/doc/src/linux-mobile/creator-projects-settings-run-linux.qdocinc b/doc/src/linux-mobile/creator-projects-settings-run-linux.qdocinc
index 54da042580..5cec581486 100644
--- a/doc/src/linux-mobile/creator-projects-settings-run-linux.qdocinc
+++ b/doc/src/linux-mobile/creator-projects-settings-run-linux.qdocinc
@@ -1,8 +1,9 @@
\section2 Specifying Run Settings for Linux-Based Devices
- To run an application on a Linux-based device target (embedded Linux, MeeGo
- Harmattan, or Maemo), create and select a device configuration in the run
- settings for the project.
+ To run an application on a Linux-based device (embedded Linux, MeeGo
+ Harmattan, or Maemo), create and select a device configuration in the
+ \l{glossary-buildandrun-kit}{kit} that is used for building and running the project and set its
+ device type correspondingly.
You can also pass command line arguments to your application.
\image qtcreator-screenshot-run-settings-maemo.png "Run settings for Linux-based devices"
@@ -16,7 +17,7 @@
When you run the application, \QC copies the files to the connected device.
- For MeeGo Harmattan and Maemo targets, \QC also generates an
+ For MeeGo Harmattan and Maemo device types, \QC also generates an
installation package in the build directory by default. You can deliver the
installation package to users for installation
on devices that are of the same type and run the same firmware as the
diff --git a/doc/src/linux-mobile/creator-publish-maemo-extras-devel.qdoc b/doc/src/linux-mobile/creator-publish-maemo-extras-devel.qdoc
index f3ecc7cf4b..d2f25c48fc 100644
--- a/doc/src/linux-mobile/creator-publish-maemo-extras-devel.qdoc
+++ b/doc/src/linux-mobile/creator-publish-maemo-extras-devel.qdoc
@@ -61,7 +61,8 @@
\list 1
- \o Select the \gui {Maemo5} build target for your project.
+ \o Select the \l{glossary-buildandrun-kit}{kit} with \gui {Maemo5} device type
+ for your project.
\o Choose \gui {Build > Publish Project}.
diff --git a/doc/src/linux-mobile/linuxdev.qdoc b/doc/src/linux-mobile/linuxdev.qdoc
index 9605027606..b215ecc7d8 100644
--- a/doc/src/linux-mobile/linuxdev.qdoc
+++ b/doc/src/linux-mobile/linuxdev.qdoc
@@ -31,17 +31,17 @@
If you have a tool chain for building applications for embedded Linux
devices (with no MADDE support) installed on the development PC, you can add
- it to \QC. You can then select the \gui {Embedded Linux} target to
- run applications on embedded Linux devices.
+ it to \QC. You can then select a \l{glossary-buildandrun-kit}{kit}
+ with \gui {Embedded Linux} device type to
+ build and run applications on embedded Linux devices.
To be able to run and debug applications on embedded Linux devices, you must
- create device configurations and select them in the \QC run
- settings.
+ create device configurations and select them in the \QC \l{glossary-buildandrun-kit}{kit}
You use a wizard to create the connections. You can edit the settings later
- in \gui {Tools > Options > Linux Devices > Device Configurations}.
+ in \gui {Tools > Options > Devices > Devices}.
- \image qtcreator-linux-device-configurations.png "Device Configurations dialog"
+ \image qtcreator-linux-device-configurations.png "Devices dialog"
You can protect the connections between \QC and a device by using
either a password or an SSH key. If you do not have an SSH key, you can
@@ -67,8 +67,8 @@
\list 1
- \o Select \gui {Tools > Options > Linux Devices > Device
- Configurations > Add > Generic Linux Device > Start Wizard}.
+ \o Select \gui {Tools > Options > Linux Devices > Devices > Add
+ > Generic Linux Device > Start Wizard}.
\image qtcreator-screenshot-devconf-linux.png "Connection Data wizard"
@@ -91,9 +91,10 @@
\endlist
- \o Select \gui Tools > \gui Options > \gui {Build & Run} > \gui Targets
- > \gui Add to add a target for building for the device. Select the
- Qt version, compiler, and device that you added above.
+ \o Select \gui Tools > \gui Options > \gui {Build & Run} > \gui Kits
+ > \gui Add to add a kit for building for the device. Select the
+ Qt version, compiler, and device that you added above, and choose
+ \gui {Generic Linux Device} for the device type.
\o To specify build settings:
@@ -102,9 +103,9 @@
\o Open a project for an application you want to develop for the
device.
- \o Select \gui {Projects > Targets > Add}.
+ \o Select \gui {Projects > Build & Run Settings > Add Kit}.
- \o Select the target that you added above.
+ \o Select the kit that you added above.
\endlist
diff --git a/doc/src/overview/creator-deployment-overview.qdoc b/doc/src/overview/creator-deployment-overview.qdoc
index 400f3413da..2461ba30fa 100644
--- a/doc/src/overview/creator-deployment-overview.qdoc
+++ b/doc/src/overview/creator-deployment-overview.qdoc
@@ -40,7 +40,7 @@
\o \l{Deploying Applications to Linux-Based Devices}
- When you deploy the application on a Linux-based device target, such
+ When you deploy the application on a Linux-based device, such
as \gui {Embedded Linux}, \gui Harmattan, or \gui{Maemo5}, \QC
copies the application files to the connected device. You
can test and debug the application on the device.
@@ -48,14 +48,14 @@
Maemo 5 devices.
\o \l{Deploying Applications to QNX Devices}
- When you deploy the application on the \gui{QNX} target, depending
+ When you deploy the application on a \gui{QNX} device, depending
on your target device, \QC either generates a BAR package in the
build directory and deploys it to the connected device, or copies
the application files to the connected device. You can test and
debug the application on the device.
\o \l{Deploying Applications to Android Devices}
- When you deploy the application on the Android target, \QC copies
+ When you deploy the application on an Android device, \QC copies
the application files to the device. In addition, you can determine
the Qt libraries to use.
\endlist
@@ -68,7 +68,7 @@
When you are ready to publish the application on a publishing
channel, you must make sure that the installation file meets the
requirements for publishing and installing applications to the
- target devices.
+ targeted devices.
\endlist
*/
diff --git a/doc/src/overview/creator-getting-started.qdoc b/doc/src/overview/creator-getting-started.qdoc
index 6616f6f15c..bab83192c6 100644
--- a/doc/src/overview/creator-getting-started.qdoc
+++ b/doc/src/overview/creator-getting-started.qdoc
@@ -49,7 +49,7 @@
with the parts of the user interface, go to \l{User Interface}.
\o \bold {\l{Building and Running an Example}}
- To check that \l{glossary-development-target}{targets} were
+ To check that \l{glossary-buildandrun-kit}{kits} for building and running were
successfully installed as part of the \QSDK installation, open
an example application and run it. If you have not done so
before, go to \l{Building and Running an Example}.
diff --git a/doc/src/overview/creator-glossary.qdoc b/doc/src/overview/creator-glossary.qdoc
index 73d48e9bf3..293cdd7451 100644
--- a/doc/src/overview/creator-glossary.qdoc
+++ b/doc/src/overview/creator-glossary.qdoc
@@ -43,7 +43,8 @@
into binaries. Different build configurations allow you to
quickly build the project for different purposes.
By default, \QC creates \e {debug build} and \e {release build}
- configurations for each \e target. A debug build contains
+ configurations for each \l{glossary-buildandrun-kit}{kit} defined for your project.
+ A debug build contains
additional debug symbols that you need for debugging the
application but that you can leave out from the release version.
Generally, you use the debug configuration for testing and the
@@ -80,6 +81,15 @@
a mobile device.
\row
+ \o Kit
+ \target glossary-buildandrun-kit
+ \o \QC groups build and run specific settings as kits to make
+ cross-platform development easier. Each kit consists of a set
+ of values that define one environment, such as a device,
+ tool chain, Qt version, and debugger command to use. Configure kits at
+ \gui {Tools > Options > Build & Run > Kits}.
+
+ \row
\o Mode
\target glossary-mode
\o Adapts the \QC user interface to the different application
@@ -102,14 +112,15 @@
\target glossary-project-qt
\o \QC allows you to have multiple versions of Qt installed on your
development PC and use different versions to build your projects
- for different \e targets.
+ for different purposes.
\row
\o Run configuration
\target glossary-run-config
\o Starts the application in the location where it was copied by
the \e {deploy configuration}. By default, when you run a
- project, \QC builds it, deploys it to the selected \e target,
+ project, \QC builds it, deploys it to the device specified in the selected
+ \l{glossary-buildandrun-kit}{kit},
and runs it there. However, if you have not made any changes to
the project since you last built and deployed it, \QC simply
runs it again.
@@ -126,23 +137,6 @@
if you need many build configurations for a single set of
source files.
- \row
- \o Target
- \target glossary-development-target
- \o \QC groups platform specific settings as targets to make
- cross-platform development easier. Each target consists of a set
- of values that define one environment, such as a device,
- tool chain, Qt version, and debugger command to use.
-
- \row
- \o Tool chain
- \target glossary-tool-chain
- \o Specifies a compiler and a debugger and other necessary
- tools for building an application for a particular \e target.
- \QC tries to detect the tool chains that are available on your
- system. You can manually add tool chains that are not detected
- automatically.
-
\endtable
*/
diff --git a/doc/src/overview/creator-issues.qdoc b/doc/src/overview/creator-issues.qdoc
index ade3e75302..74d2b2a952 100644
--- a/doc/src/overview/creator-issues.qdoc
+++ b/doc/src/overview/creator-issues.qdoc
@@ -107,7 +107,7 @@
\if defined(qcmanual)
\o On Windows, you must create projects for Maemo 5 and Harmattan
- targets on the same partition where you installed \QSDK, \QC, and
+ device types on the same partition where you installed \QSDK, \QC, and
MADDE.
\endif
diff --git a/doc/src/overview/creator-mobile-targets.qdoc b/doc/src/overview/creator-mobile-targets.qdoc
index 315dd31f3b..08e6014bbf 100644
--- a/doc/src/overview/creator-mobile-targets.qdoc
+++ b/doc/src/overview/creator-mobile-targets.qdoc
@@ -32,7 +32,8 @@
\title Connecting Mobile Targets
You can connect mobile devices to the development PC to build, run, debug,
- and analyze applications on them from \QC. When you install mobile targets
+ and analyze applications on them from \QC. When you install
+ \l{glossary-buildandrun-kit}{kits} for building and running on mobile targets
as part of the \QSDK, the build and run settings for the target devices are
set up automatically in \QC. However, \QSDK does not contain a tool chain
for building applications for embedded Linux devices.
diff --git a/doc/src/overview/creator-overview.qdoc b/doc/src/overview/creator-overview.qdoc
index 41cfe940ee..fbd9b47b92 100644
--- a/doc/src/overview/creator-overview.qdoc
+++ b/doc/src/overview/creator-overview.qdoc
@@ -87,9 +87,10 @@
and commands used to build the project.
\QC provides support for building, running, and deploying Qt
- applications for desktop environment and mobile devices. Build,
+ applications for desktop environment and mobile devices.
+ \l{glossary-buildandrun-kit}{Kits}, build,
run, and deployment settings allow you to quickly switch between
- targets.
+ different setups and targets.
For more information, see \l{Building and Running}.
\o \bold {\l{Debugging and Analyzing}}
diff --git a/doc/src/projects/creator-projects-build-run-tutorial.qdoc b/doc/src/projects/creator-projects-build-run-tutorial.qdoc
index cf7ad4379b..11fa27de4d 100644
--- a/doc/src/projects/creator-projects-build-run-tutorial.qdoc
+++ b/doc/src/projects/creator-projects-build-run-tutorial.qdoc
@@ -50,22 +50,22 @@
\o Select \gui Projects to configure the project:
- \image qtcreator-gs-build-example-targets.png "Selecting targets"
+ \image qtcreator-gs-build-example-targets.png "Selecting kit for building and running"
\list 1
\o Select at least \QS and one of the mobile
- \l{glossary-development-target}{targets} (1), Maemo 5 or
+ \l{glossary-buildandrun-kit}{kits} (1), Maemo 5 or
MeeGo Harmattan, depending on the device you develop for.
\o Select \gui {Configure Project} (2).
\endlist
- \o To test the application in \QS, click the \gui {Target
+ \o To test the application in \QS, click the \gui {Kit
Selector} and select \gui {\QS}.
- \image qtcreator-gs-build-example-select-qs.png "Selecting Qt Simulator as target"
+ \image qtcreator-gs-build-example-select-qs.png "Selecting Qt Simulator as target device type"
\o Click
\inlineimage qtcreator-run.png
diff --git a/doc/src/projects/creator-projects-building-running.qdoc b/doc/src/projects/creator-projects-building-running.qdoc
index 3b24ebcf77..75dc88ca45 100644
--- a/doc/src/projects/creator-projects-building-running.qdoc
+++ b/doc/src/projects/creator-projects-building-running.qdoc
@@ -34,20 +34,24 @@
\image creator_buildingrunning.png
\QC provides support for building, running, and deploying Qt applications
- for different \l{glossary-development-target}{targets}.
+ for different targets, or using different compilers, debuggers or Qt versions.
+ \l{glossary-buildandrun-kit}{Kits} define the tools,
+ device type and other settings to use when building and running your project.
\list
\o \l{Building for Multiple Targets}
\e {Build configurations} contain everything you need to compile
- the sources into binaries.
+ the sources into binaries. Build configurations use the tools and settings
+ defined in their corresponding \l{glossary-buildandrun-kit}{kit}.
\o \l{Running on Multiple Targets}
\e {Run configurations} start the application in the location
where it was copied by the \e{deploy configuration}. By default,
when you select the \gui Run function, \QC builds the project,
- deploys it to the selected target, and runs it there. However,
+ deploys it to the target defined in the \l{glossary-buildandrun-kit}{kit},
+ and runs it there. However,
if you have not made any changes to the project since you last
built and deployed it, \QC simply runs it again.
@@ -60,8 +64,8 @@
\o \l{Connecting Mobile Targets}
- When you install tool chains for build targets as part of the \QSDK,
- the build and run settings for mobile device targets are set up
+ When you install tool chains for device types as part of the \QSDK,
+ the build and run settings for mobile device types are set up
automatically. However, you might need to install and configure some
additional software on the devices to be able to connect to them
from the development PC.
@@ -75,7 +79,7 @@
\o \l{Customizing the Build Process}
By default, running an application also builds it and deploys it to
- a location from where it can be run on the target. You can change
+ a location from where it can be run on the target device. You can change
the relationship between the build, run, and deploy configurations.
\o \l{http://doc.qt.nokia.com/qtsimulator/index.html}
@@ -89,7 +93,9 @@
Therefore, applications that run well on \QS also run on
any device that hosts the Qt and Qt Mobility libraries.
The \QS is installed as part of the \QSDK. After it is
- installed, you can select it as a build target in \QC.
+ installed, you can create a \l{glossary-buildandrun-kit}{kit}
+ with \gui Desktop device type and the Qt Simulator Qt version for
+ building and running your projects.
\o \l{Using Maemo or MeeGo Harmattan Emulator}
diff --git a/doc/src/projects/creator-projects-building.qdoc b/doc/src/projects/creator-projects-building.qdoc
index 440fea2007..307310255c 100644
--- a/doc/src/projects/creator-projects-building.qdoc
+++ b/doc/src/projects/creator-projects-building.qdoc
@@ -31,12 +31,15 @@
\title Building for Multiple Targets
- You can build applications for multiple \l{glossary-development-target}
- {targets}. By default, when you run the application on a target, you
- automatically build it for the target and deploy it to the target first.
+ You can build applications for multiple targets, or using different compilers,
+ debuggers or Qt versions. \l{glossary-buildandrun-kit}{Kits} define the tools,
+ device type and other settings to use.
+
+ By default, when you run the application, you
+ automatically build and deploy it first.
However, you can also perform each operation separately.
- To check that the application code can be compiled and linked for a target,
+ To check that the application code can be compiled and linked for a device,
you can build the project. The build errors and warnings are displayed in
the \gui {Issues} output pane. More detailed information is displayed
in the \gui {Compile Output} pane.
@@ -45,9 +48,9 @@
\list 1
- \o Select a target for the project.
+ \o Select a \l{glossary-buildandrun-kit}{kit} for the project.
- \image qtcreator-target-selector.png "Target selector"
+ \image qtcreator-kit-selector.png "Kit selector"
\o Choose \gui {Build > Build Project} or press \key {Ctrl+B}.
diff --git a/doc/src/projects/creator-projects-compilers.qdoc b/doc/src/projects/creator-projects-compilers.qdoc
index 9382336da6..e99bd621ae 100644
--- a/doc/src/projects/creator-projects-compilers.qdoc
+++ b/doc/src/projects/creator-projects-compilers.qdoc
@@ -33,9 +33,9 @@
Qt is supported on a variety of 32-bit and 64-bit platforms, and can
usually be built on each platform with GCC, a vendor-supplied compiler, or
- a third party compiler. In \QC, a \l{glossary-development-target}{target}
- specifies the compiler and other necessary tools for building an
- application for a particular platform.
+ a third party compiler. In \QC, a \l{glossary-buildandrun-kit}{kit}
+ specifies the compiler and other necessary tools for building and running an
+ application on a particular platform.
\QC automatically detects the compilers that are registered by your system
or by an SDK. You can add compilers to build applications by using other
@@ -64,8 +64,8 @@
the application binary interface (ABI) version from the list of available
versions. You can also create a custom ABI definition.
- You specify the compiler to use for each target in \gui Tools >
- \gui Options > \gui {Build & Run} > \gui Targets.
+ You specify the compiler to use for each kit in \gui Tools >
+ \gui Options > \gui {Build & Run} > \gui Kits.
To add compilers:
diff --git a/doc/src/projects/creator-projects-creating.qdoc b/doc/src/projects/creator-projects-creating.qdoc
index 1f8a371499..cd467f1169 100644
--- a/doc/src/projects/creator-projects-creating.qdoc
+++ b/doc/src/projects/creator-projects-creating.qdoc
@@ -68,9 +68,9 @@
use \QC as a code editor and to fully control the steps and commands used to
build the project.
- 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
+ You can install tools for mobile devices
+ as part of the \QSDK. The \l{glossary-buildandrun-kit}{kits} and build and run settings for the
+ installed device types are set up automatically. However, you might need to
install and configure some additional software on the devices to be able to
connect to them from the development PC.
@@ -78,7 +78,7 @@
In the first step, you
select a template for the project. You can filter templates (1) to view only
- those that apply to a particular target.
+ those that apply to a particular device type.
\image qtcreator-new-qt-quick-project-wizard.png
@@ -225,8 +225,8 @@
To create a new project, select \gui File > \gui{New File or Project} and
select the type of your project. The contents of the wizard dialogs depend
- on the project type and the build targets that you select in the
- \gui {Target Setup} dialog. Follow the instructions of the wizard.
+ on the project type and the \l{glossary-buildandrun-kit}{kits} that you select in the
+ \gui {Kit Selection} dialog. Follow the instructions of the wizard.
For examples of creating different types of projects, see
\l{Tutorials}.
@@ -238,8 +238,8 @@
for building and running projects, select \gui{Tools} > \gui{Options} >
\gui{Build & Run} > \gui{General}.
- To specify build and run settings for different target platforms, select
- \gui Projects.
+ To specify build and run settings for different target platforms ,
+ select \gui Projects.
\section1 Adding Files to Projects
diff --git a/doc/src/projects/creator-projects-opening.qdoc b/doc/src/projects/creator-projects-opening.qdoc
index 6d30ba4f4d..cf9cedb34e 100644
--- a/doc/src/projects/creator-projects-opening.qdoc
+++ b/doc/src/projects/creator-projects-opening.qdoc
@@ -39,19 +39,20 @@
one environment to another. Therefore, we recommend that you click \gui No
and enter the information again in the \gui {Configure Project} tab.
- The \gui {Configure Project} tab displays a list of development environments
- for target platforms that are installed on the development PC and
- configured in \gui Tools > \gui Options > \gui {Build & Run} > \gui Targets.
- Select the targets that you want to build the project for.
+ The \gui {Configure Project} tab displays a list of \l{glossary-buildandrun-kit}{kits}
+ for building and running projects, that are installed on the development PC and
+ configured in \gui Tools > \gui Options > \gui {Build & Run} > \gui Kits.
+ Select the kits that you want to build and run the project with.
\image qtcreator-open-project-targets.png "Configure Project tab"
Even if you do not intend to build the project, the C++ and QML code models
need a Qt version and compiler to offer code completion. To specify them,
select the \gui Options link, or select \gui {Tools > Options > Build & Run
- > Targets}.
+ > Kits}.
- If \QC cannot find an existing build for a particular target, it starts out
+ If \QC cannot find an existing build for a particular \l{glossary-buildandrun-kit}{kit},
+ it starts out
from a clean slate, and creates new debug and release build configurations
in the specified directory. \QC suggests a name
and location for the directory that you can change.
@@ -71,7 +72,7 @@
\o Select \gui File > \gui{Open File or Project} and select the project
to open.
- \o In the \gui {Configure Project} tab, select build targets for your
+ \o In the \gui {Configure Project} tab, select kits for building and running your
project, and click \gui {Configure Project}.
\endlist
diff --git a/doc/src/projects/creator-projects-qt-versions.qdoc b/doc/src/projects/creator-projects-qt-versions.qdoc
index b9a31b8be5..9185ac45a5 100644
--- a/doc/src/projects/creator-projects-qt-versions.qdoc
+++ b/doc/src/projects/creator-projects-qt-versions.qdoc
@@ -32,7 +32,7 @@
\title Adding Qt Versions
\QC allows you to have multiple versions of Qt installed on your development
- PC and use different versions to build your projects for different targets.
+ PC and use different versions to build your projects.
For example, \QSDK contains special Qt versions for developing applications
for mobile devices.
@@ -42,8 +42,9 @@
\gui {Qt version for} section. To add Qt versions, select
\gui {Tools > Options > Build & Run > Qt Versions}.
- You specify the Qt version to use for each \l{glossary-development-target}
- {target} in \gui Tools > \gui Options > \gui {Build & Run} > \gui Targets.
+ You specify the Qt version to use for each \l{glossary-buildandrun-kit}
+ {kit} for building and running your projects
+ in \gui Tools > \gui Options > \gui {Build & Run} > \gui Kits.
\section2 Setting Up New Qt Versions
diff --git a/doc/src/projects/creator-projects-running-desktop.qdocinc b/doc/src/projects/creator-projects-running-desktop.qdocinc
index c5f2cc732f..0a7b810b9b 100644
--- a/doc/src/projects/creator-projects-running-desktop.qdocinc
+++ b/doc/src/projects/creator-projects-running-desktop.qdocinc
@@ -2,9 +2,9 @@
\list 1
- \o Select \gui Desktop as the target.
+ \o Select \gui Desktop as the build and run \l{glossary-buildandrun-kit}{kit}.
- \image qtcreator-target-selector.png "Target selector"
+ \image qtcreator-kit-selector.png "Kit selector"
\o Click the \gui Run button.
diff --git a/doc/src/projects/creator-projects-running-simulator.qdocinc b/doc/src/projects/creator-projects-running-simulator.qdocinc
index 1b802dbc56..7a96271c62 100644
--- a/doc/src/projects/creator-projects-running-simulator.qdocinc
+++ b/doc/src/projects/creator-projects-running-simulator.qdocinc
@@ -7,7 +7,7 @@
\list 1
- \o Select \gui {\QS} as the target.
+ \o Select \gui {\QS} as the build and run \l{glossary-buildandrun-kit}{kit}.
\o Click the \gui Run button.
diff --git a/doc/src/projects/creator-projects-settings-build.qdoc b/doc/src/projects/creator-projects-settings-build.qdoc
index 8e5e1d7a0f..3a39742c3f 100644
--- a/doc/src/projects/creator-projects-settings-build.qdoc
+++ b/doc/src/projects/creator-projects-settings-build.qdoc
@@ -55,11 +55,12 @@
By default, \QC builds projects in a separate directory from the source
directory, as \l{glossary-shadow-build} {shadow builds}. This keeps the
- files generated for each \l{glossary-development-target}{target} separate.
- If you only build for one target, you can deselect the \gui {Shadow build}
+ files generated for each \l{glossary-buildandrun-kit}{build and run kit} separate.
+ If you only build and run with a single \l{glossary-buildandrun-kit}{kit},
+ you can deselect the \gui {Shadow build}
checkbox.
- Shadow building is not supported for the following target platforms on
+ Shadow building is not supported for the following device types on
Windows:
\list
@@ -192,7 +193,7 @@
\list
- \o \l{Adding Targets}
+ \o \l{Adding Kits}
\o \l{Adding Qt Versions}
\o \l{Adding Compilers}
diff --git a/doc/src/projects/creator-projects-settings-overview.qdoc b/doc/src/projects/creator-projects-settings-overview.qdoc
index 2a4f293d79..2584d2337e 100644
--- a/doc/src/projects/creator-projects-settings-overview.qdoc
+++ b/doc/src/projects/creator-projects-settings-overview.qdoc
@@ -33,8 +33,7 @@
\omit
When you install the \QSDK, the build and run settings for the development
- targets
- delivered with the \QSDK are set up automatically.
+ targets delivered with the \QSDK are set up automatically.
\endomit
To view and modify the settings for currently open projects, switch to the
@@ -42,23 +41,23 @@
\image qtcreator-project-targets.png
- To add build and run targets for the project, select \gui Add. The list
- displays targets that are configured in \gui Tools > \gui Options >
- \gui {Build & Run} > \gui Targets. To add targets to the list, select
+ To add build and run \l{glossary-buildandrun-kit}{kits} for the project, select \gui Add. The list
+ displays kits that are configured in \gui Tools > \gui Options >
+ \gui {Build & Run} > \gui Kits. To add kits to the list, select
\gui Manage.
- To remove a target, hover the cursor over it (1) and click
- \inlineimage qtcreator-target-remove.png "Remove Target button"
+ To remove a kit, hover the cursor over it (1) and click
+ \inlineimage qtcreator-target-remove.png "Remove Kit button"
.
- You can select the targets and use the \gui Build menu commands to build,
+ You can select the kits and use the \gui Build menu commands to build,
deploy, and run projects.
The project pane consists of the following tabs:
\list
- \o \l{Adding Targets}{Targets}
+ \o \l{Adding Kits}{Build & Run}
\list
@@ -69,7 +68,7 @@
\endlist
\note If you have not configured the project for building, the
- \gui Targets tab is replaced by the \l{Opening Projects}
+ \gui {Build & Run} tab is replaced by the \l{Opening Projects}
{Configure Projects} tab.
\o \l{Specifying Editor Settings}{Editor Settings}
diff --git a/doc/src/projects/creator-projects-settings-run-analyze.qdocinc b/doc/src/projects/creator-projects-settings-run-analyze.qdocinc
index 69352b1dcf..f53563feef 100644
--- a/doc/src/projects/creator-projects-settings-run-analyze.qdocinc
+++ b/doc/src/projects/creator-projects-settings-run-analyze.qdocinc
@@ -4,8 +4,7 @@
detecting memory leaks and profiling function execution. You can configure
the tools according to your needs.
- You can specify analyzer settings for the desktop and \QS targets.
- You can specify them either globally for all projects or separately for each
+ You can specify analyzer settings either globally for all projects or separately for each
project.
To specify analyzer settings for the current project:
diff --git a/doc/src/projects/creator-projects-settings-run-desktop.qdocinc b/doc/src/projects/creator-projects-settings-run-desktop.qdocinc
index 59b275d09e..06b680927f 100644
--- a/doc/src/projects/creator-projects-settings-run-desktop.qdocinc
+++ b/doc/src/projects/creator-projects-settings-run-desktop.qdocinc
@@ -1,4 +1,4 @@
- \section2 Specifying Run Settings for Desktop Targets
+ \section2 Specifying Run Settings for Desktop Device Types
You can specify command line arguments to be passed to the executable
and the working directory to use. The working directory defaults to
diff --git a/doc/src/projects/creator-projects-settings-run.qdoc b/doc/src/projects/creator-projects-settings-run.qdoc
index 38f32faefd..407fe67246 100644
--- a/doc/src/projects/creator-projects-settings-run.qdoc
+++ b/doc/src/projects/creator-projects-settings-run.qdoc
@@ -32,10 +32,10 @@
\title Specifying Run Settings
\QC automatically creates run configurations for your project.
- To view and modify the settings, select \gui {Projects > Run}.
+ To view and modify the settings, select \gui {Projects > Build & Run > Run}.
- The settings to specify depend on the type of the project and on the build
- target for the project.
+ The settings to specify depend on the type of the project and on the
+ \l{glossary-buildandrun-kit}{kit} that you build and run the project with.
Click \gui Add to add run settings for a project and \gui Remove to remove
the current settings.
diff --git a/doc/src/projects/creator-projects-targets.qdoc b/doc/src/projects/creator-projects-targets.qdoc
index 6cadd5cdbb..2c7aefb6e5 100644
--- a/doc/src/projects/creator-projects-targets.qdoc
+++ b/doc/src/projects/creator-projects-targets.qdoc
@@ -29,13 +29,14 @@
\page creator-targets.html
\nextpage creator-project-qmake.html
- \title Adding Targets
+ \title Adding Kits
- \QC groups platform specific settings as \e targets to make cross-platform
- development easier. Each target consists of a set of values that define one
+ \QC groups settings used for building and running projects as kits
+ to make cross-platform and cross-configuration
+ development easier. Each kit consists of a set of values that define one
environment, such as a device, compiler, Qt version, and debugger command
- to use, and some metadata, such as an icon and a name for the target. Once
- you have defined targets, you can select them to build and run projects.
+ to use, and some metadata, such as an icon and a name for the kit. Once
+ you have defined kits, you can select them to build and run projects.
\QC supports development for the desktop and for the following types of
devices:
@@ -54,18 +55,18 @@
\endlist
- To add targets:
+ To add kits:
\list 1
- \o Select \gui Tools > \gui Options > \gui {Build & Run} > \gui Targets
+ \o Select \gui Tools > \gui Options > \gui {Build & Run} > \gui Kits
> \gui Add.
\image qtcreator-targets.png
- To clone the selected target, select \gui Clone.
+ To clone the selected kit, select \gui Clone.
- \o In the \gui Name column, double-click the target name to change it.
+ \o In the \gui Name column, double-click the kit name to change it.
@@ -73,11 +74,11 @@
target.
Double-click the icon next to the field to select the image that is
- displayed in the target selector for this target. You can use any
+ displayed in the kit selector for this kit. You can use any
image in a supported file format (for example, PNG). The image is
scaled to the size 64x64 pixels. For example, using the compiler
logo as an icon allows you to easily see, which compiler is used to
- build the project for the selected target.
+ build the project for the selected kit.
\o In the \gui Device field, select the device configuration to target.
@@ -104,7 +105,7 @@
\QC checks the directories listed in the \c{PATH} environment
variable for the qmake executable. If a qmake executable is found,
it is referred to as \bold{Qt in PATH} and selected as the Qt
- version to use for the \gui Desktop target.
+ version to use for the \gui Desktop kit that is created by default.
\o In the \gui {Qt mkspec} field, specify build instructions for qmake.
If you leave this field empty, the default value is used.
diff --git a/doc/src/qtcreator.qdoc b/doc/src/qtcreator.qdoc
index 0e8d3214af..44e6632004 100644
--- a/doc/src/qtcreator.qdoc
+++ b/doc/src/qtcreator.qdoc
@@ -169,7 +169,7 @@
\list
\o \l{Specifying Build Settings}
\list
- \o \l{Adding Targets}
+ \o \l{Adding Kits}
\o \l{Adding Qt Versions}
\o \l{Adding Compilers}
\endlist
diff --git a/doc/src/qtquick/creator-projects-settings-run-qtquick.qdocinc b/doc/src/qtquick/creator-projects-settings-run-qtquick.qdocinc
index 32434f1c56..09d36b33fd 100644
--- a/doc/src/qtquick/creator-projects-settings-run-qtquick.qdocinc
+++ b/doc/src/qtquick/creator-projects-settings-run-qtquick.qdocinc
@@ -1,6 +1,6 @@
\section1 Specifying Run Settings for Qt Quick UI Projects
- You can specify run settings for the \gui Desktop target:
+ You can specify run settings for \l{glossary-buildandrun-kit}{kits} with \gui Desktop device type:
\list
diff --git a/doc/src/qtquick/qtquick-app-tutorial.qdoc b/doc/src/qtquick/qtquick-app-tutorial.qdoc
index b00b72a2f7..2c963ce1d5 100644
--- a/doc/src/qtquick/qtquick-app-tutorial.qdoc
+++ b/doc/src/qtquick/qtquick-app-tutorial.qdoc
@@ -59,13 +59,11 @@
\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 In the \gui {Application Type} dialog, select \gui {Built-in
- elements only (for all platforms)}, and then click \gui{Next}.
+ \o Select \l{glossary-buildandrun-kit}{kits} for running and building your project,
+ and then click \gui{Next}.
- \o Select targets, and then click \gui{Next}.
-
- \note Targets are listed if they have been specified in \gui Tools >
- \gui Options > \gui {Build & Run} > \gui Targets.
+ \note Kits are listed if they have been specified in \gui Tools >
+ \gui Options > \gui {Build & Run} > \gui Kits.
\o Select \gui Next in the following dialogs to use the default
settings.
diff --git a/doc/src/qtquick/qtquick-creating.qdoc b/doc/src/qtquick/qtquick-creating.qdoc
index 025b38787f..d92505411c 100644
--- a/doc/src/qtquick/qtquick-creating.qdoc
+++ b/doc/src/qtquick/qtquick-creating.qdoc
@@ -154,15 +154,15 @@
\o Click \gui{Next}.
- The \gui {Target Setup} dialog opens.
+ The \gui {Kit Selection} dialog opens.
- \image qmldesigner-new-project-qt-versions.png "Target Setup dialog"
+ \image qmldesigner-new-project-qt-versions.png "Kit Selection dialog"
- \o Select build targets for your project,
+ \o Select build and run \l{glossary-buildandrun-kit}{kits} for your project,
and then click \gui{Next}.
- \note If only one target is specified in \gui Tools > \gui Options >
- \gui {Build & Run} > \gui Targets, this dialog is skipped.
+ \note If only one kit is specified in \gui Tools > \gui Options >
+ \gui {Build & Run} > \gui Kits, this dialog is skipped.
The \gui {Mobile Options} dialog opens.
@@ -172,8 +172,8 @@
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
- target in the \gui {Target Setup} dialog. On
+ \note This dialog opens only if you select a \l{glossary-buildandrun-kit}{kit}
+ with \gui Maemo5 device type in the \gui {Kit Selection} dialog. On
Harmattan, the Qt Quick Components for MeeGo provide native-looking
rotation.
diff --git a/doc/src/widgets/qtdesigner-app-tutorial.qdoc b/doc/src/widgets/qtdesigner-app-tutorial.qdoc
index 8afe90923b..9e917d52c8 100644
--- a/doc/src/widgets/qtdesigner-app-tutorial.qdoc
+++ b/doc/src/widgets/qtdesigner-app-tutorial.qdoc
@@ -57,15 +57,15 @@
\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}.
- The \gui {Target Setup} dialog opens.
+ The \gui {Kit Selection} dialog opens.
- \image qtcreator-new-project-qt-versions-qt-gui.png "Target Setup dialog"
+ \image qtcreator-new-project-qt-versions-qt-gui.png "Kit Selection dialog"
- \o Select build targets for your project,
+ \o Select build and run \l{glossary-buildandrun-kit}{kits} for your project,
and click \gui{Next}.
- \note If only one target is specified in \gui Tools > \gui Options >
- \gui {Build & Run} > \gui Targets, this dialog is
+ \note If only one kit is specified in \gui Tools > \gui Options >
+ \gui {Build & Run} > \gui Kits, this dialog is
skipped.
The \gui{Class Information} dialog opens.
diff --git a/qtcreator.pro b/qtcreator.pro
index d08345e351..c9b2be0268 100644
--- a/qtcreator.pro
+++ b/qtcreator.pro
@@ -20,10 +20,11 @@ OTHER_FILES += dist/copyright_template.txt \
macx {
APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
deployqt.commands = $$PWD/scripts/deployqtHelper_mac.sh \"$${APPBUNDLE}\"
+ codesign.commands = codesign -s \"$(SIGNING_IDENTITY)\" \"$${APPBUNDLE}\"
bindist.commands = 7z a -mx9 $$OUT_PWD/qt-creator-mac$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX).7z \"$$OUT_PWD/bin/Qt Creator.app/\"
dmg.commands = $$PWD/scripts/makedmg.sh $$OUT_PWD/bin qt-creator-mac$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX).dmg
dmg.depends = deployqt
- QMAKE_EXTRA_TARGETS += dmg
+ QMAKE_EXTRA_TARGETS += codesign dmg
} else {
deployqt.commands = $$PWD/scripts/deployqt.py -i $(INSTALL_ROOT)
deployqt.depends = install
diff --git a/src/libs/cplusplus/FindUsages.cpp b/src/libs/cplusplus/FindUsages.cpp
index 3086ca0d0f..1ae48798d6 100644
--- a/src/libs/cplusplus/FindUsages.cpp
+++ b/src/libs/cplusplus/FindUsages.cpp
@@ -212,35 +212,6 @@ void FindUsages::reportResult(unsigned tokenIndex)
_references.append(tokenIndex);
}
-bool FindUsages::compareFullyQualifiedName(const QList<const Name *> &path, const QList<const Name *> &other)
-{
- if (path.length() != other.length())
- return false;
-
- for (int i = 0; i < path.length(); ++i) {
- if (! compareName(path.at(i), other.at(i)))
- return false;
- }
-
- return true;
-}
-
-bool FindUsages::compareName(const Name *name, const Name *other)
-{
- if (name == other)
- return true;
-
- else if (name && other) {
- const Identifier *id = name->identifier();
- const Identifier *otherId = other->identifier();
-
- if (id == otherId || (id && id->isEqualTo(otherId)))
- return true;
- }
-
- return false;
-}
-
bool FindUsages::isLocalScope(Scope *scope)
{
if (scope) {
diff --git a/src/libs/cplusplus/FindUsages.h b/src/libs/cplusplus/FindUsages.h
index 2f5ec585b9..bd94323892 100644
--- a/src/libs/cplusplus/FindUsages.h
+++ b/src/libs/cplusplus/FindUsages.h
@@ -82,8 +82,6 @@ protected:
bool checkCandidates(const QList<LookupItem> &candidates) const;
void checkExpression(unsigned startToken, unsigned endToken, Scope *scope = 0);
- static bool compareFullyQualifiedName(const QList<const Name *> &path, const QList<const Name *> &other);
- static bool compareName(const Name *name, const Name *other);
static bool isLocalScope(Scope *scope);
void statement(StatementAST *ast);
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index d41846014c..909e02b5e0 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -88,6 +88,39 @@ static void path_helper(Symbol *symbol, QList<const Name *> *names)
}
}
+namespace CPlusPlus {
+
+bool compareName(const Name *name, const Name *other)
+{
+ if (name == other)
+ return true;
+
+ else if (name && other) {
+ const Identifier *id = name->identifier();
+ const Identifier *otherId = other->identifier();
+
+ if (id == otherId || (id && id->isEqualTo(otherId)))
+ return true;
+ }
+
+ return false;
+}
+
+bool compareFullyQualifiedName(const QList<const Name *> &path, const QList<const Name *> &other)
+{
+ if (path.length() != other.length())
+ return false;
+
+ for (int i = 0; i < path.length(); ++i) {
+ if (! compareName(path.at(i), other.at(i)))
+ return false;
+ }
+
+ return true;
+}
+
+}
+
bool ClassOrNamespace::CompareName::operator()(const Name *name, const Name *other) const
{
Q_ASSERT(name != 0);
@@ -416,20 +449,51 @@ QList<LookupItem> ClassOrNamespace::lookup_helper(const Name *name, bool searchI
QList<LookupItem> result;
if (name) {
- QSet<ClassOrNamespace *> processed;
if (const QualifiedNameId *q = name->asQualifiedNameId()) {
if (! q->base())
result = globalNamespace()->find(q->name());
- else if (ClassOrNamespace *binding = lookupType(q->base()))
+ else if (ClassOrNamespace *binding = lookupType(q->base())) {
result = binding->find(q->name());
- lookup_helper(name, this, &result, &processed, /*templateId = */ 0);
+ QList<const Name *> fullName;
+ addNames(name, &fullName);
+
+ // It's also possible that there are matches in the parent binding through
+ // a qualified name. For instance, a nested class which is forward declared
+ // in the class but defined outside it - we should capture both.
+ Symbol *match = 0;
+ ClassOrNamespace *parentBinding = binding->parent();
+ while (parentBinding && !match) {
+ for (int j = 0; j < parentBinding->symbols().size() && !match; ++j) {
+ if (Scope *scope = parentBinding->symbols().at(j)->asScope()) {
+ for (unsigned i = 0; i < scope->memberCount(); ++i) {
+ Symbol *candidate = scope->memberAt(i);
+ if (compareFullyQualifiedName(
+ fullName,
+ LookupContext::fullyQualifiedName(candidate))) {
+ match = candidate;
+ break;
+ }
+ }
+ }
+ }
+ parentBinding = parentBinding->parent();
+ }
+
+ if (match) {
+ LookupItem item;
+ item.setDeclaration(match);
+ item.setBinding(binding);
+ result.append(item);
+ }
+ }
return result;
}
+ QSet<ClassOrNamespace *> processed;
ClassOrNamespace *binding = this;
do {
lookup_helper(name, binding, &result, &processed, /*templateId = */ 0);
@@ -456,6 +520,7 @@ void ClassOrNamespace::lookup_helper(const Name *name, ClassOrNamespace *binding
else if (s->isUsingNamespaceDirective())
continue;
+
if (Scope *scope = s->asScope()) {
if (Class *klass = scope->asClass()) {
if (const Identifier *id = klass->identifier()) {
diff --git a/src/libs/cplusplus/LookupContext.h b/src/libs/cplusplus/LookupContext.h
index a2de7f8cad..fef317fd61 100644
--- a/src/libs/cplusplus/LookupContext.h
+++ b/src/libs/cplusplus/LookupContext.h
@@ -252,6 +252,11 @@ private:
QSharedPointer<Control> _control;
};
+bool CPLUSPLUS_EXPORT compareName(const Name *name, const Name *other);
+bool CPLUSPLUS_EXPORT compareFullyQualifiedName(const QList<const Name *> &path,
+ const QList<const Name *> &other);
+
+
} // namespace CPlusPlus
#endif // CPLUSPLUS_LOOKUPCONTEXT_H
diff --git a/src/libs/cplusplus/ResolveExpression.cpp b/src/libs/cplusplus/ResolveExpression.cpp
index 961795c95d..a64a61a0bc 100644
--- a/src/libs/cplusplus/ResolveExpression.cpp
+++ b/src/libs/cplusplus/ResolveExpression.cpp
@@ -473,27 +473,38 @@ bool ResolveExpression::visit(SimpleNameAST *ast)
if (item.declaration() == 0)
continue;
- if (item.type().isAuto()) {
+ if (item.type().isAuto()
+ && _blockedIds.find(ast->name->identifier()) == _blockedIds.end()) {
const Declaration *decl = item.declaration()->asDeclaration();
if (!decl)
continue;
- Document::Ptr doc = _context.snapshot().document(decl->fileName());
-
const StringLiteral *initializationString = decl->getInitializer();
if (initializationString == 0)
continue;
- QByteArray initializer = QByteArray::fromRawData(initializationString->chars(), initializationString->size()).trimmed();
+ const QByteArray &initializer =
+ QByteArray::fromRawData(initializationString->chars(),
+ initializationString->size()).trimmed();
// Skip lambda-function initializers
if (initializer.length() > 0 && initializer[0] == '[')
continue;
TypeOfExpression exprTyper;
+ Document::Ptr doc = _context.snapshot().document(decl->fileName());
exprTyper.init(doc, _context.snapshot(), _context.bindings());
- QList<LookupItem> typeItems = exprTyper(initializer, decl->enclosingScope(), TypeOfExpression::Preprocess);
+ Document::Ptr exprDoc =
+ documentForExpression(exprTyper.preprocessedExpression(initializer));
+ exprDoc->check();
+ ExpressionAST *exprAST = extractExpressionAST(exprDoc);
+ if (!exprAST)
+ continue;
+
+ _blockedIds.insert(ast->name->identifier());
+ const QList<LookupItem> &typeItems = resolve(exprAST, decl->enclosingScope());
+ _blockedIds.erase(ast->name->identifier());
if (typeItems.empty())
continue;
diff --git a/src/libs/cplusplus/ResolveExpression.h b/src/libs/cplusplus/ResolveExpression.h
index e792d6c283..3809f04afc 100644
--- a/src/libs/cplusplus/ResolveExpression.h
+++ b/src/libs/cplusplus/ResolveExpression.h
@@ -36,6 +36,7 @@
#include <ASTVisitor.h>
#include <FullySpecifiedType.h>
#include <Bind.h>
+#include <set>
namespace CPlusPlus {
@@ -118,12 +119,20 @@ protected:
// Objective-C expressions
virtual bool visit(ObjCMessageExpressionAST *ast);
+
private:
+ struct IdentifierComp
+ {
+ bool operator()(const Identifier *a, const Identifier *b) const
+ { return strcmp(a->chars(), b->chars()) < 0; }
+ };
+
Scope *_scope;
LookupContext _context;
Bind bind;
QList<LookupItem> _results;
bool _reference;
+ std::set<const Identifier *, IdentifierComp> _blockedIds; // Replace by a hash impl.
};
} // namespace CPlusPlus
diff --git a/src/libs/cplusplus/TypeOfExpression.cpp b/src/libs/cplusplus/TypeOfExpression.cpp
index 6ff53618c2..792ecb1cba 100644
--- a/src/libs/cplusplus/TypeOfExpression.cpp
+++ b/src/libs/cplusplus/TypeOfExpression.cpp
@@ -163,23 +163,6 @@ ExpressionAST *TypeOfExpression::expressionAST() const
return extractExpressionAST(m_lookupContext.expressionDocument());
}
-ExpressionAST *TypeOfExpression::extractExpressionAST(Document::Ptr doc) const
-{
- if (! doc->translationUnit()->ast())
- return 0;
-
- return doc->translationUnit()->ast()->asExpression();
-}
-
-Document::Ptr TypeOfExpression::documentForExpression(const QByteArray &utf8code) const
-{
- // create the expression's AST.
- Document::Ptr doc = Document::create(QLatin1String("<completion>"));
- doc->setUtf8Source(utf8code);
- doc->parse(Document::ParseExpression);
- return doc;
-}
-
void TypeOfExpression::processEnvironment(Document::Ptr doc, Environment *env,
QSet<QString> *processed) const
{
@@ -210,3 +193,24 @@ QByteArray TypeOfExpression::preprocessedExpression(const QByteArray &utf8code)
Preprocessor preproc(0, m_environment.data());
return preproc.run("<expression>", utf8code);
}
+
+namespace CPlusPlus {
+
+ExpressionAST *extractExpressionAST(Document::Ptr doc)
+{
+ if (! doc->translationUnit()->ast())
+ return 0;
+
+ return doc->translationUnit()->ast()->asExpression();
+}
+
+Document::Ptr documentForExpression(const QByteArray &utf8code)
+{
+ // create the expression's AST.
+ Document::Ptr doc = Document::create(QLatin1String("<completion>"));
+ doc->setUtf8Source(utf8code);
+ doc->parse(Document::ParseExpression);
+ return doc;
+}
+
+} // namespace CPlusPlus
diff --git a/src/libs/cplusplus/TypeOfExpression.h b/src/libs/cplusplus/TypeOfExpression.h
index 3e3a134ba2..430202910f 100644
--- a/src/libs/cplusplus/TypeOfExpression.h
+++ b/src/libs/cplusplus/TypeOfExpression.h
@@ -122,15 +122,13 @@ public:
Scope *scope() const;
ExpressionAST *expressionAST() const;
+ QByteArray preprocessedExpression(const QByteArray &utf8code) const;
private:
- ExpressionAST *extractExpressionAST(Document::Ptr doc) const;
- Document::Ptr documentForExpression(const QByteArray &utf8code) const;
void processEnvironment(Document::Ptr doc, Environment *env,
QSet<QString> *processed) const;
- QByteArray preprocessedExpression(const QByteArray &utf8code) const;
private:
Document::Ptr m_thisDocument;
@@ -142,6 +140,9 @@ private:
mutable QSharedPointer<Environment> m_environment;
};
+ExpressionAST CPLUSPLUS_EXPORT *extractExpressionAST(Document::Ptr doc);
+Document::Ptr CPLUSPLUS_EXPORT documentForExpression(const QByteArray &utf8code);
+
} // namespace CPlusPlus
#endif // CPLUSPLUS_TYPEOFEXPRESSION_H
diff --git a/src/libs/utils/persistentsettings.cpp b/src/libs/utils/persistentsettings.cpp
index 7134158869..733ebef39d 100644
--- a/src/libs/utils/persistentsettings.cpp
+++ b/src/libs/utils/persistentsettings.cpp
@@ -373,20 +373,12 @@ static void writeVariantValue(QXmlStreamWriter &w, const Context &ctx,
}
PersistentSettingsWriter::PersistentSettingsWriter(const FileName &fileName, const QString &docType) :
- m_fileName(fileName), m_docType(docType), m_mustSave(false)
+ m_fileName(fileName), m_docType(docType)
{ }
-void PersistentSettingsWriter::saveValue(const QString &variable, const QVariant &value)
+bool PersistentSettingsWriter::save(const QVariantMap &data, QWidget *parent) const
{
- if (m_valueMap.contains(variable) && m_valueMap.value(variable) == value)
- return;
- m_mustSave = true;
- m_valueMap.insert(variable, value);
-}
-
-bool PersistentSettingsWriter::save(QWidget *parent) const
-{
- if (!m_mustSave)
+ if (data == m_savedData)
return true;
QDir tmp;
@@ -403,8 +395,8 @@ bool PersistentSettingsWriter::save(QWidget *parent) const
arg(QLatin1String(Core::Constants::IDE_VERSION_LONG),
QDateTime::currentDateTime().toString(Qt::ISODate)));
w.writeStartElement(ctx.qtCreatorElement);
- const QVariantMap::const_iterator cend = m_valueMap.constEnd();
- for (QVariantMap::const_iterator it = m_valueMap.constBegin(); it != cend; ++it) {
+ const QVariantMap::const_iterator cend = data.constEnd();
+ for (QVariantMap::const_iterator it = data.constBegin(); it != cend; ++it) {
w.writeStartElement(ctx.dataElement);
w.writeTextElement(ctx.variableElement, it.key());
writeVariantValue(w, ctx, it.value());
@@ -416,7 +408,7 @@ bool PersistentSettingsWriter::save(QWidget *parent) const
}
bool ok = saver.finalize(parent);
if (ok)
- m_mustSave = false;
+ m_savedData = data;
return ok;
}
diff --git a/src/libs/utils/persistentsettings.h b/src/libs/utils/persistentsettings.h
index ec0d3cb0e9..c5547f4a99 100644
--- a/src/libs/utils/persistentsettings.h
+++ b/src/libs/utils/persistentsettings.h
@@ -60,16 +60,14 @@ class QTCREATOR_UTILS_EXPORT PersistentSettingsWriter
{
public:
PersistentSettingsWriter(const FileName &fileName, const QString &docType);
- void saveValue(const QString &variable, const QVariant &value);
- bool save(QWidget *parent) const;
+ bool save(const QVariantMap &data, QWidget *parent) const;
Utils::FileName fileName() const;
private:
- QMap<QString, QVariant> m_valueMap;
const Utils::FileName m_fileName;
const QString m_docType;
- mutable bool m_mustSave;
+ mutable QMap<QString, QVariant> m_savedData;
};
} // namespace Utils
diff --git a/src/plugins/analyzerbase/ianalyzertool.cpp b/src/plugins/analyzerbase/ianalyzertool.cpp
index 6be5ee5c85..9090f3dfbf 100644
--- a/src/plugins/analyzerbase/ianalyzertool.cpp
+++ b/src/plugins/analyzerbase/ianalyzertool.cpp
@@ -66,7 +66,7 @@ QString IAnalyzerTool::defaultActionName(const IAnalyzerTool *tool, StartMode mo
{
QString base = tool->displayName();
if (mode == StartRemote)
- return base + tr(" (Remote)");
+ return base + tr(" (External)");
return base;
}
diff --git a/src/plugins/analyzerbase/startremotedialog.cpp b/src/plugins/analyzerbase/startremotedialog.cpp
index ec72813459..b6796c4f21 100644
--- a/src/plugins/analyzerbase/startremotedialog.cpp
+++ b/src/plugins/analyzerbase/startremotedialog.cpp
@@ -32,8 +32,8 @@
#include <coreplugin/icore.h>
#include <coreplugin/id.h>
-#include <projectexplorer/profilechooser.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitchooser.h>
+#include <projectexplorer/kitinformation.h>
#include <ssh/sshconnection.h>
#include <utils/pathchooser.h>
@@ -53,7 +53,7 @@ namespace Internal {
class StartRemoteDialogPrivate
{
public:
- ProfileChooser *profileChooser;
+ KitChooser *kitChooser;
QLineEdit *executable;
QLineEdit *arguments;
QLineEdit *workingDirectory;
@@ -69,7 +69,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Remote Analysis"));
- d->profileChooser = new ProfileChooser(this, ProfileChooser::RemoteDebugging);
+ d->kitChooser = new KitChooser(this, KitChooser::RemoteDebugging);
d->executable = new QLineEdit(this);
d->arguments = new QLineEdit(this);
d->workingDirectory = new QLineEdit(this);
@@ -80,7 +80,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
QFormLayout *formLayout = new QFormLayout;
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
- formLayout->addRow(tr("Target:"), d->profileChooser);
+ formLayout->addRow(tr("Kit:"), d->kitChooser);
formLayout->addRow(tr("Executable:"), d->executable);
formLayout->addRow(tr("Arguments:"), d->arguments);
formLayout->addRow(tr("Working directory:"), d->workingDirectory);
@@ -91,14 +91,14 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String("AnalyzerStartRemoteDialog"));
- QString profile = settings->value(QLatin1String("profile")).toString();
- d->profileChooser->setCurrentProfileId(Core::Id(profile));
+ QString kit = settings->value(QLatin1String("profile")).toString();
+ d->kitChooser->setCurrentKitId(Core::Id(kit));
d->executable->setText(settings->value(QLatin1String("executable")).toString());
d->workingDirectory->setText(settings->value(QLatin1String("workingDirectory")).toString());
d->arguments->setText(settings->value(QLatin1String("arguments")).toString());
settings->endGroup();
- connect(d->profileChooser, SIGNAL(activated(int)), SLOT(validate()));
+ connect(d->kitChooser, SIGNAL(activated(int)), SLOT(validate()));
connect(d->executable, SIGNAL(textChanged(QString)), SLOT(validate()));
connect(d->workingDirectory, SIGNAL(textChanged(QString)), SLOT(validate()));
connect(d->arguments, SIGNAL(textChanged(QString)), SLOT(validate()));
@@ -117,7 +117,7 @@ void StartRemoteDialog::accept()
{
QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String("AnalyzerStartRemoteDialog"));
- settings->setValue(QLatin1String("profile"), d->profileChooser->currentProfileId().toString());
+ settings->setValue(QLatin1String("profile"), d->kitChooser->currentKitId().toString());
settings->setValue(QLatin1String("executable"), d->executable->text());
settings->setValue(QLatin1String("workingDirectory"), d->workingDirectory->text());
settings->setValue(QLatin1String("arguments"), d->arguments->text());
@@ -134,8 +134,8 @@ void StartRemoteDialog::validate()
QSsh::SshConnectionParameters StartRemoteDialog::sshParams() const
{
- Profile *profile = d->profileChooser->currentProfile();
- IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
+ Kit *kit = d->kitChooser->currentKit();
+ IDevice::ConstPtr device = DeviceKitInformation::device(kit);
return device->sshParameters();
}
diff --git a/src/plugins/android/addnewavddialog.ui b/src/plugins/android/addnewavddialog.ui
index 149f79dfcf..6c57b31c6a 100644
--- a/src/plugins/android/addnewavddialog.ui
+++ b/src/plugins/android/addnewavddialog.ui
@@ -32,7 +32,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
- <string>Target:</string>
+ <string>Kit:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp
index 4e10eea255..72f7100465 100644
--- a/src/plugins/android/androiddebugsupport.cpp
+++ b/src/plugins/android/androiddebugsupport.cpp
@@ -37,7 +37,7 @@
#include <debugger/debuggerengine.h>
#include <debugger/debuggerplugin.h>
-#include <debugger/debuggerprofileinformation.h>
+#include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerrunner.h>
#include <debugger/debuggerstartparameters.h>
@@ -45,7 +45,7 @@
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4nodes.h>
#include <qt4projectmanager/qt4project.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <QDir>
@@ -93,10 +93,10 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
if (runConfig->debuggerAspect()->useCppDebugger()) {
params.languages |= CppLanguage;
- Profile *profile = target->profile();
- params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
- params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
- if (ToolChain *tc = ToolChainProfileInformation::toolChain(profile))
+ Kit *kit = target->kit();
+ params.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
+ params.debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString();
+ if (ToolChain *tc = ToolChainKitInformation::toolChain(kit))
params.toolChainAbi = tc->targetAbi();
params.executable = project->rootQt4ProjectNode()->buildDir() + QLatin1String("/app_process");
params.remoteChannel = runConfig->remoteChannel();
@@ -105,7 +105,7 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
foreach (Qt4ProFileNode *node, nodes)
if (node->projectType() == ApplicationTemplate)
params.solibSearchPath.append(node->targetInformation().buildDir);
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(profile);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
params.solibSearchPath.append(qtSoPaths(version));
}
if (runConfig->debuggerAspect()->useQmlDebugger()) {
diff --git a/src/plugins/android/androiddeployconfiguration.cpp b/src/plugins/android/androiddeployconfiguration.cpp
index 8cd678d73e..6d06801af6 100644
--- a/src/plugins/android/androiddeployconfiguration.cpp
+++ b/src/plugins/android/androiddeployconfiguration.cpp
@@ -39,7 +39,7 @@
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4project.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
using namespace ProjectExplorer;
@@ -119,15 +119,15 @@ QList<Core::Id> AndroidDeployConfigurationFactory::availableCreationIds(Target *
if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(parent->project()))
return ids;
- if (!parent->project()->supportsProfile(parent->profile()))
+ if (!parent->project()->supportsKit(parent->kit()))
return ids;
- ToolChain *tc = ToolChainProfileInformation::toolChain(parent->profile());
+ ToolChain *tc = ToolChainKitInformation::toolChain(parent->kit());
if (!tc || tc->targetAbi().osFlavor() != Abi::AndroidLinuxFlavor)
return ids;
- if (QtSupport::QtProfileInformation::qtVersion(parent->profile())->type() != QLatin1String(Constants::ANDROIDQT))
+ if (QtSupport::QtKitInformation::qtVersion(parent->kit())->type() != QLatin1String(Constants::ANDROIDQT))
return ids;
ids << Core::Id(ANDROID_DEPLOYCONFIGURATION_ID);
diff --git a/src/plugins/android/androiddeploystep.cpp b/src/plugins/android/androiddeploystep.cpp
index e06012a8e8..df8fc9867b 100644
--- a/src/plugins/android/androiddeploystep.cpp
+++ b/src/plugins/android/androiddeploystep.cpp
@@ -44,7 +44,7 @@
#include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4nodes.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <QDir>
@@ -97,7 +97,7 @@ bool AndroidDeployStep::init()
return false;
}
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!version)
return false;
diff --git a/src/plugins/android/androiddeploystepfactory.cpp b/src/plugins/android/androiddeploystepfactory.cpp
index a19fe3f966..e7a6a6e9cd 100644
--- a/src/plugins/android/androiddeploystepfactory.cpp
+++ b/src/plugins/android/androiddeploystepfactory.cpp
@@ -37,7 +37,7 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <qtsupport/qtsupportconstants.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <QCoreApplication>
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp
index 54de2d032a..6e13f8538b 100644
--- a/src/plugins/android/androidmanager.cpp
+++ b/src/plugins/android/androidmanager.cpp
@@ -44,7 +44,7 @@
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/customexecutablerunconfiguration.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <QDir>
@@ -81,7 +81,7 @@ bool AndroidManager::supportsAndroid(ProjectExplorer::Target *target)
{
if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(target->project()))
return false;
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
return version && version->platformName() == QLatin1String(QtSupport::Constants::ANDROID_PLATFORM);
}
@@ -388,7 +388,7 @@ QString AndroidManager::targetApplicationPath(ProjectExplorer::Target *target)
bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target *target)
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
Qt4ProjectManager::Qt4Project *qt4Project = qobject_cast<Qt4ProjectManager::Qt4Project*>(target->project());
if (!qt4Project || !qt4Project->rootProjectNode() || !version)
return false;
@@ -555,7 +555,7 @@ void AndroidManager::updateTarget(ProjectExplorer::Target *target, const QString
Utils::FileName AndroidManager::localLibsRulesFilePath(ProjectExplorer::Target *target)
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (!version)
return Utils::FileName();
return Utils::FileName::fromString(version->qmakeProperty("QT_INSTALL_LIBS") + QLatin1String("/rules.xml"));
@@ -573,7 +573,7 @@ QString AndroidManager::loadLocalJars(ProjectExplorer::Target *target, int apiLe
QStringList AndroidManager::availableQtLibs(ProjectExplorer::Target *target)
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (!target->activeRunConfiguration())
return QStringList();
diff --git a/src/plugins/android/androidpackageinstallationfactory.cpp b/src/plugins/android/androidpackageinstallationfactory.cpp
index 0bd36954cc..cc4eb657d8 100644
--- a/src/plugins/android/androidpackageinstallationfactory.cpp
+++ b/src/plugins/android/androidpackageinstallationfactory.cpp
@@ -36,7 +36,7 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
using namespace ProjectExplorer;
diff --git a/src/plugins/android/androidrunconfiguration.cpp b/src/plugins/android/androidrunconfiguration.cpp
index 60f8524652..85f9014f44 100644
--- a/src/plugins/android/androidrunconfiguration.cpp
+++ b/src/plugins/android/androidrunconfiguration.cpp
@@ -34,10 +34,10 @@
#include "androidtoolchain.h"
#include "androidmanager.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <qtsupport/qtoutputformatter.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/qtcassert.h>
@@ -87,7 +87,7 @@ AndroidConfig AndroidRunConfiguration::config() const
const Utils::FileName AndroidRunConfiguration::gdbCmd() const
{
- ToolChain *tc = ToolChainProfileInformation::toolChain(target()->profile());
+ ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (!tc)
return Utils::FileName();
return AndroidConfigurations::instance().gdbPath(tc->targetAbi().architecture());
@@ -110,7 +110,7 @@ const QString AndroidRunConfiguration::remoteChannel() const
const QString AndroidRunConfiguration::dumperLib() const
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!version)
return QString();
return version->gdbDebuggingHelperLibrary();
diff --git a/src/plugins/android/androidrunfactories.cpp b/src/plugins/android/androidrunfactories.cpp
index 66383a1b8a..193354c8bb 100644
--- a/src/plugins/android/androidrunfactories.cpp
+++ b/src/plugins/android/androidrunfactories.cpp
@@ -43,7 +43,7 @@
#include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4nodes.h>
#include <qtsupport/customexecutablerunconfiguration.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
@@ -140,7 +140,7 @@ RunConfiguration *AndroidRunConfigurationFactory::clone(Target *parent, RunConfi
bool AndroidRunConfigurationFactory::canHandle(Target *t) const
{
- if (!t->project()->supportsProfile(t->profile()))
+ if (!t->project()->supportsKit(t->kit()))
return false;
return AndroidManager::supportsAndroid(t);
}
diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp
index 07ba1ecd86..cd85cbeeed 100644
--- a/src/plugins/android/androidtoolchain.cpp
+++ b/src/plugins/android/androidtoolchain.cpp
@@ -38,7 +38,7 @@
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/projectexplorer.h>
#include <qt4projectmanager/qt4project.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtversionmanager.h>
#include <utils/environment.h>
@@ -95,7 +95,7 @@ void AndroidToolChain::addToEnvironment(Environment &env) const
Qt4Project *qt4pro = qobject_cast<Qt4Project *>(ProjectExplorerPlugin::instance()->currentProject());
if (!qt4pro || !qt4pro->activeTarget()
- || QtSupport::QtProfileInformation::qtVersion(qt4pro->activeTarget()->profile())->type() != QLatin1String(Constants::ANDROIDQT))
+ || QtSupport::QtKitInformation::qtVersion(qt4pro->activeTarget()->kit())->type() != QLatin1String(Constants::ANDROIDQT))
return;
QString ndkHost;
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
index 45c63b3ebb..a7ca5a05c7 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
@@ -42,7 +42,7 @@
#include "configurestep.h"
#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
@@ -117,7 +117,7 @@ void AutotoolsBuildConfiguration::setBuildDirectory(const QString &buildDirector
IOutputParser *AutotoolsBuildConfiguration::createOutputParser() const
{
- ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
+ ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
if (tc)
return tc->outputParser();
return 0;
@@ -214,7 +214,7 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::createDefaultCo
bool AutotoolsBuildConfigurationFactory::canHandle(const Target *t) const
{
- if (!t->project()->supportsProfile(t->profile()))
+ if (!t->project()->supportsKit(t->kit()))
return false;
return t->project()->id() == Constants::AUTOTOOLS_PROJECT_ID;
}
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
index 4fa1d370a6..ff4b78966c 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
@@ -44,8 +44,8 @@
#include <projectexplorer/abi.h>
#include <projectexplorer/buildenvironmentwidget.h>
-#include <projectexplorer/profilemanager.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitmanager.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -158,9 +158,9 @@ bool AutotoolsProject::fromMap(const QVariantMap &map)
// Load the project tree structure.
loadProjectTree();
- Profile *defaultProfile = ProfileManager::instance()->defaultProfile();
- if (!activeTarget() && defaultProfile)
- addTarget(createTarget(defaultProfile));
+ Kit *defaultKit = KitManager::instance()->defaultKit();
+ if (!activeTarget() && defaultKit)
+ addTarget(createTarget(defaultKit));
return true;
}
@@ -418,7 +418,7 @@ void AutotoolsProject::updateCppCodeModel()
QByteArray macros;
if (activeTarget()) {
- ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(activeTarget()->profile());
+ ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
if (tc) {
const QList<HeaderPath> allHeaderPaths = tc->systemHeaderPaths();
foreach (const HeaderPath &headerPath, allHeaderPaths) {
diff --git a/src/plugins/autotoolsprojectmanager/makestep.cpp b/src/plugins/autotoolsprojectmanager/makestep.cpp
index 2ca4ae8102..01738224ce 100644
--- a/src/plugins/autotoolsprojectmanager/makestep.cpp
+++ b/src/plugins/autotoolsprojectmanager/makestep.cpp
@@ -41,7 +41,7 @@
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/gnumakeparser.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcprocess.h>
@@ -174,7 +174,7 @@ bool MakeStep::init()
setIgnoreReturnValue(m_clean);
- ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(bc->target()->profile());
+ ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
@@ -289,7 +289,7 @@ QString MakeStepConfigWidget::summaryText() const
void MakeStepConfigWidget::updateDetails()
{
AutotoolsBuildConfiguration *bc = m_makeStep->autotoolsBuildConfiguration();
- ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(m_makeStep->target()->profile());
+ ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(m_makeStep->target()->kit());
if (tc) {
QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->m_buildTargets);
@@ -303,7 +303,7 @@ void MakeStepConfigWidget::updateDetails()
param.setArguments(arguments);
m_summaryText = param.summary(displayName());
} else {
- m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
+ m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
}
emit updateSummary();
diff --git a/src/plugins/clearcase/clearcase.pro b/src/plugins/clearcase/clearcase.pro
index 347966dc04..c40f5475df 100644
--- a/src/plugins/clearcase/clearcase.pro
+++ b/src/plugins/clearcase/clearcase.pro
@@ -7,33 +7,35 @@ include(clearcase_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII
-HEADERS += annotationhighlighter.h \
- clearcaseplugin.h \
+HEADERS += activityselector.h \
+ annotationhighlighter.h \
+ checkoutdialog.h \
+ clearcaseconstants.h \
clearcasecontrol.h \
- settingspage.h \
clearcaseeditor.h \
+ clearcaseplugin.h \
clearcasesettings.h \
- clearcaseconstants.h \
clearcasesubmiteditor.h \
- checkoutdialog.h \
- activityselector.h \
clearcasesubmiteditorwidget.h \
+ clearcasesync.h \
+ settingspage.h \
versionselector.h
-SOURCES += annotationhighlighter.cpp \
- clearcaseplugin.cpp \
+SOURCES += activityselector.cpp \
+ annotationhighlighter.cpp \
+ checkoutdialog.cpp \
clearcasecontrol.cpp \
- settingspage.cpp \
clearcaseeditor.cpp \
+ clearcaseplugin.cpp \
clearcasesettings.cpp \
clearcasesubmiteditor.cpp \
- checkoutdialog.cpp \
- activityselector.cpp \
clearcasesubmiteditorwidget.cpp \
+ clearcasesync.cpp \
+ settingspage.cpp \
versionselector.cpp
-FORMS += settingspage.ui \
- checkoutdialog.ui \
+FORMS += checkoutdialog.ui \
+ settingspage.ui \
undocheckout.ui \
versionselector.ui
diff --git a/src/plugins/clearcase/clearcase.qbs b/src/plugins/clearcase/clearcase.qbs
index 63c4d3ac64..2a3776d6d1 100644
--- a/src/plugins/clearcase/clearcase.qbs
+++ b/src/plugins/clearcase/clearcase.qbs
@@ -33,6 +33,7 @@ QtcPlugin {
"checkoutdialog.cpp",
"checkoutdialog.h",
"checkoutdialog.ui",
+ "clearcase.qrc",
"clearcaseconstants.h",
"clearcasecontrol.cpp",
"clearcasecontrol.h",
@@ -40,13 +41,14 @@ QtcPlugin {
"clearcaseeditor.h",
"clearcaseplugin.cpp",
"clearcaseplugin.h",
- "clearcase.qrc",
"clearcasesettings.cpp",
"clearcasesettings.h",
"clearcasesubmiteditor.cpp",
"clearcasesubmiteditor.h",
"clearcasesubmiteditorwidget.cpp",
"clearcasesubmiteditorwidget.h",
+ "clearcasesync.cpp",
+ "clearcasesync.h",
"settingspage.cpp",
"settingspage.h",
"settingspage.ui",
diff --git a/src/plugins/clearcase/clearcasecontrol.cpp b/src/plugins/clearcase/clearcasecontrol.cpp
index 7c055f118d..475333084e 100644
--- a/src/plugins/clearcase/clearcasecontrol.cpp
+++ b/src/plugins/clearcase/clearcasecontrol.cpp
@@ -136,6 +136,16 @@ bool ClearCaseControl::vcsAnnotate(const QString &file, int line)
return true;
}
+QString ClearCaseControl::vcsOpenText() const
+{
+ return tr("&Check Out");
+}
+
+QString ClearCaseControl::vcsMakeWritableText() const
+{
+ return tr("&Hijack");
+}
+
void ClearCaseControl::emitRepositoryChanged(const QString &s)
{
emit repositoryChanged(s);
diff --git a/src/plugins/clearcase/clearcasecontrol.h b/src/plugins/clearcase/clearcasecontrol.h
index 789dbbf9b3..166b6195d3 100644
--- a/src/plugins/clearcase/clearcasecontrol.h
+++ b/src/plugins/clearcase/clearcasecontrol.h
@@ -70,6 +70,9 @@ public:
bool vcsAnnotate(const QString &file, int line);
+ QString vcsOpenText() const;
+ QString vcsMakeWritableText() const;
+
void emitRepositoryChanged(const QString &);
void emitFilesChanged(const QStringList &);
void emitConfigurationChanged();
diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp
index feaef2c80c..85d770972f 100644
--- a/src/plugins/clearcase/clearcaseplugin.cpp
+++ b/src/plugins/clearcase/clearcaseplugin.cpp
@@ -38,6 +38,7 @@
#include "clearcaseplugin.h"
#include "clearcasesubmiteditor.h"
#include "clearcasesubmiteditorwidget.h"
+#include "clearcasesync.h"
#include "settingspage.h"
#include "versionselector.h"
#include "ui_undocheckout.h"
@@ -116,8 +117,6 @@ static const char CMD_ID_UPDATE_VIEW[] = "ClearCase.UpdateView";
static const char CMD_ID_CHECKIN_ALL[] = "ClearCase.CheckInAll";
static const char CMD_ID_STATUS[] = "ClearCase.Status";
-StatusMap ClearCasePlugin::s_statusMap;
-
static const VcsBase::VcsBaseEditorParameters editorParameters[] = {
{
VcsBase::RegularCommandOutput,
@@ -182,18 +181,20 @@ ClearCasePlugin::ClearCasePlugin() :
m_submitUndoAction(0),
m_submitRedoAction(0),
m_menuAction(0),
- m_submitActionTriggered(false)
+ m_submitActionTriggered(false),
+ m_activityMutex(new QMutex),
+ m_statusMap(new StatusMap)
{
- activityMutex = new QMutex;
+ qRegisterMetaType<ClearCase::Internal::FileStatus::Status>("ClearCase::Internal::FileStatus::Status");
}
ClearCasePlugin::~ClearCasePlugin()
{
cleanCheckInMessageFile();
// wait for sync thread to finish reading activities
- activityMutex->lock();
- activityMutex->unlock();
- delete activityMutex;
+ m_activityMutex->lock();
+ m_activityMutex->unlock();
+ delete m_activityMutex;
}
void ClearCasePlugin::cleanCheckInMessageFile()
@@ -539,7 +540,7 @@ QStringList ClearCasePlugin::ccGetActiveVobs() const
// file must be relative to topLevel, and using '/' path separator
FileStatus ClearCasePlugin::vcsStatus(const QString &file) const
{
- return s_statusMap.value(file, FileStatus(FileStatus::Unknown));
+ return m_statusMap->value(file, FileStatus(FileStatus::Unknown));
}
QString ClearCasePlugin::ccGetFileActivity(const QString &workingDir, const QString &file)
@@ -569,7 +570,7 @@ ClearCaseSubmitEditor *ClearCasePlugin::openClearCaseSubmitEditor(const QString
void ClearCasePlugin::updateStatusActions()
{
bool hasFile = currentState().hasFile();
- FileStatus fileStatus = s_statusMap.value(currentState().relativeCurrentFile(), FileStatus(FileStatus::Unknown));
+ FileStatus fileStatus = m_statusMap->value(currentState().relativeCurrentFile(), FileStatus(FileStatus::Unknown));
m_checkOutAction->setEnabled(hasFile && (fileStatus.status & (FileStatus::CheckedIn | FileStatus::Hijacked)));
m_undoCheckOutAction->setEnabled(hasFile && (fileStatus.status & FileStatus::CheckedOut));
m_undoHijackAction->setEnabled(hasFile && (fileStatus.status & FileStatus::Hijacked));
@@ -618,9 +619,9 @@ void ClearCasePlugin::addCurrentFile()
vcsAdd(state.currentFileTopLevel(), state.relativeCurrentFile());
}
-void ClearCasePlugin::setStatus(const QString &file, FileStatus::Status status, bool update)
+void ClearCasePlugin::setStatus(const QString &file, ClearCase::Internal::FileStatus::Status status, bool update)
{
- s_statusMap[file] = FileStatus(status, QFileInfo(currentState().topLevel(), file).permissions());
+ m_statusMap->insert(file, FileStatus(status, QFileInfo(currentState().topLevel(), file).permissions()));
if (update && (currentState().relativeCurrentFile() == file))
updateStatusActions();
}
@@ -705,8 +706,13 @@ void ClearCasePlugin::undoHijackCurrent()
const QString fileName = state.relativeCurrentFile();
bool keep = false;
- QString diffres = diffExternal(ccGetFileVersion(state.topLevel(), fileName), fileName);
- if (diffres.at(0) != QLatin1Char('F')) { // Files are identical
+ bool askKeep = true;
+ if (m_settings.extDiffAvailable) {
+ QString diffres = diffExternal(ccGetFileVersion(state.topLevel(), fileName), fileName);
+ if (diffres.at(0) == QLatin1Char('F')) // Files are identical
+ askKeep = false;
+ }
+ if (askKeep) {
Ui::UndoCheckOut unhijackUi;
QDialog unhijackDlg;
unhijackUi.setupUi(&unhijackDlg);
@@ -742,15 +748,20 @@ void ClearCasePlugin::ccDiffWithPred(const QStringList &files)
if ((m_settings.diffType == GraphicalDiff) && (files.count() == 1)) {
QString file = files.first();
- if (s_statusMap[file].status == FileStatus::Hijacked)
+ if (m_statusMap->value(file).status == FileStatus::Hijacked)
diffGraphical(ccGetFileVersion(topLevel, file), file);
else
diffGraphical(file);
return; // done here, diff is opened in a new window
}
+ if (!m_settings.extDiffAvailable) {
+ VcsBase::VcsBaseOutputWindow::instance()->appendError(
+ tr("External diff is required to compare multiple files."));
+ return;
+ }
QString result;
foreach (const QString &file, files) {
- if (s_statusMap[QDir::fromNativeSeparators(file)].status == FileStatus::Hijacked)
+ if (m_statusMap->value(QDir::fromNativeSeparators(file)).status == FileStatus::Hijacked)
result += diffExternal(ccGetFileVersion(topLevel, file), file);
else
result += diffExternal(file);
@@ -813,6 +824,11 @@ void ClearCasePlugin::diffActivity()
QTC_ASSERT(state.hasTopLevel(), return);
if (ClearCase::Constants::debug)
qDebug() << Q_FUNC_INFO;
+ if (!m_settings.extDiffAvailable) {
+ VcsBase::VcsBaseOutputWindow::instance()->appendError(
+ tr("External diff is required to compare multiple files."));
+ return;
+ }
QString topLevel = state.topLevel();
QString activity = QInputDialog::getText(0, tr("Enter Activity"), tr("Activity Name"), QLineEdit::Normal, m_activity);
if (activity.isEmpty())
@@ -885,8 +901,8 @@ void ClearCasePlugin::startCheckInAll()
QTC_ASSERT(state.hasTopLevel(), return);
QString topLevel = state.topLevel();
QStringList files;
- for (StatusMap::ConstIterator iterator = s_statusMap.constBegin();
- iterator != s_statusMap.constEnd();
+ for (StatusMap::ConstIterator iterator = m_statusMap->constBegin();
+ iterator != m_statusMap->constEnd();
++iterator)
{
if (iterator.value().status == FileStatus::CheckedOut)
@@ -1025,8 +1041,8 @@ void ClearCasePlugin::viewStatus()
VcsBase::VcsBaseOutputWindow *outputwindow = VcsBase::VcsBaseOutputWindow::instance();
outputwindow->appendCommand(QLatin1String("Indexed files status (C=Checked Out, H=Hijacked, ?=Missing)"));
bool anymod = false;
- for (StatusMap::ConstIterator it = s_statusMap.constBegin();
- it != s_statusMap.constEnd();
+ for (StatusMap::ConstIterator it = m_statusMap->constBegin();
+ it != m_statusMap->constEnd();
++it)
{
char cstat = 0;
@@ -1147,7 +1163,8 @@ void ClearCasePlugin::describe(const QString &source, const QString &changeNr)
const ClearCaseResponse response =
runCleartool(topLevel, args, m_settings.timeOutMS(), 0, codec);
description = response.stdOut;
- description += diffExternal(id);
+ if (m_settings.extDiffAvailable)
+ description += diffExternal(id);
// Re-use an existing view if possible to support
// the common usage pattern of continuously changing and diffing a file
@@ -1266,13 +1283,13 @@ bool ClearCasePlugin::vcsOpen(const QString &workingDir, const QString &fileName
const QString title = QString::fromLatin1("Checkout %1").arg(file);
CheckOutDialog coDialog(title);
if (!m_settings.disableIndexer &&
- (fi.isWritable() || s_statusMap[relFile].status == FileStatus::Unknown))
+ (fi.isWritable() || m_statusMap->value(relFile).status == FileStatus::Unknown))
QtConcurrent::run(&sync, topLevel, QStringList(relFile)).waitForFinished();
- if (s_statusMap[relFile].status == FileStatus::CheckedOut) {
+ if (m_statusMap->value(relFile).status == FileStatus::CheckedOut) {
QMessageBox::information(0, tr("ClearCase Checkout"), tr("File is already checked out."));
return true;
}
- bool isHijacked = (s_statusMap[relFile].status & FileStatus::Hijacked);
+ bool isHijacked = (m_statusMap->value(relFile).status & FileStatus::Hijacked);
if (!isHijacked)
coDialog.hideHijack();
if (coDialog.exec() == QDialog::Accepted) {
@@ -1574,7 +1591,7 @@ QList<QStringPair> ClearCasePlugin::ccGetActivities() const
void ClearCasePlugin::refreshActivities()
{
- QMutexLocker locker(activityMutex);
+ QMutexLocker locker(m_activityMutex);
m_activity = ccGetCurrentActivity();
m_activities = ccGetActivities();
}
@@ -1585,7 +1602,7 @@ QList<QStringPair> ClearCasePlugin::activities(int *current) const
QString curActivity;
const VcsBase::VcsBasePluginState state = currentState();
if (state.topLevel() == state.currentProjectTopLevel()) {
- QMutexLocker locker(activityMutex);
+ QMutexLocker locker(m_activityMutex);
activitiesList = m_activities;
curActivity = m_activity;
} else {
@@ -1693,7 +1710,7 @@ void ClearCasePlugin::updateIndex()
if (!project)
return;
m_checkInAllAction->setEnabled(false);
- s_statusMap.clear();
+ m_statusMap->clear();
QFuture<void> result = QtConcurrent::run(&sync, currentState().topLevel(),
project->files(ProjectExplorer::Project::ExcludeGeneratedFiles));
if (!m_settings.disableIndexer)
@@ -1847,112 +1864,14 @@ void ClearCasePlugin::closing()
void ClearCasePlugin::sync(QFutureInterface<void> &future, QString topLevel, QStringList files)
{
ClearCasePlugin *plugin = ClearCasePlugin::instance();
-
- ClearCaseSettings settings = plugin->settings();
- QString program = settings.ccBinaryPath;
- if (program.isEmpty())
- return;
- int total = files.size();
- bool hot = (total < 10);
- int processed = 0;
- QString view = plugin->currentView();
- if (view.isEmpty())
- plugin->updateStreamAndView();
- if (!hot)
- total = settings.totalFiles.value(view, total);
-
- // refresh activities list
- plugin->refreshActivities();
-
- if (settings.disableIndexer)
- return;
- QStringList vobs;
- if (!settings.indexOnlyVOBs.isEmpty())
- vobs = settings.indexOnlyVOBs.split(QLatin1Char(','));
- else
- vobs = plugin->ccGetActiveVobs();
- QDir topLevelDir(topLevel);
- QStringList args(QLatin1String("ls"));
- if (hot) {
- // find all files whose permissions changed OR hijacked files
- // (might have become checked out)
- foreach (const QString &file, s_statusMap.keys()) {
- bool permChanged =
- s_statusMap[file].permissions != QFileInfo(topLevel, file).permissions();
- if (permChanged || s_statusMap[file].status == FileStatus::Hijacked) {
- files.append(file);
- s_statusMap[file].status = FileStatus::Unknown;
- ++total;
- }
- }
- args << files;
- } else {
- foreach (const QString &file, files)
- plugin->setStatus(topLevelDir.relativeFilePath(file), FileStatus::Unknown, false);
- args << QLatin1String("-recurse");
- args << vobs;
- }
-
- // adding 1 for initial sync in which total is not accurate, to prevent finishing
- // (we don't want it to become green)
- future.setProgressRange(0, total + 1);
- QProcess process;
- process.setWorkingDirectory(topLevel);
- process.start(program, args);
- if (!process.waitForStarted())
- return;
- QString buffer;
- while (process.waitForReadyRead() && !future.isCanceled()) {
- while (process.state() == QProcess::Running &&
- process.bytesAvailable() && !future.isCanceled())
- {
- QString line = QString::fromLocal8Bit(process.readLine().constData());
- buffer += line;
- if (buffer.endsWith(QLatin1Char('\n')) || process.atEnd()) {
- int atatpos = buffer.indexOf(QLatin1String("@@"));
- if (atatpos != -1) { // probably managed file
- // find first whitespace. anything before that is not interesting
- int wspos = buffer.indexOf(QRegExp(QLatin1String("\\s")));
- const QString file = QDir::fromNativeSeparators(buffer.left(atatpos));
- QString ccState;
- QRegExp reState(QLatin1String("^\\s*\\[[^\\]]*\\]")); // [hijacked]; [loaded but missing]
- if (reState.indexIn(buffer, wspos + 1, QRegExp::CaretAtOffset) != -1) {
- ccState = reState.cap();
- if (ccState.indexOf(QLatin1String("hijacked")) != -1)
- plugin->setStatus(file, FileStatus::Hijacked, true);
- else if (ccState.indexOf(QLatin1String("loaded but missing")) != -1)
- plugin->setStatus(file, FileStatus::Missing, false);
- }
- else if (buffer.lastIndexOf(QLatin1String("CHECKEDOUT"), wspos) != -1)
- plugin->setStatus(file, FileStatus::CheckedOut, true);
- // don't care about checked-in files not listed in project
- else if (s_statusMap.contains(file))
- plugin->setStatus(file, FileStatus::CheckedIn, false);
- }
- buffer.clear();
- future.setProgressValue(qMin(total, ++processed));
- }
- }
- }
-
- if (!future.isCanceled()) {
- foreach (const QString &file, files) {
- QString relFile = topLevelDir.relativeFilePath(file);
- if (s_statusMap[relFile].status == FileStatus::Unknown)
- plugin->setStatus(relFile, FileStatus::NotManaged, false);
- }
- future.setProgressValue(total + 1);
- if (!hot) {
- settings.totalFiles[view] = processed;
- plugin->setSettings(settings);
- }
- }
- if (process.state() == QProcess::Running)
- process.kill();
- process.waitForFinished();
+ ClearCaseSync ccSync(plugin, plugin->m_statusMap);
+ connect(&ccSync, SIGNAL(updateStreamAndView()), plugin, SLOT(updateStreamAndView()));
+ connect(&ccSync, SIGNAL(setStatus(QString, ClearCase::Internal::FileStatus::Status, bool)),
+ plugin, SLOT(setStatus(QString, ClearCase::Internal::FileStatus::Status, bool)));
+ ccSync.run(future, topLevel, files);
}
-} // namespace ClearCase
} // namespace Internal
+} // namespace ClearCase
Q_EXPORT_PLUGIN(ClearCase::Internal::ClearCasePlugin)
diff --git a/src/plugins/clearcase/clearcaseplugin.h b/src/plugins/clearcase/clearcaseplugin.h
index 68c224136c..144dd709b8 100644
--- a/src/plugins/clearcase/clearcaseplugin.h
+++ b/src/plugins/clearcase/clearcaseplugin.h
@@ -39,6 +39,8 @@
#include <QFile>
#include <QPair>
#include <QStringList>
+#include <QMetaType>
+#include <QSharedPointer>
QT_BEGIN_NAMESPACE
class QAction;
@@ -145,11 +147,14 @@ public:
const QString &fileName, const QString &file2 = QString());
FileStatus vcsStatus(const QString &file) const;
QString currentView() const { return m_view; }
+ void refreshActivities();
public slots:
void vcsAnnotate(const QString &workingDir, const QString &file,
const QString &revision = QString(), int lineNumber = -1) const;
bool newActivity();
+ void updateStreamAndView();
+ void setStatus(const QString &file, ClearCase::Internal::FileStatus::Status status, bool update = true);
private slots:
void checkOutCurrentFile();
@@ -179,7 +184,6 @@ protected:
void updateActions(VcsBase::VcsBasePlugin::ActionState);
bool submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *submitEditor);
QString ccGet(const QString &workingDir, const QString &file, const QString &prefix = QString());
- void refreshActivities();
QList<QStringPair> ccGetActivities() const;
private:
@@ -204,7 +208,6 @@ private:
void cleanCheckInMessageFile();
inline ClearCaseControl *clearCaseControl() const;
QString ccGetFileActivity(const QString &workingDir, const QString &file);
- void setStatus(const QString &file, FileStatus::Status status, bool update = true);
QStringList ccGetActivityVersions(const QString &workingDir, const QString &activity);
void updateStatusActions();
void diffGraphical(const QString &file1, const QString &file2 = QString());
@@ -214,11 +217,9 @@ private:
QString runExtDiff(const QString &workingDir, const QStringList &arguments,
int timeOut, QTextCodec *outputCodec = 0);
QString ccGetView(const QString &workingDir, bool *isDynamic = 0) const;
- void updateStreamAndView();
ClearCaseSettings m_settings;
- static StatusMap s_statusMap;
QString m_checkInMessageFileName;
QString m_topLevel;
QString m_stream;
@@ -249,8 +250,9 @@ private:
QAction *m_submitRedoAction;
QAction *m_menuAction;
bool m_submitActionTriggered;
- QMutex *activityMutex;
+ QMutex *m_activityMutex;
QList<QStringPair> m_activities;
+ QSharedPointer<StatusMap> m_statusMap;
static ClearCasePlugin *m_clearcasePluginInstance;
};
@@ -258,4 +260,6 @@ private:
} // namespace Internal
} // namespace ClearCase
+Q_DECLARE_METATYPE(ClearCase::Internal::FileStatus::Status)
+
#endif // CLEARCASEPLUGIN_H
diff --git a/src/plugins/clearcase/clearcasesettings.cpp b/src/plugins/clearcase/clearcasesettings.cpp
index f47dacba72..ba6f4fb896 100644
--- a/src/plugins/clearcase/clearcasesettings.cpp
+++ b/src/plugins/clearcase/clearcasesettings.cpp
@@ -98,6 +98,7 @@ void ClearCaseSettings::fromSettings(QSettings *settings)
promptToCheckIn = settings->value(QLatin1String(promptToCheckInKeyC), false).toBool();
disableIndexer = settings->value(QLatin1String(disableIndexerKeyC), false).toBool();
indexOnlyVOBs = settings->value(QLatin1String(indexOnlyVOBsC), QString()).toString();
+ extDiffAvailable = !Utils::Environment::systemEnvironment().searchInPath(QLatin1String("diff")).isEmpty();
settings->beginGroup(QLatin1String(totalFilesKeyC));
foreach (const QString &view, settings->childKeys())
totalFiles[view] = settings->value(view).toInt();
diff --git a/src/plugins/clearcase/clearcasesettings.h b/src/plugins/clearcase/clearcasesettings.h
index a7b7be46a3..0c10d07cd2 100644
--- a/src/plugins/clearcase/clearcasesettings.h
+++ b/src/plugins/clearcase/clearcasesettings.h
@@ -73,6 +73,7 @@ public:
bool promptToCheckIn;
bool disableIndexer;
QString indexOnlyVOBs;
+ bool extDiffAvailable;
QHash<QString, int> totalFiles;
};
diff --git a/src/plugins/clearcase/clearcasesync.cpp b/src/plugins/clearcase/clearcasesync.cpp
new file mode 100644
index 0000000000..3877e62596
--- /dev/null
+++ b/src/plugins/clearcase/clearcasesync.cpp
@@ -0,0 +1,125 @@
+#include "clearcasesync.h"
+
+#include <QDir>
+#include <QFutureInterface>
+#include <QProcess>
+#include <QStringList>
+
+namespace ClearCase {
+namespace Internal {
+
+ClearCaseSync::ClearCaseSync(ClearCasePlugin *plugin, QSharedPointer<StatusMap> statusMap) :
+ m_plugin(plugin),
+ m_statusMap(statusMap)
+{
+}
+
+void ClearCaseSync::run(QFutureInterface<void> &future, const QString &topLevel, QStringList &files)
+{
+ ClearCaseSettings settings = m_plugin->settings();
+ QString program = settings.ccBinaryPath;
+ if (program.isEmpty())
+ return;
+ int total = files.size();
+ bool hot = (total < 10);
+ int processed = 0;
+ QString view = m_plugin->currentView();
+ if (view.isEmpty())
+ emit updateStreamAndView();
+ if (!hot)
+ total = settings.totalFiles.value(view, total);
+
+ // refresh activities list
+ m_plugin->refreshActivities();
+
+ if (settings.disableIndexer)
+ return;
+ QStringList vobs;
+ if (!settings.indexOnlyVOBs.isEmpty())
+ vobs = settings.indexOnlyVOBs.split(QLatin1Char(','));
+ else
+ vobs = m_plugin->ccGetActiveVobs();
+ QDir topLevelDir(topLevel);
+ QStringList args(QLatin1String("ls"));
+ if (hot) {
+ // find all files whose permissions changed OR hijacked files
+ // (might have become checked out)
+ foreach (const QString &file, m_statusMap->keys()) {
+ bool permChanged =
+ m_statusMap->value(file).permissions != QFileInfo(topLevel, file).permissions();
+ if (permChanged || m_statusMap->value(file).status == FileStatus::Hijacked) {
+ files.append(file);
+ (*m_statusMap)[file].status = FileStatus::Unknown;
+ ++total;
+ }
+ }
+ args << files;
+ } else {
+ foreach (const QString &file, files)
+ emit setStatus(topLevelDir.relativeFilePath(file), FileStatus::Unknown, false);
+ args << QLatin1String("-recurse");
+ args << vobs;
+ }
+
+ // adding 1 for initial sync in which total is not accurate, to prevent finishing
+ // (we don't want it to become green)
+ future.setProgressRange(0, total + 1);
+ QProcess process;
+ process.setWorkingDirectory(topLevel);
+ process.start(program, args);
+ if (!process.waitForStarted())
+ return;
+ QString buffer;
+ while (process.waitForReadyRead() && !future.isCanceled()) {
+ while (process.state() == QProcess::Running &&
+ process.bytesAvailable() && !future.isCanceled())
+ {
+ QString line = QString::fromLocal8Bit(process.readLine().constData());
+ buffer += line;
+ if (buffer.endsWith(QLatin1Char('\n')) || process.atEnd()) {
+ int atatpos = buffer.indexOf(QLatin1String("@@"));
+ if (atatpos != -1) { // probably managed file
+ // find first whitespace. anything before that is not interesting
+ int wspos = buffer.indexOf(QRegExp(QLatin1String("\\s")));
+ const QString file = QDir::fromNativeSeparators(buffer.left(atatpos));
+ QString ccState;
+ QRegExp reState(QLatin1String("^\\s*\\[[^\\]]*\\]")); // [hijacked]; [loaded but missing]
+ if (reState.indexIn(buffer, wspos + 1, QRegExp::CaretAtOffset) != -1) {
+ ccState = reState.cap();
+ if (ccState.indexOf(QLatin1String("hijacked")) != -1)
+ emit setStatus(file, FileStatus::Hijacked, true);
+ else if (ccState.indexOf(QLatin1String("loaded but missing")) != -1)
+ emit setStatus(file, FileStatus::Missing, false);
+ }
+ else if (buffer.lastIndexOf(QLatin1String("CHECKEDOUT"), wspos) != -1)
+ emit setStatus(file, FileStatus::CheckedOut, true);
+ // don't care about checked-in files not listed in project
+ else if (m_statusMap->contains(file))
+ emit setStatus(file, FileStatus::CheckedIn, true);
+ }
+ buffer.clear();
+ future.setProgressValue(qMin(total, ++processed));
+ }
+ }
+ }
+
+ if (!future.isCanceled()) {
+ foreach (const QString &file, files) {
+ QString relFile = topLevelDir.relativeFilePath(file);
+ if (m_statusMap->value(relFile).status == FileStatus::Unknown)
+ emit setStatus(relFile, FileStatus::NotManaged, false);
+ }
+ future.setProgressValue(total + 1);
+ if (!hot) {
+ settings = m_plugin->settings(); // Might have changed while task was running
+ settings.totalFiles[view] = processed;
+ m_plugin->setSettings(settings);
+ }
+ }
+ if (process.state() == QProcess::Running)
+ process.kill();
+ process.waitForFinished();
+}
+
+} // namespace Internal
+} // namespace ClearCase
diff --git a/src/plugins/clearcase/clearcasesync.h b/src/plugins/clearcase/clearcasesync.h
new file mode 100644
index 0000000000..a529a83021
--- /dev/null
+++ b/src/plugins/clearcase/clearcasesync.h
@@ -0,0 +1,28 @@
+#ifndef CLEARCASESYNC_H
+#define CLEARCASESYNC_H
+
+#include "clearcaseplugin.h"
+
+namespace ClearCase {
+namespace Internal {
+
+class ClearCaseSync : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ClearCaseSync(ClearCasePlugin *plugin, QSharedPointer<StatusMap> statusMap);
+ void run(QFutureInterface<void> &future, const QString &topLevel, QStringList &files);
+
+signals:
+ void updateStreamAndView();
+ void setStatus(const QString &file, ClearCase::Internal::FileStatus::Status status, bool update);
+
+private:
+ ClearCasePlugin *m_plugin;
+ QSharedPointer<StatusMap> m_statusMap;
+};
+
+} // namespace Internal
+} // namespace ClearCase
+
+#endif // CLEARCASESYNC_H
diff --git a/src/plugins/clearcase/settingspage.cpp b/src/plugins/clearcase/settingspage.cpp
index ff5f8f21d4..08ab9507b8 100644
--- a/src/plugins/clearcase/settingspage.cpp
+++ b/src/plugins/clearcase/settingspage.cpp
@@ -37,6 +37,7 @@
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
+#include <utils/environment.h>
#include <utils/pathchooser.h>
#include <QCoreApplication>
@@ -71,6 +72,7 @@ ClearCaseSettings SettingsPageWidget::settings() const
rc.disableIndexer = m_ui.disableIndexerCheckBox->isChecked();
rc.diffArgs = m_ui.diffArgsEdit->text();
rc.indexOnlyVOBs = m_ui.indexOnlyVOBsEdit->text();
+ rc.extDiffAvailable = m_ui.externalDiffRadioButton->isEnabled();
return rc;
}
@@ -79,16 +81,23 @@ void SettingsPageWidget::setSettings(const ClearCaseSettings &s)
m_ui.commandPathChooser->setPath(s.ccCommand);
m_ui.timeOutSpinBox->setValue(s.timeOutS);
m_ui.autoCheckOutCheckBox->setChecked(s.autoCheckOut);
- switch (s.diffType) {
- case GraphicalDiff:
- m_ui.graphicalDiffRadioButton->setChecked(true);
- m_ui.diffWidget->setEnabled(false);
- break;
- case ExternalDiff:
- m_ui.externalDiffRadioButton->setChecked(true);
- m_ui.diffWidget->setEnabled(true);
- break;
+ bool extDiffAvailable = !Utils::Environment::systemEnvironment().searchInPath(QLatin1String("diff")).isEmpty();
+ if (extDiffAvailable) {
+ m_ui.diffWarningLabel->setVisible(false);
+ } else {
+ QString diffWarning = tr("In order to use External diff, 'diff' command needs to be accessible.");
+#ifdef Q_OS_WIN
+ diffWarning.append(tr(" DiffUtils is available for free download "
+ "<a href=\"http://gnuwin32.sourceforge.net/packages/diffutils.htm\">here</a>. "
+ "Please extract it to a directory in your PATH."));
+#endif
+ m_ui.diffWarningLabel->setText(diffWarning);
+ m_ui.externalDiffRadioButton->setEnabled(false);
}
+ if (extDiffAvailable && s.diffType == ExternalDiff)
+ m_ui.externalDiffRadioButton->setChecked(true);
+ else
+ m_ui.graphicalDiffRadioButton->setChecked(true);
m_ui.autoAssignActivityCheckBox->setChecked(s.autoAssignActivityName);
m_ui.historyCountSpinBox->setValue(s.historyCount);
m_ui.promptCheckBox->setChecked(s.promptToCheckIn);
diff --git a/src/plugins/clearcase/settingspage.ui b/src/plugins/clearcase/settingspage.ui
index 7f4c324708..9d80e2b4ef 100644
--- a/src/plugins/clearcase/settingspage.ui
+++ b/src/plugins/clearcase/settingspage.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>363</width>
- <height>384</height>
+ <height>403</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -39,11 +39,17 @@
<string>Diff</string>
</property>
<layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
<item row="0" column="0">
<widget class="QRadioButton" name="graphicalDiffRadioButton">
<property name="text">
<string>&amp;Graphical (Single file only)</string>
</property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
</widget>
</item>
<item row="1" column="0">
@@ -55,6 +61,9 @@
</item>
<item row="1" column="1">
<widget class="QWidget" name="diffWidget" native="true">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>0</number>
@@ -75,6 +84,53 @@
</layout>
</widget>
</item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QLabel" name="diffWarningLabel">
+ <property name="palette">
+ <palette>
+ <active>
+ <colorrole role="WindowText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </active>
+ <inactive>
+ <colorrole role="WindowText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </inactive>
+ <disabled>
+ <colorrole role="WindowText">
+ <brush brushstyle="SolidPattern">
+ <color alpha="255">
+ <red>68</red>
+ <green>96</green>
+ <blue>92</blue>
+ </color>
+ </brush>
+ </colorrole>
+ </disabled>
+ </palette>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
index 1bc699083e..ac933cb48b 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
@@ -36,12 +36,12 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/gnumakeparser.h>
#include <projectexplorer/ioutputparser.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtparser.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/qtcassert.h>
#include <QInputDialog>
@@ -113,11 +113,11 @@ ProjectExplorer::IOutputParser *CMakeBuildConfiguration::createOutputParser() co
{
ProjectExplorer::IOutputParser *parserchain = new ProjectExplorer::GnuMakeParser;
- int versionId = QtSupport::QtProfileInformation::qtVersionId(target()->profile());
+ int versionId = QtSupport::QtKitInformation::qtVersionId(target()->kit());
if (versionId >= 0)
parserchain->appendOutputParser(new QtSupport::QtParser);
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
if (tc)
parserchain->appendOutputParser(tc->outputParser());
return parserchain;
@@ -126,7 +126,7 @@ ProjectExplorer::IOutputParser *CMakeBuildConfiguration::createOutputParser() co
Utils::Environment CMakeBuildConfiguration::baseEnvironment() const
{
Utils::Environment env = BuildConfiguration::baseEnvironment();
- target()->profile()->addToEnvironment(env);
+ target()->kit()->addToEnvironment(env);
return env;
}
@@ -248,7 +248,7 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::restore(ProjectExplorer
bool CMakeBuildConfigurationFactory::canHandle(const ProjectExplorer::Target *t) const
{
- if (!t->project()->supportsProfile(t->profile()))
+ if (!t->project()->supportsKit(t->kit()))
return false;
return qobject_cast<CMakeProject *>(t->project());
}
diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
index 7807dee197..b5c98e8c8b 100644
--- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
@@ -34,8 +34,8 @@
#include <coreplugin/icore.h>
#include <utils/pathchooser.h>
#include <utils/fancylineedit.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/kitmanager.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/abi.h>
#include <texteditor/fontsettings.h>
@@ -405,13 +405,13 @@ void CMakeRunPage::initializePage()
m_generatorComboBox->clear();
bool hasCodeBlocksGenerator = m_cmakeWizard->cmakeManager()->hasCodeBlocksMsvcGenerator();
- QList<ProjectExplorer::Profile *> profileList =
- ProjectExplorer::ProfileManager::instance()->profiles();
+ QList<ProjectExplorer::Kit *> kitList =
+ ProjectExplorer::KitManager::instance()->kits();
- foreach (ProjectExplorer::Profile *p, profileList) {
- QVariant profileVariant = qVariantFromValue(static_cast<void *>(p));
+ foreach (ProjectExplorer::Kit *k, kitList) {
+ QVariant kitVariant = qVariantFromValue(static_cast<void *>(k));
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p);
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
if (!tc)
continue;
ProjectExplorer::Abi targetAbi = tc->targetAbi();
@@ -421,21 +421,21 @@ void CMakeRunPage::initializePage()
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor) {
if (hasCodeBlocksGenerator && (cachedGenerator.isEmpty() || cachedGenerator == "NMake Makefiles"))
- m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(p->displayName()), profileVariant);
+ m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(k->displayName()), kitVariant);
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
#ifdef Q_OS_WIN
if (cachedGenerator.isEmpty() || cachedGenerator == "MinGW Makefiles")
- m_generatorComboBox->addItem(tr("MinGW Generator (%1)").arg(p->displayName()), profileVariant);
+ m_generatorComboBox->addItem(tr("MinGW Generator (%1)").arg(p->displayName()), kitVariant);
#else
if (cachedGenerator.isEmpty() || cachedGenerator == "Unix Makefiles")
- m_generatorComboBox->addItem(tr("Unix Generator (%1)").arg(p->displayName()), profileVariant);
+ m_generatorComboBox->addItem(tr("Unix Generator (%1)").arg(k->displayName()), kitVariant);
#endif
}
} else {
// Non windows
if (cachedGenerator.isEmpty() || cachedGenerator == "Unix Makefiles")
- m_generatorComboBox->addItem(tr("Unix Generator (%1)").arg(p->displayName()), profileVariant);
+ m_generatorComboBox->addItem(tr("Unix Generator (%1)").arg(k->displayName()), kitVariant);
}
}
}
@@ -448,15 +448,15 @@ void CMakeRunPage::runCMake()
int index = m_generatorComboBox->currentIndex();
- ProjectExplorer::Profile *p = 0;
+ ProjectExplorer::Kit *p = 0;
if (index >= 0)
- p = static_cast<ProjectExplorer::Profile *>(m_generatorComboBox->itemData(index).value<void *>());
+ p = static_cast<ProjectExplorer::Kit *>(m_generatorComboBox->itemData(index).value<void *>());
if (!p) {
m_output->appendPlainText(tr("No generator selected."));
return;
}
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p);
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(p);
m_runCMake->setEnabled(false);
m_argumentsLineEdit->setEnabled(false);
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index dd2d44e245..239e46594a 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -45,8 +45,8 @@
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/buildmanager.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/kitmanager.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/target.h>
#include <qtsupport/customexecutablerunconfiguration.h>
@@ -286,7 +286,7 @@ bool CMakeProject::parseCMakeLists()
createUiCodeModelSupport();
- ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(activeTarget()->profile());
+ ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
if (!tc) {
emit buildTargetsChanged();
emit fileListChanged();
@@ -530,9 +530,9 @@ bool CMakeProject::fromMap(const QVariantMap &map)
if (!Project::fromMap(map))
return false;
- Profile *defaultProfile = ProfileManager::instance()->defaultProfile();
- if (!activeTarget() && defaultProfile)
- addTarget(createTarget(defaultProfile));
+ Kit *defaultKit = KitManager::instance()->defaultKit();
+ if (!activeTarget() && defaultKit)
+ addTarget(createTarget(defaultKit));
// We have a user file, but we could still be missing the cbp file
// or simply run createXml with the saved settings
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
index 76e9696601..c74dca7601 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
@@ -496,7 +496,7 @@ QString CMakeRunConfigurationFactory::displayNameForId(const Core::Id id) const
bool CMakeRunConfigurationFactory::canHandle(ProjectExplorer::Target *parent) const
{
- if (!parent->project()->supportsProfile(parent->profile()))
+ if (!parent->project()->supportsKit(parent->kit()))
return false;
return qobject_cast<CMakeProject *>(parent->project());
}
diff --git a/src/plugins/cmakeprojectmanager/makestep.cpp b/src/plugins/cmakeprojectmanager/makestep.cpp
index 6e51cbd2a0..feda03a96c 100644
--- a/src/plugins/cmakeprojectmanager/makestep.cpp
+++ b/src/plugins/cmakeprojectmanager/makestep.cpp
@@ -37,7 +37,7 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/deployconfiguration.h>
#include <projectexplorer/gnumakeparser.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
@@ -137,7 +137,7 @@ bool MakeStep::init()
setIgnoreReturnValue(m_clean);
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
pp->setEnvironment(bc->environment());
@@ -308,7 +308,7 @@ void MakeStepConfigWidget::updateDetails()
return;
}
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(m_makeStep->target()->profile());
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(m_makeStep->target()->kit());
if (tc) {
QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->buildTargets());
Utils::QtcProcess::addArgs(&arguments, m_makeStep->additionalArguments());
@@ -321,7 +321,7 @@ void MakeStepConfigWidget::updateDetails()
param.setArguments(arguments);
m_summaryText = param.summary(displayName());
} else {
- m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
+ m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
}
emit updateSummary();
}
diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro
index 1736574340..14a7450b3c 100644
--- a/src/plugins/coreplugin/coreplugin.pro
+++ b/src/plugins/coreplugin/coreplugin.pro
@@ -102,7 +102,8 @@ SOURCES += mainwindow.cpp \
idocument.cpp \
textdocument.cpp \
documentmanager.cpp \
- removefiledialog.cpp
+ removefiledialog.cpp \
+ iversioncontrol.cpp
HEADERS += mainwindow.h \
editmode.h \
diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs
index 255d946c4d..cf50a57299 100644
--- a/src/plugins/coreplugin/coreplugin.qbs
+++ b/src/plugins/coreplugin/coreplugin.qbs
@@ -152,6 +152,7 @@ QtcPlugin {
"versiondialog.cpp",
"versiondialog.h",
"id.cpp",
+ "iversioncontrol.cpp",
"iversioncontrol.h",
"variablechooser.cpp",
"variablemanager.cpp",
diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp
index a604f00974..6e7a230756 100644
--- a/src/plugins/coreplugin/documentmanager.cpp
+++ b/src/plugins/coreplugin/documentmanager.cpp
@@ -825,15 +825,20 @@ DocumentManager::ReadOnlyAction
tr("The file <i>%1</i> is read only.").arg(QDir::toNativeSeparators(fileName)),
QMessageBox::Cancel, parent);
+ QString makeWritableText;
QPushButton *vcsButton = 0;
- if (promptVCS)
- vcsButton = msgBox.addButton(tr("Open with VCS (%1)").arg(versionControl->displayName()), QMessageBox::AcceptRole);
+ if (promptVCS) {
+ vcsButton = msgBox.addButton(versionControl->vcsOpenText(), QMessageBox::AcceptRole);
+ makeWritableText = versionControl->vcsMakeWritableText();
+ }
+ if (makeWritableText.isEmpty())
+ makeWritableText = tr("Make &Writable");
- QPushButton *makeWritableButton = msgBox.addButton(tr("Make Writable"), QMessageBox::AcceptRole);
+ QPushButton *makeWritableButton = msgBox.addButton(makeWritableText, QMessageBox::AcceptRole);
QPushButton *saveAsButton = 0;
if (displaySaveAsButton)
- saveAsButton = msgBox.addButton(tr("Save As..."), QMessageBox::ActionRole);
+ saveAsButton = msgBox.addButton(tr("&Save As..."), QMessageBox::ActionRole);
msgBox.setDefaultButton(vcsButton ? vcsButton : makeWritableButton);
msgBox.exec();
diff --git a/src/plugins/coreplugin/iversioncontrol.cpp b/src/plugins/coreplugin/iversioncontrol.cpp
new file mode 100644
index 0000000000..ebd075b112
--- /dev/null
+++ b/src/plugins/coreplugin/iversioncontrol.cpp
@@ -0,0 +1,45 @@
+/**************************************************************************
+**
+** 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 "iversioncontrol.h"
+
+namespace Core {
+
+QString IVersionControl::vcsOpenText() const
+{
+ return tr("Open with VCS (%1)").arg(displayName());
+}
+
+QString IVersionControl::vcsMakeWritableText() const
+{
+ return QString();
+}
+
+}
diff --git a/src/plugins/coreplugin/iversioncontrol.h b/src/plugins/coreplugin/iversioncontrol.h
index 3134d0fe08..b6f4e012f3 100644
--- a/src/plugins/coreplugin/iversioncontrol.h
+++ b/src/plugins/coreplugin/iversioncontrol.h
@@ -163,6 +163,16 @@ public:
*/
virtual bool vcsAnnotate(const QString &file, int line) = 0;
+ /*!
+ * Display text for Open operation
+ */
+ virtual QString vcsOpenText() const;
+
+ /*!
+ * Display text for Make Writable
+ */
+ virtual QString vcsMakeWritableText() const;
+
signals:
void repositoryChanged(const QString &repository);
void filesChanged(const QStringList &files);
diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro
index 246a491594..83d207eead 100644
--- a/src/plugins/debugger/debugger.pro
+++ b/src/plugins/debugger/debugger.pro
@@ -38,8 +38,8 @@ HEADERS += \
debuggerstartparameters.h \
debuggerstreamops.h \
debuggerstringutils.h \
- debuggerprofileconfigwidget.h \
- debuggerprofileinformation.h \
+ debuggerkitconfigwidget.h \
+ debuggerkitinformation.h \
disassembleragent.h \
disassemblerlines.h \
loadcoredialog.h \
@@ -92,8 +92,8 @@ SOURCES += \
debuggerplugin.cpp \
debuggerrunner.cpp \
debuggerstreamops.cpp \
- debuggerprofileconfigwidget.cpp \
- debuggerprofileinformation.cpp \
+ debuggerkitconfigwidget.cpp \
+ debuggerkitinformation.cpp \
disassembleragent.cpp \
disassemblerlines.cpp \
loadcoredialog.cpp \
diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs
index cd1300f276..7538677da2 100644
--- a/src/plugins/debugger/debugger.qbs
+++ b/src/plugins/debugger/debugger.qbs
@@ -33,10 +33,10 @@ QtcPlugin {
files: [
"debugger.qrc",
- "debuggerprofileconfigwidget.cpp",
- "debuggerprofileconfigwidget.h",
- "debuggerprofileinformation.cpp",
- "debuggerprofileinformation.h",
+ "debuggerkitconfigwidget.cpp",
+ "debuggerkitconfigwidget.h",
+ "debuggerkitinformation.cpp",
+ "debuggerkitinformation.h",
"basewindow.cpp",
"breakhandler.cpp",
"breakhandler.h",
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index f27b8c00e4..893cbb13f0 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -32,15 +32,15 @@
#include "debuggerstartparameters.h"
#include "debuggerconstants.h"
-#include "debuggerprofileinformation.h"
+#include "debuggerkitinformation.h"
#include "debuggerstringutils.h"
#include "cdb/cdbengine.h"
#include "shared/hostutils.h"
#include <coreplugin/icore.h>
#include <projectexplorer/abi.h>
-#include <projectexplorer/profilechooser.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitchooser.h>
+#include <projectexplorer/kitinformation.h>
#include <utils/historycompleter.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
@@ -88,7 +88,7 @@ namespace Internal {
class StartApplicationDialogPrivate
{
public:
- ProfileChooser *profileChooser;
+ KitChooser *kitChooser;
PathChooser *localExecutablePathChooser;
FancyLineEdit *arguments;
PathChooser *workingDirectory;
@@ -127,7 +127,7 @@ public:
bool operator==(const StartApplicationParameters &p) const { return equals(p); }
bool operator!=(const StartApplicationParameters &p) const { return !equals(p); }
- Id profileId;
+ Id kitId;
QString localExecutable;
QString processArgs;
QString workingDirectory;
@@ -150,7 +150,7 @@ bool StartApplicationParameters::equals(const StartApplicationParameters &rhs) c
&& breakAtMain == rhs.breakAtMain
&& runInTerminal == rhs.runInTerminal
&& serverStartScript == rhs.serverStartScript
- && profileId == rhs.profileId
+ && kitId == rhs.kitId
&& debugInfoLocation == rhs.debugInfoLocation;
}
@@ -167,15 +167,15 @@ QString StartApplicationParameters::displayName() const
name += QLatin1String("...");
}
- if (Profile *profile = ProfileManager::instance()->find(profileId))
- name += QString::fromLatin1(" (%1)").arg(profile->displayName());
+ if (Kit *kit = KitManager::instance()->find(kitId))
+ name += QString::fromLatin1(" (%1)").arg(kit->displayName());
return name;
}
void StartApplicationParameters::toSettings(QSettings *settings) const
{
- settings->setValue(_("LastProfileId"), profileId.toString());
+ settings->setValue(_("LastProfileId"), kitId.toString());
settings->setValue(_("LastExternalExecutable"), localExecutable);
settings->setValue(_("LastExternalExecutableArguments"), processArgs);
settings->setValue(_("LastExternalWorkingDirectory"), workingDirectory);
@@ -187,8 +187,8 @@ void StartApplicationParameters::toSettings(QSettings *settings) const
void StartApplicationParameters::fromSettings(const QSettings *settings)
{
- const QString profileIdString = settings->value(_("LastProfileId")).toString();
- profileId = profileIdString.isEmpty() ? Id() : Id(profileIdString);
+ const QString kitIdString = settings->value(_("LastProfileId")).toString();
+ kitId = kitIdString.isEmpty() ? Id() : Id(kitIdString);
localExecutable = settings->value(_("LastExternalExecutable")).toString();
processArgs = settings->value(_("LastExternalExecutableArguments")).toString();
workingDirectory = settings->value(_("LastExternalWorkingDirectory")).toString();
@@ -225,7 +225,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
d->runInTerminalCheckBox = new QCheckBox(this);
- d->profileChooser = new ProfileChooser(this, ProfileChooser::LocalDebugging);
+ d->kitChooser = new KitChooser(this, KitChooser::LocalDebugging);
d->breakAtMainCheckBox = new QCheckBox(this);
d->breakAtMainCheckBox->setText(QString());
@@ -263,7 +263,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
QFormLayout *formLayout = new QFormLayout();
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
- formLayout->addRow(tr("&Target:"), d->profileChooser);
+ formLayout->addRow(tr("&Kit:"), d->kitChooser);
formLayout->addRow(tr("Local &executable:"), d->localExecutablePathChooser);
formLayout->addRow(tr("Command line &arguments:"), d->arguments);
formLayout->addRow(tr("&Working directory:"), d->workingDirectory);
@@ -319,9 +319,9 @@ void StartApplicationDialog::historyIndexChanged(int index)
setParameters(v.value<StartApplicationParameters>());
}
-Id StartApplicationDialog::profileId() const
+Id StartApplicationDialog::kitId() const
{
- return d->profileChooser->currentProfileId();
+ return d->kitChooser->currentKitId();
}
void StartApplicationDialog::updateState()
@@ -373,9 +373,9 @@ bool StartApplicationDialog::run(QWidget *parent, QSettings *settings, DebuggerS
settings->endGroup();
}
- Profile *profile = dialog.d->profileChooser->currentProfile();
- QTC_ASSERT(profile, return false);
- fillParameters(sp, profile);
+ Kit *kit = dialog.d->kitChooser->currentKit();
+ QTC_ASSERT(kit, return false);
+ fillParameters(sp, kit);
sp->executable = newParameters.localExecutable;
sp->displayName = newParameters.displayName();
@@ -387,7 +387,7 @@ bool StartApplicationDialog::run(QWidget *parent, QSettings *settings, DebuggerS
sp->serverStartScript = newParameters.serverStartScript;
sp->debugInfoLocation = newParameters.debugInfoLocation;
- bool isLocal = DeviceProfileInformation::device(profile)->type()
+ bool isLocal = DeviceKitInformation::device(kit)->type()
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
sp->startMode = isLocal ? StartExternal : StartRemoteProcess;
return true;
@@ -398,7 +398,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const
StartApplicationParameters result;
result.localExecutable = d->localExecutablePathChooser->path();
result.serverStartScript = d->serverStartScriptPathChooser->path();
- result.profileId = d->profileChooser->currentProfileId();
+ result.kitId = d->kitChooser->currentKitId();
result.debugInfoLocation = d->debuginfoPathChooser->path();
result.processArgs = d->arguments->text();
result.workingDirectory = d->workingDirectory->path();
@@ -409,7 +409,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const
void StartApplicationDialog::setParameters(const StartApplicationParameters &p)
{
- d->profileChooser->setCurrentProfileId(p.profileId);
+ d->kitChooser->setCurrentKitId(p.kitId);
d->localExecutablePathChooser->setPath(p.localExecutable);
d->serverStartScriptPathChooser->setPath(p.serverStartScript);
d->debuginfoPathChooser->setPath(p.debugInfoLocation);
@@ -430,7 +430,7 @@ class AttachToQmlPortDialogPrivate
{
public:
QSpinBox *portSpinBox;
- ProfileChooser *profileChooser;
+ KitChooser *kitChooser;
};
AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
@@ -440,7 +440,7 @@ AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Debugger"));
- d->profileChooser = new ProfileChooser(this);
+ d->kitChooser = new KitChooser(this);
d->portSpinBox = new QSpinBox(this);
d->portSpinBox->setMaximum(65535);
@@ -451,7 +451,7 @@ AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
QFormLayout *formLayout = new QFormLayout();
- formLayout->addRow(tr("Target:"), d->profileChooser);
+ formLayout->addRow(tr("Kit:"), d->kitChooser);
formLayout->addRow(tr("&Port:"), d->portSpinBox);
QVBoxLayout *verticalLayout = new QVBoxLayout(this);
@@ -477,14 +477,14 @@ int AttachToQmlPortDialog::port() const
return d->portSpinBox->value();
}
-Profile *AttachToQmlPortDialog::profile() const
+Kit *AttachToQmlPortDialog::kit() const
{
- return d->profileChooser->currentProfile();
+ return d->kitChooser->currentKit();
}
-void AttachToQmlPortDialog::setProfileId(const Id &id)
+void AttachToQmlPortDialog::setKitId(const Id &id)
{
- d->profileChooser->setCurrentProfileId(id);
+ d->kitChooser->setCurrentKitId(id);
}
// --------- StartRemoteCdbDialog
diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h
index 49e32347a2..a8d8274c60 100644
--- a/src/plugins/debugger/debuggerdialogs.h
+++ b/src/plugins/debugger/debuggerdialogs.h
@@ -44,7 +44,7 @@ class QSettings;
QT_END_NAMESPACE
namespace Core { class Id; }
-namespace ProjectExplorer { class Profile; }
+namespace ProjectExplorer { class Kit; }
namespace Debugger {
class DebuggerStartParameters;
@@ -78,7 +78,7 @@ private:
void setParameters(const StartApplicationParameters &p);
void setHistory(const QList<StartApplicationParameters> &l);
void hideStartScript();
- Core::Id profileId() const;
+ Core::Id kitId() const;
StartApplicationDialogPrivate *d;
};
@@ -94,8 +94,8 @@ public:
int port() const;
void setPort(const int port);
- ProjectExplorer::Profile *profile() const;
- void setProfileId(const Core::Id &id);
+ ProjectExplorer::Kit *kit() const;
+ void setKitId(const Core::Id &id);
private:
AttachToQmlPortDialogPrivate *d;
diff --git a/src/plugins/debugger/debuggerprofileconfigwidget.cpp b/src/plugins/debugger/debuggerkitconfigwidget.cpp
index 81789acfb1..96cf2b04a7 100644
--- a/src/plugins/debugger/debuggerprofileconfigwidget.cpp
+++ b/src/plugins/debugger/debuggerkitconfigwidget.cpp
@@ -28,12 +28,12 @@
**
**************************************************************************/
-#include "debuggerprofileconfigwidget.h"
+#include "debuggerkitconfigwidget.h"
-#include "debuggerprofileinformation.h"
+#include "debuggerkitinformation.h"
#include <projectexplorer/abi.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
@@ -56,23 +56,23 @@ namespace Internal {
static const char dgbToolsDownloadLink32C[] = "http://www.microsoft.com/whdc/devtools/debugging/installx86.Mspx";
static const char dgbToolsDownloadLink64C[] = "http://www.microsoft.com/whdc/devtools/debugging/install64bit.Mspx";
// -----------------------------------------------------------------------
-// DebuggerProfileConfigWidget:
+// DebuggerKitConfigWidget:
// -----------------------------------------------------------------------
-DebuggerProfileConfigWidget::DebuggerProfileConfigWidget(ProjectExplorer::Profile *p,
- const DebuggerProfileInformation *pi,
- QWidget *parent) :
- ProjectExplorer::ProfileConfigWidget(parent),
- m_profile(p),
- m_info(pi),
+DebuggerKitConfigWidget::DebuggerKitConfigWidget(ProjectExplorer::Kit *k,
+ const DebuggerKitInformation *ki,
+ QWidget *parent) :
+ ProjectExplorer::KitConfigWidget(parent),
+ m_kit(k),
+ m_info(ki),
m_chooser(new Utils::PathChooser)
{
- setToolTip(tr("The debugger to use for this target."));
+ setToolTip(tr("The debugger to use for this kit."));
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p);
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
if (tc && tc->targetAbi().os() == ProjectExplorer::Abi::WindowsOS
&& tc->targetAbi().osFlavor() != ProjectExplorer::Abi::WindowsMSysFlavor) {
QLabel *msvcDebuggerConfigLabel = new QLabel;
@@ -104,43 +104,42 @@ DebuggerProfileConfigWidget::DebuggerProfileConfigWidget(ProjectExplorer::Profil
connect(m_chooser, SIGNAL(changed(QString)), this, SIGNAL(dirty()));
}
-QString DebuggerProfileConfigWidget::displayName() const
+QString DebuggerKitConfigWidget::displayName() const
{
return tr("Debugger:");
}
-void DebuggerProfileConfigWidget::makeReadOnly()
+void DebuggerKitConfigWidget::makeReadOnly()
{
m_chooser->setEnabled(false);
}
-void DebuggerProfileConfigWidget::apply()
+void DebuggerKitConfigWidget::apply()
{
Utils::FileName fn = m_chooser->fileName();
- DebuggerProfileInformation::setDebuggerCommand(m_profile, fn);
+ DebuggerKitInformation::setDebuggerCommand(m_kit, fn);
}
-void DebuggerProfileConfigWidget::discard()
+void DebuggerKitConfigWidget::discard()
{
- m_chooser->setFileName(DebuggerProfileInformation::debuggerCommand(m_profile));
+ m_chooser->setFileName(DebuggerKitInformation::debuggerCommand(m_kit));
}
-bool DebuggerProfileConfigWidget::isDirty() const
+bool DebuggerKitConfigWidget::isDirty() const
{
- return m_chooser->fileName() != DebuggerProfileInformation::debuggerCommand(m_profile);
+ return m_chooser->fileName() != DebuggerKitInformation::debuggerCommand(m_kit);
}
-QWidget *DebuggerProfileConfigWidget::buttonWidget() const
+QWidget *DebuggerKitConfigWidget::buttonWidget() const
{
return m_chooser->buttonAtIndex(1);
}
-void DebuggerProfileConfigWidget::autoDetectDebugger()
+void DebuggerKitConfigWidget::autoDetectDebugger()
{
- QVariant v = m_info->defaultValue(m_profile);
+ QVariant v = m_info->defaultValue(m_kit);
m_chooser->setFileName(Utils::FileName::fromString(v.toString()));
}
} // namespace Internal
-
} // namespace Debugger
diff --git a/src/plugins/debugger/debuggerprofileconfigwidget.h b/src/plugins/debugger/debuggerkitconfigwidget.h
index f87b89f1b3..b818f3817f 100644
--- a/src/plugins/debugger/debuggerprofileconfigwidget.h
+++ b/src/plugins/debugger/debuggerkitconfigwidget.h
@@ -28,33 +28,33 @@
**
**************************************************************************/
-#ifndef DEBUGGER_DEBUGGERPROFILECONFIGWIDGET_H
-#define DEBUGGER_DEBUGGERPROFILECONFIGWIDGET_H
+#ifndef DEBUGGER_DEBUGGERKITCONFIGWIDGET_H
+#define DEBUGGER_DEBUGGERKITCONFIGWIDGET_H
-#include <projectexplorer/profileconfigwidget.h>
+#include <projectexplorer/kitconfigwidget.h>
#include <QLabel>
-#include <debuggerprofileinformation.h>
+#include <debuggerkitinformation.h>
-namespace ProjectExplorer { class Profile; }
+namespace ProjectExplorer { class Kit; }
namespace Utils { class PathChooser; }
namespace Debugger {
-class DebuggerProfileInformation;
+class DebuggerKitInformation;
namespace Internal {
// -----------------------------------------------------------------------
-// DebuggerProfileConfigWidget:
+// DebuggerKitConfigWidget:
// -----------------------------------------------------------------------
-class DebuggerProfileConfigWidget : public ProjectExplorer::ProfileConfigWidget
+class DebuggerKitConfigWidget : public ProjectExplorer::KitConfigWidget
{
Q_OBJECT
public:
- DebuggerProfileConfigWidget(ProjectExplorer::Profile *p,
- const DebuggerProfileInformation *pi,
- QWidget *parent = 0);
+ DebuggerKitConfigWidget(ProjectExplorer::Kit *p,
+ const DebuggerKitInformation *ki,
+ QWidget *parent = 0);
QString displayName() const;
@@ -69,12 +69,12 @@ private slots:
void autoDetectDebugger();
private:
- ProjectExplorer::Profile *m_profile;
- const DebuggerProfileInformation *m_info;
+ ProjectExplorer::Kit *m_kit;
+ const DebuggerKitInformation *m_info;
Utils::PathChooser *m_chooser;
};
} // namespace Internal
} // namespace Debugger
-#endif // DEBUGGER_DEBUGGERPROFILEINFORMATION_H
+#endif // DEBUGGER_DEBUGGERKITINFORMATION_H
diff --git a/src/plugins/debugger/debuggerprofileinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp
index f794bbc634..8d7db74f57 100644
--- a/src/plugins/debugger/debuggerprofileinformation.cpp
+++ b/src/plugins/debugger/debuggerkitinformation.cpp
@@ -28,9 +28,9 @@
**
**************************************************************************/
-#include "debuggerprofileinformation.h"
+#include "debuggerkitinformation.h"
-#include "debuggerprofileconfigwidget.h"
+#include "debuggerkitconfigwidget.h"
#include <projectexplorer/abi.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -115,30 +115,30 @@ static QPair<QString, QString> autoDetectCdbDebugger()
namespace Debugger {
// --------------------------------------------------------------------------
-// DebuggerProfileInformation:
+// DebuggerKitInformation:
// --------------------------------------------------------------------------
static const char DEBUGGER_INFORMATION[] = "Debugger.Information";
-DebuggerProfileInformation::DebuggerProfileInformation()
+DebuggerKitInformation::DebuggerKitInformation()
{
- setObjectName(QLatin1String("DebuggerProfileInformation"));
+ setObjectName(QLatin1String("DebuggerKitInformation"));
}
-Core::Id DebuggerProfileInformation::dataId() const
+Core::Id DebuggerKitInformation::dataId() const
{
static Core::Id id = Core::Id(DEBUGGER_INFORMATION);
return id;
}
-unsigned int DebuggerProfileInformation::priority() const
+unsigned int DebuggerKitInformation::priority() const
{
return 28000;
}
-QVariant DebuggerProfileInformation::defaultValue(Profile *p) const
+QVariant DebuggerKitInformation::defaultValue(Kit *k) const
{
- ToolChain *tc = ToolChainProfileInformation::toolChain(p);
+ ToolChain *tc = ToolChainKitInformation::toolChain(k);
Abi abi = Abi::hostAbi();
if (tc)
abi = tc->targetAbi();
@@ -166,11 +166,11 @@ QVariant DebuggerProfileInformation::defaultValue(Profile *p) const
return env.searchInPath(debugger);
}
-QList<Task> DebuggerProfileInformation::validate(Profile *p) const
+QList<Task> DebuggerKitInformation::validate(Kit *k) const
{
const Core::Id id(Constants::TASK_CATEGORY_BUILDSYSTEM);
QList<Task> result;
- FileName dbg = debuggerCommand(p);
+ FileName dbg = debuggerCommand(k);
if (dbg.isEmpty()) {
result << Task(Task::Warning, tr("No debugger set up."), FileName(), -1, id);
return result;
@@ -182,7 +182,7 @@ QList<Task> DebuggerProfileInformation::validate(Profile *p) const
else if (!fi.isExecutable())
result << Task(Task::Error, tr("Debugger not exectutable."), FileName(), -1, id);
- if (ToolChain *tc = ToolChainProfileInformation::toolChain(p)) {
+ if (ToolChain *tc = ToolChainKitInformation::toolChain(k)) {
// We need an absolute path to be able to locate Python on Windows.
const Abi abi = tc->targetAbi();
if (abi.os() == Abi::WindowsOS && !fi.isAbsolute()) {
@@ -202,25 +202,25 @@ QList<Task> DebuggerProfileInformation::validate(Profile *p) const
return result;
}
-ProfileConfigWidget *DebuggerProfileInformation::createConfigWidget(Profile *p) const
+KitConfigWidget *DebuggerKitInformation::createConfigWidget(Kit *k) const
{
- return new Internal::DebuggerProfileConfigWidget(p, this);
+ return new Internal::DebuggerKitConfigWidget(k, this);
}
-ProfileInformation::ItemList DebuggerProfileInformation::toUserOutput(Profile *p) const
+KitInformation::ItemList DebuggerKitInformation::toUserOutput(Kit *k) const
{
- return ItemList() << qMakePair(tr("Debugger"), debuggerCommand(p).toUserOutput());
+ return ItemList() << qMakePair(tr("Debugger"), debuggerCommand(k).toUserOutput());
}
-FileName DebuggerProfileInformation::debuggerCommand(const Profile *p)
+FileName DebuggerKitInformation::debuggerCommand(const Kit *k)
{
- return FileName::fromString(p ? p->value(Core::Id(DEBUGGER_INFORMATION)).toString() : QString());
+ return FileName::fromString(k ? k->value(Core::Id(DEBUGGER_INFORMATION)).toString() : QString());
}
-void DebuggerProfileInformation::setDebuggerCommand(Profile *p, const FileName &command)
+void DebuggerKitInformation::setDebuggerCommand(Kit *k, const FileName &command)
{
- QTC_ASSERT(p, return);
- p->setValue(Core::Id(DEBUGGER_INFORMATION), command.toString());
+ QTC_ASSERT(k, return);
+ k->setValue(Core::Id(DEBUGGER_INFORMATION), command.toString());
}
} // namespace Debugger
diff --git a/src/plugins/debugger/debuggerprofileinformation.h b/src/plugins/debugger/debuggerkitinformation.h
index ae409c96f5..e6d9dab6c8 100644
--- a/src/plugins/debugger/debuggerprofileinformation.h
+++ b/src/plugins/debugger/debuggerkitinformation.h
@@ -28,38 +28,38 @@
**
**************************************************************************/
-#ifndef DEBUGGER_DEBUGGERPROFILEINFORMATION_H
-#define DEBUGGER_DEBUGGERPROFILEINFORMATION_H
+#ifndef DEBUGGER_DEBUGGERKITINFORMATION_H
+#define DEBUGGER_DEBUGGERKITINFORMATION_H
#include "debugger_global.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
namespace Debugger {
-class DEBUGGER_EXPORT DebuggerProfileInformation : public ProjectExplorer::ProfileInformation
+class DEBUGGER_EXPORT DebuggerKitInformation : public ProjectExplorer::KitInformation
{
Q_OBJECT
public:
- DebuggerProfileInformation();
+ DebuggerKitInformation();
Core::Id dataId() const;
unsigned int priority() const; // the higher the closer to the top.
- QVariant defaultValue(ProjectExplorer::Profile *p) const;
+ QVariant defaultValue(ProjectExplorer::Kit *k) const;
- QList<ProjectExplorer::Task> validate(ProjectExplorer::Profile *p) const;
+ QList<ProjectExplorer::Task> validate(ProjectExplorer::Kit *k) const;
- ProjectExplorer::ProfileConfigWidget *createConfigWidget(ProjectExplorer::Profile *p) const;
+ ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
- ItemList toUserOutput(ProjectExplorer::Profile *p) const;
+ ItemList toUserOutput(ProjectExplorer::Kit *k) const;
- static Utils::FileName debuggerCommand(const ProjectExplorer::Profile *p);
- static void setDebuggerCommand(ProjectExplorer::Profile *p, const Utils::FileName &command);
+ static Utils::FileName debuggerCommand(const ProjectExplorer::Kit *k);
+ static void setDebuggerCommand(ProjectExplorer::Kit *k, const Utils::FileName &command);
};
} // namespace Debugger
-#endif // DEBUGGER_DEBUGGERPROFILEINFORMATION_H
+#endif // DEBUGGER_DEBUGGERKITINFORMATION_H
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index b6d5b593b8..403c4e28ec 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -41,7 +41,7 @@
#include "debuggerrunner.h"
#include "debuggerruncontrolfactory.h"
#include "debuggerstringutils.h"
-#include "debuggerprofileinformation.h"
+#include "debuggerkitinformation.h"
#include "memoryagent.h"
#include "breakpoint.h"
#include "breakhandler.h"
@@ -101,9 +101,9 @@
#include <projectexplorer/projectexplorersettings.h>
#include <projectexplorer/project.h>
#include <projectexplorer/session.h>
-#include <projectexplorer/profilechooser.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitchooser.h>
+#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/kitmanager.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchainmanager.h>
@@ -562,13 +562,13 @@ static inline QString executableForPid(qint64 pid)
return QString();
}
-class AbiProfileMatcher : public ProfileMatcher
+class AbiKitMatcher : public KitMatcher
{
public:
- explicit AbiProfileMatcher(const QList<Abi> &abis) : m_abis(abis) {}
- bool matches(const Profile *p) const
+ explicit AbiKitMatcher(const QList<Abi> &abis) : m_abis(abis) {}
+ bool matches(const Kit *p) const
{
- if (const ToolChain *tc = ToolChainProfileInformation::toolChain(p))
+ if (const ToolChain *tc = ToolChainKitInformation::toolChain(p))
return m_abis.contains(tc->targetAbi());
return false;
}
@@ -577,13 +577,13 @@ private:
const QList<Abi> m_abis;
};
-class CompatibleAbiProfileMatcher : public ProfileMatcher
+class CompatibleAbiKitMatcher : public KitMatcher
{
public:
- explicit CompatibleAbiProfileMatcher(const QList<Abi> &abis) : m_abis(abis) {}
- bool matches(const Profile *p) const
+ explicit CompatibleAbiKitMatcher(const QList<Abi> &abis) : m_abis(abis) {}
+ bool matches(const Kit *p) const
{
- if (const ToolChain *tc = ToolChainProfileInformation::toolChain(p))
+ if (const ToolChain *tc = ToolChainKitInformation::toolChain(p))
foreach (const Abi &a, m_abis)
if (a.isCompatibleWith(tc->targetAbi()))
return true;
@@ -594,14 +594,14 @@ private:
const QList<Abi> m_abis;
};
-class CdbMatcher : ProfileMatcher
+class CdbMatcher : KitMatcher
{
public:
CdbMatcher(char wordWidth = 0) : m_wordWidth(wordWidth) {}
- bool matches(const Profile *profile) const
+ bool matches(const Kit *k) const
{
- const ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
+ const ToolChain *tc = ToolChainKitInformation::toolChain(k);
QTC_ASSERT(tc, return false);
const Abi abi = tc->targetAbi();
if (abi.architecture() != Abi::X86Architecture
@@ -616,58 +616,63 @@ public:
return true;
}
- // Find a CDB profile for debugging unknown processes.
+ // Find a CDB kit for debugging unknown processes.
// On a 64bit OS, prefer a 64bit debugger.
- static Profile *findUniversalCdbProfile()
+ static Kit *findUniversalCdbKit()
{
#ifdef Q_OS_WIN
if (Utils::winIs64BitSystem()) {
CdbMatcher matcher64(64);
- if (Profile *cdb64Profile = ProfileManager::instance()->find(&matcher64))
- return cdb64Profile;
+ if (Kit *cdb64Kit = KitManager::instance()->find(&matcher64))
+ return cdb64Kit;
}
#endif
CdbMatcher matcher;
- return ProfileManager::instance()->find(&matcher);
+ return KitManager::instance()->find(&matcher);
}
private:
const char m_wordWidth;
};
-void fillParameters(DebuggerStartParameters *sp, const Profile *profile /* = 0 */)
+void fillParameters(DebuggerStartParameters *sp, const Kit *kit /* = 0 */)
{
- if (!profile) {
- // This code can only be reached when starting via the command
- // (-debug pid or executable) without specifying a profile.
- // Try to find a profile via ABI.
- if (sp->executable.isEmpty()
- && (sp->startMode == AttachExternal || sp->startMode == AttachCrashedExternal)) {
- sp->executable = executableForPid(sp->attachPID);
+ if (!kit) {
+ // This code can only be reached when starting via the command line
+ // (-debug pid or executable) or attaching from runconfiguration
+ // without specifying a kit. Try to find a kit via ABI.
+ QList<Abi> abis;
+ if (sp->toolChainAbi.isValid()) {
+ abis.push_back(sp->toolChainAbi);
+ } else {
+ // Try via executable.
+ if (sp->executable.isEmpty()
+ && (sp->startMode == AttachExternal || sp->startMode == AttachCrashedExternal)) {
+ sp->executable = executableForPid(sp->attachPID);
+ }
+ if (!sp->executable.isEmpty())
+ abis = Abi::abisOfBinary(Utils::FileName::fromString(sp->executable));
}
- if (!sp->executable.isEmpty()) {
- const QList<Abi> abis = Abi::abisOfBinary(Utils::FileName::fromString(sp->executable));
- if (!abis.isEmpty()) {
- AbiProfileMatcher matcher(abis);
- profile = ProfileManager::instance()->find(&matcher);
- if (!profile) {
- CompatibleAbiProfileMatcher matcher(abis);
- profile = ProfileManager::instance()->find(&matcher);
- }
+ if (!abis.isEmpty()) {
+ AbiKitMatcher matcher(abis);
+ kit = KitManager::instance()->find(&matcher);
+ if (!kit) {
+ CompatibleAbiKitMatcher matcher(abis);
+ kit = KitManager::instance()->find(&matcher);
}
}
- if (!profile)
- profile = ProfileManager::instance()->defaultProfile();
+ if (!kit)
+ kit = KitManager::instance()->defaultKit();
}
- sp->sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
- sp->debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
+ sp->sysRoot = SysRootKitInformation::sysRoot(kit).toString();
+ sp->debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString();
- ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
+ ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (tc)
sp->toolChainAbi = tc->targetAbi();
- IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
+ IDevice::ConstPtr device = DeviceKitInformation::device(kit);
if (device) {
sp->connParams = device->sshParameters();
sp->remoteChannel = sp->connParams.host + QLatin1Char(':') + QString::number(sp->connParams.port);
@@ -1384,14 +1389,14 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
{
const QString &option = *it;
// '-debug <pid>'
- // '-debug <exe>[,server=<server:port>][,core=<core>][,profile=<profile>]'
+ // '-debug <exe>[,server=<server:port>][,core=<core>][,kit=<kit>]'
if (*it == _("-debug")) {
++it;
if (it == cend) {
*errorMessage = msgParameterMissing(*it);
return false;
}
- Profile *profile = 0;
+ Kit *kit = 0;
DebuggerStartParameters sp;
qulonglong pid = it->toULongLong();
if (pid) {
@@ -1429,12 +1434,12 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
sp.displayName = tr("Core file \"%1\"").arg(sp.coreFile);
sp.startMessage = tr("Attaching to core file %1.").arg(sp.coreFile);
}
- else if (key == QLatin1String("profile")) {
- profile = ProfileManager::instance()->find(Id(val));
+ else if (key == QLatin1String("kit")) {
+ kit = KitManager::instance()->find(Id(val));
}
}
}
- fillParameters(&sp, profile);
+ fillParameters(&sp, kit);
if (sp.startMode == StartExternal) {
sp.displayName = tr("Executable file \"%1\"").arg(sp.executable);
sp.startMessage = tr("Debugging file %1.").arg(sp.executable);
@@ -1454,7 +1459,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
return false;
}
DebuggerStartParameters sp;
- fillParameters(&sp, CdbMatcher::findUniversalCdbProfile());
+ fillParameters(&sp, CdbMatcher::findUniversalCdbKit());
sp.startMode = AttachCrashedExternal;
sp.crashParameter = it->section(QLatin1Char(':'), 0, 0);
sp.attachPID = it->section(QLatin1Char(':'), 1, 1).toULongLong();
@@ -1575,7 +1580,7 @@ void DebuggerPluginPrivate::attachCore()
{
AttachCoreDialog dlg(mainWindow());
- dlg.setProfileId(Id(configValue(_("LastExternalProfile")).toString()));
+ dlg.setKitId(Id(configValue(_("LastExternalProfile")).toString()));
dlg.setLocalExecutableFile(configValue(_("LastExternalExecutableFile")).toString());
dlg.setLocalCoreFile(configValue(_("LastLocalCoreFile")).toString());
dlg.setRemoteCoreFile(configValue(_("LastRemoteCoreFile")).toString());
@@ -1587,12 +1592,12 @@ void DebuggerPluginPrivate::attachCore()
setConfigValue(_("LastExternalExecutableFile"), dlg.localExecutableFile());
setConfigValue(_("LastLocalCoreFile"), dlg.localCoreFile());
setConfigValue(_("LastRemoteCoreFile"), dlg.remoteCoreFile());
- setConfigValue(_("LastExternalProfile"), dlg.profile()->id().toString());
+ setConfigValue(_("LastExternalProfile"), dlg.kit()->id().toString());
setConfigValue(_("LastExternalStartScript"), dlg.overrideStartScript());
DebuggerStartParameters sp;
QString display = dlg.isLocal() ? dlg.localCoreFile() : dlg.remoteCoreFile();
- fillParameters(&sp, dlg.profile());
+ fillParameters(&sp, dlg.kit());
sp.masterEngineType = GdbEngineType;
sp.executable = dlg.localExecutableFile();
sp.coreFile = dlg.localCoreFile();
@@ -1607,9 +1612,9 @@ void DebuggerPluginPrivate::startRemoteCdbSession()
{
const QString connectionKey = _("CdbRemoteConnection");
DebuggerStartParameters sp;
- Profile *profile = CdbMatcher::findUniversalCdbProfile();
- QTC_ASSERT(profile, return);
- fillParameters(&sp, profile);
+ Kit *kit = CdbMatcher::findUniversalCdbKit();
+ QTC_ASSERT(kit, return);
+ fillParameters(&sp, kit);
sp.startMode = AttachToRemoteServer;
sp.closeMode = KillAtClose;
StartRemoteCdbDialog dlg(mainWindow());
@@ -1656,10 +1661,10 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
}
dlg->setAttribute(Qt::WA_DeleteOnClose);
- ProfileChooser *profileChooser = dlg->profileChooser();
- Profile *profile = profileChooser->currentProfile();
- QTC_ASSERT(profile, return);
- IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
+ KitChooser *kitChooser = dlg->kitChooser();
+ Kit *kit = kitChooser->currentKit();
+ QTC_ASSERT(kit, return);
+ IDevice::ConstPtr device = DeviceKitInformation::device(kit);
QTC_ASSERT(device, return);
DeviceProcess process = dlg->currentProcess();
if (process.pid == 0) {
@@ -1679,7 +1684,7 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
if (device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
DebuggerStartParameters sp;
- fillParameters(&sp, profile);
+ fillParameters(&sp, kit);
sp.attachPID = process.pid;
sp.displayName = tr("Process %1").arg(process.pid);
sp.executable = process.exe;
@@ -1695,12 +1700,16 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
void DebuggerPluginPrivate::attachExternalApplication(ProjectExplorer::RunControl *rc)
{
DebuggerStartParameters sp;
- fillParameters(&sp);
sp.attachPID = rc->applicationProcessHandle().pid();
sp.displayName = tr("Process %1").arg(sp.attachPID);
sp.startMode = AttachExternal;
sp.closeMode = DetachAtClose;
sp.toolChainAbi = rc->abi();
+ Kit *kit = 0;
+ if (const RunConfiguration *runConfiguration = rc->runConfiguration())
+ if (const Target *target = runConfiguration->target())
+ kit = target->kit();
+ fillParameters(&sp, kit);
DebuggerRunControlFactory::createAndScheduleRun(sp);
}
@@ -1715,19 +1724,19 @@ void DebuggerPluginPrivate::attachToQmlPort()
else
dlg.setPort(sp.qmlServerPort);
- const QVariant profileId = configValue(_("LastProfile"));
- if (profileId.isValid())
- dlg.setProfileId(Id(profileId.toString()));
+ const QVariant kitId = configValue(_("LastProfile"));
+ if (kitId.isValid())
+ dlg.setKitId(Id(kitId.toString()));
if (dlg.exec() != QDialog::Accepted)
return;
- Profile *profile = dlg.profile();
- QTC_ASSERT(profile, return);
+ Kit *kit = dlg.kit();
+ QTC_ASSERT(kit, return);
setConfigValue(_("LastQmlServerPort"), dlg.port());
- setConfigValue(_("LastProfile"), profile->id().toString());
+ setConfigValue(_("LastProfile"), kit->id().toString());
- fillParameters(&sp, profile);
+ fillParameters(&sp, kit);
sp.qmlServerAddress = sp.connParams.host;
sp.qmlServerPort = dlg.port();
sp.startMode = AttachToRemoteProcess;
@@ -3361,7 +3370,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
mstart->addSeparator(globalcontext, Constants::G_GENERAL);
mstart->addSeparator(globalcontext, Constants::G_SPECIAL);
- ProfileManager::instance()->registerProfileInformation(new DebuggerProfileInformation);
+ KitManager::instance()->registerKitInformation(new DebuggerKitInformation);
return theDebuggerCore->initialize(arguments, errorMessage);
}
@@ -3455,12 +3464,12 @@ static Target *activeTarget()
return project->activeTarget();
}
-static Profile *currentProfile()
+static Kit *currentKit()
{
Target *t = activeTarget();
if (!t || !t->isEnabled())
return 0;
- return activeTarget()->profile();
+ return activeTarget()->kit();
}
static LocalApplicationRunConfiguration *activeLocalRunConfiguration()
@@ -3508,7 +3517,7 @@ void DebuggerPluginPrivate::testPythonDumpers1()
void DebuggerPluginPrivate::testPythonDumpers2()
{
DebuggerStartParameters sp;
- fillParameters(&sp, currentProfile());
+ fillParameters(&sp, currentKit());
sp.executable = activeLocalRunConfiguration()->executable();
testRunProject(sp, TestCallBack(this, "testPythonDumpers3"));
}
@@ -3540,7 +3549,7 @@ void DebuggerPluginPrivate::testStateMachine1()
void DebuggerPluginPrivate::testStateMachine2()
{
DebuggerStartParameters sp;
- fillParameters(&sp, currentProfile());
+ fillParameters(&sp, currentKit());
sp.executable = activeLocalRunConfiguration()->executable();
sp.testCase = TestNoBoundsOfCurrentFunction;
testRunProject(sp, TestCallBack(this, "testStateMachine3"));
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index 69a084b3e5..85d96b9f50 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -39,7 +39,7 @@
#include "debuggerplugin.h"
#include "debuggerstringutils.h"
#include "debuggerstartparameters.h"
-#include "debuggerprofileinformation.h"
+#include "debuggerkitinformation.h"
#include "lldb/lldbenginehost.h"
#include "debuggertooltipmanager.h"
@@ -485,8 +485,8 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
QTC_ASSERT(rc, return sp);
Target *target = runConfiguration->target();
- Profile *profile = target ? target->profile() : ProfileManager::instance()->defaultProfile();
- fillParameters(&sp, profile);
+ Kit *kit = target ? target->kit() : KitManager::instance()->defaultKit();
+ fillParameters(&sp, kit);
sp.environment = rc->environment();
sp.workingDirectory = rc->workingDirectory();
@@ -624,7 +624,7 @@ static void fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc)
if (rc) {
DebuggerRunConfigurationAspect *aspect = rc->debuggerAspect();
if (const Target *target = rc->target())
- fillParameters(&sp, target->profile());
+ fillParameters(&sp, target->kit());
const bool useCppDebugger = aspect->useCppDebugger();
const bool useQmlDebugger = aspect->useQmlDebugger();
if (useQmlDebugger) {
diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h
index acb28354db..09e0a4f554 100644
--- a/src/plugins/debugger/debuggerstartparameters.h
+++ b/src/plugins/debugger/debuggerstartparameters.h
@@ -38,7 +38,7 @@
#include <ssh/sshconnection.h>
#include <utils/environment.h>
#include <projectexplorer/abi.h>
-#include <projectexplorer/profile.h>
+#include <projectexplorer/kit.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <QMetaType>
@@ -140,7 +140,7 @@ public:
namespace Internal {
-void fillParameters(DebuggerStartParameters *sp, const ProjectExplorer::Profile *profile = 0);
+void fillParameters(DebuggerStartParameters *sp, const ProjectExplorer::Kit *kit = 0);
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/gdb/startgdbserverdialog.cpp b/src/plugins/debugger/gdb/startgdbserverdialog.cpp
index dbeaea6dc2..20a08293ce 100644
--- a/src/plugins/debugger/gdb/startgdbserverdialog.cpp
+++ b/src/plugins/debugger/gdb/startgdbserverdialog.cpp
@@ -33,14 +33,14 @@
#include "debuggercore.h"
#include "debuggermainwindow.h"
#include "debuggerplugin.h"
-#include "debuggerprofileinformation.h"
+#include "debuggerkitinformation.h"
#include "debuggerrunner.h"
#include "debuggerruncontrolfactory.h"
#include "debuggerstartparameters.h"
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
-#include <projectexplorer/profilechooser.h>
+#include <projectexplorer/kitchooser.h>
#include <projectexplorer/devicesupport/deviceprocesslist.h>
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
#include <ssh/sshconnection.h>
@@ -69,7 +69,7 @@ public:
DeviceProcessesDialog *dialog;
bool startServerOnly;
DeviceProcess process;
- Profile *profile;
+ Kit *kit;
IDevice::ConstPtr device;
DeviceUsedPortsGatherer gatherer;
@@ -81,9 +81,9 @@ GdbServerStarter::GdbServerStarter(DeviceProcessesDialog *dlg, bool startServerO
{
d = new StartGdbServerDialogPrivate;
d->dialog = dlg;
- d->profile = dlg->profileChooser()->currentProfile();
+ d->kit = dlg->kitChooser()->currentKit();
d->process = dlg->currentProcess();
- d->device = DeviceProfileInformation::device(d->profile);
+ d->device = DeviceKitInformation::device(d->kit);
d->startServerOnly = startServerOnly;
}
@@ -169,7 +169,7 @@ void GdbServerStarter::handleProcessErrorOutput()
void GdbServerStarter::attach(int port)
{
- QString sysroot = SysRootProfileInformation::sysRoot(d->profile).toString();
+ QString sysroot = SysRootKitInformation::sysRoot(d->kit).toString();
QString binary;
QString localExecutable;
QString candidate = sysroot + d->process.exe;
@@ -207,7 +207,7 @@ void GdbServerStarter::attach(int port)
}
DebuggerStartParameters sp;
- fillParameters(&sp, d->profile);
+ fillParameters(&sp, d->kit);
sp.masterEngineType = GdbEngineType;
sp.connParams.port = port;
sp.displayName = tr("Remote: \"%1:%2\"").arg(sp.connParams.host).arg(port);
diff --git a/src/plugins/debugger/gdb/startgdbserverdialog.h b/src/plugins/debugger/gdb/startgdbserverdialog.h
index 285848996e..e8f019241d 100644
--- a/src/plugins/debugger/gdb/startgdbserverdialog.h
+++ b/src/plugins/debugger/gdb/startgdbserverdialog.h
@@ -32,7 +32,7 @@
#define STARTGDBSERVERDIALOG_H
#include "debugger_global.h"
-#include <projectexplorer/profile.h>
+#include <projectexplorer/kit.h>
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
namespace Debugger {
diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp
index 374025cd07..aee1ce75db 100644
--- a/src/plugins/debugger/loadcoredialog.cpp
+++ b/src/plugins/debugger/loadcoredialog.cpp
@@ -36,8 +36,8 @@
#include <coreplugin/icore.h>
#include <projectexplorer/abi.h>
-#include <projectexplorer/profilechooser.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitchooser.h>
+#include <projectexplorer/kitinformation.h>
#include <ssh/sshconnection.h>
#include <ssh/sshremoteprocessrunner.h>
#include <ssh/sftpdefs.h>
@@ -93,7 +93,7 @@ class SelectRemoteFileDialog : public QDialog
public:
explicit SelectRemoteFileDialog(QWidget *parent);
- void attachToDevice(Profile *profile);
+ void attachToDevice(Kit *k);
QString localFile() const { return m_localFile; }
QString remoteFile() const { return m_remoteFile; }
@@ -151,11 +151,11 @@ SelectRemoteFileDialog::SelectRemoteFileDialog(QWidget *parent)
SLOT(handleConnectionError(QString)));
}
-void SelectRemoteFileDialog::attachToDevice(Profile *profile)
+void SelectRemoteFileDialog::attachToDevice(Kit *k)
{
m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
- QTC_ASSERT(profile, return);
- IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
+ QTC_ASSERT(k, return);
+ IDevice::ConstPtr device = DeviceKitInformation::device(k);
QTC_ASSERT(device, return);
QSsh::SshConnectionParameters sshParams = device->sshParameters();
m_fileSystemModel.setSshConnection(sshParams);
@@ -223,7 +223,7 @@ void SelectRemoteFileDialog::selectFile()
class AttachCoreDialogPrivate
{
public:
- ProfileChooser *profileChooser;
+ KitChooser *kitChooser;
QSettings *settings;
@@ -245,7 +245,7 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
d->settings = ICore::settings();
- d->profileChooser = new ProfileChooser(this);
+ d->kitChooser = new KitChooser(this);
d->selectRemoteCoreButton = new QPushButton(tr("Browse..."), this);
d->remoteCoreFileName = new QLineEdit(this);
@@ -277,7 +277,7 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
formLayout->setContentsMargins(0, 0, 0, 0);
formLayout->setHorizontalSpacing(6);
formLayout->setVerticalSpacing(6);
- formLayout->addRow(tr("Target:"), d->profileChooser);
+ formLayout->addRow(tr("Kit:"), d->kitChooser);
formLayout->addRow(tr("&Executable:"), d->localExecFileName);
formLayout->addRow(tr("Core file:"), coreLayout);
formLayout->addRow(tr("Override &start script:"), d->overrideStartScriptFileName);
@@ -296,7 +296,7 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
connect(d->selectRemoteCoreButton, SIGNAL(clicked()), SLOT(selectRemoteCoreFile()));
connect(d->remoteCoreFileName, SIGNAL(textChanged(QString)), SLOT(changed()));
- connect(d->profileChooser, SIGNAL(activated(int)), SLOT(changed()));
+ connect(d->kitChooser, SIGNAL(activated(int)), SLOT(changed()));
connect(d->buttonBox, SIGNAL(rejected()), SLOT(reject()));
connect(d->buttonBox, SIGNAL(accepted()), SLOT(accept()));
}
@@ -308,19 +308,19 @@ AttachCoreDialog::~AttachCoreDialog()
bool AttachCoreDialog::isLocal() const
{
- Profile *profile = d->profileChooser->currentProfile();
- QTC_ASSERT(profile, return false);
- IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
+ Kit *k = d->kitChooser->currentKit();
+ QTC_ASSERT(k, return false);
+ IDevice::ConstPtr device = DeviceKitInformation::device(k);
QTC_ASSERT(device, return false);
SshConnectionParameters sshParams = device->sshParameters();
d->settings->setValue(QLatin1String("LastProfile"),
- d->profileChooser->currentProfileId().toString());
+ d->kitChooser->currentKitId().toString());
return sshParams.host.isEmpty();
}
void AttachCoreDialog::changed()
{
- bool isValid = d->profileChooser->currentIndex() >= 0
+ bool isValid = d->kitChooser->currentIndex() >= 0
&& !localCoreFile().isEmpty();
d->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(isValid);
@@ -341,7 +341,7 @@ void AttachCoreDialog::selectRemoteCoreFile()
QTC_ASSERT(!isLocal(), return);
SelectRemoteFileDialog dlg(this);
dlg.setWindowTitle(tr("Select Remote Core File"));
- dlg.attachToDevice(d->profileChooser->currentProfile());
+ dlg.attachToDevice(d->kitChooser->currentKit());
if (dlg.exec() == QDialog::Rejected)
return;
d->localCoreFileName->setPath(dlg.localFile());
@@ -379,15 +379,15 @@ QString AttachCoreDialog::remoteCoreFile() const
return d->remoteCoreFileName->text();
}
-void AttachCoreDialog::setProfileId(const Core::Id &id)
+void AttachCoreDialog::setKitId(const Core::Id &id)
{
- d->profileChooser->setCurrentProfileId(id);
+ d->kitChooser->setCurrentKitId(id);
changed();
}
-Profile *AttachCoreDialog::profile() const
+Kit *AttachCoreDialog::kit() const
{
- return d->profileChooser->currentProfile();
+ return d->kitChooser->currentKit();
}
QString AttachCoreDialog::overrideStartScript() const
diff --git a/src/plugins/debugger/loadcoredialog.h b/src/plugins/debugger/loadcoredialog.h
index 34cc05bc01..3efcfe4cea 100644
--- a/src/plugins/debugger/loadcoredialog.h
+++ b/src/plugins/debugger/loadcoredialog.h
@@ -34,7 +34,7 @@
#include <QDialog>
namespace Core { class Id; }
-namespace ProjectExplorer { class Profile; }
+namespace ProjectExplorer { class Kit; }
namespace Debugger {
namespace Internal {
@@ -56,12 +56,12 @@ public:
bool isLocal() const;
// For persistance.
- ProjectExplorer::Profile *profile() const;
+ ProjectExplorer::Kit *kit() const;
void setLocalExecutableFile(const QString &executable);
void setLocalCoreFile(const QString &core);
void setRemoteCoreFile(const QString &core);
void setOverrideStartScript(const QString &scriptName);
- void setProfileId(const Core::Id &id);
+ void setKitId(const Core::Id &id);
private slots:
void changed();
diff --git a/src/plugins/debugger/moduleshandler.cpp b/src/plugins/debugger/moduleshandler.cpp
index 75642d0e3f..645e944f2d 100644
--- a/src/plugins/debugger/moduleshandler.cpp
+++ b/src/plugins/debugger/moduleshandler.cpp
@@ -228,8 +228,11 @@ void ModulesModel::removeModule(const QString &modulePath)
void ModulesModel::updateModule(const Module &module)
{
const int row = indexOfModule(module.modulePath);
+ const QString path = module.modulePath;
+ if (path.isEmpty())
+ return;
try { // MinGW occasionallly throws std::bad_alloc.
- ElfReader reader(module.modulePath);
+ ElfReader reader(path);
ElfData elfData = reader.readHeaders();
if (row == -1) {
diff --git a/src/plugins/debugger/watchdata.cpp b/src/plugins/debugger/watchdata.cpp
index 96bcedeecc..6fd7dd972a 100644
--- a/src/plugins/debugger/watchdata.cpp
+++ b/src/plugins/debugger/watchdata.cpp
@@ -32,6 +32,7 @@
#include "watchutils.h"
#include <QTextStream>
+#include <QTextDocument>
#include <QDebug>
////////////////////////////////////////////////////////////////////
@@ -43,25 +44,6 @@
namespace Debugger {
namespace Internal {
-static QString htmlEscape(const QString &plain)
-{
- QString rich;
- rich.reserve(int(plain.length() * 1.1));
- for (int i = 0; i < plain.length(); ++i) {
- if (plain.at(i) == QLatin1Char('<'))
- rich += QLatin1String("&lt;");
- else if (plain.at(i) == QLatin1Char('>'))
- rich += QLatin1String("&gt;");
- else if (plain.at(i) == QLatin1Char('&'))
- rich += QLatin1String("&amp;");
- else if (plain.at(i) == QLatin1Char('"'))
- rich += QLatin1String("&quot;");
- else
- rich += plain.at(i);
- }
- return rich;
-}
-
bool isPointerType(const QByteArray &type)
{
return type.endsWith('*') || type.endsWith("* const");
@@ -368,8 +350,10 @@ QString WatchData::toString() const
static void formatToolTipRow(QTextStream &str,
const QString &category, const QString &value)
{
+ QString val = Qt::escape(value);
+ val.replace(QLatin1Char('\n'), QLatin1String("<br>"));
str << "<tr><td>" << category << "</td><td> : </td><td>"
- << htmlEscape(value) << "</td></tr>";
+ << val << "</td></tr>";
}
QString WatchData::toToolTip() const
@@ -384,7 +368,7 @@ QString WatchData::toToolTip() const
formatToolTipRow(str, tr("Internal Type"), QLatin1String(type));
formatToolTipRow(str, tr("Displayed Type"), displayedType);
QString val = value;
- if (value.size() > 1000) {
+ if (val.size() > 1000) {
val.truncate(1000);
val += tr(" ... <cut off>");
}
diff --git a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
index 8dffe02457..727476103b 100644
--- a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
+++ b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
@@ -34,7 +34,7 @@
#include "genericproject.h"
#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/toolchain.h>
#include <utils/pathchooser.h>
@@ -113,7 +113,7 @@ BuildConfigWidget *GenericBuildConfiguration::createConfigWidget()
IOutputParser *GenericBuildConfiguration::createOutputParser() const
{
- ToolChain *tc = ToolChainProfileInformation::toolChain(target()->profile());
+ ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
return tc ? tc->outputParser() : 0;
}
@@ -223,7 +223,7 @@ BuildConfiguration *GenericBuildConfigurationFactory::restore(Target *parent, co
bool GenericBuildConfigurationFactory::canHandle(const Target *t) const
{
- if (!t->project()->supportsProfile(t->profile()))
+ if (!t->project()->supportsKit(t->kit()))
return false;
return qobject_cast<GenericProject *>(t->project());
}
diff --git a/src/plugins/genericprojectmanager/genericmakestep.cpp b/src/plugins/genericprojectmanager/genericmakestep.cpp
index 97ae8253ae..6100366af4 100644
--- a/src/plugins/genericprojectmanager/genericmakestep.cpp
+++ b/src/plugins/genericprojectmanager/genericmakestep.cpp
@@ -37,7 +37,7 @@
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/gnumakeparser.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/toolchain.h>
@@ -119,7 +119,7 @@ bool GenericMakeStep::init()
setIgnoreReturnValue(m_clean);
setOutputParser(new GnuMakeParser());
- ToolChain *tc = ToolChainProfileInformation::toolChain(bc->target()->profile());
+ ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (tc)
appendOutputParser(tc->outputParser());
outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());
@@ -169,7 +169,7 @@ QString GenericMakeStep::makeCommand() const
{
QString command = m_makeCommand;
if (command.isEmpty()) {
- ToolChain *tc = ToolChainProfileInformation::toolChain(target()->profile());
+ ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (tc)
command = tc->makeCommand();
else
@@ -243,7 +243,7 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt
connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()),
this, SLOT(updateDetails()));
- connect(m_makeStep->target(), SIGNAL(profileChanged()),
+ connect(m_makeStep->target(), SIGNAL(kitChanged()),
this, SLOT(updateMakeOverrrideLabel()));
}
diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp
index 23d533c877..fbf0bbb2fb 100644
--- a/src/plugins/genericprojectmanager/genericproject.cpp
+++ b/src/plugins/genericprojectmanager/genericproject.cpp
@@ -43,8 +43,8 @@
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/headerpath.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/kitmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/customexecutablerunconfiguration.h>
#include <utils/fileutils.h>
@@ -250,7 +250,7 @@ void GenericProject::refresh(RefreshOptions options)
new CPlusPlus::CppModelManagerInterface::ProjectPart);
ToolChain *tc = activeTarget() ?
- ToolChainProfileInformation::toolChain(activeTarget()->profile()) : 0;
+ ToolChainKitInformation::toolChain(activeTarget()->kit()) : 0;
if (tc) {
part->defines = tc->predefinedMacros(QStringList());
part->defines += '\n';
@@ -430,9 +430,9 @@ bool GenericProject::fromMap(const QVariantMap &map)
if (!Project::fromMap(map))
return false;
- Profile *defaultProfile = ProfileManager::instance()->defaultProfile();
- if (!activeTarget() && defaultProfile)
- addTarget(createTarget(defaultProfile));
+ Kit *defaultKit = KitManager::instance()->defaultKit();
+ if (!activeTarget() && defaultKit)
+ addTarget(createTarget(defaultKit));
// Sanity check: We need both a buildconfiguration and a runconfiguration!
QList<Target *> targetList = targets();
diff --git a/src/plugins/madde/debianmanager.cpp b/src/plugins/madde/debianmanager.cpp
index d3273589ac..d8a7c80599 100644
--- a/src/plugins/madde/debianmanager.cpp
+++ b/src/plugins/madde/debianmanager.cpp
@@ -39,7 +39,7 @@
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/filesystemwatcher.h>
#include <utils/qtcassert.h>
@@ -612,7 +612,7 @@ DebianManager::ActionStatus DebianManager::createTemplate(Qt4ProjectManager::Qt4
<< (packageName + QLatin1Char('_')
+ AbstractMaemoPackageCreationStep::DefaultVersionNumber);
- QtSupport::BaseQtVersion *lqt = QtSupport::QtProfileInformation::qtVersion(bc->target()->profile());
+ QtSupport::BaseQtVersion *lqt = QtSupport::QtKitInformation::qtVersion(bc->target()->kit());
if (!lqt) {
raiseError(tr("Unable to create Debian templates: No Qt version set."));
return ActionFailed;
@@ -653,7 +653,7 @@ DebianManager::ActionStatus DebianManager::createTemplate(Qt4ProjectManager::Qt4
setPackageName(debianDir, packageName);
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(bc->target()->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(bc->target()->kit());
const QByteArray sec = section(deviceType);
const QByteArray nameField = packageManagerNameFieldName(deviceType);
@@ -674,7 +674,7 @@ Utils::FileName DebianManager::debianDirectory(ProjectExplorer::Target *target)
{
Utils::FileName path = Utils::FileName::fromString(target->project()->projectDirectory());
path.appendPath(PackagingDirName);
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(target->kit());
if (deviceType == HarmattanOsType)
path.appendPath(QLatin1String("debian_harmattan"));
else if (deviceType == Maemo5OsType)
diff --git a/src/plugins/madde/maddeqemustartstep.cpp b/src/plugins/madde/maddeqemustartstep.cpp
index a2748712d5..ffcb7f7f0c 100644
--- a/src/plugins/madde/maddeqemustartstep.cpp
+++ b/src/plugins/madde/maddeqemustartstep.cpp
@@ -32,7 +32,7 @@
#include "maemoqemumanager.h"
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <remotelinux/abstractremotelinuxdeployservice.h>
#include <utils/qtcassert.h>
@@ -66,7 +66,7 @@ private:
}
MaemoQemuRuntime rt;
- const int qtId = QtSupport::QtProfileInformation::qtVersionId(profile());
+ const int qtId = QtSupport::QtKitInformation::qtVersionId(profile());
if (MaemoQemuManager::instance().runtimeForQtVersion(qtId, &rt)) {
MaemoQemuManager::instance().startRuntime();
emit errorMessage(tr("Cannot deploy: Qemu was not running. "
diff --git a/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp b/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp
index 9a5c918f45..fdadf6017c 100644
--- a/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp
+++ b/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp
@@ -35,7 +35,7 @@
#include "maemoqemumanager.h"
#include <projectexplorer/target.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <remotelinux/abstractuploadandinstallpackageservice.h>
#include <remotelinux/remotelinuxdeployconfiguration.h>
#include <ssh/sshconnection.h>
@@ -117,7 +117,7 @@ MaemoUploadAndInstallPackageStep::MaemoUploadAndInstallPackageStep(ProjectExplor
void MaemoUploadAndInstallPackageStep::ctor()
{
setDefaultDisplayName(displayName());
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(target()->kit());
if (deviceType == HarmattanOsType)
m_deployService = new HarmattanUploadAndInstallPackageAction(this);
else
diff --git a/src/plugins/madde/maemodeploymentmounter.cpp b/src/plugins/madde/maemodeploymentmounter.cpp
index c7769e0a89..902c9e5ad3 100644
--- a/src/plugins/madde/maemodeploymentmounter.cpp
+++ b/src/plugins/madde/maemodeploymentmounter.cpp
@@ -34,7 +34,7 @@
#include "maemoremotemounter.h"
#include <projectexplorer/target.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
@@ -63,15 +63,15 @@ MaemoDeploymentMounter::~MaemoDeploymentMounter() {}
void MaemoDeploymentMounter::setupMounts(SshConnection *connection,
const QList<MaemoMountSpecification> &mountSpecs,
- const Profile *profile)
+ const Kit *k)
{
QTC_ASSERT(m_state == Inactive, return);
m_mountSpecs = mountSpecs;
m_connection = connection;
- m_profile = profile;
- m_devConf = DeviceProfileInformation::device(profile);
- m_mounter->setParameters(m_devConf, MaemoGlobal::maddeRoot(profile));
+ m_kit = k;
+ m_devConf = DeviceKitInformation::device(k);
+ m_mounter->setParameters(m_devConf, MaemoGlobal::maddeRoot(k));
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
setState(UnmountingOldDirs);
unmount();
diff --git a/src/plugins/madde/maemodeploymentmounter.h b/src/plugins/madde/maemodeploymentmounter.h
index 1c25b8e32a..e3370afdbd 100644
--- a/src/plugins/madde/maemodeploymentmounter.h
+++ b/src/plugins/madde/maemodeploymentmounter.h
@@ -36,7 +36,7 @@
#include <projectexplorer/devicesupport/idevice.h>
#include <utils/portlist.h>
-namespace ProjectExplorer { class Profile; }
+namespace ProjectExplorer { class Kit; }
namespace QSsh { class SshConnection; }
namespace Utils { class FileName; }
@@ -55,7 +55,7 @@ public:
// Connection must be in connected state.
void setupMounts(QSsh::SshConnection *connection,
const QList<MaemoMountSpecification> &mountSpecs,
- const ProjectExplorer::Profile *profile);
+ const ProjectExplorer::Kit *k);
void tearDownMounts();
signals:
@@ -86,7 +86,7 @@ private:
ProjectExplorer::IDevice::ConstPtr m_devConf;
MaemoRemoteMounter * const m_mounter;
QList<MaemoMountSpecification> m_mountSpecs;
- const ProjectExplorer::Profile *m_profile;
+ const ProjectExplorer::Kit *m_kit;
};
} // namespace Internal
diff --git a/src/plugins/madde/maemodeploystepfactory.cpp b/src/plugins/madde/maemodeploystepfactory.cpp
index 475bd7b8f1..b27098a380 100644
--- a/src/plugins/madde/maemodeploystepfactory.cpp
+++ b/src/plugins/madde/maemodeploystepfactory.cpp
@@ -41,7 +41,7 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <remotelinux/genericdirectuploadstep.h>
#include <remotelinux/remotelinuxcheckforfreediskspacestep.h>
@@ -69,7 +69,7 @@ QList<Core::Id> MaemoDeployStepFactory::availableCreationIds(BuildStepList *pare
return ids;
QString platform;
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(parent->target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(parent->target()->kit());
if (version)
platform = version->platformName();
@@ -121,7 +121,7 @@ bool MaemoDeployStepFactory::canCreate(BuildStepList *parent, const Core::Id id)
BuildStep *MaemoDeployStepFactory::create(BuildStepList *parent, const Core::Id id)
{
- Core::Id deviceType = DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
+ Core::Id deviceType = DeviceTypeKitInformation::deviceTypeId(parent->target()->kit());
if (id == MaemoInstallDebianPackageToSysrootStep::Id)
return new MaemoInstallDebianPackageToSysrootStep(parent);
diff --git a/src/plugins/madde/maemodeviceconfigwizard.cpp b/src/plugins/madde/maemodeviceconfigwizard.cpp
index 493eaca1a1..6572072166 100644
--- a/src/plugins/madde/maemodeviceconfigwizard.cpp
+++ b/src/plugins/madde/maemodeviceconfigwizard.cpp
@@ -577,7 +577,9 @@ IDevice::Ptr MaemoDeviceConfigWizard::device()
device->setFreePorts(PortList::fromString(freePortsSpec));
device->setSshParameters(sshParams);
if (doTest) {
- LinuxDeviceTestDialog dlg(device, new MaddeDeviceTester(this), this);
+ // Might be called after accept.
+ QWidget *parent = isVisible() ? this : static_cast<QWidget *>(0);
+ LinuxDeviceTestDialog dlg(device, new MaddeDeviceTester(this), parent);
dlg.exec();
}
return device;
diff --git a/src/plugins/madde/maemoglobal.cpp b/src/plugins/madde/maemoglobal.cpp
index fe4635f9b9..f8777d5b0e 100644
--- a/src/plugins/madde/maemoglobal.cpp
+++ b/src/plugins/madde/maemoglobal.cpp
@@ -33,11 +33,11 @@
#include "maemoqemumanager.h"
#include <projectexplorer/devicesupport/idevice.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <remotelinux/remotelinux_constants.h>
#include <utils/environment.h>
#include <utils/hostosinfo.h>
@@ -60,9 +60,9 @@ namespace {
static const QLatin1String binQmake("/bin/qmake" EXEC_SUFFIX);
} // namespace
-bool MaemoGlobal::hasMaemoDevice(const Profile *p)
+bool MaemoGlobal::hasMaemoDevice(const Kit *k)
{
- IDevice::ConstPtr dev = DeviceProfileInformation::device(p);
+ IDevice::ConstPtr dev = DeviceKitInformation::device(k);
if (dev.isNull())
return false;
@@ -70,9 +70,9 @@ bool MaemoGlobal::hasMaemoDevice(const Profile *p)
return type == Maemo5OsType || type == HarmattanOsType;
}
-bool MaemoGlobal::supportsMaemoDevice(const Profile *p)
+bool MaemoGlobal::supportsMaemoDevice(const Kit *p)
{
- const Core::Id type = DeviceTypeProfileInformation::deviceTypeId(p);
+ const Core::Id type = DeviceTypeKitInformation::deviceTypeId(p);
return type == Maemo5OsType || type == HarmattanOsType;
}
@@ -123,7 +123,7 @@ QString MaemoGlobal::devrootshPath()
int MaemoGlobal::applicationIconSize(const Target *target)
{
- Core::Id deviceType = DeviceTypeProfileInformation::deviceTypeId(target->profile());
+ Core::Id deviceType = DeviceTypeKitInformation::deviceTypeId(target->kit());
return deviceType == HarmattanOsType ? 80 : 64;
}
@@ -146,10 +146,10 @@ QString MaemoGlobal::remoteSourceProfilesCommand()
return QString::fromAscii(remoteCall);
}
-PortList MaemoGlobal::freePorts(const Profile *profile)
+PortList MaemoGlobal::freePorts(const Kit *k)
{
- IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
- QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(profile);
+ IDevice::ConstPtr device = DeviceKitInformation::device(k);
+ QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k);
if (!device || !qtVersion)
return PortList();
@@ -169,9 +169,9 @@ QString MaemoGlobal::maddeRoot(const QString &qmakePath)
return dir.absolutePath();
}
-FileName MaemoGlobal::maddeRoot(const Profile *profile)
+FileName MaemoGlobal::maddeRoot(const Kit *k)
{
- return SysRootProfileInformation::sysRoot(profile).parentDir().parentDir();
+ return SysRootKitInformation::sysRoot(k).parentDir().parentDir();
}
QString MaemoGlobal::targetRoot(const QString &qmakePath)
diff --git a/src/plugins/madde/maemoglobal.h b/src/plugins/madde/maemoglobal.h
index f28e36dcfd..d8ef3509a5 100644
--- a/src/plugins/madde/maemoglobal.h
+++ b/src/plugins/madde/maemoglobal.h
@@ -45,7 +45,7 @@ class QProcess;
QT_END_NAMESPACE
namespace ProjectExplorer {
-class Profile;
+class Kit;
class Target;
} // namespace ProjectExplorer
@@ -81,8 +81,8 @@ class MaemoGlobal
{
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::MaemoGlobal)
public:
- static bool hasMaemoDevice(const ProjectExplorer::Profile *p);
- static bool supportsMaemoDevice(const ProjectExplorer::Profile *p);
+ static bool hasMaemoDevice(const ProjectExplorer::Kit *k);
+ static bool supportsMaemoDevice(const ProjectExplorer::Kit *p);
static bool isValidMaemo5QtVersion(const QString &qmakePath);
static bool isValidHarmattanQtVersion(const QString &qmakePath);
@@ -91,12 +91,12 @@ public:
static int applicationIconSize(const ProjectExplorer::Target *target);
static QString remoteSudo(Core::Id deviceType, const QString &uname);
static QString remoteSourceProfilesCommand();
- static Utils::PortList freePorts(const ProjectExplorer::Profile *profile);
+ static Utils::PortList freePorts(const ProjectExplorer::Kit *k);
static void addMaddeEnvironment(Utils::Environment &env, const QString &qmakePath);
static void transformMaddeCall(QString &command, QStringList &args, const QString &qmakePath);
static QString maddeRoot(const QString &qmakePath);
- static Utils::FileName maddeRoot(const ProjectExplorer::Profile *profile);
+ static Utils::FileName maddeRoot(const ProjectExplorer::Kit *k);
static QString targetRoot(const QString &qmakePath);
static QString targetName(const QString &qmakePath);
static QString madCommand(const QString &qmakePath);
diff --git a/src/plugins/madde/maemoinstalltosysrootstep.cpp b/src/plugins/madde/maemoinstalltosysrootstep.cpp
index 2912362523..0c8f9eef24 100644
--- a/src/plugins/madde/maemoinstalltosysrootstep.cpp
+++ b/src/plugins/madde/maemoinstalltosysrootstep.cpp
@@ -39,7 +39,7 @@
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <remotelinux/remotelinuxdeployconfiguration.h>
#include <utils/fileutils.h>
@@ -157,7 +157,7 @@ bool AbstractMaemoInstallPackageToSysrootStep::init()
return false;
}
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!version) {
addOutput(tr("Cannot install package to sysroot without a Qt version."),
ErrorMessageOutput);
@@ -235,7 +235,7 @@ QStringList MaemoInstallDebianPackageToSysrootStep::madArguments() const
{
QStringList args;
args << QLatin1String("xdpkg");
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(target()->kit());
if (deviceType == HarmattanOsType)
args << QLatin1String("--no-force-downgrade");
args << QLatin1String("-i");
@@ -274,13 +274,13 @@ bool MaemoCopyToSysrootStep::init()
}
const MaemoQtVersion *const qtVersion
- = dynamic_cast<MaemoQtVersion *>(QtSupport::QtProfileInformation::qtVersion(target()->profile()));
+ = dynamic_cast<MaemoQtVersion *>(QtSupport::QtKitInformation::qtVersion(target()->kit()));
if (!qtVersion) {
addOutput(tr("Cannot copy to sysroot without valid Qt version."),
ErrorMessageOutput);
return false;
}
- m_systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(target()->profile()).toString();
+ m_systemRoot = ProjectExplorer::SysRootKitInformation::sysRoot(target()->kit()).toString();
m_files = target()->deploymentData().allFiles();
@@ -348,7 +348,7 @@ bool MaemoMakeInstallToSysrootStep::init()
return false;
}
const QtSupport::BaseQtVersion *const qtVersion
- = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!qtVersion) {
addOutput("Cannot deploy: Unusable build configuration.",
ErrorMessageOutput);
@@ -359,8 +359,8 @@ bool MaemoMakeInstallToSysrootStep::init()
MaemoGlobal::addMaddeEnvironment(env, qtVersion->qmakeCommand().toString());
QString command = MaemoGlobal::madCommand(qtVersion->qmakeCommand().toString());
QString systemRoot;
- if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(target()->profile()))
- systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(target()->profile()).toString();
+ if (ProjectExplorer::SysRootKitInformation::hasSysRoot(target()->kit()))
+ systemRoot = ProjectExplorer::SysRootKitInformation::sysRoot(target()->kit()).toString();
QStringList args = QStringList() << QLatin1String("-t")
<< MaemoGlobal::targetName(qtVersion->qmakeCommand().toString()) << QLatin1String("make")
<< QLatin1String("install") << (QLatin1String("INSTALL_ROOT=") + systemRoot);
diff --git a/src/plugins/madde/maemopackagecreationfactory.cpp b/src/plugins/madde/maemopackagecreationfactory.cpp
index c8a067eab0..5143cec80c 100644
--- a/src/plugins/madde/maemopackagecreationfactory.cpp
+++ b/src/plugins/madde/maemopackagecreationfactory.cpp
@@ -36,7 +36,7 @@
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/deployconfiguration.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <utils/qtcassert.h>
diff --git a/src/plugins/madde/maemopackagecreationstep.cpp b/src/plugins/madde/maemopackagecreationstep.cpp
index 36cc0bae4b..ba4ad2a348 100644
--- a/src/plugins/madde/maemopackagecreationstep.cpp
+++ b/src/plugins/madde/maemopackagecreationstep.cpp
@@ -39,7 +39,7 @@
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
@@ -98,7 +98,7 @@ bool AbstractMaemoPackageCreationStep::init()
QLatin1String("nostrip"), QLatin1String(" "));
}
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!version) {
raiseError(tr("Packaging failed: No Qt version."));
return false;
@@ -238,7 +238,7 @@ void AbstractMaemoPackageCreationStep::preparePackagingProcess(QProcess *proc,
QString AbstractMaemoPackageCreationStep::replaceDots(const QString &name) const
{
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(target()->kit());
// Idiotic OVI store requirement for N900 (but not allowed for N9 ...).
if (deviceType == Maemo5OsType) {
QString adaptedName = name;
@@ -276,7 +276,7 @@ bool MaemoDebianPackageCreationStep::init()
{
if (!AbstractMaemoPackageCreationStep::init())
return false;
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
m_maddeRoot = MaemoGlobal::maddeRoot(version->qmakeCommand().toString());
m_projectDirectory = project()->projectDirectory();
m_pkgFileName = DebianManager::packageFileName(DebianManager::debianDirectory(target())).toString();
diff --git a/src/plugins/madde/maemopackagecreationwidget.cpp b/src/plugins/madde/maemopackagecreationwidget.cpp
index 7d5fba9b53..36680f14c6 100644
--- a/src/plugins/madde/maemopackagecreationwidget.cpp
+++ b/src/plugins/madde/maemopackagecreationwidget.cpp
@@ -36,7 +36,7 @@
#include "maemopackagecreationstep.h"
#include <coreplugin/editormanager/editormanager.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
@@ -71,7 +71,7 @@ void MaemoPackageCreationWidget::initGui()
{
m_ui->shortDescriptionLineEdit->setMaxLength(60);
updateVersionInfo();
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(m_step->target()->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(m_step->target()->kit());
const Utils::FileName path = DebianManager::debianDirectory(m_step->target());
const QSize iconSize = MaddeDevice::packageManagerIconSize(deviceType);
m_ui->packageManagerIconButton->setFixedSize(iconSize);
@@ -170,7 +170,7 @@ void MaemoPackageCreationWidget::updatePackageManagerName()
{
const Utils::FileName path = DebianManager::debianDirectory(m_step->target());
Core::Id deviceType
- = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(m_step->target()->profile());
+ = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(m_step->target()->kit());
m_ui->packageManagerNameLineEdit->setText(DebianManager::packageManagerName(path, deviceType));
}
@@ -184,7 +184,7 @@ void MaemoPackageCreationWidget::setPackageManagerIcon()
{
const Utils::FileName path = DebianManager::debianDirectory(m_step->target());
Core::Id deviceType
- = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(m_step->target()->profile());
+ = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(m_step->target()->kit());
QString imageFilter = tr("Images") + QLatin1String("( ");
const QList<QByteArray> &imageTypes = QImageReader::supportedImageFormats();
foreach (const QByteArray &imageType, imageTypes)
@@ -215,7 +215,7 @@ void MaemoPackageCreationWidget::setPackageManagerName()
{
const Utils::FileName path = DebianManager::debianDirectory(m_step->target());
Core::Id deviceType
- = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(m_step->target()->profile());
+ = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(m_step->target()->kit());
if (!DebianManager::setPackageManagerName(path, deviceType, m_ui->packageManagerNameLineEdit->text())) {
QMessageBox::critical(this, tr("File Error"),
tr("Could not set package name for project manager."));
diff --git a/src/plugins/madde/maemopublisherfremantlefree.cpp b/src/plugins/madde/maemopublisherfremantlefree.cpp
index 1907c2cf39..bae903d16b 100644
--- a/src/plugins/madde/maemopublisherfremantlefree.cpp
+++ b/src/plugins/madde/maemopublisherfremantlefree.cpp
@@ -42,7 +42,7 @@
#include <qt4projectmanager/qmakestep.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <ssh/sshremoteprocessrunner.h>
@@ -302,10 +302,10 @@ void MaemoPublisherFremantleFree::handleProcessFinished(bool failedToStart)
setState(RunningMakeDistclean);
// Toolchain might be null! (yes because this sucks)
ProjectExplorer::ToolChain *tc
- = ProjectExplorer::ToolChainProfileInformation::toolChain(m_buildConfig->target()->profile());
+ = ProjectExplorer::ToolChainKitInformation::toolChain(m_buildConfig->target()->kit());
if (!tc) {
finishWithFailure(QString(), tr("Make distclean failed: %1")
- .arg(ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget()));
+ .arg(ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget()));
}
m_process->start(tc->makeCommand(), QStringList() << QLatin1String("distclean"));
}
@@ -371,7 +371,7 @@ void MaemoPublisherFremantleFree::runDpkgBuildPackage()
}
}
- QtSupport::BaseQtVersion *lqt = QtSupport::QtProfileInformation::qtVersion(m_buildConfig->target()->profile());
+ QtSupport::BaseQtVersion *lqt = QtSupport::QtKitInformation::qtVersion(m_buildConfig->target()->kit());
if (!lqt)
finishWithFailure(QString(), tr("No Qt version set."));
@@ -538,7 +538,7 @@ QStringList MaemoPublisherFremantleFree::findProblems() const
QStringList problems;
ProjectExplorer::Target *target = m_buildConfig->target();
Core::Id deviceType
- = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target->profile());
+ = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(target->kit());
if (deviceType != Maemo5OsType)
return QStringList();
diff --git a/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp b/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp
index 672a6e72ce..f4f2b1abd2 100644
--- a/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp
+++ b/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp
@@ -39,7 +39,7 @@
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <utils/qtcassert.h>
@@ -79,7 +79,7 @@ void MaemoPublishingBuildSettingsPageFremantleFree::collectBuildConfigurations(c
m_buildConfigs.clear();
foreach (const Target *const target, project->targets()) {
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (!version || version->platformName() != QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
continue;
foreach (BuildConfiguration *const bc, target->buildConfigurations()) {
diff --git a/src/plugins/madde/maemopublishingwizardfactories.cpp b/src/plugins/madde/maemopublishingwizardfactories.cpp
index 7ba97a73c1..58218bdbee 100644
--- a/src/plugins/madde/maemopublishingwizardfactories.cpp
+++ b/src/plugins/madde/maemopublishingwizardfactories.cpp
@@ -37,7 +37,7 @@
#include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
using namespace ProjectExplorer;
@@ -71,7 +71,7 @@ bool MaemoPublishingWizardFactoryFremantleFree::canCreateWizard(const Project *p
if (!qobject_cast<const Qt4Project *>(project))
return false;
foreach (const Target *const target, project->targets()) {
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
const QString &platform = version ? version->platformName() : QString();
if (platform == QLatin1String(QtSupport::Constants::MAEMO_FREMANTLE_PLATFORM))
return true;
diff --git a/src/plugins/madde/maemoqemumanager.cpp b/src/plugins/madde/maemoqemumanager.cpp
index 6140ee761b..f688d84035 100644
--- a/src/plugins/madde/maemoqemumanager.cpp
+++ b/src/plugins/madde/maemoqemumanager.cpp
@@ -48,7 +48,7 @@
#include <projectexplorer/project.h>
#include <projectexplorer/session.h>
#include <projectexplorer/target.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtversionmanager.h>
#include <remotelinux/remotelinuxrunconfiguration.h>
#include <utils/filesystemwatcher.h>
@@ -246,23 +246,23 @@ void MaemoQemuManager::projectChanged(ProjectExplorer::Project *project)
void MaemoQemuManager::targetAdded(ProjectExplorer::Target *target)
{
- if (!target || !MaemoGlobal::hasMaemoDevice(target->profile()))
+ if (!target || !MaemoGlobal::hasMaemoDevice(target->kit()))
return;
// handle the Qt version changes the build configuration uses
connect(target, SIGNAL(environmentChanged()), this, SLOT(environmentChanged()));
- connect(target, SIGNAL(profileChanged()), this, SLOT(systemChanged()));
+ connect(target, SIGNAL(kitChanged()), this, SLOT(systemChanged()));
toggleStarterButton(target);
}
void MaemoQemuManager::targetRemoved(ProjectExplorer::Target *target)
{
- if (!target || !MaemoGlobal::hasMaemoDevice(target->profile()))
+ if (!target || !MaemoGlobal::hasMaemoDevice(target->kit()))
return;
disconnect(target, SIGNAL(environmentChanged()), this, SLOT(environmentChanged()));
- disconnect(target, SIGNAL(profileChanged()), this, SLOT(systemChanged()));
+ disconnect(target, SIGNAL(kitChanged()), this, SLOT(systemChanged()));
showOrHideQemuButton();
}
@@ -459,7 +459,7 @@ void MaemoQemuManager::toggleStarterButton(Target *target)
{
int uniqueId = -1;
if (target) {
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (version)
uniqueId = version->uniqueId();
}
@@ -474,7 +474,7 @@ void MaemoQemuManager::toggleStarterButton(Target *target)
const Project * const p
= ProjectExplorerPlugin::instance()->session()->startupProject();
const bool qemuButtonEnabled
- = p && p->activeTarget() && MaemoGlobal::hasMaemoDevice(target->profile())
+ = p && p->activeTarget() && MaemoGlobal::hasMaemoDevice(target->kit())
&& m_runtimes.value(uniqueId, MaemoQemuRuntime()).isValid()
&& targetUsesMatchingRuntimeConfig(target) && !isRunning;
m_qemuAction->setEnabled(qemuButtonEnabled);
@@ -487,7 +487,7 @@ bool MaemoQemuManager::sessionHasMaemoTarget() const
const QList<Project*> &projects = explorer->session()->projects();
foreach (const Project *p, projects) {
foreach (const Target * const target, p->targets()) {
- if (MaemoGlobal::hasMaemoDevice(target->profile()))
+ if (MaemoGlobal::hasMaemoDevice(target->kit()))
return true;
}
}
@@ -507,13 +507,13 @@ bool MaemoQemuManager::targetUsesMatchingRuntimeConfig(Target *target,
if (!mrc)
return false;
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (!version || !m_runtimes.value(version->uniqueId(), MaemoQemuRuntime()).isValid())
return false;
if (qtVersion)
*qtVersion = version;
- const IDevice::ConstPtr config = DeviceProfileInformation::device(target->profile());
+ const IDevice::ConstPtr config = DeviceKitInformation::device(target->kit());
return !config.isNull() && config->machineType() == IDevice::Emulator;
}
diff --git a/src/plugins/madde/maemoqtversion.cpp b/src/plugins/madde/maemoqtversion.cpp
index bc6acb400b..079a104e17 100644
--- a/src/plugins/madde/maemoqtversion.cpp
+++ b/src/plugins/madde/maemoqtversion.cpp
@@ -32,7 +32,7 @@
#include "maemoconstants.h"
#include "maemoglobal.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qtsupport/qtsupportconstants.h>
#include <utils/hostosinfo.h>
@@ -161,13 +161,13 @@ QString MaemoQtVersion::platformDisplayName() const
return QLatin1String(QtSupport::Constants::MEEGO_HARMATTAN_PLATFORM_TR);
}
-void MaemoQtVersion::addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const
+void MaemoQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const
{
- Q_UNUSED(p);
+ Q_UNUSED(k);
const QString maddeRoot = MaemoGlobal::maddeRoot(qmakeCommand().toString());
// Needed to make pkg-config stuff work.
- Utils::FileName sysRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(p);
+ Utils::FileName sysRoot = ProjectExplorer::SysRootKitInformation::sysRoot(k);
env.prependOrSet(QLatin1String("SYSROOT_DIR"), sysRoot.toUserOutput());
env.prependOrSetPath(QDir::toNativeSeparators(QString("%1/madbin")
.arg(maddeRoot)));
diff --git a/src/plugins/madde/maemoqtversion.h b/src/plugins/madde/maemoqtversion.h
index ee817e45ae..35b7be3592 100644
--- a/src/plugins/madde/maemoqtversion.h
+++ b/src/plugins/madde/maemoqtversion.h
@@ -49,7 +49,7 @@ public:
bool isValid() const;
QList<ProjectExplorer::Abi> detectQtAbis() const;
- void addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const;
+ void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const;
QString description() const;
diff --git a/src/plugins/madde/maemorunconfiguration.cpp b/src/plugins/madde/maemorunconfiguration.cpp
index fc5a325345..3355b4e37d 100644
--- a/src/plugins/madde/maemorunconfiguration.cpp
+++ b/src/plugins/madde/maemorunconfiguration.cpp
@@ -36,7 +36,7 @@
#include <debugger/debuggerconstants.h>
#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
@@ -77,7 +77,7 @@ void MaemoRunConfiguration::init()
SLOT(handleRemoteMountsChanged()));
connect(m_remoteMounts, SIGNAL(modelReset()), SLOT(handleRemoteMountsChanged()));
- if (DeviceTypeProfileInformation::deviceTypeId(target()->profile()) != HarmattanOsType)
+ if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) != HarmattanOsType)
debuggerAspect()->suppressQmlDebuggingOptions();
}
@@ -119,7 +119,7 @@ QString MaemoRunConfiguration::environmentPreparationCommand() const
QString MaemoRunConfiguration::commandPrefix() const
{
- IDevice::ConstPtr dev = DeviceProfileInformation::device(target()->profile());
+ IDevice::ConstPtr dev = DeviceKitInformation::device(target()->kit());
if (!dev)
return QString();
@@ -130,13 +130,13 @@ QString MaemoRunConfiguration::commandPrefix() const
Utils::PortList MaemoRunConfiguration::freePorts() const
{
- return MaemoGlobal::freePorts(target()->profile());
+ return MaemoGlobal::freePorts(target()->kit());
}
bool MaemoRunConfiguration::hasEnoughFreePorts(RunMode mode) const
{
const int freePortCount = freePorts().count();
- Core::Id typeId = DeviceTypeProfileInformation::deviceTypeId(target()->profile());
+ Core::Id typeId = DeviceTypeKitInformation::deviceTypeId(target()->kit());
const bool remoteMountsAllowed = MaddeDevice::allowsRemoteMounts(typeId);
const int mountDirCount = remoteMountsAllowed
? remoteMounts()->validMountSpecificationCount() : 0;
diff --git a/src/plugins/madde/maemorunconfigurationwidget.cpp b/src/plugins/madde/maemorunconfigurationwidget.cpp
index 815f9db73e..485e423732 100644
--- a/src/plugins/madde/maemorunconfigurationwidget.cpp
+++ b/src/plugins/madde/maemorunconfigurationwidget.cpp
@@ -37,7 +37,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <projectexplorer/environmentwidget.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <remotelinux/remotelinuxrunconfigurationwidget.h>
@@ -82,12 +82,12 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
QVBoxLayout *subLayout = new QVBoxLayout(m_subWidget);
subLayout->setMargin(0);
addMountWidgets(subLayout);
- connect(m_runConfiguration->target(), SIGNAL(profileChanged()), this, SLOT(updateMountWarning()));
+ connect(m_runConfiguration->target(), SIGNAL(kitChanged()), this, SLOT(updateMountWarning()));
connect(m_runConfiguration->debuggerAspect(), SIGNAL(debuggersChanged()),
SLOT(updateMountWarning()));
updateMountWarning();
- Core::Id devId = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(runConfiguration->target()->profile());
+ Core::Id devId = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(runConfiguration->target()->kit());
m_mountDetailsContainer->setVisible(MaddeDevice::allowsRemoteMounts(devId));
connect(m_runConfiguration, SIGNAL(enabledChanged()),
diff --git a/src/plugins/madde/maemorunfactories.cpp b/src/plugins/madde/maemorunfactories.cpp
index 0802294e8c..0a24c8b924 100644
--- a/src/plugins/madde/maemorunfactories.cpp
+++ b/src/plugins/madde/maemorunfactories.cpp
@@ -39,7 +39,7 @@
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerrunner.h>
#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4nodes.h>
#include <qt4projectmanager/qt4project.h>
@@ -69,9 +69,9 @@ QString pathFromId(Core::Id id)
template<class Receiver> void setHelperActions(Receiver *receiver, MaemoRunConfiguration *runConfig,
RunControl *runControl)
{
- const Profile * const profile = runConfig->target()->profile();
+ const Kit * const k = runConfig->target()->kit();
MaemoPreRunAction * const preRunAction = new MaemoPreRunAction(
- DeviceProfileInformation::device(profile), MaemoGlobal::maddeRoot(profile),
+ DeviceKitInformation::device(k), MaemoGlobal::maddeRoot(k),
runConfig->remoteMounts()->mountSpecs(), runControl);
MaemoPostRunAction * const postRunAction
= new MaemoPostRunAction(preRunAction->mounter(), runControl);
@@ -166,11 +166,11 @@ RunConfiguration *MaemoRunConfigurationFactory::clone(Target *parent, RunConfigu
bool MaemoRunConfigurationFactory::canHandle(Target *t) const
{
- if (!t->project()->supportsProfile(t->profile()))
+ if (!t->project()->supportsKit(t->kit()))
return false;
if (!qobject_cast<Qt4Project *>(t->project()))
return false;
- Core::Id devType = DeviceTypeProfileInformation::deviceTypeId(t->profile());
+ Core::Id devType = DeviceTypeKitInformation::deviceTypeId(t->kit());
return devType == Maemo5OsType || devType == HarmattanOsType;
}
diff --git a/src/plugins/madde/qt4maemodeployconfiguration.cpp b/src/plugins/madde/qt4maemodeployconfiguration.cpp
index 79e89d0027..5f533a9bd9 100644
--- a/src/plugins/madde/qt4maemodeployconfiguration.cpp
+++ b/src/plugins/madde/qt4maemodeployconfiguration.cpp
@@ -45,7 +45,7 @@
#include <projectexplorer/projectexplorer.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4project.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <remotelinux/remotelinuxcheckforfreediskspacestep.h>
#include <remotelinux/remotelinuxdeployconfigurationwidget.h>
@@ -118,7 +118,7 @@ void Qt4MaemoDeployConfiguration::setupPackaging()
void Qt4MaemoDeployConfiguration::setupDebianPackaging()
{
Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
- if (!bc || !target()->profile())
+ if (!bc || !target()->kit())
return;
Utils::FileName debianDir = DebianManager::debianDirectory(target());
@@ -135,7 +135,7 @@ void Qt4MaemoDeployConfiguration::setupDebianPackaging()
if (status == DebianManager::NoActionRequired)
return;
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(target()->kit());
QString projectName = target()->project()->displayName();
if (!DebianManager::hasPackageManagerIcon(debianDir)) {
@@ -219,7 +219,7 @@ QList<Core::Id> Qt4MaemoDeployConfigurationFactory::availableCreationIds(Target
if (!canHandle(parent))
return ids;
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->kit());
if (deviceType == Maemo5OsType)
ids << Qt4MaemoDeployConfiguration::fremantleWithPackagingId()
<< Qt4MaemoDeployConfiguration::fremantleWithoutPackagingId();
@@ -279,7 +279,7 @@ bool Qt4MaemoDeployConfigurationFactory::canRestore(Target *parent, const QVaria
{
Core::Id id = idFromMap(map);
return canHandle(parent) && availableCreationIds(parent).contains(id)
- && MaemoGlobal::supportsMaemoDevice(parent->profile());
+ && MaemoGlobal::supportsMaemoDevice(parent->kit());
}
DeployConfiguration *Qt4MaemoDeployConfigurationFactory::restore(Target *parent, const QVariantMap &map)
@@ -308,9 +308,9 @@ bool Qt4MaemoDeployConfigurationFactory::canHandle(Target *parent) const
{
if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(parent->project()))
return false;
- if (!parent->project()->supportsProfile(parent->profile()))
+ if (!parent->project()->supportsKit(parent->kit()))
return false;
- return MaemoGlobal::supportsMaemoDevice(parent->profile());
+ return MaemoGlobal::supportsMaemoDevice(parent->kit());
}
} // namespace Internal
diff --git a/src/plugins/perforce/perforceversioncontrol.cpp b/src/plugins/perforce/perforceversioncontrol.cpp
index d4482aa5ba..7a7b2f69d6 100644
--- a/src/plugins/perforce/perforceversioncontrol.cpp
+++ b/src/plugins/perforce/perforceversioncontrol.cpp
@@ -158,6 +158,16 @@ QString PerforceVersionControl::vcsGetRepositoryURL(const QString &)
return QString();
}
+QString PerforceVersionControl::vcsOpenText() const
+{
+ return tr("&Edit (%1)").arg(displayName());
+}
+
+QString PerforceVersionControl::vcsMakeWritableText() const
+{
+ return tr("&Hijack");
+}
+
bool PerforceVersionControl::managesDirectory(const QString &directory, QString *topLevel) const
{
const bool rc = m_plugin->managesDirectory(directory, topLevel);
diff --git a/src/plugins/perforce/perforceversioncontrol.h b/src/plugins/perforce/perforceversioncontrol.h
index ee1ab655d9..0be5847b9e 100644
--- a/src/plugins/perforce/perforceversioncontrol.h
+++ b/src/plugins/perforce/perforceversioncontrol.h
@@ -64,6 +64,8 @@ public:
bool vcsRestoreSnapshot(const QString &topLevel, const QString &name);
bool vcsRemoveSnapshot(const QString &topLevel, const QString &name);
bool vcsAnnotate(const QString &file, int line);
+ QString vcsOpenText() const;
+ QString vcsMakeWritableText() const;
void emitRepositoryChanged(const QString &s);
void emitFilesChanged(const QStringList &l);
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index 4ca1bd7903..19a40d3e44 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -34,7 +34,7 @@
#include "buildsteplist.h"
#include "projectexplorer.h"
#include "projectexplorerconstants.h"
-#include "profilemanager.h"
+#include "kitmanager.h"
#include "target.h"
#include "project.h"
@@ -92,8 +92,8 @@ BuildConfiguration::BuildConfiguration(Target *target, const Core::Id id) :
bsl->setDefaultDisplayName(tr("Clean"));
m_stepLists.append(bsl);
- connect(ProfileManager::instance(), SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(handleProfileUpdate(ProjectExplorer::Profile*)));
+ connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(handleKitUpdate(ProjectExplorer::Kit*)));
}
BuildConfiguration::BuildConfiguration(Target *target, BuildConfiguration *source) :
@@ -107,8 +107,8 @@ BuildConfiguration::BuildConfiguration(Target *target, BuildConfiguration *sourc
// otherwise BuildStepFactories might reject to set up a BuildStep for us
// since we are not yet the derived class!
- connect(ProfileManager::instance(), SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(handleProfileUpdate(ProjectExplorer::Profile*)));
+ connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(handleKitUpdate(ProjectExplorer::Kit*)));
}
BuildConfiguration::~BuildConfiguration()
@@ -187,9 +187,9 @@ bool BuildConfiguration::fromMap(const QVariantMap &map)
return ProjectConfiguration::fromMap(map);
}
-void BuildConfiguration::handleProfileUpdate(ProjectExplorer::Profile *p)
+void BuildConfiguration::handleKitUpdate(ProjectExplorer::Kit *p)
{
- if (p != target()->profile())
+ if (p != target()->kit())
return;
emit environmentChanged();
}
diff --git a/src/plugins/projectexplorer/buildconfiguration.h b/src/plugins/projectexplorer/buildconfiguration.h
index 109136ddde..77d8c478ff 100644
--- a/src/plugins/projectexplorer/buildconfiguration.h
+++ b/src/plugins/projectexplorer/buildconfiguration.h
@@ -47,7 +47,7 @@ namespace ProjectExplorer {
class BuildConfiguration;
class BuildConfigWidget;
class BuildStepList;
-class Profile;
+class Kit;
class Target;
class IOutputParser;
@@ -112,7 +112,7 @@ protected:
virtual bool fromMap(const QVariantMap &map);
private slots:
- void handleProfileUpdate(ProjectExplorer::Profile *p);
+ void handleKitUpdate(ProjectExplorer::Kit *p);
private:
bool m_clearSystemEnvironment;
diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
index 8c1bea62d9..e0f5cad3ce 100644
--- a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
@@ -173,7 +173,7 @@ BuildSettingsWidget::BuildSettingsWidget(Target *target) :
connect(m_target, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
this, SLOT(updateActiveConfiguration()));
- connect(m_target, SIGNAL(profileChanged()), this, SLOT(updateAddButtonMenu()));
+ connect(m_target, SIGNAL(kitChanged()), this, SLOT(updateAddButtonMenu()));
}
void BuildSettingsWidget::addSubWidget(BuildConfigWidget *widget)
diff --git a/src/plugins/projectexplorer/codestylesettingspropertiespage.cpp b/src/plugins/projectexplorer/codestylesettingspropertiespage.cpp
index d0f105a1d0..f2d731ebcb 100644
--- a/src/plugins/projectexplorer/codestylesettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/codestylesettingspropertiespage.cpp
@@ -48,7 +48,7 @@ QString CodeStyleSettingsPanelFactory::id() const
QString CodeStyleSettingsPanelFactory::displayName() const
{
- return QCoreApplication::translate("CodeStyleSettingsPanelFactory", "Code Style Settings");
+ return QCoreApplication::translate("CodeStyleSettingsPanelFactory", "Code Style");
}
int CodeStyleSettingsPanelFactory::priority() const
@@ -67,7 +67,7 @@ PropertiesPanel *CodeStyleSettingsPanelFactory::createPanel(Project *project)
PropertiesPanel *panel = new PropertiesPanel;
panel->setWidget(new CodeStyleSettingsWidget(project));
panel->setIcon(QIcon(QLatin1String(":/projectexplorer/images/CodeStyleSettings.png")));
- panel->setDisplayName(QCoreApplication::translate("CodeStyleSettingsPanel", "Code Style Settings"));
+ panel->setDisplayName(QCoreApplication::translate("CodeStyleSettingsPanel", "Code Style"));
return panel;
}
diff --git a/src/plugins/projectexplorer/deployconfiguration.cpp b/src/plugins/projectexplorer/deployconfiguration.cpp
index d7853eca37..edb5e16986 100644
--- a/src/plugins/projectexplorer/deployconfiguration.cpp
+++ b/src/plugins/projectexplorer/deployconfiguration.cpp
@@ -33,7 +33,7 @@
#include "buildmanager.h"
#include "buildsteplist.h"
#include "buildstepspage.h"
-#include "profileinformation.h"
+#include "kitinformation.h"
#include "project.h"
#include "projectexplorer.h"
#include "projectexplorerconstants.h"
@@ -242,9 +242,9 @@ DeployConfigurationFactory *DeployConfigurationFactory::find(Target *parent)
bool DeployConfigurationFactory::canHandle(Target *parent) const
{
- if (!parent->project()->supportsProfile(parent->profile()))
+ if (!parent->project()->supportsKit(parent->kit()))
return false;
- return DeviceTypeProfileInformation::deviceTypeId(parent->profile()) == Constants::DESKTOP_DEVICE_TYPE;
+ return DeviceTypeKitInformation::deviceTypeId(parent->kit()) == Constants::DESKTOP_DEVICE_TYPE;
}
///
diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
index 3616d7c538..b63cc813dc 100644
--- a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
+++ b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
@@ -136,8 +136,9 @@ void DeviceManager::copy(const DeviceManager *source, DeviceManager *target, boo
void DeviceManager::save()
{
- d->writer->saveValue(QLatin1String(DeviceManagerKey), toMap());
- d->writer->save(Core::ICore::mainWindow());
+ QVariantMap data;
+ data.insert(QLatin1String(DeviceManagerKey), toMap());
+ d->writer->save(data, Core::ICore::mainWindow());
}
void DeviceManager::load()
diff --git a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp
index 5c88d9b5bd..c3d4375c6c 100644
--- a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp
+++ b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.cpp
@@ -29,8 +29,8 @@
#include "devicesupport/deviceprocessesdialog.h"
#include "devicesupport/deviceprocesslist.h"
-#include "profilechooser.h"
-#include "profileinformation.h"
+#include "kitchooser.h"
+#include "kitinformation.h"
#include <utils/filterlineedit.h>
#include <utils/qtcassert.h>
@@ -113,7 +113,7 @@ public:
QWidget *q;
DeviceProcessList *processList;
ProcessListFilterModel proxyModel;
- ProfileChooser *profileChooser;
+ KitChooser *kitChooser;
QTreeView *procView;
QTextBrowser *errorText;
@@ -133,7 +133,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(QWidget *parent)
processFilterLineEdit->setPlaceholderText(DeviceProcessesDialog::tr("Filter"));
processFilterLineEdit->setFocus(Qt::TabFocusReason);
- profileChooser = new ProfileChooser(q);
+ kitChooser = new KitChooser(q);
procView = new QTreeView(q);
procView->setModel(&proxyModel);
@@ -157,7 +157,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(QWidget *parent)
QFormLayout *leftColumn = new QFormLayout();
leftColumn->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
- leftColumn->addRow(DeviceProcessesDialog::tr("Target:"), profileChooser);
+ leftColumn->addRow(DeviceProcessesDialog::tr("Kit:"), kitChooser);
leftColumn->addRow(DeviceProcessesDialog::tr("&Filter:"), processFilterLineEdit);
// QVBoxLayout *rightColumn = new QVBoxLayout();
@@ -185,7 +185,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(QWidget *parent)
SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
SLOT(updateButtons()));
connect(updateListButton, SIGNAL(clicked()), SLOT(updateProcessList()));
- connect(profileChooser, SIGNAL(currentIndexChanged(int)), SLOT(updateDevice()));
+ connect(kitChooser, SIGNAL(currentIndexChanged(int)), SLOT(updateDevice()));
connect(killProcessButton, SIGNAL(clicked()), SLOT(killProcess()));
connect(&proxyModel, SIGNAL(layoutChanged()), SLOT(handleProcessListUpdated()));
connect(buttonBox, SIGNAL(accepted()), q, SLOT(accept()));
@@ -246,7 +246,7 @@ void DeviceProcessesDialogPrivate::killProcess()
void DeviceProcessesDialogPrivate::updateDevice()
{
- setDevice(DeviceProfileInformation::device(profileChooser->currentProfile()));
+ setDevice(DeviceKitInformation::device(kitChooser->currentKit()));
}
void DeviceProcessesDialogPrivate::handleProcessKilled()
@@ -323,13 +323,13 @@ void DeviceProcessesDialog::addCloseButton()
void DeviceProcessesDialog::setDevice(const IDevice::ConstPtr &device)
{
- d->profileChooser->hide();
+ d->kitChooser->hide();
d->setDevice(device);
}
void DeviceProcessesDialog::showAllDevices()
{
- d->profileChooser->show();
+ d->kitChooser->show();
d->updateDevice();
}
@@ -338,9 +338,9 @@ DeviceProcess DeviceProcessesDialog::currentProcess() const
return d->selectedProcess();
}
-ProfileChooser *DeviceProcessesDialog::profileChooser() const
+KitChooser *DeviceProcessesDialog::kitChooser() const
{
- return d->profileChooser;
+ return d->kitChooser;
}
void DeviceProcessesDialog::logMessage(const QString &line)
diff --git a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.h b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.h
index 3f7a968fa4..13d65e2100 100644
--- a/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.h
+++ b/src/plugins/projectexplorer/devicesupport/deviceprocessesdialog.h
@@ -32,7 +32,7 @@
#include "../projectexplorer_export.h"
-#include <projectexplorer/profile.h>
+#include <projectexplorer/kit.h>
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/devicesupport/deviceprocesslist.h>
@@ -40,7 +40,7 @@
namespace ProjectExplorer {
-class ProfileChooser;
+class KitChooser;
namespace Internal { class DeviceProcessesDialogPrivate; }
@@ -57,7 +57,7 @@ public:
void setDevice(const IDevice::ConstPtr &device);
void showAllDevices();
DeviceProcess currentProcess() const;
- ProfileChooser *profileChooser() const;
+ KitChooser *kitChooser() const;
void logMessage(const QString &line);
private:
diff --git a/src/plugins/projectexplorer/editorsettingspropertiespage.cpp b/src/plugins/projectexplorer/editorsettingspropertiespage.cpp
index 5d59ed2566..1f766ccd11 100644
--- a/src/plugins/projectexplorer/editorsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/editorsettingspropertiespage.cpp
@@ -44,7 +44,7 @@ QString EditorSettingsPanelFactory::id() const
QString EditorSettingsPanelFactory::displayName() const
{
- return QCoreApplication::translate("EditorSettingsPanelFactory", "Editor Settings");
+ return QCoreApplication::translate("EditorSettingsPanelFactory", "Editor");
}
int EditorSettingsPanelFactory::priority() const
@@ -61,7 +61,7 @@ bool EditorSettingsPanelFactory::supports(Project *project)
PropertiesPanel *EditorSettingsPanelFactory::createPanel(Project *project)
{
PropertiesPanel *panel = new PropertiesPanel;
- panel->setDisplayName(QCoreApplication::translate("EditorSettingsPanel", "Editor Settings"));
+ panel->setDisplayName(QCoreApplication::translate("EditorSettingsPanel", "Editor"));
panel->setWidget(new EditorSettingsWidget(project)),
panel->setIcon(QIcon(QLatin1String(":/projectexplorer/images/EditorSettings.png")));
return panel;
diff --git a/src/plugins/projectexplorer/profile.cpp b/src/plugins/projectexplorer/kit.cpp
index 867282ca72..cd448b93c6 100644
--- a/src/plugins/projectexplorer/profile.cpp
+++ b/src/plugins/projectexplorer/kit.cpp
@@ -28,11 +28,11 @@
**
**************************************************************************/
-#include "profile.h"
+#include "kit.h"
#include "devicesupport/devicemanager.h"
-#include "profileinformation.h"
-#include "profilemanager.h"
+#include "kitinformation.h"
+#include "kitmanager.h"
#include "project.h"
#include "toolchainmanager.h"
@@ -55,15 +55,15 @@ const char ICON_KEY[] = "PE.Profile.Icon";
namespace ProjectExplorer {
// -------------------------------------------------------------------------
-// ProfilePrivate
+// KitPrivate
// -------------------------------------------------------------------------
namespace Internal {
-class ProfilePrivate
+class KitPrivate
{
public:
- ProfilePrivate() :
+ KitPrivate() :
m_id(QUuid::createUuid().toString().toLatin1().constData()),
m_autodetected(false),
m_isValid(true)
@@ -82,32 +82,32 @@ public:
} // namespace Internal
// -------------------------------------------------------------------------
-// Profile:
+// Kit:
// -------------------------------------------------------------------------
-Profile::Profile() :
- d(new Internal::ProfilePrivate)
+Kit::Kit() :
+ d(new Internal::KitPrivate)
{
- ProfileManager *stm = ProfileManager::instance();
- foreach (ProfileInformation *sti, stm->profileInformation())
+ KitManager *stm = KitManager::instance();
+ foreach (KitInformation *sti, stm->kitInformation())
d->m_data.insert(sti->dataId(), sti->defaultValue(this));
- setDisplayName(QCoreApplication::translate("ProjectExplorer::Profile", "Unnamed"));
+ setDisplayName(QCoreApplication::translate("ProjectExplorer::Kit", "Unnamed"));
setIconPath(QLatin1String(":///DESKTOP///"));
}
-Profile::~Profile()
+Kit::~Kit()
{
delete d;
}
-Profile *Profile::clone(bool keepName) const
+Kit *Kit::clone(bool keepName) const
{
- Profile *p = new Profile;
+ Kit *p = new Kit;
if (keepName)
p->d->m_displayName = d->m_displayName;
else
- p->d->m_displayName = QCoreApplication::translate("ProjectExplorer::Profile", "Clone of %1")
+ p->d->m_displayName = QCoreApplication::translate("ProjectExplorer::Kit", "Clone of %1")
.arg(d->m_displayName);
p->d->m_autodetected = false;
p->d->m_data = d->m_data;
@@ -117,21 +117,21 @@ Profile *Profile::clone(bool keepName) const
return p;
}
-bool Profile::isValid() const
+bool Kit::isValid() const
{
return d->m_id.isValid() && d->m_isValid;
}
-QList<Task> Profile::validate()
+QList<Task> Kit::validate()
{
QList<Task> result;
- QList<ProfileInformation *> infoList = ProfileManager::instance()->profileInformation();
- foreach (ProfileInformation *i, infoList)
+ QList<KitInformation *> infoList = KitManager::instance()->kitInformation();
+ foreach (KitInformation *i, infoList)
result.append(i->validate(this));
return result;
}
-QString Profile::displayName() const
+QString Kit::displayName() const
{
return d->m_displayName;
}
@@ -143,16 +143,16 @@ static QString candidateName(const QString &name, const QString &postfix)
return name + QLatin1Char('-') + postfix;
}
-void Profile::setDisplayName(const QString &name)
+void Kit::setDisplayName(const QString &name)
{
- ProfileManager *pm = ProfileManager::instance();
- QList<ProfileInformation *> profileInfo = pm->profileInformation();
+ KitManager *pm = KitManager::instance();
+ QList<KitInformation *> kitInfo = pm->kitInformation();
QStringList nameList;
- foreach (Profile *p, pm->profiles()) {
+ foreach (Kit *p, pm->kits()) {
nameList << p->displayName();
- foreach (ProfileInformation *pi, profileInfo) {
- const QString postfix = pi->displayNamePostfix(p);
+ foreach (KitInformation *ki, kitInfo) {
+ const QString postfix = ki->displayNamePostfix(p);
if (!postfix.isEmpty())
nameList << candidateName(p->displayName(), postfix);
}
@@ -161,8 +161,8 @@ void Profile::setDisplayName(const QString &name)
QStringList candidateNames;
candidateNames << name;
- foreach (ProfileInformation *pi, profileInfo) {
- const QString postfix = pi->displayNamePostfix(this);
+ foreach (KitInformation *ki, kitInfo) {
+ const QString postfix = ki->displayNamePostfix(this);
if (!postfix.isEmpty())
candidateNames << candidateName(name, postfix);
}
@@ -181,30 +181,30 @@ void Profile::setDisplayName(const QString &name)
if (d->m_displayName == uniqueName)
return;
d->m_displayName = uniqueName;
- profileUpdated();
+ kitUpdated();
}
-bool Profile::isAutoDetected() const
+bool Kit::isAutoDetected() const
{
return d->m_autodetected;
}
-Core::Id Profile::id() const
+Core::Id Kit::id() const
{
return d->m_id;
}
-QIcon Profile::icon() const
+QIcon Kit::icon() const
{
return d->m_icon;
}
-QString Profile::iconPath() const
+QString Kit::iconPath() const
{
return d->m_iconPath;
}
-void Profile::setIconPath(const QString &path)
+void Kit::setIconPath(const QString &path)
{
if (d->m_iconPath == path)
return;
@@ -215,36 +215,36 @@ void Profile::setIconPath(const QString &path)
d->m_icon = qApp->style()->standardIcon(QStyle::SP_ComputerIcon);
else
d->m_icon = QIcon(path);
- profileUpdated();
+ kitUpdated();
}
-QVariant Profile::value(const Core::Id &key, const QVariant &unset) const
+QVariant Kit::value(const Core::Id &key, const QVariant &unset) const
{
return d->m_data.value(key, unset);
}
-bool Profile::hasValue(const Core::Id &key) const
+bool Kit::hasValue(const Core::Id &key) const
{
return d->m_data.contains(key);
}
-void Profile::setValue(const Core::Id &key, const QVariant &value)
+void Kit::setValue(const Core::Id &key, const QVariant &value)
{
if (d->m_data.value(key) == value)
return;
d->m_data.insert(key, value);
- profileUpdated();
+ kitUpdated();
}
-void Profile::removeKey(const Core::Id &key)
+void Kit::removeKey(const Core::Id &key)
{
if (!d->m_data.contains(key))
return;
d->m_data.remove(key);
- profileUpdated();
+ kitUpdated();
}
-QVariantMap Profile::toMap() const
+QVariantMap Kit::toMap() const
{
QVariantMap data;
data.insert(QLatin1String(ID_KEY), QString::fromLatin1(d->m_id.name()));
@@ -260,19 +260,19 @@ QVariantMap Profile::toMap() const
return data;
}
-bool Profile::operator==(const Profile &other) const
+bool Kit::operator==(const Kit &other) const
{
return d->m_data == other.d->m_data;
}
-void Profile::addToEnvironment(Utils::Environment &env) const
+void Kit::addToEnvironment(Utils::Environment &env) const
{
- QList<ProfileInformation *> infoList = ProfileManager::instance()->profileInformation();
- foreach (ProfileInformation *si, infoList)
- si->addToEnvironment(this, env);
+ QList<KitInformation *> infoList = KitManager::instance()->kitInformation();
+ foreach (KitInformation *ki, infoList)
+ ki->addToEnvironment(this, env);
}
-QString Profile::toHtml()
+QString Kit::toHtml()
{
QString rc;
QTextStream str(&rc);
@@ -287,10 +287,10 @@ QString Profile::toHtml()
str << "<b>";
switch (t.type) {
case Task::Error:
- QCoreApplication::translate("ProjectExplorer::Profile", "Error:");
+ QCoreApplication::translate("ProjectExplorer::Kit", "Error:");
break;
case Task::Warning:
- QCoreApplication::translate("ProjectExplorer::Profile", "Warning:");
+ QCoreApplication::translate("ProjectExplorer::Kit", "Warning:");
break;
case Task::Unknown:
default:
@@ -301,17 +301,17 @@ QString Profile::toHtml()
str << "</p>";
}
- QList<ProfileInformation *> infoList = ProfileManager::instance()->profileInformation();
- foreach (ProfileInformation *i, infoList) {
- ProfileInformation::ItemList list = i->toUserOutput(this);
- foreach (const ProfileInformation::Item &j, list)
+ QList<KitInformation *> infoList = KitManager::instance()->kitInformation();
+ foreach (KitInformation *ki, infoList) {
+ KitInformation::ItemList list = ki->toUserOutput(this);
+ foreach (const KitInformation::Item &j, list)
str << "<tr><td><b>" << j.first << ":</b></td><td>" << j.second << "</td></tr>";
}
str << "</table></body></html>";
return rc;
}
-bool Profile::fromMap(const QVariantMap &data)
+bool Kit::fromMap(const QVariantMap &data)
{
const QString id = data.value(QLatin1String(ID_KEY)).toString();
if (id.isEmpty())
@@ -328,19 +328,19 @@ bool Profile::fromMap(const QVariantMap &data)
return true;
}
-void Profile::setAutoDetected(bool detected)
+void Kit::setAutoDetected(bool detected)
{
d->m_autodetected = detected;
}
-void Profile::setValid(bool valid)
+void Kit::setValid(bool valid)
{
d->m_isValid = valid;
}
-void Profile::profileUpdated()
+void Kit::kitUpdated()
{
- ProfileManager::instance()->notifyAboutUpdate(this);
+ KitManager::instance()->notifyAboutUpdate(this);
}
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/profile.h b/src/plugins/projectexplorer/kit.h
index 4db326dbdf..9eb600b5d9 100644
--- a/src/plugins/projectexplorer/profile.h
+++ b/src/plugins/projectexplorer/kit.h
@@ -28,8 +28,8 @@
**
**************************************************************************/
-#ifndef PROFILE_H
-#define PROFILE_H
+#ifndef KIT_H
+#define KIT_H
#include "projectexplorer_export.h"
#include "task.h"
@@ -43,21 +43,21 @@ namespace Utils { class Environment; }
namespace ProjectExplorer {
namespace Internal {
-class ProfileManagerPrivate;
-class ProfilePrivate;
+class KitManagerPrivate;
+class KitPrivate;
} // namespace Internal
/**
- * @brief The Profile class
+ * @brief The Kit class
*
- * The profile holds a set of values defining a system targeted by the software
+ * The kit holds a set of values defining a system targeted by the software
* under development.
*/
-class PROJECTEXPLORER_EXPORT Profile
+class PROJECTEXPLORER_EXPORT Kit
{
public:
- Profile();
- ~Profile();
+ Kit();
+ ~Kit();
bool isValid() const;
QList<Task> validate();
@@ -77,34 +77,34 @@ public:
void setValue(const Core::Id &key, const QVariant &value);
void removeKey(const Core::Id &key);
- bool operator==(const Profile &other) const;
+ bool operator==(const Kit &other) const;
void addToEnvironment(Utils::Environment &env) const;
QString toHtml();
- Profile *clone(bool keepName = false) const;
+ Kit *clone(bool keepName = false) const;
private:
// Unimplemented.
- Profile(const Profile &other);
- void operator=(const Profile &other);
+ Kit(const Kit &other);
+ void operator=(const Kit &other);
void setAutoDetected(bool detected);
void setValid(bool valid);
- void profileUpdated();
+ void kitUpdated();
QVariantMap toMap() const;
bool fromMap(const QVariantMap &value);
- Internal::ProfilePrivate *d;
+ Internal::KitPrivate *d;
- friend class ProfileManager;
- friend class Internal::ProfileManagerPrivate;
+ friend class KitManager;
+ friend class Internal::KitManagerPrivate;
};
} // namespace ProjectExplorer
-Q_DECLARE_METATYPE(ProjectExplorer::Profile *)
+Q_DECLARE_METATYPE(ProjectExplorer::Kit *)
-#endif // PROFILE_H
+#endif // KIT_H
diff --git a/src/plugins/projectexplorer/profilechooser.cpp b/src/plugins/projectexplorer/kitchooser.cpp
index da73a5f146..8273990ed7 100644
--- a/src/plugins/projectexplorer/profilechooser.cpp
+++ b/src/plugins/projectexplorer/kitchooser.cpp
@@ -28,17 +28,17 @@
**
**************************************************************************/
-#include "profilechooser.h"
+#include "kitchooser.h"
-#include "profileinformation.h"
-#include "profilemanager.h"
+#include "kitinformation.h"
+#include "kitmanager.h"
#include "abi.h"
#include <utils/qtcassert.h>
namespace ProjectExplorer {
-ProfileChooser::ProfileChooser(QWidget *parent, unsigned flags) :
+KitChooser::KitChooser(QWidget *parent, unsigned flags) :
QComboBox(parent)
{
populate(flags);
@@ -46,64 +46,64 @@ ProfileChooser::ProfileChooser(QWidget *parent, unsigned flags) :
connect(this, SIGNAL(currentIndexChanged(int)), SLOT(onCurrentIndexChanged(int)));
}
-void ProfileChooser::onCurrentIndexChanged(int index)
+void KitChooser::onCurrentIndexChanged(int index)
{
- if (Profile *profile = profileAt(index))
- setToolTip(profile->toHtml());
+ if (Kit *kit = kitAt(index))
+ setToolTip(kit->toHtml());
else
setToolTip(QString());
}
-void ProfileChooser::populate(unsigned flags)
+void KitChooser::populate(unsigned flags)
{
clear();
const Abi hostAbi = Abi::hostAbi();
- foreach (Profile *profile, ProfileManager::instance()->profiles()) {
- if (!profile->isValid() && !(flags & IncludeInvalidProfiles))
+ foreach (Kit *kit, KitManager::instance()->kits()) {
+ if (!kit->isValid() && !(flags & IncludeInvalidKits))
continue;
- ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
+ ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (!tc)
continue;
const Abi abi = tc->targetAbi();
if ((flags & HostAbiOnly) && hostAbi.os() != abi.os())
continue;
- const QString debuggerCommand = profile->value(Core::Id("Debugger.Information")).toString();
+ const QString debuggerCommand = kit->value(Core::Id("Debugger.Information")).toString();
if ((flags & HasDebugger) && debuggerCommand.isEmpty())
continue;
const QString completeBase = QFileInfo(debuggerCommand).completeBaseName();
- const QString name = tr("%1 (%2)").arg(profile->displayName(), completeBase);
- addItem(name, qVariantFromValue(profile->id()));
- setItemData(count() - 1, profile->toHtml(), Qt::ToolTipRole);
+ const QString name = tr("%1 (%2)").arg(kit->displayName(), completeBase);
+ addItem(name, qVariantFromValue(kit->id()));
+ setItemData(count() - 1, kit->toHtml(), Qt::ToolTipRole);
}
setEnabled(count() > 1);
}
-Profile *ProfileChooser::currentProfile() const
+Kit *KitChooser::currentKit() const
{
const int index = currentIndex();
- return index == -1 ? 0 : profileAt(index);
+ return index == -1 ? 0 : kitAt(index);
}
-void ProfileChooser::setCurrentProfileId(Core::Id id)
+void KitChooser::setCurrentKitId(Core::Id id)
{
for (int i = 0, n = count(); i != n; ++i) {
- if (profileAt(i)->id() == id) {
+ if (kitAt(i)->id() == id) {
setCurrentIndex(i);
break;
}
}
}
-Core::Id ProfileChooser::currentProfileId() const
+Core::Id KitChooser::currentKitId() const
{
- Profile *profile = currentProfile();
- return profile ? profile->id() : Core::Id();
+ Kit *kit = currentKit();
+ return kit ? kit->id() : Core::Id();
}
-Profile *ProfileChooser::profileAt(int index) const
+Kit *KitChooser::kitAt(int index) const
{
Core::Id id = qvariant_cast<Core::Id>(itemData(index));
- return ProfileManager::instance()->find(id);
+ return KitManager::instance()->find(id);
}
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/profilechooser.h b/src/plugins/projectexplorer/kitchooser.h
index 66582786e4..c53cfb8575 100644
--- a/src/plugins/projectexplorer/profilechooser.h
+++ b/src/plugins/projectexplorer/kitchooser.h
@@ -28,8 +28,8 @@
**
**************************************************************************/
-#ifndef PROJECTEXPLORER_PROFILECHOOSER_H
-#define PROJECTEXPLORER_PROFILECHOOSER_H
+#ifndef PROJECTEXPLORER_KITCHOOSER_H
+#define PROJECTEXPLORER_KITCHOOSER_H
#include "projectexplorer_export.h"
@@ -39,35 +39,35 @@ namespace Core { class Id; }
namespace ProjectExplorer {
-class Profile;
+class Kit;
-// Let the user pick a profile.
-class PROJECTEXPLORER_EXPORT ProfileChooser : public QComboBox
+// Let the user pick a kit.
+class PROJECTEXPLORER_EXPORT KitChooser : public QComboBox
{
Q_OBJECT
public:
enum Flags {
HostAbiOnly = 0x1,
- IncludeInvalidProfiles = 0x2,
+ IncludeInvalidKits = 0x2,
HasDebugger = 0x4,
- RemoteDebugging = IncludeInvalidProfiles | HasDebugger,
+ RemoteDebugging = IncludeInvalidKits | HasDebugger,
LocalDebugging = RemoteDebugging | HostAbiOnly
};
- explicit ProfileChooser(QWidget *parent, unsigned flags = 0);
+ explicit KitChooser(QWidget *parent, unsigned flags = 0);
- void setCurrentProfileId(Core::Id id);
- Core::Id currentProfileId() const;
+ void setCurrentKitId(Core::Id id);
+ Core::Id currentKitId() const;
- Profile *currentProfile() const;
+ Kit *currentKit() const;
private:
Q_SLOT void onCurrentIndexChanged(int index);
void populate(unsigned flags);
- Profile *profileAt(int index) const;
+ Kit *kitAt(int index) const;
};
} // namespace ProjectExplorer
-#endif // PROJECTEXPLORER_PROFILECHOOSER_H
+#endif // PROJECTEXPLORER_KITCHOOSER_H
diff --git a/src/plugins/projectexplorer/profileconfigwidget.h b/src/plugins/projectexplorer/kitconfigwidget.h
index 02f3798171..d48033dbc8 100644
--- a/src/plugins/projectexplorer/profileconfigwidget.h
+++ b/src/plugins/projectexplorer/kitconfigwidget.h
@@ -28,8 +28,8 @@
**
**************************************************************************/
-#ifndef PROFILECONFIGWIDGET_H
-#define PROFILECONFIGWIDGET_H
+#ifndef KITCONFIGWIDGET_H
+#define KITCONFIGWIDGET_H
#include "projectexplorer_export.h"
@@ -38,15 +38,15 @@
namespace ProjectExplorer {
// --------------------------------------------------------------------------
-// ProfileConfigWidget
+// KitConfigWidget
// --------------------------------------------------------------------------
-class PROJECTEXPLORER_EXPORT ProfileConfigWidget : public QWidget
+class PROJECTEXPLORER_EXPORT KitConfigWidget : public QWidget
{
Q_OBJECT
public:
- ProfileConfigWidget(QWidget *parent = 0) : QWidget(parent)
+ KitConfigWidget(QWidget *parent = 0) : QWidget(parent)
{ }
virtual QString displayName() const = 0;
@@ -63,4 +63,4 @@ signals:
} // namespace ProjectExplorer
-#endif // PROFILECONFIGWIDGET_H
+#endif // KITCONFIGWIDGET_H
diff --git a/src/plugins/projectexplorer/profileinformation.cpp b/src/plugins/projectexplorer/kitinformation.cpp
index 7a31baf4e9..277f72c584 100644
--- a/src/plugins/projectexplorer/profileinformation.cpp
+++ b/src/plugins/projectexplorer/kitinformation.cpp
@@ -28,13 +28,13 @@
**
**************************************************************************/
-#include "profileinformation.h"
+#include "kitinformation.h"
#include "devicesupport/desktopdevice.h"
#include "devicesupport/devicemanager.h"
#include "projectexplorerconstants.h"
-#include "profile.h"
-#include "profileinformationconfigwidget.h"
+#include "kit.h"
+#include "kitinformationconfigwidget.h"
#include "toolchain.h"
#include "toolchainmanager.h"
@@ -55,67 +55,67 @@ namespace ProjectExplorer {
static const char SYSROOT_INFORMATION[] = "PE.Profile.SysRoot";
-SysRootProfileInformation::SysRootProfileInformation()
+SysRootKitInformation::SysRootKitInformation()
{
setObjectName(QLatin1String("SysRootInformation"));
}
-Core::Id SysRootProfileInformation::dataId() const
+Core::Id SysRootKitInformation::dataId() const
{
static const Core::Id id(SYSROOT_INFORMATION);
return id;
}
-unsigned int SysRootProfileInformation::priority() const
+unsigned int SysRootKitInformation::priority() const
{
return 32000;
}
-QVariant SysRootProfileInformation::defaultValue(Profile *p) const
+QVariant SysRootKitInformation::defaultValue(Kit *k) const
{
- Q_UNUSED(p)
+ Q_UNUSED(k)
return QString();
}
-QList<Task> SysRootProfileInformation::validate(Profile *p) const
+QList<Task> SysRootKitInformation::validate(Kit *k) const
{
QList<Task> result;
- const Utils::FileName dir = SysRootProfileInformation::sysRoot(p);
- if (!dir.toFileInfo().isDir() && SysRootProfileInformation::hasSysRoot(p)) {
+ const Utils::FileName dir = SysRootKitInformation::sysRoot(k);
+ if (!dir.toFileInfo().isDir() && SysRootKitInformation::hasSysRoot(k)) {
result << Task(Task::Error, tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput()),
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
}
return result;
}
-ProfileConfigWidget *SysRootProfileInformation::createConfigWidget(Profile *p) const
+KitConfigWidget *SysRootKitInformation::createConfigWidget(Kit *k) const
{
- Q_ASSERT(p);
- return new Internal::SysRootInformationConfigWidget(p);
+ Q_ASSERT(k);
+ return new Internal::SysRootInformationConfigWidget(k);
}
-ProfileInformation::ItemList SysRootProfileInformation::toUserOutput(Profile *p) const
+KitInformation::ItemList SysRootKitInformation::toUserOutput(Kit *k) const
{
- return ItemList() << qMakePair(tr("Sys Root"), sysRoot(p).toUserOutput());
+ return ItemList() << qMakePair(tr("Sys Root"), sysRoot(k).toUserOutput());
}
-bool SysRootProfileInformation::hasSysRoot(const Profile *p)
+bool SysRootKitInformation::hasSysRoot(const Kit *k)
{
- if (p)
- return !p->value(Core::Id(SYSROOT_INFORMATION)).toString().isEmpty();
+ if (k)
+ return !k->value(Core::Id(SYSROOT_INFORMATION)).toString().isEmpty();
return false;
}
-Utils::FileName SysRootProfileInformation::sysRoot(const Profile *p)
+Utils::FileName SysRootKitInformation::sysRoot(const Kit *k)
{
- if (!p)
+ if (!k)
return Utils::FileName();
- return Utils::FileName::fromString(p->value(Core::Id(SYSROOT_INFORMATION)).toString());
+ return Utils::FileName::fromString(k->value(Core::Id(SYSROOT_INFORMATION)).toString());
}
-void SysRootProfileInformation::setSysRoot(Profile *p, const Utils::FileName &v)
+void SysRootKitInformation::setSysRoot(Kit *k, const Utils::FileName &v)
{
- p->setValue(Core::Id(SYSROOT_INFORMATION), v.toString());
+ k->setValue(Core::Id(SYSROOT_INFORMATION), v.toString());
}
// --------------------------------------------------------------------------
@@ -124,7 +124,7 @@ void SysRootProfileInformation::setSysRoot(Profile *p, const Utils::FileName &v)
static const char TOOLCHAIN_INFORMATION[] = "PE.Profile.ToolChain";
-ToolChainProfileInformation::ToolChainProfileInformation()
+ToolChainKitInformation::ToolChainKitInformation()
{
setObjectName(QLatin1String("ToolChainInformation"));
connect(ToolChainManager::instance(), SIGNAL(toolChainRemoved(ProjectExplorer::ToolChain*)),
@@ -133,20 +133,20 @@ ToolChainProfileInformation::ToolChainProfileInformation()
this, SIGNAL(validationNeeded()));
}
-Core::Id ToolChainProfileInformation::dataId() const
+Core::Id ToolChainKitInformation::dataId() const
{
static const Core::Id id(TOOLCHAIN_INFORMATION);
return id;
}
-unsigned int ToolChainProfileInformation::priority() const
+unsigned int ToolChainKitInformation::priority() const
{
return 30000;
}
-QVariant ToolChainProfileInformation::defaultValue(Profile *p) const
+QVariant ToolChainKitInformation::defaultValue(Kit *k) const
{
- Q_UNUSED(p);
+ Q_UNUSED(k);
QList<ToolChain *> tcList = ToolChainManager::instance()->toolChains();
if (tcList.isEmpty())
return QString();
@@ -161,58 +161,58 @@ QVariant ToolChainProfileInformation::defaultValue(Profile *p) const
return tcList.at(0)->id();
}
-QList<Task> ToolChainProfileInformation::validate(Profile *p) const
+QList<Task> ToolChainKitInformation::validate(Kit *k) const
{
QList<Task> result;
- if (!toolChain(p)) {
- setToolChain(p, 0); // make sure to clear out no longer known tool chains
- result << Task(Task::Error, ToolChainProfileInformation::msgNoToolChainInTarget(),
+ if (!toolChain(k)) {
+ setToolChain(k, 0); // make sure to clear out no longer known tool chains
+ result << Task(Task::Error, ToolChainKitInformation::msgNoToolChainInTarget(),
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
}
return result;
}
-ProfileConfigWidget *ToolChainProfileInformation::createConfigWidget(Profile *p) const
+KitConfigWidget *ToolChainKitInformation::createConfigWidget(Kit *k) const
{
- Q_ASSERT(p);
- return new Internal::ToolChainInformationConfigWidget(p);
+ Q_ASSERT(k);
+ return new Internal::ToolChainInformationConfigWidget(k);
}
-QString ToolChainProfileInformation::displayNamePostfix(const Profile *p) const
+QString ToolChainKitInformation::displayNamePostfix(const Kit *k) const
{
- ToolChain *tc = toolChain(p);
+ ToolChain *tc = toolChain(k);
return tc ? tc->displayName() : QString();
}
-ProfileInformation::ItemList ToolChainProfileInformation::toUserOutput(Profile *p) const
+KitInformation::ItemList ToolChainKitInformation::toUserOutput(Kit *k) const
{
- ToolChain *tc = toolChain(p);
+ ToolChain *tc = toolChain(k);
return ItemList() << qMakePair(tr("Compiler"), tc ? tc->displayName() : tr("None"));
}
-void ToolChainProfileInformation::addToEnvironment(const Profile *p, Utils::Environment &env) const
+void ToolChainKitInformation::addToEnvironment(const Kit *k, Utils::Environment &env) const
{
- ToolChain *tc = toolChain(p);
+ ToolChain *tc = toolChain(k);
if (tc)
tc->addToEnvironment(env);
}
-ToolChain *ToolChainProfileInformation::toolChain(const Profile *p)
+ToolChain *ToolChainKitInformation::toolChain(const Kit *k)
{
- if (!p)
+ if (!k)
return 0;
- const QString id = p->value(Core::Id(TOOLCHAIN_INFORMATION)).toString();
+ const QString id = k->value(Core::Id(TOOLCHAIN_INFORMATION)).toString();
return ToolChainManager::instance()->findToolChain(id);
}
-void ToolChainProfileInformation::setToolChain(Profile *p, ToolChain *tc)
+void ToolChainKitInformation::setToolChain(Kit *k, ToolChain *tc)
{
- p->setValue(Core::Id(TOOLCHAIN_INFORMATION), tc ? tc->id() : QString());
+ k->setValue(Core::Id(TOOLCHAIN_INFORMATION), tc ? tc->id() : QString());
}
-QString ToolChainProfileInformation::msgNoToolChainInTarget()
+QString ToolChainKitInformation::msgNoToolChainInTarget()
{
- return tr("No compiler set in target.");
+ return tr("No compiler set in kit.");
}
// --------------------------------------------------------------------------
@@ -221,47 +221,47 @@ QString ToolChainProfileInformation::msgNoToolChainInTarget()
static const char DEVICETYPE_INFORMATION[] = "PE.Profile.DeviceType";
-DeviceTypeProfileInformation::DeviceTypeProfileInformation()
+DeviceTypeKitInformation::DeviceTypeKitInformation()
{
setObjectName(QLatin1String("DeviceTypeInformation"));
}
-Core::Id DeviceTypeProfileInformation::dataId() const
+Core::Id DeviceTypeKitInformation::dataId() const
{
static const Core::Id id(DEVICETYPE_INFORMATION);
return id;
}
-unsigned int DeviceTypeProfileInformation::priority() const
+unsigned int DeviceTypeKitInformation::priority() const
{
return 33000;
}
-QVariant DeviceTypeProfileInformation::defaultValue(Profile *p) const
+QVariant DeviceTypeKitInformation::defaultValue(Kit *k) const
{
- Q_UNUSED(p);
+ Q_UNUSED(k);
return QByteArray(Constants::DESKTOP_DEVICE_TYPE);
}
-QList<Task> DeviceTypeProfileInformation::validate(Profile *p) const
+QList<Task> DeviceTypeKitInformation::validate(Kit *k) const
{
- IDevice::ConstPtr dev = DeviceProfileInformation::device(p);
+ IDevice::ConstPtr dev = DeviceKitInformation::device(k);
QList<Task> result;
- if (!dev.isNull() && dev->type() != DeviceTypeProfileInformation::deviceTypeId(p))
+ if (!dev.isNull() && dev->type() != DeviceTypeKitInformation::deviceTypeId(k))
result.append(Task(Task::Error, tr("Device does not match device type."),
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
return result;
}
-ProfileConfigWidget *DeviceTypeProfileInformation::createConfigWidget(Profile *p) const
+KitConfigWidget *DeviceTypeKitInformation::createConfigWidget(Kit *k) const
{
- Q_ASSERT(p);
- return new Internal::DeviceTypeInformationConfigWidget(p);
+ Q_ASSERT(k);
+ return new Internal::DeviceTypeInformationConfigWidget(k);
}
-ProfileInformation::ItemList DeviceTypeProfileInformation::toUserOutput(Profile *p) const
+KitInformation::ItemList DeviceTypeKitInformation::toUserOutput(Kit *k) const
{
- Core::Id type = deviceTypeId(p);
+ Core::Id type = deviceTypeId(k);
QString typeDisplayName = tr("Unknown device type");
if (type.isValid()) {
QList<IDeviceFactory *> factories
@@ -276,16 +276,16 @@ ProfileInformation::ItemList DeviceTypeProfileInformation::toUserOutput(Profile
return ItemList() << qMakePair(tr("Device type"), typeDisplayName);
}
-const Core::Id DeviceTypeProfileInformation::deviceTypeId(const Profile *p)
+const Core::Id DeviceTypeKitInformation::deviceTypeId(const Kit *k)
{
- if (!p)
+ if (!k)
return Core::Id();
- return Core::Id(p->value(Core::Id(DEVICETYPE_INFORMATION)).toByteArray().constData());
+ return Core::Id(k->value(Core::Id(DEVICETYPE_INFORMATION)).toByteArray().constData());
}
-void DeviceTypeProfileInformation::setDeviceTypeId(Profile *p, Core::Id type)
+void DeviceTypeKitInformation::setDeviceTypeId(Kit *k, Core::Id type)
{
- p->setValue(Core::Id(DEVICETYPE_INFORMATION), type.name());
+ k->setValue(Core::Id(DEVICETYPE_INFORMATION), type.name());
}
// --------------------------------------------------------------------------
@@ -294,7 +294,7 @@ void DeviceTypeProfileInformation::setDeviceTypeId(Profile *p, Core::Id type)
static const char DEVICE_INFORMATION[] = "PE.Profile.Device";
-DeviceProfileInformation::DeviceProfileInformation()
+DeviceKitInformation::DeviceKitInformation()
{
setObjectName(QLatin1String("DeviceInformation"));
connect(DeviceManager::instance(), SIGNAL(deviceRemoved(Core::Id)),
@@ -303,71 +303,71 @@ DeviceProfileInformation::DeviceProfileInformation()
this, SIGNAL(validationNeeded()));
}
-Core::Id DeviceProfileInformation::dataId() const
+Core::Id DeviceKitInformation::dataId() const
{
static const Core::Id id(DEVICE_INFORMATION);
return id;
}
-unsigned int DeviceProfileInformation::priority() const
+unsigned int DeviceKitInformation::priority() const
{
return 32000;
}
-QVariant DeviceProfileInformation::defaultValue(Profile *p) const
+QVariant DeviceKitInformation::defaultValue(Kit *k) const
{
- Q_UNUSED(p);
+ Q_UNUSED(k);
return QByteArray(Constants::DESKTOP_DEVICE_ID);
}
-QList<Task> DeviceProfileInformation::validate(Profile *p) const
+QList<Task> DeviceKitInformation::validate(Kit *k) const
{
- Q_UNUSED(p);
+ Q_UNUSED(k);
QList<Task> result;
return result;
}
-ProfileConfigWidget *DeviceProfileInformation::createConfigWidget(Profile *p) const
+KitConfigWidget *DeviceKitInformation::createConfigWidget(Kit *k) const
{
- Q_ASSERT(p);
- return new Internal::DeviceInformationConfigWidget(p);
+ Q_ASSERT(k);
+ return new Internal::DeviceInformationConfigWidget(k);
}
-QString DeviceProfileInformation::displayNamePostfix(const Profile *p) const
+QString DeviceKitInformation::displayNamePostfix(const Kit *k) const
{
- IDevice::ConstPtr dev = device(p);
+ IDevice::ConstPtr dev = device(k);
return dev.isNull() ? QString() : dev->displayName();
}
-ProfileInformation::ItemList DeviceProfileInformation::toUserOutput(Profile *p) const
+KitInformation::ItemList DeviceKitInformation::toUserOutput(Kit *k) const
{
- IDevice::ConstPtr dev = device(p);
+ IDevice::ConstPtr dev = device(k);
return ItemList() << qMakePair(tr("Device"), dev.isNull() ? tr("Unconfigured") : dev->displayName());
}
-IDevice::ConstPtr DeviceProfileInformation::device(const Profile *p)
+IDevice::ConstPtr DeviceKitInformation::device(const Kit *k)
{
DeviceManager *dm = DeviceManager::instance();
- return dm ? dm->find(deviceId(p)) : IDevice::ConstPtr();
+ return dm ? dm->find(deviceId(k)) : IDevice::ConstPtr();
}
-Core::Id DeviceProfileInformation::deviceId(const Profile *p)
+Core::Id DeviceKitInformation::deviceId(const Kit *k)
{
- if (p) {
- QString idname = p->value(Core::Id(DEVICE_INFORMATION)).toString();
+ if (k) {
+ QString idname = k->value(Core::Id(DEVICE_INFORMATION)).toString();
return idname.isEmpty() ? IDevice::invalidId() : Core::Id(idname);
}
return IDevice::invalidId();
}
-void DeviceProfileInformation::setDevice(Profile *p, IDevice::ConstPtr dev)
+void DeviceKitInformation::setDevice(Kit *k, IDevice::ConstPtr dev)
{
- setDeviceId(p, dev ? dev->id() : IDevice::invalidId());
+ setDeviceId(k, dev ? dev->id() : IDevice::invalidId());
}
-void DeviceProfileInformation::setDeviceId(Profile *p, const Core::Id id)
+void DeviceKitInformation::setDeviceId(Kit *k, const Core::Id id)
{
- p->setValue(Core::Id(DEVICE_INFORMATION), id.toString());
+ k->setValue(Core::Id(DEVICE_INFORMATION), id.toString());
}
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/profileinformation.h b/src/plugins/projectexplorer/kitinformation.h
index 641743924f..ce6a6749dd 100644
--- a/src/plugins/projectexplorer/profileinformation.h
+++ b/src/plugins/projectexplorer/kitinformation.h
@@ -28,11 +28,11 @@
**
**************************************************************************/
-#ifndef PROFILEINFORMATION_H
-#define PROFILEINFORMATION_H
+#ifndef KITINFORMATION_H
+#define KITINFORMATION_H
-#include "profilemanager.h"
-#include "profile.h"
+#include "kitmanager.h"
+#include "kit.h"
#include "devicesupport/idevice.h"
#include "toolchain.h"
@@ -43,44 +43,44 @@
namespace ProjectExplorer {
-class ProfileConfigWidget;
+class KitConfigWidget;
// --------------------------------------------------------------------------
// SysRootInformation:
// --------------------------------------------------------------------------
-class PROJECTEXPLORER_EXPORT SysRootProfileInformation : public ProfileInformation
+class PROJECTEXPLORER_EXPORT SysRootKitInformation : public KitInformation
{
Q_OBJECT
public:
- SysRootProfileInformation();
+ SysRootKitInformation();
Core::Id dataId() const;
unsigned int priority() const;
- QVariant defaultValue(Profile *p) const;
+ QVariant defaultValue(Kit *k) const;
- QList<Task> validate(Profile *p) const;
+ QList<Task> validate(Kit *k) const;
- ProfileConfigWidget *createConfigWidget(Profile *p) const;
+ KitConfigWidget *createConfigWidget(Kit *k) const;
- ItemList toUserOutput(Profile *p) const;
+ ItemList toUserOutput(Kit *k) const;
- static bool hasSysRoot(const Profile *p);
- static Utils::FileName sysRoot(const Profile *p);
- static void setSysRoot(Profile *p, const Utils::FileName &v);
+ static bool hasSysRoot(const Kit *k);
+ static Utils::FileName sysRoot(const Kit *k);
+ static void setSysRoot(Kit *k, const Utils::FileName &v);
};
-class PROJECTEXPLORER_EXPORT SysRootMatcher : public ProfileMatcher
+class PROJECTEXPLORER_EXPORT SysRootMatcher : public KitMatcher
{
public:
SysRootMatcher(const Utils::FileName &fn) : m_sysroot(fn)
{ }
- bool matches(const Profile *p) const
+ bool matches(const Kit *p) const
{
- return SysRootProfileInformation::sysRoot(p) == m_sysroot;
+ return SysRootKitInformation::sysRoot(p) == m_sysroot;
}
private:
@@ -91,43 +91,43 @@ private:
// ToolChainInformation:
// --------------------------------------------------------------------------
-class PROJECTEXPLORER_EXPORT ToolChainProfileInformation : public ProfileInformation
+class PROJECTEXPLORER_EXPORT ToolChainKitInformation : public KitInformation
{
Q_OBJECT
public:
- ToolChainProfileInformation();
+ ToolChainKitInformation();
Core::Id dataId() const;
unsigned int priority() const;
- QVariant defaultValue(Profile *p) const;
+ QVariant defaultValue(Kit *k) const;
- QList<Task> validate(Profile *p) const;
+ QList<Task> validate(Kit *k) const;
- ProfileConfigWidget *createConfigWidget(Profile *p) const;
+ KitConfigWidget *createConfigWidget(Kit *k) const;
- QString displayNamePostfix(const Profile *p) const;
+ QString displayNamePostfix(const Kit *k) const;
- ItemList toUserOutput(Profile *p) const;
+ ItemList toUserOutput(Kit *k) const;
- void addToEnvironment(const Profile *p, Utils::Environment &env) const;
+ void addToEnvironment(const Kit *k, Utils::Environment &env) const;
- static ToolChain *toolChain(const Profile *p);
- static void setToolChain(Profile *p, ToolChain *tc);
+ static ToolChain *toolChain(const Kit *k);
+ static void setToolChain(Kit *k, ToolChain *tc);
static QString msgNoToolChainInTarget();
};
-class PROJECTEXPLORER_EXPORT ToolChainMatcher : public ProfileMatcher
+class PROJECTEXPLORER_EXPORT ToolChainMatcher : public KitMatcher
{
public:
ToolChainMatcher(const ToolChain *tc) : m_tc(tc)
{ }
- bool matches(const Profile *p) const
+ bool matches(const Kit *p) const
{
- return ToolChainProfileInformation::toolChain(p) == m_tc;
+ return ToolChainKitInformation::toolChain(p) == m_tc;
}
private:
@@ -138,37 +138,37 @@ private:
// DeviceTypeInformation:
// --------------------------------------------------------------------------
-class PROJECTEXPLORER_EXPORT DeviceTypeProfileInformation : public ProfileInformation
+class PROJECTEXPLORER_EXPORT DeviceTypeKitInformation : public KitInformation
{
Q_OBJECT
public:
- DeviceTypeProfileInformation();
+ DeviceTypeKitInformation();
Core::Id dataId() const;
unsigned int priority() const;
- QVariant defaultValue(Profile *p) const;
+ QVariant defaultValue(Kit *k) const;
- QList<Task> validate(Profile *p) const;
+ QList<Task> validate(Kit *k) const;
- ProfileConfigWidget *createConfigWidget(Profile *p) const;
+ KitConfigWidget *createConfigWidget(Kit *k) const;
- ItemList toUserOutput(Profile *p) const;
+ ItemList toUserOutput(Kit *k) const;
- static const Core::Id deviceTypeId(const Profile *p);
- static void setDeviceTypeId(Profile *p, Core::Id type);
+ static const Core::Id deviceTypeId(const Kit *k);
+ static void setDeviceTypeId(Kit *k, Core::Id type);
};
-class PROJECTEXPLORER_EXPORT DeviceTypeMatcher : public ProfileMatcher
+class PROJECTEXPLORER_EXPORT DeviceTypeMatcher : public KitMatcher
{
public:
DeviceTypeMatcher(const Core::Id t) : m_type(t)
{ }
- bool matches(const Profile *p) const
+ bool matches(const Kit *p) const
{
- Core::Id deviceType = DeviceTypeProfileInformation::deviceTypeId(p);
+ Core::Id deviceType = DeviceTypeKitInformation::deviceTypeId(p);
if (!deviceType.isValid())
return false;
return deviceType == m_type;
@@ -182,41 +182,41 @@ private:
// DeviceInformation:
// --------------------------------------------------------------------------
-class PROJECTEXPLORER_EXPORT DeviceProfileInformation : public ProfileInformation
+class PROJECTEXPLORER_EXPORT DeviceKitInformation : public KitInformation
{
Q_OBJECT
public:
- DeviceProfileInformation();
+ DeviceKitInformation();
Core::Id dataId() const;
unsigned int priority() const;
- QVariant defaultValue(Profile *p) const;
+ QVariant defaultValue(Kit *k) const;
- QList<Task> validate(Profile *p) const;
+ QList<Task> validate(Kit *k) const;
- ProfileConfigWidget *createConfigWidget(Profile *p) const;
+ KitConfigWidget *createConfigWidget(Kit *k) const;
- QString displayNamePostfix(const Profile *p) const;
+ QString displayNamePostfix(const Kit *k) const;
- ItemList toUserOutput(Profile *p) const;
+ ItemList toUserOutput(Kit *k) const;
- static IDevice::ConstPtr device(const Profile *p);
- static Core::Id deviceId(const Profile *p);
- static void setDevice(Profile *p, IDevice::ConstPtr dev);
- static void setDeviceId(Profile *p, const Core::Id id);
+ static IDevice::ConstPtr device(const Kit *k);
+ static Core::Id deviceId(const Kit *k);
+ static void setDevice(Kit *k, IDevice::ConstPtr dev);
+ static void setDeviceId(Kit *k, const Core::Id id);
};
-class PROJECTEXPLORER_EXPORT DeviceMatcher : public ProfileMatcher
+class PROJECTEXPLORER_EXPORT DeviceMatcher : public KitMatcher
{
public:
DeviceMatcher(Core::Id id) : m_devId(id)
{ }
- bool matches(const Profile *p) const
+ bool matches(const Kit *p) const
{
- return DeviceProfileInformation::deviceId(p) == m_devId;
+ return DeviceKitInformation::deviceId(p) == m_devId;
}
private:
@@ -225,4 +225,4 @@ private:
} // namespace ProjectExplorer
-#endif // PROFILEINFORMATION_H
+#endif // KITINFORMATION_H
diff --git a/src/plugins/projectexplorer/profileinformationconfigwidget.cpp b/src/plugins/projectexplorer/kitinformationconfigwidget.cpp
index d480f563c2..a6f2e8c4f7 100644
--- a/src/plugins/projectexplorer/profileinformationconfigwidget.cpp
+++ b/src/plugins/projectexplorer/kitinformationconfigwidget.cpp
@@ -28,14 +28,14 @@
**
**************************************************************************/
-#include "profileinformationconfigwidget.h"
+#include "kitinformationconfigwidget.h"
#include "devicesupport/devicemanager.h"
#include "devicesupport/devicemanagermodel.h"
#include "devicesupport/idevicefactory.h"
#include "projectexplorerconstants.h"
-#include "profile.h"
-#include "profileinformation.h"
+#include "kit.h"
+#include "kitinformation.h"
#include "toolchain.h"
#include "toolchainmanager.h"
@@ -55,9 +55,9 @@ namespace Internal {
// SysRootInformationConfigWidget:
// --------------------------------------------------------------------------
-SysRootInformationConfigWidget::SysRootInformationConfigWidget(Profile *p, QWidget *parent) :
- ProfileConfigWidget(parent),
- m_profile(p)
+SysRootInformationConfigWidget::SysRootInformationConfigWidget(Kit *k, QWidget *parent) :
+ KitConfigWidget(parent),
+ m_kit(k)
{
setToolTip(tr("The root directory of the system image to use.<br>"
"Leave empty when building for the desktop."));
@@ -68,7 +68,7 @@ SysRootInformationConfigWidget::SysRootInformationConfigWidget(Profile *p, QWidg
layout->addWidget(m_chooser);
m_chooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);
- m_chooser->setFileName(SysRootProfileInformation::sysRoot(p));
+ m_chooser->setFileName(SysRootKitInformation::sysRoot(k));
connect(m_chooser, SIGNAL(changed(QString)), this, SIGNAL(dirty()));
}
@@ -80,17 +80,17 @@ QString SysRootInformationConfigWidget::displayName() const
void SysRootInformationConfigWidget::apply()
{
- SysRootProfileInformation::setSysRoot(m_profile, m_chooser->fileName());
+ SysRootKitInformation::setSysRoot(m_kit, m_chooser->fileName());
}
void SysRootInformationConfigWidget::discard()
{
- m_chooser->setFileName(SysRootProfileInformation::sysRoot(m_profile));
+ m_chooser->setFileName(SysRootKitInformation::sysRoot(m_kit));
}
bool SysRootInformationConfigWidget::isDirty() const
{
- return SysRootProfileInformation::sysRoot(m_profile) != m_chooser->fileName();
+ return SysRootKitInformation::sysRoot(m_kit) != m_chooser->fileName();
}
void SysRootInformationConfigWidget::makeReadOnly()
@@ -107,9 +107,9 @@ QWidget *SysRootInformationConfigWidget::buttonWidget() const
// ToolChainInformationConfigWidget:
// --------------------------------------------------------------------------
-ToolChainInformationConfigWidget::ToolChainInformationConfigWidget(Profile *p, QWidget *parent) :
- ProfileConfigWidget(parent),
- m_isReadOnly(false), m_profile(p),
+ToolChainInformationConfigWidget::ToolChainInformationConfigWidget(Kit *k, QWidget *parent) :
+ KitConfigWidget(parent),
+ m_isReadOnly(false), m_kit(k),
m_comboBox(new QComboBox), m_manageButton(new QPushButton(this))
{
setToolTip(tr("The compiler to use for building.<br>"
@@ -153,17 +153,17 @@ void ToolChainInformationConfigWidget::apply()
{
const QString id = m_comboBox->itemData(m_comboBox->currentIndex()).toString();
ToolChain *tc = ToolChainManager::instance()->findToolChain(id);
- ToolChainProfileInformation::setToolChain(m_profile, tc);
+ ToolChainKitInformation::setToolChain(m_kit, tc);
}
void ToolChainInformationConfigWidget::discard()
{
- m_comboBox->setCurrentIndex(indexOf(ToolChainProfileInformation::toolChain(m_profile)));
+ m_comboBox->setCurrentIndex(indexOf(ToolChainKitInformation::toolChain(m_kit)));
}
bool ToolChainInformationConfigWidget::isDirty() const
{
- ToolChain *tc = ToolChainProfileInformation::toolChain(m_profile);
+ ToolChain *tc = ToolChainKitInformation::toolChain(m_kit);
return (m_comboBox->itemData(m_comboBox->currentIndex()).toString())
== (tc ? tc->id() : QString());
}
@@ -235,9 +235,9 @@ int ToolChainInformationConfigWidget::indexOf(const ToolChain *tc)
// DeviceTypeInformationConfigWidget:
// --------------------------------------------------------------------------
-DeviceTypeInformationConfigWidget::DeviceTypeInformationConfigWidget(Profile *p, QWidget *parent) :
- ProfileConfigWidget(parent),
- m_isReadOnly(false), m_profile(p),
+DeviceTypeInformationConfigWidget::DeviceTypeInformationConfigWidget(Kit *k, QWidget *parent) :
+ KitConfigWidget(parent),
+ m_isReadOnly(false), m_kit(k),
m_comboBox(new QComboBox)
{
setToolTip(tr("The type of device to run applications on."));
@@ -269,12 +269,12 @@ void DeviceTypeInformationConfigWidget::apply()
Core::Id devType;
if (m_comboBox->currentIndex() >= 0)
devType = m_comboBox->itemData(m_comboBox->currentIndex()).value<Core::Id>();
- DeviceTypeProfileInformation::setDeviceTypeId(m_profile, devType);
+ DeviceTypeKitInformation::setDeviceTypeId(m_kit, devType);
}
void DeviceTypeInformationConfigWidget::discard()
{
- Core::Id devType = DeviceTypeProfileInformation::deviceTypeId(m_profile);
+ Core::Id devType = DeviceTypeKitInformation::deviceTypeId(m_kit);
if (!devType.isValid())
m_comboBox->setCurrentIndex(-1);
for (int i = 0; i < m_comboBox->count(); ++i) {
@@ -290,7 +290,7 @@ bool DeviceTypeInformationConfigWidget::isDirty() const
Core::Id devType;
if (m_comboBox->currentIndex() >= 0)
devType = m_comboBox->itemData(m_comboBox->currentIndex()).value<Core::Id>();
- return DeviceTypeProfileInformation::deviceTypeId(m_profile) != devType;
+ return DeviceTypeKitInformation::deviceTypeId(m_kit) != devType;
}
void DeviceTypeInformationConfigWidget::makeReadOnly()
@@ -302,9 +302,9 @@ void DeviceTypeInformationConfigWidget::makeReadOnly()
// DeviceInformationConfigWidget:
// --------------------------------------------------------------------------
-DeviceInformationConfigWidget::DeviceInformationConfigWidget(Profile *p, QWidget *parent) :
- ProfileConfigWidget(parent),
- m_isReadOnly(false), m_profile(p),
+DeviceInformationConfigWidget::DeviceInformationConfigWidget(Kit *k, QWidget *parent) :
+ KitConfigWidget(parent),
+ m_isReadOnly(false), m_kit(k),
m_comboBox(new QComboBox), m_manageButton(new QPushButton(this)),
m_model(new DeviceManagerModel(DeviceManager::instance()))
{
@@ -336,19 +336,19 @@ void DeviceInformationConfigWidget::apply()
{
int idx = m_comboBox->currentIndex();
if (idx >= 0)
- DeviceProfileInformation::setDeviceId(m_profile, m_model->deviceId(idx));
+ DeviceKitInformation::setDeviceId(m_kit, m_model->deviceId(idx));
else
- DeviceProfileInformation::setDeviceId(m_profile, IDevice::invalidId());
+ DeviceKitInformation::setDeviceId(m_kit, IDevice::invalidId());
}
void DeviceInformationConfigWidget::discard()
{
- m_comboBox->setCurrentIndex(m_model->indexOf(DeviceProfileInformation::device(m_profile)));
+ m_comboBox->setCurrentIndex(m_model->indexOf(DeviceKitInformation::device(m_kit)));
}
bool DeviceInformationConfigWidget::isDirty() const
{
- Core::Id devId = DeviceProfileInformation::deviceId(m_profile);
+ Core::Id devId = DeviceKitInformation::deviceId(m_kit);
return devId != m_model->deviceId(m_comboBox->currentIndex());
}
diff --git a/src/plugins/projectexplorer/profileinformationconfigwidget.h b/src/plugins/projectexplorer/kitinformationconfigwidget.h
index d1fe859e7a..f338b9be4c 100644
--- a/src/plugins/projectexplorer/profileinformationconfigwidget.h
+++ b/src/plugins/projectexplorer/kitinformationconfigwidget.h
@@ -28,10 +28,10 @@
**
**************************************************************************/
-#ifndef PROFILEINFORMATIONCONFIGWIDGET_H
-#define PROFILEINFORMATIONCONFIGWIDGET_H
+#ifndef KITINFORMATIONCONFIGWIDGET_H
+#define KITINFORMATIONCONFIGWIDGET_H
-#include "profileconfigwidget.h"
+#include "kitconfigwidget.h"
QT_BEGIN_NAMESPACE
class QComboBox;
@@ -43,7 +43,7 @@ namespace Utils { class PathChooser; }
namespace ProjectExplorer {
class DeviceManagerModel;
-class Profile;
+class Kit;
class ToolChain;
namespace Internal {
@@ -52,12 +52,12 @@ namespace Internal {
// SysRootInformationConfigWidget:
// --------------------------------------------------------------------------
-class SysRootInformationConfigWidget : public ProfileConfigWidget
+class SysRootInformationConfigWidget : public KitConfigWidget
{
Q_OBJECT
public:
- explicit SysRootInformationConfigWidget(Profile *p, QWidget *parent = 0);
+ explicit SysRootInformationConfigWidget(Kit *k, QWidget *parent = 0);
QString displayName() const;
void apply();
@@ -67,7 +67,7 @@ public:
QWidget *buttonWidget() const;
private:
- Profile *m_profile;
+ Kit *m_kit;
Utils::PathChooser *m_chooser;
};
@@ -75,12 +75,12 @@ private:
// ToolChainInformationConfigWidget:
// --------------------------------------------------------------------------
-class ToolChainInformationConfigWidget : public ProfileConfigWidget
+class ToolChainInformationConfigWidget : public KitConfigWidget
{
Q_OBJECT
public:
- explicit ToolChainInformationConfigWidget(Profile *p, QWidget *parent = 0);
+ explicit ToolChainInformationConfigWidget(Kit *k, QWidget *parent = 0);
QString displayName() const;
void apply();
@@ -100,7 +100,7 @@ private:
int indexOf(const ToolChain *tc);
bool m_isReadOnly;
- Profile *m_profile;
+ Kit *m_kit;
QComboBox *m_comboBox;
QPushButton *m_manageButton;
};
@@ -109,12 +109,12 @@ private:
// DeviceTypeInformationConfigWidget:
// --------------------------------------------------------------------------
-class DeviceTypeInformationConfigWidget : public ProfileConfigWidget
+class DeviceTypeInformationConfigWidget : public KitConfigWidget
{
Q_OBJECT
public:
- explicit DeviceTypeInformationConfigWidget(Profile *p, QWidget *parent = 0);
+ explicit DeviceTypeInformationConfigWidget(Kit *k, QWidget *parent = 0);
QString displayName() const;
void apply();
@@ -124,7 +124,7 @@ public:
private:
bool m_isReadOnly;
- Profile *m_profile;
+ Kit *m_kit;
QComboBox *m_comboBox;
};
@@ -132,12 +132,12 @@ private:
// DeviceInformationConfigWidget:
// --------------------------------------------------------------------------
-class DeviceInformationConfigWidget : public ProfileConfigWidget
+class DeviceInformationConfigWidget : public KitConfigWidget
{
Q_OBJECT
public:
- explicit DeviceInformationConfigWidget(Profile *p, QWidget *parent = 0);
+ explicit DeviceInformationConfigWidget(Kit *k, QWidget *parent = 0);
QString displayName() const;
void apply();
@@ -151,7 +151,7 @@ private slots:
private:
bool m_isReadOnly;
- Profile *m_profile;
+ Kit *m_kit;
QComboBox *m_comboBox;
QPushButton *m_manageButton;
DeviceManagerModel *m_model;
@@ -160,4 +160,4 @@ private:
} // namespace Internal
} // namespace ProjectExplorer
-#endif // PROFILEINFORMATIONCONFIGWIDGET_H
+#endif // KITINFORMATIONCONFIGWIDGET_H
diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp
new file mode 100644
index 0000000000..7c503690fd
--- /dev/null
+++ b/src/plugins/projectexplorer/kitmanager.cpp
@@ -0,0 +1,478 @@
+/**************************************************************************
+**
+** 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 "kitmanager.h"
+
+#include "kit.h"
+#include "kitconfigwidget.h"
+#include "kitinformation.h"
+#include "kitmanagerconfigwidget.h"
+#include "project.h"
+
+#include <coreplugin/icore.h>
+
+#include <extensionsystem/pluginmanager.h>
+
+#include <utils/persistentsettings.h>
+#include <utils/environment.h>
+
+#include <QCoreApplication>
+#include <QDir>
+#include <QSettings>
+
+#include <QFormLayout>
+#include <QLabel>
+
+static const char KIT_DATA_KEY[] = "Profile.";
+static const char KIT_COUNT_KEY[] = "Profile.Count";
+static const char KIT_FILE_VERSION_KEY[] = "Version";
+static const char KIT_DEFAULT_KEY[] = "Profile.Default";
+static const char KIT_FILENAME[] = "/qtcreator/profiles.xml";
+
+using Utils::PersistentSettingsWriter;
+using Utils::PersistentSettingsReader;
+
+static Utils::FileName settingsFileName()
+{
+ QFileInfo settingsLocation(ExtensionSystem::PluginManager::settings()->fileName());
+ return Utils::FileName::fromString(settingsLocation.absolutePath() + QLatin1String(KIT_FILENAME));
+}
+
+namespace ProjectExplorer {
+
+KitManager *KitManager::m_instance = 0;
+
+namespace Internal {
+
+// --------------------------------------------------------------------------
+// KitManagerPrivate:
+// --------------------------------------------------------------------------
+
+class KitManagerPrivate
+{
+public:
+ KitManagerPrivate();
+ ~KitManagerPrivate();
+ QList<Task> validateKit(Kit *k) const;
+
+ Kit *m_defaultKit;
+ bool m_initialized;
+ QList<KitInformation *> m_informationList;
+ QList<Kit *> m_kitList;
+ Utils::PersistentSettingsWriter *m_writer;
+};
+
+KitManagerPrivate::KitManagerPrivate()
+ : m_defaultKit(0), m_initialized(false),
+ m_writer(new Utils::PersistentSettingsWriter(settingsFileName(), QLatin1String("QtCreatorProfiles")))
+{ }
+
+KitManagerPrivate::~KitManagerPrivate()
+{
+ qDeleteAll(m_informationList);
+ qDeleteAll(m_kitList);
+ delete m_writer;
+}
+
+QList<Task> KitManagerPrivate::validateKit(Kit *k) const
+{
+ Q_ASSERT(k);
+ QList<Task> result;
+ bool hasError = false;
+ foreach (KitInformation *ki, m_informationList) {
+ QList<Task> tmp = ki->validate(k);
+ foreach (const Task &t, tmp)
+ if (t.type == Task::Error)
+ hasError = true;
+ result << tmp;
+ }
+ k->setValid(!hasError);
+ return result;
+}
+
+} // namespace Internal
+
+// --------------------------------------------------------------------------
+// KitManager:
+// --------------------------------------------------------------------------
+
+KitManager *KitManager::instance()
+{
+ return m_instance;
+}
+
+KitManager::KitManager(QObject *parent) :
+ QObject(parent),
+ d(new Internal::KitManagerPrivate())
+{
+ Q_ASSERT(!m_instance);
+ m_instance = this;
+
+ connect(Core::ICore::instance(), SIGNAL(saveSettingsRequested()),
+ this, SLOT(saveKits()));
+
+ connect(this, SIGNAL(kitAdded(ProjectExplorer::Kit*)),
+ this, SIGNAL(kitsChanged()));
+ connect(this, SIGNAL(kitRemoved(ProjectExplorer::Kit*)),
+ this, SIGNAL(kitsChanged()));
+ connect(this, SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SIGNAL(kitsChanged()));
+}
+
+void KitManager::restoreKits()
+{
+ QList<Kit *> kitsToRegister;
+ QList<Kit *> kitsToCheck;
+
+ // read all kits from SDK
+ QFileInfo systemSettingsFile(Core::ICore::settings(QSettings::SystemScope)->fileName());
+ KitList system = restoreKits(Utils::FileName::fromString(systemSettingsFile.absolutePath() + QLatin1String(KIT_FILENAME)));
+ QList<Kit *> readKits = system.kits;
+ // make sure we mark these as autodetected!
+ foreach (Kit *p, readKits)
+ p->setAutoDetected(true);
+
+ kitsToRegister = readKits; // SDK kits are always considered to be up-to-date, so no need to
+ // recheck them.
+
+ // read all kit chains from user file
+ KitList userKits = restoreKits(settingsFileName());
+ readKits = userKits.kits;
+
+ foreach (Kit *p, readKits) {
+ if (p->isAutoDetected())
+ kitsToCheck.append(p);
+ else
+ kitsToRegister.append(p);
+ }
+ readKits.clear();
+
+ // Then auto create kits:
+ QList<Kit *> detectedKits;
+
+ // Find/update autodetected kits:
+ Kit *toStore = 0;
+ foreach (Kit *currentDetected, detectedKits) {
+ toStore = currentDetected;
+
+ // Check whether we had this kit stored and prefer the old one with the old id:
+ for (int i = 0; i < kitsToCheck.count(); ++i) {
+ if (*(kitsToCheck.at(i)) == *currentDetected) {
+ toStore = kitsToCheck.at(i);
+ kitsToCheck.removeAt(i);
+ delete currentDetected;
+ break;
+ }
+ }
+ addKit(toStore);
+ }
+
+ // Delete all loaded autodetected kits that were not rediscovered:
+ qDeleteAll(kitsToCheck);
+
+ // Store manual kits
+ foreach (Kit *p, kitsToRegister)
+ addKit(p);
+
+ if (kits().isEmpty()) {
+ Kit *defaultKit = new Kit; // One kit using default values
+ defaultKit->setDisplayName(tr("Desktop"));
+ defaultKit->setAutoDetected(false);
+ defaultKit->setIconPath(QLatin1String(":///DESKTOP///"));
+
+ addKit(defaultKit);
+ }
+
+ Kit *p = find(userKits.defaultKit);
+ if (p)
+ setDefaultKit(p);
+}
+
+KitManager::~KitManager()
+{
+ // Clean out kit information to avoid calling them during deregistration:
+ delete d;
+ m_instance = 0;
+}
+
+void KitManager::saveKits()
+{
+ if (!d->m_initialized) // ignore save requests while we are not initialized.
+ return;
+
+ QVariantMap data;
+ data.insert(QLatin1String(KIT_FILE_VERSION_KEY), 1);
+
+ int count = 0;
+ foreach (Kit *p, kits()) {
+ QVariantMap tmp = p->toMap();
+ if (tmp.isEmpty())
+ continue;
+ data.insert(QString::fromLatin1(KIT_DATA_KEY) + QString::number(count), tmp);
+ ++count;
+ }
+ data.insert(QLatin1String(KIT_COUNT_KEY), count);
+ data.insert(QLatin1String(KIT_DEFAULT_KEY),
+ d->m_defaultKit ? QString::fromLatin1(d->m_defaultKit->id().name()) : QString());
+ d->m_writer->save(data, Core::ICore::mainWindow());
+}
+
+bool greaterPriority(KitInformation *a, KitInformation *b)
+{
+ return a->priority() > b->priority();
+}
+
+void KitManager::registerKitInformation(KitInformation *ki)
+{
+ QList<KitInformation *>::iterator it
+ = qLowerBound(d->m_informationList.begin(), d->m_informationList.end(), ki, greaterPriority);
+ d->m_informationList.insert(it, ki);
+
+ connect(ki, SIGNAL(validationNeeded()), this, SLOT(validateKits()));
+
+ if (!d->m_initialized)
+ return;
+
+ foreach (Kit *p, kits()) {
+ if (!p->hasValue(ki->dataId()))
+ p->setValue(ki->dataId(), ki->defaultValue(p));
+ }
+
+ return;
+}
+
+void KitManager::deregisterKitInformation(KitInformation *ki)
+{
+ Q_ASSERT(d->m_informationList.contains(ki));
+ d->m_informationList.removeAll(ki);
+ delete ki;
+}
+
+KitManager::KitList KitManager::restoreKits(const Utils::FileName &fileName)
+{
+ KitList result;
+
+ PersistentSettingsReader reader;
+ if (!reader.load(fileName))
+ return result;
+ QVariantMap data = reader.restoreValues();
+
+ // Check version:
+ int version = data.value(QLatin1String(KIT_FILE_VERSION_KEY), 0).toInt();
+ if (version < 1)
+ return result;
+
+ const int count = data.value(QLatin1String(KIT_COUNT_KEY), 0).toInt();
+ for (int i = 0; i < count; ++i) {
+ const QString key = QString::fromLatin1(KIT_DATA_KEY) + QString::number(i);
+ if (!data.contains(key))
+ break;
+
+ const QVariantMap stMap = data.value(key).toMap();
+
+ Kit *p = new Kit;
+ if (p->fromMap(stMap)) {
+ result.kits.append(p);
+ } else {
+ delete p;
+ qWarning("Warning: Unable to restore kits stored in %s at position %d.",
+ qPrintable(fileName.toUserOutput()), i);
+ }
+ }
+ const QString defaultId = data.value(QLatin1String(KIT_DEFAULT_KEY)).toString();
+ if (defaultId.isEmpty())
+ return result;
+
+ const Core::Id id = Core::Id(defaultId);
+ foreach (Kit *i, result.kits) {
+ if (i->id() == id) {
+ result.defaultKit = id;
+ break;
+ }
+ }
+ return result;
+}
+
+QList<Kit *> KitManager::kits(const KitMatcher *m) const
+{
+ if (!d->m_initialized) {
+ d->m_initialized = true;
+ const_cast<KitManager *>(this)->restoreKits();
+ }
+
+ QList<Kit *> result;
+ foreach (Kit *p, d->m_kitList) {
+ if (!m || m->matches(p))
+ result.append(p);
+ }
+ return result;
+}
+
+Kit *KitManager::find(const Core::Id &id) const
+{
+ if (!id.isValid())
+ return 0;
+
+ foreach (Kit *p, kits()) {
+ if (p->id() == id)
+ return p;
+ }
+ return 0;
+}
+
+Kit *KitManager::find(const KitMatcher *m) const
+{
+ QList<Kit *> matched = kits(m);
+ return matched.isEmpty() ? 0 : matched.first();
+}
+
+Kit *KitManager::defaultKit()
+{
+ if (!d->m_initialized) {
+ d->m_initialized = true;
+ restoreKits();
+ }
+ return d->m_defaultKit;
+}
+
+QList<KitInformation *> KitManager::kitInformation() const
+{
+ return d->m_informationList;
+}
+
+KitConfigWidget *KitManager::createConfigWidget(Kit *k) const
+{
+ if (!k)
+ return 0;
+
+ Internal::KitManagerConfigWidget *result = new Internal::KitManagerConfigWidget(k);
+ foreach (KitInformation *ki, d->m_informationList)
+ result->addConfigWidget(ki->createConfigWidget(k));
+
+ return result;
+}
+
+void KitManager::notifyAboutUpdate(ProjectExplorer::Kit *p)
+{
+ if (!p || !kits().contains(p))
+ return;
+ d->validateKit(p);
+ emit kitUpdated(p);
+}
+
+bool KitManager::registerKit(ProjectExplorer::Kit *k)
+{
+ if (!k)
+ return true;
+ foreach (Kit *current, kits()) {
+ if (k == current)
+ return false;
+ }
+
+ // make sure we have all the information in our kits:
+ foreach (KitInformation *ki, d->m_informationList) {
+ if (!k->hasValue(ki->dataId()))
+ k->setValue(ki->dataId(), ki->defaultValue(k));
+ }
+
+ addKit(k);
+ emit kitAdded(k);
+ return true;
+}
+
+void KitManager::deregisterKit(Kit *k)
+{
+ if (!k || !kits().contains(k))
+ return;
+ d->m_kitList.removeOne(k);
+ if (d->m_defaultKit == k) {
+ QList<Kit *> stList = kits();
+ Kit *newDefault = 0;
+ foreach (Kit *cur, stList) {
+ if (cur->isValid()) {
+ newDefault = cur;
+ break;
+ }
+ }
+ setDefaultKit(newDefault);
+ }
+ emit kitRemoved(k);
+ delete k;
+}
+
+QList<Task> KitManager::validateKit(Kit *k)
+{
+ QList<Task> result = d->validateKit(k);
+ qSort(result);
+ return result;
+}
+
+void KitManager::setDefaultKit(Kit *k)
+{
+ if (d->m_defaultKit == k)
+ return;
+ if (k && !kits().contains(k))
+ return;
+ d->m_defaultKit = k;
+ emit defaultkitChanged();
+}
+
+void KitManager::validateKits()
+{
+ foreach (Kit *p, kits())
+ d->validateKit(p);
+}
+
+void KitManager::addKit(Kit *k)
+{
+ if (!k)
+ return;
+ k->setDisplayName(k->displayName()); // make name unique
+ d->validateKit(k);
+ d->m_kitList.append(k);
+ if (!d->m_defaultKit ||
+ (!d->m_defaultKit->isValid() && k->isValid()))
+ setDefaultKit(k);
+}
+
+
+void KitInformation::addToEnvironment(const Kit *k, Utils::Environment &env) const
+{
+ Q_UNUSED(k);
+ Q_UNUSED(env);
+}
+
+QString KitInformation::displayNamePostfix(const Kit *k) const
+{
+ Q_UNUSED(k);
+ return QString();
+}
+
+} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/kitmanager.h b/src/plugins/projectexplorer/kitmanager.h
new file mode 100644
index 0000000000..4756535a23
--- /dev/null
+++ b/src/plugins/projectexplorer/kitmanager.h
@@ -0,0 +1,171 @@
+/**************************************************************************
+**
+** 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 KITMANAGER_H
+#define KITMANAGER_H
+
+#include "projectexplorer_export.h"
+
+#include "task.h"
+
+#include <coreplugin/id.h>
+#include <utils/fileutils.h>
+
+#include <QObject>
+#include <QPair>
+
+namespace Utils { class Environment; }
+
+namespace ProjectExplorer {
+class Kit;
+class KitConfigWidget;
+
+namespace Internal {
+class KitManagerPrivate;
+class KitModel;
+} // namespace Internal
+
+/**
+ * @brief The KitInformation class
+ *
+ * One piece of information stored in the kit.
+ *
+ * This needs to get registered with the \a KitManager.
+ */
+class PROJECTEXPLORER_EXPORT KitInformation : public QObject
+{
+ Q_OBJECT
+
+public:
+ typedef QPair<QString, QString> Item;
+ typedef QList<Item> ItemList;
+
+ virtual Core::Id dataId() const = 0;
+
+ virtual unsigned int priority() const = 0; // the higher the closer to the top.
+
+ virtual bool visibleIn(Kit *) { return true; }
+ virtual QVariant defaultValue(Kit *) const = 0;
+
+ virtual QList<Task> validate(Kit *) const = 0;
+
+ virtual ItemList toUserOutput(Kit *) const = 0;
+
+ virtual KitConfigWidget *createConfigWidget(Kit *) const = 0;
+
+ virtual void addToEnvironment(const Kit *k, Utils::Environment &env) const;
+
+ virtual QString displayNamePostfix(const Kit *k) const;
+
+signals:
+ void validationNeeded();
+};
+
+class PROJECTEXPLORER_EXPORT KitMatcher
+{
+public:
+ virtual ~KitMatcher() { }
+ virtual bool matches(const Kit *k) const = 0;
+};
+
+class PROJECTEXPLORER_EXPORT KitManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ static KitManager *instance();
+ ~KitManager();
+
+ QList<Kit *> kits(const KitMatcher *m = 0) const;
+ Kit *find(const Core::Id &id) const;
+ Kit *find(const KitMatcher *m) const;
+ Kit *defaultKit();
+
+ QList<KitInformation *> kitInformation() const;
+
+ KitConfigWidget *createConfigWidget(Kit *k) const;
+
+public slots:
+ bool registerKit(ProjectExplorer::Kit *k);
+ void deregisterKit(ProjectExplorer::Kit *k);
+ QList<Task> validateKit(ProjectExplorer::Kit *k);
+ void setDefaultKit(ProjectExplorer::Kit *k);
+
+ void saveKits();
+
+ void registerKitInformation(ProjectExplorer::KitInformation *ki);
+ void deregisterKitInformation(ProjectExplorer::KitInformation *ki);
+
+signals:
+ void kitAdded(ProjectExplorer::Kit *);
+ // Kit is still valid when this call happens!
+ void kitRemoved(ProjectExplorer::Kit *);
+ // Kit was updated.
+ void kitUpdated(ProjectExplorer::Kit *);
+ // Default kit was changed.
+ void defaultkitChanged();
+ // Something changed.
+ void kitsChanged();
+
+private slots:
+ void validateKits();
+
+private:
+ explicit KitManager(QObject *parent = 0);
+
+ // Make sure the this is only called after all
+ // KitInformation are registered!
+ void restoreKits();
+ class KitList
+ {
+ public:
+ KitList()
+ { }
+ Core::Id defaultKit;
+ QList<Kit *> kits;
+ };
+ KitList restoreKits(const Utils::FileName &fileName);
+
+ void notifyAboutUpdate(ProjectExplorer::Kit *p);
+ void addKit(Kit *k);
+
+ Internal::KitManagerPrivate *const d;
+
+ static KitManager *m_instance;
+
+ friend class Internal::KitManagerPrivate; // for the restoreToolChains methods
+ friend class ProjectExplorerPlugin; // for constructor
+ friend class Kit;
+ friend class Internal::KitModel;
+};
+
+} // namespace ProjectExplorer
+
+#endif // KITMANAGER_H
diff --git a/src/plugins/projectexplorer/profilemanagerconfigwidget.cpp b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
index abf9dfb35d..452127be96 100644
--- a/src/plugins/projectexplorer/profilemanagerconfigwidget.cpp
+++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
@@ -28,9 +28,9 @@
**
**************************************************************************/
-#include "profilemanagerconfigwidget.h"
+#include "kitmanagerconfigwidget.h"
-#include "profile.h"
+#include "kit.h"
#include <utils/detailswidget.h>
@@ -46,11 +46,11 @@
namespace ProjectExplorer {
namespace Internal {
-ProfileManagerConfigWidget::ProfileManagerConfigWidget(Profile *p, QWidget *parent) :
- ProfileConfigWidget(parent),
+KitManagerConfigWidget::KitManagerConfigWidget(Kit *k, QWidget *parent) :
+ KitConfigWidget(parent),
m_layout(new QGridLayout),
m_iconButton(new QToolButton),
- m_profile(p)
+ m_kit(k)
{
m_layout->setMargin(0);
m_layout->setSpacing(6);
@@ -88,35 +88,35 @@ ProfileManagerConfigWidget::ProfileManagerConfigWidget(Profile *p, QWidget *pare
connect(m_iconButton, SIGNAL(clicked()), this, SLOT(setIcon()));
}
-QString ProfileManagerConfigWidget::displayName() const
+QString KitManagerConfigWidget::displayName() const
{
- return tr("Targets");
+ return tr("Kits");
}
-void ProfileManagerConfigWidget::apply()
+void KitManagerConfigWidget::apply()
{
- foreach (ProfileConfigWidget *w, m_widgets)
+ foreach (KitConfigWidget *w, m_widgets)
w->apply();
- m_profile->setIconPath(m_iconPath);
+ m_kit->setIconPath(m_iconPath);
}
-void ProfileManagerConfigWidget::discard()
+void KitManagerConfigWidget::discard()
{
- foreach (ProfileConfigWidget *w, m_widgets)
+ foreach (KitConfigWidget *w, m_widgets)
w->discard();
- m_iconButton->setIcon(m_profile->icon());
- m_iconPath = m_profile->iconPath();
+ m_iconButton->setIcon(m_kit->icon());
+ m_iconPath = m_kit->iconPath();
}
-bool ProfileManagerConfigWidget::isDirty() const
+bool KitManagerConfigWidget::isDirty() const
{
- foreach (ProfileConfigWidget *w, m_widgets)
+ foreach (KitConfigWidget *w, m_widgets)
if (w->isDirty())
return true;
- return m_profile->iconPath() != m_iconPath;
+ return m_kit->iconPath() != m_iconPath;
}
-void ProfileManagerConfigWidget::addConfigWidget(ProjectExplorer::ProfileConfigWidget *widget)
+void KitManagerConfigWidget::addConfigWidget(ProjectExplorer::KitConfigWidget *widget)
{
Q_ASSERT(widget);
Q_ASSERT(!m_widgets.contains(widget));
@@ -138,14 +138,14 @@ void ProfileManagerConfigWidget::addConfigWidget(ProjectExplorer::ProfileConfigW
m_widgets.append(widget);
}
-void ProfileManagerConfigWidget::makeReadOnly()
+void KitManagerConfigWidget::makeReadOnly()
{
- foreach (ProfileConfigWidget *w, m_widgets)
+ foreach (KitConfigWidget *w, m_widgets)
w->makeReadOnly();
m_iconButton->setEnabled(false);
}
-void ProfileManagerConfigWidget::setIcon()
+void KitManagerConfigWidget::setIcon()
{
const QString path = QFileDialog::getOpenFileName(0, tr("Select Icon"), m_iconPath, tr("Images (*.png *.xpm *.jpg)"));
if (path.isEmpty())
diff --git a/src/plugins/projectexplorer/profilemanagerconfigwidget.h b/src/plugins/projectexplorer/kitmanagerconfigwidget.h
index 62bacb26f5..afcf9b18e7 100644
--- a/src/plugins/projectexplorer/profilemanagerconfigwidget.h
+++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.h
@@ -28,10 +28,10 @@
**
**************************************************************************/
-#ifndef PROFILEMANAGERWIDGET_H
-#define PROFILEMANAGERWIDGET_H
+#ifndef KITMANAGERWIDGET_H
+#define KITMANAGERWIDGET_H
-#include "profileconfigwidget.h"
+#include "kitconfigwidget.h"
QT_BEGIN_NAMESPACE
class QHBoxLayout;
@@ -40,23 +40,23 @@ class QToolButton;
QT_END_NAMESPACE
namespace ProjectExplorer {
-class Profile;
+class Kit;
namespace Internal {
-class ProfileManagerConfigWidget : public ProjectExplorer::ProfileConfigWidget
+class KitManagerConfigWidget : public ProjectExplorer::KitConfigWidget
{
Q_OBJECT
public:
- explicit ProfileManagerConfigWidget(Profile *p, QWidget *parent = 0);
+ explicit KitManagerConfigWidget(Kit *k, QWidget *parent = 0);
QString displayName() const;
void apply();
void discard();
bool isDirty() const;
- void addConfigWidget(ProjectExplorer::ProfileConfigWidget *widget);
+ void addConfigWidget(ProjectExplorer::KitConfigWidget *widget);
void makeReadOnly();
private slots:
@@ -65,12 +65,12 @@ private slots:
private:
QGridLayout *m_layout;
QToolButton *m_iconButton;
- QList<ProfileConfigWidget *> m_widgets;
- Profile *m_profile;
+ QList<KitConfigWidget *> m_widgets;
+ Kit *m_kit;
QString m_iconPath;
};
} // namespace Internal
} // namespace ProjectExplorer
-#endif // PROFILEMANAGERCONFIGWIDGET_H
+#endif // KITMANAGERWIDGET_H
diff --git a/src/plugins/projectexplorer/profilemodel.cpp b/src/plugins/projectexplorer/kitmodel.cpp
index 3b7b499187..337ae9a72d 100644
--- a/src/plugins/projectexplorer/profilemodel.cpp
+++ b/src/plugins/projectexplorer/kitmodel.cpp
@@ -28,11 +28,11 @@
**
**************************************************************************/
-#include "profilemodel.h"
+#include "kitmodel.h"
-#include "profile.h"
-#include "profileconfigwidget.h"
-#include "profilemanager.h"
+#include "kit.h"
+#include "kitconfigwidget.h"
+#include "kitmanager.h"
#include <utils/qtcassert.h>
@@ -43,128 +43,128 @@
namespace ProjectExplorer {
namespace Internal {
-class ProfileNode
+class KitNode
{
public:
- explicit ProfileNode(ProfileNode *pn, Profile *p = 0, bool c = false) :
- parent(pn), profile(p), changed(c)
+ explicit KitNode(KitNode *pn, Kit *k = 0, bool c = false) :
+ parent(pn), kit(k), changed(c)
{
if (pn)
pn->childNodes.append(this);
- widget = ProfileManager::instance()->createConfigWidget(p);
+ widget = KitManager::instance()->createConfigWidget(k);
if (widget) {
- if (p && p->isAutoDetected())
+ if (k && k->isAutoDetected())
widget->makeReadOnly();
widget->setVisible(false);
}
}
- ~ProfileNode()
+ ~KitNode()
{
if (parent)
parent->childNodes.removeOne(this);
// deleting a child removes it from childNodes
// so operate on a temporary list
- QList<ProfileNode *> tmp = childNodes;
+ QList<KitNode *> tmp = childNodes;
qDeleteAll(tmp);
Q_ASSERT(childNodes.isEmpty());
}
- ProfileNode *parent;
+ KitNode *parent;
QString newName;
- QList<ProfileNode *> childNodes;
- Profile *profile;
- ProfileConfigWidget *widget;
+ QList<KitNode *> childNodes;
+ Kit *kit;
+ KitConfigWidget *widget;
bool changed;
};
// --------------------------------------------------------------------------
-// ProfileModel
+// KitModel
// --------------------------------------------------------------------------
-ProfileModel::ProfileModel(QBoxLayout *parentLayout, QObject *parent) :
+KitModel::KitModel(QBoxLayout *parentLayout, QObject *parent) :
QAbstractItemModel(parent),
m_parentLayout(parentLayout),
m_defaultNode(0)
{
Q_ASSERT(m_parentLayout);
- connect(ProfileManager::instance(), SIGNAL(profileAdded(ProjectExplorer::Profile*)),
- this, SLOT(addProfile(ProjectExplorer::Profile*)));
- connect(ProfileManager::instance(), SIGNAL(profileRemoved(ProjectExplorer::Profile*)),
- this, SLOT(removeProfile(ProjectExplorer::Profile*)));
- connect(ProfileManager::instance(), SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(updateProfile(ProjectExplorer::Profile*)));
- connect(ProfileManager::instance(), SIGNAL(defaultProfileChanged()),
- this, SLOT(changeDefaultProfile()));
+ connect(KitManager::instance(), SIGNAL(kitAdded(ProjectExplorer::Kit*)),
+ this, SLOT(addKit(ProjectExplorer::Kit*)));
+ connect(KitManager::instance(), SIGNAL(kitRemoved(ProjectExplorer::Kit*)),
+ this, SLOT(removeKit(ProjectExplorer::Kit*)));
+ connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(updateKit(ProjectExplorer::Kit*)));
+ connect(KitManager::instance(), SIGNAL(defaultkitChanged()),
+ this, SLOT(changeDefaultKit()));
- m_root = new ProfileNode(0);
- m_autoRoot = new ProfileNode(m_root);
- m_manualRoot = new ProfileNode(m_root);
+ m_root = new KitNode(0);
+ m_autoRoot = new KitNode(m_root);
+ m_manualRoot = new KitNode(m_root);
- foreach (Profile *p, ProfileManager::instance()->profiles())
- addProfile(p);
+ foreach (Kit *k, KitManager::instance()->kits())
+ addKit(k);
- changeDefaultProfile();
+ changeDefaultKit();
}
-ProfileModel::~ProfileModel()
+KitModel::~KitModel()
{
delete m_root;
}
-QModelIndex ProfileModel::index(int row, int column, const QModelIndex &parent) const
+QModelIndex KitModel::index(int row, int column, const QModelIndex &parent) const
{
if (!parent.isValid()) {
if (row >= 0 && row < m_root->childNodes.count())
return createIndex(row, column, m_root->childNodes.at(row));
}
- ProfileNode *node = static_cast<ProfileNode *>(parent.internalPointer());
+ KitNode *node = static_cast<KitNode *>(parent.internalPointer());
if (row < node->childNodes.count() && column == 0)
return createIndex(row, column, node->childNodes.at(row));
else
return QModelIndex();
}
-QModelIndex ProfileModel::parent(const QModelIndex &idx) const
+QModelIndex KitModel::parent(const QModelIndex &idx) const
{
if (!idx.isValid())
return QModelIndex();
- ProfileNode *node = static_cast<ProfileNode *>(idx.internalPointer());
+ KitNode *node = static_cast<KitNode *>(idx.internalPointer());
if (node->parent == m_root)
return QModelIndex();
return index(node->parent);
}
-int ProfileModel::rowCount(const QModelIndex &parent) const
+int KitModel::rowCount(const QModelIndex &parent) const
{
if (!parent.isValid())
return m_root->childNodes.count();
- ProfileNode *node = static_cast<ProfileNode *>(parent.internalPointer());
+ KitNode *node = static_cast<KitNode *>(parent.internalPointer());
return node->childNodes.count();
}
-int ProfileModel::columnCount(const QModelIndex &parent) const
+int KitModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
return 1;
}
-QVariant ProfileModel::data(const QModelIndex &index, int role) const
+QVariant KitModel::data(const QModelIndex &index, int role) const
{
static QIcon warningIcon(":/projectexplorer/images/compile_warning.png");
if (!index.isValid() || index.column() != 0)
return QVariant();
- ProfileNode *node = static_cast<ProfileNode *>(index.internalPointer());
+ KitNode *node = static_cast<KitNode *>(index.internalPointer());
QTC_ASSERT(node, return QVariant());
if (node == m_autoRoot && role == Qt::DisplayRole)
return tr("Auto-detected");
if (node == m_manualRoot && role == Qt::DisplayRole)
return tr("Manual");
- if (node->profile) {
+ if (node->kit) {
if (role == Qt::FontRole) {
QFont f = QApplication::font();
if (node->changed)
@@ -173,54 +173,54 @@ QVariant ProfileModel::data(const QModelIndex &index, int role) const
f.setItalic(f.style() != QFont::StyleItalic);
return f;
} else if (role == Qt::DisplayRole) {
- QString baseName = node->newName.isEmpty() ? node->profile->displayName() : node->newName;
+ QString baseName = node->newName.isEmpty() ? node->kit->displayName() : node->newName;
if (node == m_defaultNode)
- //: Mark up a profile as the default one.
+ //: Mark up a kit as the default one.
baseName = tr("%1 (default)").arg(baseName);
return baseName;
} else if (role == Qt::EditRole) {
- return node->newName.isEmpty() ? node->profile->displayName() : node->newName;
+ return node->newName.isEmpty() ? node->kit->displayName() : node->newName;
} else if (role == Qt::DecorationRole) {
- return node->profile->isValid() ? QIcon() : warningIcon;
+ return node->kit->isValid() ? QIcon() : warningIcon;
} else if (role == Qt::ToolTipRole) {
- return node->profile->toHtml();
+ return node->kit->toHtml();
}
}
return QVariant();
}
-bool ProfileModel::setData(const QModelIndex &index, const QVariant &value, int role)
+bool KitModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if (!index.isValid())
return false;
- ProfileNode *node = static_cast<ProfileNode *>(index.internalPointer());
+ KitNode *node = static_cast<KitNode *>(index.internalPointer());
Q_ASSERT(node);
- if (index.column() != 0 || !node->profile || role != Qt::EditRole)
+ if (index.column() != 0 || !node->kit || role != Qt::EditRole)
return false;
node->newName = value.toString();
- if (!node->newName.isEmpty() && node->newName != node->profile->displayName())
+ if (!node->newName.isEmpty() && node->newName != node->kit->displayName())
node->changed = true;
return true;
}
-Qt::ItemFlags ProfileModel::flags(const QModelIndex &index) const
+Qt::ItemFlags KitModel::flags(const QModelIndex &index) const
{
if (!index.isValid())
return 0;
- ProfileNode *node = static_cast<ProfileNode *>(index.internalPointer());
+ KitNode *node = static_cast<KitNode *>(index.internalPointer());
Q_ASSERT(node);
- if (!node->profile)
+ if (!node->kit)
return Qt::ItemIsEnabled;
- if (node->profile->isAutoDetected())
+ if (node->kit->isAutoDetected())
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
}
-QVariant ProfileModel::headerData(int section, Qt::Orientation orientation, int role) const
+QVariant KitModel::headerData(int section, Qt::Orientation orientation, int role) const
{
Q_UNUSED(section);
if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
@@ -228,64 +228,64 @@ QVariant ProfileModel::headerData(int section, Qt::Orientation orientation, int
return QVariant();
}
-Profile *ProfileModel::profile(const QModelIndex &index)
+Kit *KitModel::kit(const QModelIndex &index)
{
if (!index.isValid())
return 0;
- ProfileNode *node = static_cast<ProfileNode *>(index.internalPointer());
+ KitNode *node = static_cast<KitNode *>(index.internalPointer());
Q_ASSERT(node);
- return node->profile;
+ return node->kit;
}
-QModelIndex ProfileModel::indexOf(Profile *p) const
+QModelIndex KitModel::indexOf(Kit *k) const
{
- ProfileNode *n = find(p);
+ KitNode *n = find(k);
return n ? index(n) : QModelIndex();
}
-void ProfileModel::setDefaultProfile(const QModelIndex &index)
+void KitModel::setDefaultKit(const QModelIndex &index)
{
if (!index.isValid())
return;
- ProfileNode *node = static_cast<ProfileNode *>(index.internalPointer());
+ KitNode *node = static_cast<KitNode *>(index.internalPointer());
Q_ASSERT(node);
- if (node->profile)
+ if (node->kit)
setDefaultNode(node);
}
-bool ProfileModel::isDefaultProfile(const QModelIndex &index)
+bool KitModel::isDefaultKit(const QModelIndex &index)
{
- return m_defaultNode == static_cast<ProfileNode *>(index.internalPointer());
+ return m_defaultNode == static_cast<KitNode *>(index.internalPointer());
}
-ProfileConfigWidget *ProfileModel::widget(const QModelIndex &index)
+KitConfigWidget *KitModel::widget(const QModelIndex &index)
{
if (!index.isValid())
return 0;
- ProfileNode *node = static_cast<ProfileNode *>(index.internalPointer());
+ KitNode *node = static_cast<KitNode *>(index.internalPointer());
Q_ASSERT(node);
return node->widget;
}
-bool ProfileModel::isDirty() const
+bool KitModel::isDirty() const
{
- foreach (ProfileNode *n, m_manualRoot->childNodes) {
+ foreach (KitNode *n, m_manualRoot->childNodes) {
if (n->changed)
return true;
}
return false;
}
-bool ProfileModel::isDirty(Profile *p) const
+bool KitModel::isDirty(Kit *k) const
{
- ProfileNode *n = find(p);
+ KitNode *n = find(k);
return n ? !n->changed : false;
}
-void ProfileModel::setDirty()
+void KitModel::setDirty()
{
- ProfileConfigWidget *w = qobject_cast<ProfileConfigWidget *>(sender());
- foreach (ProfileNode *n, m_manualRoot->childNodes) {
+ KitConfigWidget *w = qobject_cast<KitConfigWidget *>(sender());
+ foreach (KitNode *n, m_manualRoot->childNodes) {
if (n->widget == w) {
n->changed = true;
emit dataChanged(index(n, 0), index(n, columnCount(QModelIndex())));
@@ -293,76 +293,76 @@ void ProfileModel::setDirty()
}
}
-void ProfileModel::apply()
+void KitModel::apply()
{
- // Remove unused profiles:
- QList<ProfileNode *> nodes = m_toRemoveList;
- foreach (ProfileNode *n, nodes) {
+ // Remove unused kits:
+ QList<KitNode *> nodes = m_toRemoveList;
+ foreach (KitNode *n, nodes) {
Q_ASSERT(!n->parent);
- ProfileManager::instance()->deregisterProfile(n->profile);
+ KitManager::instance()->deregisterKit(n->kit);
}
Q_ASSERT(m_toRemoveList.isEmpty());
- // Update profiles:
- foreach (ProfileNode *n, m_manualRoot->childNodes) {
+ // Update kits:
+ foreach (KitNode *n, m_manualRoot->childNodes) {
Q_ASSERT(n);
- Q_ASSERT(n->profile);
+ Q_ASSERT(n->kit);
if (n->changed) {
- ProfileManager::instance()->blockSignals(true);
+ KitManager::instance()->blockSignals(true);
if (!n->newName.isEmpty()) {
- n->profile->setDisplayName(n->newName);
+ n->kit->setDisplayName(n->newName);
n->newName.clear();
}
if (n->widget)
n->widget->apply();
n->changed = false;
- ProfileManager::instance()->blockSignals(false);
- ProfileManager::instance()->notifyAboutUpdate(n->profile);
+ KitManager::instance()->blockSignals(false);
+ KitManager::instance()->notifyAboutUpdate(n->kit);
emit dataChanged(index(n, 0), index(n, columnCount(QModelIndex())));
}
}
- // Add new (and already updated) profiles
+ // Add new (and already updated) kits
QStringList removedSts;
nodes = m_toAddList;
- foreach (ProfileNode *n, nodes) {
- if (!ProfileManager::instance()->registerProfile(n->profile))
- removedSts << n->profile->displayName();
+ foreach (KitNode *n, nodes) {
+ if (!KitManager::instance()->registerKit(n->kit))
+ removedSts << n->kit->displayName();
}
- foreach (ProfileNode *n, m_toAddList)
- markForRemoval(n->profile);
+ foreach (KitNode *n, m_toAddList)
+ markForRemoval(n->kit);
if (removedSts.count() == 1) {
QMessageBox::warning(0,
- tr("Duplicate Target Detected"),
- tr("The target<br>&nbsp;%1<br>"
+ tr("Duplicate Kit Detected"),
+ tr("The kit<br>&nbsp;%1<br>"
" was already configured. It was not configured again.")
.arg(removedSts.at(0)));
} else if (!removedSts.isEmpty()) {
QMessageBox::warning(0,
- tr("Duplicate Targets Detected"),
- tr("The following targets were already configured:<br>"
+ tr("Duplicate Kits Detected"),
+ tr("The following kits were already configured:<br>"
"&nbsp;%1<br>"
"They were not configured again.")
.arg(removedSts.join(QLatin1String(",<br>&nbsp;"))));
}
- // Set default profile:
+ // Set default kit:
if (m_defaultNode)
- ProfileManager::instance()->setDefaultProfile(m_defaultNode->profile);
+ KitManager::instance()->setDefaultKit(m_defaultNode->kit);
}
-void ProfileModel::markForRemoval(Profile *p)
+void KitModel::markForRemoval(Kit *k)
{
- ProfileNode *node = find(p);
+ KitNode *node = find(k);
if (!node)
return;
if (node == m_defaultNode) {
- ProfileNode *newDefault = 0;
+ KitNode *newDefault = 0;
if (!m_autoRoot->childNodes.isEmpty())
newDefault = m_autoRoot->childNodes.at(0);
else if (!m_manualRoot->childNodes.isEmpty())
@@ -374,8 +374,8 @@ void ProfileModel::markForRemoval(Profile *p)
m_manualRoot->childNodes.removeOne(node);
node->parent = 0;
if (m_toAddList.contains(node)) {
- delete node->profile;
- node->profile = 0;
+ delete node->kit;
+ node->kit = 0;
m_toAddList.removeOne(node);
delete node;
} else {
@@ -384,12 +384,12 @@ void ProfileModel::markForRemoval(Profile *p)
endRemoveRows();
}
-void ProfileModel::markForAddition(Profile *p)
+void KitModel::markForAddition(Kit *k)
{
int pos = m_manualRoot->childNodes.size();
beginInsertRows(index(m_manualRoot), pos, pos);
- ProfileNode *node = createNode(m_manualRoot, p, true);
+ KitNode *node = createNode(m_manualRoot, k, true);
m_toAddList.append(node);
if (!m_defaultNode)
@@ -398,7 +398,7 @@ void ProfileModel::markForAddition(Profile *p)
endInsertRows();
}
-QModelIndex ProfileModel::index(ProfileNode *node, int column) const
+QModelIndex KitModel::index(KitNode *node, int column) const
{
if (node->parent == 0) // is root (or was marked for deletion)
return QModelIndex();
@@ -408,22 +408,22 @@ QModelIndex ProfileModel::index(ProfileNode *node, int column) const
return index(node->parent->childNodes.indexOf(node), column, index(node->parent));
}
-ProfileNode *ProfileModel::find(Profile *p) const
+KitNode *KitModel::find(Kit *k) const
{
- foreach (ProfileNode *n, m_autoRoot->childNodes) {
- if (n->profile == p)
+ foreach (KitNode *n, m_autoRoot->childNodes) {
+ if (n->kit == k)
return n;
}
- foreach (ProfileNode *n, m_manualRoot->childNodes) {
- if (n->profile == p)
+ foreach (KitNode *n, m_manualRoot->childNodes) {
+ if (n->kit == k)
return n;
}
return 0;
}
-ProfileNode *ProfileModel::createNode(ProfileNode *parent, Profile *p, bool changed)
+KitNode *KitModel::createNode(KitNode *parent, Kit *k, bool changed)
{
- ProfileNode *node = new ProfileNode(parent, p, changed);
+ KitNode *node = new KitNode(parent, k, changed);
if (node->widget) {
node->widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_parentLayout->addWidget(node->widget, 10);
@@ -433,7 +433,7 @@ ProfileNode *ProfileModel::createNode(ProfileNode *parent, Profile *p, bool chan
return node;
}
-void ProfileModel::setDefaultNode(ProfileNode *node)
+void KitModel::setDefaultNode(KitNode *node)
{
if (m_defaultNode) {
QModelIndex idx = index(m_defaultNode);
@@ -448,47 +448,47 @@ void ProfileModel::setDefaultNode(ProfileNode *node)
}
}
-void ProfileModel::addProfile(Profile *p)
+void KitModel::addKit(Kit *k)
{
- QList<ProfileNode *> nodes = m_toAddList;
- foreach (ProfileNode *n, nodes) {
- if (n->profile == p) {
+ QList<KitNode *> nodes = m_toAddList;
+ foreach (KitNode *n, nodes) {
+ if (n->kit == k) {
m_toAddList.removeOne(n);
// do not delete n: Still used elsewhere!
return;
}
}
- ProfileNode *parent = m_manualRoot;
- if (p->isAutoDetected())
+ KitNode *parent = m_manualRoot;
+ if (k->isAutoDetected())
parent = m_autoRoot;
int row = parent->childNodes.count();
beginInsertRows(index(parent), row, row);
- createNode(parent, p, false);
+ createNode(parent, k, false);
endInsertRows();
- emit profileStateChanged();
+ emit kitStateChanged();
}
-void ProfileModel::removeProfile(Profile *p)
+void KitModel::removeKit(Kit *k)
{
- QList<ProfileNode *> nodes = m_toRemoveList;
- foreach (ProfileNode *n, nodes) {
- if (n->profile == p) {
+ QList<KitNode *> nodes = m_toRemoveList;
+ foreach (KitNode *n, nodes) {
+ if (n->kit == k) {
m_toRemoveList.removeOne(n);
delete n;
return;
}
}
- ProfileNode *parent = m_manualRoot;
- if (p->isAutoDetected())
+ KitNode *parent = m_manualRoot;
+ if (k->isAutoDetected())
parent = m_autoRoot;
int row = 0;
- ProfileNode *node = 0;
- foreach (ProfileNode *current, parent->childNodes) {
- if (current->profile == p) {
+ KitNode *node = 0;
+ foreach (KitNode *current, parent->childNodes) {
+ if (current->kit == k) {
node = current;
break;
}
@@ -500,13 +500,13 @@ void ProfileModel::removeProfile(Profile *p)
delete node;
endRemoveRows();
- emit profileStateChanged();
+ emit kitStateChanged();
}
-void ProfileModel::updateProfile(Profile *p)
+void KitModel::updateKit(Kit *k)
{
- ProfileNode *n = find(p);
- // This can happen if Qt Versions and Profiles are removed simultaneously.
+ KitNode *n = find(k);
+ // This can happen if Qt Versions and kits are removed simultaneously.
if (!n)
return;
if (n->widget)
@@ -515,9 +515,9 @@ void ProfileModel::updateProfile(Profile *p)
emit dataChanged(idx, idx);
}
-void ProfileModel::changeDefaultProfile()
+void KitModel::changeDefaultKit()
{
- setDefaultNode(find(ProfileManager::instance()->defaultProfile()));
+ setDefaultNode(find(KitManager::instance()->defaultKit()));
}
} // namespace Internal
diff --git a/src/plugins/projectexplorer/profilemodel.h b/src/plugins/projectexplorer/kitmodel.h
index c159bde1f9..8de127766f 100644
--- a/src/plugins/projectexplorer/profilemodel.h
+++ b/src/plugins/projectexplorer/kitmodel.h
@@ -28,8 +28,8 @@
**
**************************************************************************/
-#ifndef PROFILEMODEL_H
-#define PROFILEMODEL_H
+#ifndef KITMODEL_H
+#define KITMODEL_H
#include "projectexplorer_export.h"
@@ -42,26 +42,26 @@ QT_END_NAMESPACE
namespace ProjectExplorer {
-class Profile;
-class ProfileConfigWidget;
-class ProfileFactory;
-class ProfileManager;
+class Kit;
+class KitConfigWidget;
+class KitFactory;
+class KitManager;
namespace Internal {
-class ProfileNode;
+class KitNode;
// --------------------------------------------------------------------------
-// ProfileModel:
+// KitModel:
// --------------------------------------------------------------------------
-class ProfileModel : public QAbstractItemModel
+class KitModel : public QAbstractItemModel
{
Q_OBJECT
public:
- explicit ProfileModel(QBoxLayout *parentLayout, QObject *parent = 0);
- ~ProfileModel();
+ explicit KitModel(QBoxLayout *parentLayout, QObject *parent = 0);
+ ~KitModel();
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &index) const;
@@ -73,50 +73,50 @@ public:
Qt::ItemFlags flags(const QModelIndex &index) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
- Profile *profile(const QModelIndex &);
- QModelIndex indexOf(Profile *p) const;
+ Kit *kit(const QModelIndex &);
+ QModelIndex indexOf(Kit *k) const;
- void setDefaultProfile(const QModelIndex &index);
- bool isDefaultProfile(const QModelIndex &index);
+ void setDefaultKit(const QModelIndex &index);
+ bool isDefaultKit(const QModelIndex &index);
- ProfileConfigWidget *widget(const QModelIndex &);
+ KitConfigWidget *widget(const QModelIndex &);
bool isDirty() const;
- bool isDirty(Profile *p) const;
+ bool isDirty(Kit *k) const;
void apply();
- void markForRemoval(Profile *p);
- void markForAddition(Profile *p);
+ void markForRemoval(Kit *k);
+ void markForAddition(Kit *k);
signals:
- void profileStateChanged();
+ void kitStateChanged();
private slots:
- void addProfile(ProjectExplorer::Profile *p);
- void removeProfile(ProjectExplorer::Profile *p);
- void updateProfile(ProjectExplorer::Profile *p);
- void changeDefaultProfile();
+ void addKit(ProjectExplorer::Kit *k);
+ void removeKit(ProjectExplorer::Kit *k);
+ void updateKit(ProjectExplorer::Kit *k);
+ void changeDefaultKit();
void setDirty();
private:
- QModelIndex index(ProfileNode *, int column = 0) const;
- ProfileNode *find(Profile *) const;
- ProfileNode *createNode(ProfileNode *parent, Profile *p, bool changed);
- void setDefaultNode(ProfileNode *node);
+ QModelIndex index(KitNode *, int column = 0) const;
+ KitNode *find(Kit *k) const;
+ KitNode *createNode(KitNode *parent, Kit *k, bool changed);
+ void setDefaultNode(KitNode *node);
- ProfileNode *m_root;
- ProfileNode *m_autoRoot;
- ProfileNode *m_manualRoot;
+ KitNode *m_root;
+ KitNode *m_autoRoot;
+ KitNode *m_manualRoot;
- QList<ProfileNode *> m_toAddList;
- QList<ProfileNode *> m_toRemoveList;
+ QList<KitNode *> m_toAddList;
+ QList<KitNode *> m_toRemoveList;
QBoxLayout *m_parentLayout;
- ProfileNode *m_defaultNode;
+ KitNode *m_defaultNode;
};
} // namespace Internal
} // namespace ProjectExplorer
-#endif // PROFILEMODEL_H
+#endif // KITMODEL_H
diff --git a/src/plugins/projectexplorer/profileoptionspage.cpp b/src/plugins/projectexplorer/kitoptionspage.cpp
index 6feffdfb55..7a4ea597d6 100644
--- a/src/plugins/projectexplorer/profileoptionspage.cpp
+++ b/src/plugins/projectexplorer/kitoptionspage.cpp
@@ -28,13 +28,13 @@
**
**************************************************************************/
-#include "profileoptionspage.h"
+#include "kitoptionspage.h"
-#include "profilemodel.h"
-#include "profile.h"
+#include "kitmodel.h"
+#include "kit.h"
#include "projectexplorerconstants.h"
-#include "profileconfigwidget.h"
-#include "profilemanager.h"
+#include "kitconfigwidget.h"
+#include "kitmanager.h"
#include <coreplugin/icore.h>
@@ -50,28 +50,28 @@
namespace ProjectExplorer {
// --------------------------------------------------------------------------
-// ProfileOptionsPage:
+// KitOptionsPage:
// --------------------------------------------------------------------------
-ProfileOptionsPage::ProfileOptionsPage() :
+KitOptionsPage::KitOptionsPage() :
m_model(0), m_selectionModel(0), m_currentWidget(0), m_toShow(0)
{
- setId(Constants::PROFILE_SETTINGS_PAGE_ID);
- setDisplayName(tr("Targets"));
+ setId(Constants::KITS_SETTINGS_PAGE_ID);
+ setDisplayName(tr("Kits"));
setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
setCategoryIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
}
-QWidget *ProfileOptionsPage::createPage(QWidget *parent)
+QWidget *KitOptionsPage::createPage(QWidget *parent)
{
m_configWidget = new QWidget(parent);
- m_profilesView = new QTreeView(m_configWidget);
- m_profilesView->setUniformRowHeights(true);
- m_profilesView->header()->setStretchLastSection(true);
- m_profilesView->setSizePolicy(m_profilesView->sizePolicy().horizontalPolicy(),
+ m_kitsView = new QTreeView(m_configWidget);
+ m_kitsView->setUniformRowHeights(true);
+ m_kitsView->header()->setStretchLastSection(true);
+ m_kitsView->setSizePolicy(m_kitsView->sizePolicy().horizontalPolicy(),
QSizePolicy::Ignored);
m_addButton = new QPushButton(tr("Add"), m_configWidget);
@@ -89,37 +89,37 @@ QWidget *ProfileOptionsPage::createPage(QWidget *parent)
buttonLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
QHBoxLayout *horizontalLayout = new QHBoxLayout();
- horizontalLayout->addWidget(m_profilesView);
+ horizontalLayout->addWidget(m_kitsView);
horizontalLayout->addLayout(buttonLayout);
QVBoxLayout *verticalLayout = new QVBoxLayout(m_configWidget);
verticalLayout->addLayout(horizontalLayout);
Q_ASSERT(!m_model);
- m_model = new Internal::ProfileModel(verticalLayout);
- connect(m_model, SIGNAL(profileStateChanged()), this, SLOT(updateState()));
+ m_model = new Internal::KitModel(verticalLayout);
+ connect(m_model, SIGNAL(kitStateChanged()), this, SLOT(updateState()));
- m_profilesView->setModel(m_model);
- m_profilesView->header()->setResizeMode(0, QHeaderView::Stretch);
- m_profilesView->expandAll();
+ m_kitsView->setModel(m_model);
+ m_kitsView->header()->setResizeMode(0, QHeaderView::Stretch);
+ m_kitsView->expandAll();
- m_selectionModel = m_profilesView->selectionModel();
+ m_selectionModel = m_kitsView->selectionModel();
connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
- this, SLOT(profileSelectionChanged()));
- connect(ProfileManager::instance(), SIGNAL(profileAdded(ProjectExplorer::Profile*)),
- this, SLOT(profileSelectionChanged()));
- connect(ProfileManager::instance(), SIGNAL(profileRemoved(ProjectExplorer::Profile*)),
- this, SLOT(profileSelectionChanged()));
- connect(ProfileManager::instance(), SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(profileSelectionChanged()));
+ this, SLOT(kitSelectionChanged()));
+ connect(KitManager::instance(), SIGNAL(kitAdded(ProjectExplorer::Kit*)),
+ this, SLOT(kitSelectionChanged()));
+ connect(KitManager::instance(), SIGNAL(kitRemoved(ProjectExplorer::Kit*)),
+ this, SLOT(kitSelectionChanged()));
+ connect(KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(kitSelectionChanged()));
// Set up add menu:
- connect(m_addButton, SIGNAL(clicked()), this, SLOT(addNewProfile()));
- connect(m_cloneButton, SIGNAL(clicked()), this, SLOT(cloneProfile()));
- connect(m_delButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
- connect(m_makeDefaultButton, SIGNAL(clicked()), this, SLOT(makeDefaultProfile()));
+ connect(m_addButton, SIGNAL(clicked()), this, SLOT(addNewKit()));
+ connect(m_cloneButton, SIGNAL(clicked()), this, SLOT(cloneKit()));
+ connect(m_delButton, SIGNAL(clicked()), this, SLOT(removeKit()));
+ connect(m_makeDefaultButton, SIGNAL(clicked()), this, SLOT(makeDefaultKit()));
- m_searchKeywords = tr("Targets");
+ m_searchKeywords = tr("Kits");
updateState();
@@ -133,13 +133,13 @@ QWidget *ProfileOptionsPage::createPage(QWidget *parent)
return m_configWidget;
}
-void ProfileOptionsPage::apply()
+void KitOptionsPage::apply()
{
if (m_model)
m_model->apply();
}
-void ProfileOptionsPage::finish()
+void KitOptionsPage::finish()
{
if (m_model) {
delete m_model;
@@ -148,22 +148,22 @@ void ProfileOptionsPage::finish()
m_configWidget = 0; // deleted by settingsdialog
m_selectionModel = 0; // child of m_configWidget
- m_profilesView = 0; // child of m_configWidget
+ m_kitsView = 0; // child of m_configWidget
m_currentWidget = 0; // deleted by the model
m_toShow = 0;
}
-bool ProfileOptionsPage::matches(const QString &s) const
+bool KitOptionsPage::matches(const QString &s) const
{
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
}
-void ProfileOptionsPage::showProfile(Profile *p)
+void KitOptionsPage::showKit(Kit *k)
{
- m_toShow = p;
+ m_toShow = k;
}
-void ProfileOptionsPage::profileSelectionChanged()
+void KitOptionsPage::kitSelectionChanged()
{
if (m_currentWidget)
m_currentWidget->setVisible(false);
@@ -176,63 +176,63 @@ void ProfileOptionsPage::profileSelectionChanged()
updateState();
}
-void ProfileOptionsPage::addNewProfile()
+void KitOptionsPage::addNewKit()
{
- Profile *p = new Profile;
- m_model->markForAddition(p);
+ Kit *k = new Kit;
+ m_model->markForAddition(k);
- QModelIndex newIdx = m_model->indexOf(p);
+ QModelIndex newIdx = m_model->indexOf(k);
m_selectionModel->select(newIdx,
QItemSelectionModel::Clear
| QItemSelectionModel::SelectCurrent
| QItemSelectionModel::Rows);
}
-void ProfileOptionsPage::cloneProfile()
+void KitOptionsPage::cloneKit()
{
- Profile *current = m_model->profile(currentIndex());
+ Kit *current = m_model->kit(currentIndex());
if (!current)
return;
- Profile *p = current->clone();
+ Kit *k = current->clone();
- m_model->markForAddition(p);
+ m_model->markForAddition(k);
- QModelIndex newIdx = m_model->indexOf(p);
+ QModelIndex newIdx = m_model->indexOf(k);
m_selectionModel->select(newIdx,
QItemSelectionModel::Clear
| QItemSelectionModel::SelectCurrent
| QItemSelectionModel::Rows);
}
-void ProfileOptionsPage::removeProfile()
+void KitOptionsPage::removeKit()
{
- Profile *p = m_model->profile(currentIndex());
- if (!p)
+ Kit *k = m_model->kit(currentIndex());
+ if (!k)
return;
- m_model->markForRemoval(p);
+ m_model->markForRemoval(k);
}
-void ProfileOptionsPage::makeDefaultProfile()
+void KitOptionsPage::makeDefaultKit()
{
- m_model->setDefaultProfile(currentIndex());
+ m_model->setDefaultKit(currentIndex());
updateState();
}
-void ProfileOptionsPage::updateState()
+void KitOptionsPage::updateState()
{
- if (!m_profilesView)
+ if (!m_kitsView)
return;
bool canCopy = false;
bool canDelete = false;
bool canMakeDefault = false;
QModelIndex index = currentIndex();
- Profile *p = m_model->profile(index);
- if (p) {
- canCopy = p->isValid();
- canDelete = !p->isAutoDetected();
- canMakeDefault = !m_model->isDefaultProfile(index);
+ Kit *k = m_model->kit(index);
+ if (k) {
+ canCopy = k->isValid();
+ canDelete = !k->isAutoDetected();
+ canMakeDefault = !m_model->isDefaultKit(index);
}
m_cloneButton->setEnabled(canCopy);
@@ -240,7 +240,7 @@ void ProfileOptionsPage::updateState()
m_makeDefaultButton->setEnabled(canMakeDefault);
}
-QModelIndex ProfileOptionsPage::currentIndex() const
+QModelIndex KitOptionsPage::currentIndex() const
{
if (!m_selectionModel)
return QModelIndex();
diff --git a/src/plugins/projectexplorer/profileoptionspage.h b/src/plugins/projectexplorer/kitoptionspage.h
index 87e35672dc..8002a1aca7 100644
--- a/src/plugins/projectexplorer/profileoptionspage.h
+++ b/src/plugins/projectexplorer/kitoptionspage.h
@@ -28,8 +28,8 @@
**
**************************************************************************/
-#ifndef PROFILEOPTIONSPAGE_H
-#define PROFILEOPTIONSPAGE_H
+#ifndef KITOPTIONSPAGE_H
+#define KITOPTIONSPAGE_H
#include "projectexplorer_export.h"
@@ -45,43 +45,43 @@ QT_END_NAMESPACE
namespace ProjectExplorer {
-namespace Internal { class ProfileModel; }
+namespace Internal { class KitModel; }
-class Profile;
-class ProfileConfigWidget;
-class ProfileFactory;
-class ProfileManager;
+class Kit;
+class KitConfigWidget;
+class KitFactory;
+class KitManager;
// --------------------------------------------------------------------------
-// ProfileOptionsPage:
+// KitOptionsPage:
// --------------------------------------------------------------------------
-class PROJECTEXPLORER_EXPORT ProfileOptionsPage : public Core::IOptionsPage
+class PROJECTEXPLORER_EXPORT KitOptionsPage : public Core::IOptionsPage
{
Q_OBJECT
public:
- ProfileOptionsPage();
+ KitOptionsPage();
QWidget *createPage(QWidget *parent);
void apply();
void finish();
bool matches(const QString &) const;
- void showProfile(Profile *p);
+ void showKit(Kit *k);
private slots:
- void profileSelectionChanged();
- void addNewProfile();
- void cloneProfile();
- void removeProfile();
- void makeDefaultProfile();
+ void kitSelectionChanged();
+ void addNewKit();
+ void cloneKit();
+ void removeKit();
+ void makeDefaultKit();
void updateState();
private:
QModelIndex currentIndex() const;
- QTreeView *m_profilesView;
+ QTreeView *m_kitsView;
QPushButton *m_addButton;
QPushButton *m_cloneButton;
QPushButton *m_delButton;
@@ -90,13 +90,13 @@ private:
QWidget *m_configWidget;
QString m_searchKeywords;
- Internal::ProfileModel *m_model;
+ Internal::KitModel *m_model;
QItemSelectionModel *m_selectionModel;
QWidget *m_currentWidget;
- Profile *m_toShow;
+ Kit *m_toShow;
};
} // namespace ProjectExplorer
-#endif // PROFILEOPTIONSPAGE_H
+#endif // KITOPTIONSPAGE_H
diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp
index 9c9177482f..b1b348ddc4 100644
--- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp
+++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp
@@ -45,7 +45,7 @@
#include <projectexplorer/project.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/deployconfiguration.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitmanager.h>
#include <projectexplorer/projectmodels.h>
#include <projectexplorer/runconfiguration.h>
@@ -96,20 +96,21 @@ static bool projectLesserThan(Project *p1, Project *p2)
class TargetSelectorDelegate : public QItemDelegate
{
public:
- TargetSelectorDelegate(QObject *parent) : QItemDelegate(parent) { }
+ TargetSelectorDelegate(ListWidget *parent) : QItemDelegate(parent), m_listWidget(parent) { }
private:
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
void paint(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index) const;
mutable QImage selectionGradient;
+ ListWidget *m_listWidget;
};
QSize TargetSelectorDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
Q_UNUSED(option)
Q_UNUSED(index)
- return QSize(190, 30);
+ return QSize(m_listWidget->size().width(), 30);
}
void TargetSelectorDelegate::paint(QPainter *painter,
@@ -153,7 +154,7 @@ void TargetSelectorDelegate::paint(QPainter *painter,
// ListWidget
////////
ListWidget::ListWidget(QWidget *parent)
- : QListWidget(parent), m_maxCount(0)
+ : QListWidget(parent), m_maxCount(0), m_optimalWidth(0)
{
setFocusPolicy(Qt::NoFocus);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
@@ -165,25 +166,6 @@ ListWidget::ListWidget(QWidget *parent)
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
}
-
-QSize ListWidget::sizeHint() const
-{
- int height = m_maxCount * 30;
- int width = 190;
-
- // We try to keep the height of the popup equal to the actionbar
- QSize size(width, height);
- static QStatusBar *statusBar = Core::ICore::statusBar();
- static QWidget *actionBar = Core::ICore::mainWindow()->findChild<QWidget*>(QLatin1String("actionbar"));
- Q_ASSERT(actionBar);
-
- QMargins popupMargins = window()->contentsMargins();
- int alignedWithActionHeight
- = actionBar->height() - statusBar->height() - (popupMargins.top() + popupMargins.bottom());
- size.setHeight(qBound(alignedWithActionHeight, height, 2 * alignedWithActionHeight));
- return size;
-}
-
void ListWidget::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Left)
@@ -202,13 +184,32 @@ void ListWidget::keyReleaseEvent(QKeyEvent *event)
void ListWidget::setMaxCount(int maxCount)
{
- // Note: the current assumption is that, this is not called while the listwidget is visible
- // Otherwise we would need to add code to MiniProjectTargetSelector reacting to the
- // updateGeometry (which then would jump ugly)
m_maxCount = maxCount;
updateGeometry();
}
+int ListWidget::maxCount()
+{
+ return m_maxCount;
+}
+
+int ListWidget::optimalWidth() const
+{
+ return m_optimalWidth;
+}
+
+void ListWidget::setOptimalWidth(int width)
+{
+ m_optimalWidth = width;
+ updateGeometry();
+}
+
+int ListWidget::padding()
+{
+ // there needs to be enough extra pixels to show a scrollbar
+ return 30;
+}
+
////////
// ProjectListWidget
////////
@@ -274,6 +275,11 @@ void ProjectListWidget::addProject(Project *project)
setCurrentItem(item);
}
+ QFontMetrics fn(font());
+ int width = fn.width(project->displayName()) + padding();
+ if (width > optimalWidth())
+ setOptimalWidth(width);
+
m_ignoreIndexChange = false;
}
@@ -300,8 +306,17 @@ void ProjectListWidget::removeProject(Project *project)
item(otherIndex)->setText(p->displayName());
}
- m_ignoreIndexChange = false;
+ QFontMetrics fn(font());
+
+ // recheck optimal width
+ int width = 0;
+ for (int i = 0; i < count(); ++i) {
+ Project *p = item(i)->data(Qt::UserRole).value<Project *>();
+ width = qMax(fn.width(p->displayName()) + padding(), width);
+ }
+ setOptimalWidth(width);
+ m_ignoreIndexChange = false;
}
void ProjectListWidget::projectDisplayNameChanged(Project *project)
@@ -338,6 +353,15 @@ void ProjectListWidget::projectDisplayNameChanged(Project *project)
if (isCurrentItem)
setCurrentRow(pos);
+ // recheck optimal width
+ QFontMetrics fn(font());
+ int width = 0;
+ for (int i = 0; i < count(); ++i) {
+ Project *p = item(i)->data(Qt::UserRole).value<Project *>();
+ width = qMax(fn.width(p->displayName()) + padding(), width);
+ }
+ setOptimalWidth(width);
+
m_ignoreIndexChange = false;
}
@@ -376,9 +400,16 @@ void GenericListWidget::setProjectConfigurations(const QList<ProjectConfiguratio
disconnect(p, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
}
- foreach (ProjectConfiguration *pc, list)
+
+ QFontMetrics fn(font());
+ int width = 0;
+ foreach (ProjectConfiguration *pc, list) {
addProjectConfiguration(pc);
+ width = qMax(width, fn.width(pc->displayName()) + padding());
+ }
+ setOptimalWidth(width);
setActiveProjectConfiguration(active);
+
m_ignoreIndexChange = false;
}
@@ -408,6 +439,11 @@ void GenericListWidget::addProjectConfiguration(ProjectExplorer::ProjectConfigur
connect(pc, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
+
+ QFontMetrics fn(font());
+ int width = fn.width(pc->displayName()) + padding();
+ if (width > optimalWidth())
+ setOptimalWidth(width);
m_ignoreIndexChange = false;
}
@@ -417,6 +453,15 @@ void GenericListWidget::removeProjectConfiguration(ProjectExplorer::ProjectConfi
disconnect(pc, SIGNAL(displayNameChanged()),
this, SLOT(displayNameChanged()));
delete itemForProjectConfiguration(pc);
+
+ QFontMetrics fn(font());
+ int width = 0;
+ for (int i = 0; i < count(); ++i) {
+ ProjectConfiguration *p = item(i)->data(Qt::UserRole).value<ProjectConfiguration *>();
+ width = qMax(width, fn.width(p->displayName()) + padding());
+ }
+ setOptimalWidth(width);
+
m_ignoreIndexChange = false;
}
@@ -461,6 +506,15 @@ void GenericListWidget::displayNameChanged()
insertItem(pos, lwi);
if (activeProjectConfiguration)
setCurrentItem(itemForProjectConfiguration(activeProjectConfiguration));
+
+ QFontMetrics fn(font());
+ int width = 0;
+ for (int i = 0; i < count(); ++i) {
+ ProjectConfiguration *p = item(i)->data(Qt::UserRole).value<ProjectConfiguration *>();
+ width = qMax(width, fn.width(p->displayName()) + padding());
+ }
+ setOptimalWidth(width);
+
m_ignoreIndexChange = false;
}
@@ -475,16 +529,15 @@ QListWidgetItem *GenericListWidget::itemForProjectConfiguration(ProjectConfigura
return 0;
}
-QWidget *createTitleLabel(const QString &text)
+QWidget *MiniProjectTargetSelector::createTitleLabel(const QString &text)
{
- Utils::StyledBar *bar = new Utils::StyledBar;
+ Utils::StyledBar *bar = new Utils::StyledBar(this);
bar->setSingleRow(true);
QVBoxLayout *toolLayout = new QVBoxLayout(bar);
- toolLayout->setMargin(0);
+ toolLayout->setContentsMargins(6, 0, 6, 0);
toolLayout->setSpacing(0);
QLabel *l = new QLabel(text);
- l->setIndent(6);
QFont f = l->font();
f.setBold(true);
l->setFont(f);
@@ -496,24 +549,6 @@ QWidget *createTitleLabel(const QString &text)
return bar;
}
-class OnePixelGreyLine : public QWidget
-{
-public:
- OnePixelGreyLine(QWidget *parent)
- : QWidget(parent)
- {
- setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
- setMinimumWidth(1);
- setMaximumWidth(1);
- }
- void paintEvent(QPaintEvent *e)
- {
- Q_UNUSED(e);
- QPainter p(this);
- p.fillRect(contentsRect(), QColor(160, 160, 160, 255));
- }
-};
-
MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorAction, SessionManager *sessionManager, QWidget *parent) :
QWidget(parent), m_projectAction(targetSelectorAction), m_sessionManager(sessionManager),
m_project(0),
@@ -533,10 +568,6 @@ MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorActi
targetSelectorAction->setIcon(style()->standardIcon(QStyle::SP_ComputerIcon));
targetSelectorAction->setProperty("titledAction", true);
- QGridLayout *grid = new QGridLayout(this);
- grid->setMargin(0);
- grid->setSpacing(0);
-
m_summaryLabel = new QLabel(this);
m_summaryLabel->setMargin(3);
m_summaryLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
@@ -544,31 +575,20 @@ MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorActi
m_summaryLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
m_summaryLabel->setTextInteractionFlags(m_summaryLabel->textInteractionFlags() | Qt::LinksAccessibleByMouse);
- grid->addWidget(m_summaryLabel, 0, 0, 1, 2 * LAST - 1);
-
m_listWidgets.resize(LAST);
m_titleWidgets.resize(LAST);
- m_separators.resize(LAST);
m_listWidgets[PROJECT] = 0; //project is not a generic list widget
m_titleWidgets[PROJECT] = createTitleLabel(tr("Project"));
- grid->addWidget(m_titleWidgets[PROJECT], 1, 0, 1, 2);
m_projectListWidget = new ProjectListWidget(m_sessionManager, this);
- grid->addWidget(m_projectListWidget, 2, 0);
- m_separators[PROJECT] = new OnePixelGreyLine(this);
- grid->addWidget(m_separators[PROJECT], 2, 1);
QStringList titles;
- titles << tr("Target") << tr("Build")
+ titles << tr("Kit") << tr("Build")
<< tr("Deploy") << tr("Run");
for (int i = TARGET; i < LAST; ++i) {
m_titleWidgets[i] = createTitleLabel(titles.at(i -1));
- grid->addWidget(m_titleWidgets[i], 1, 2 * i, 1, 2);
m_listWidgets[i] = new GenericListWidget(this);
- grid->addWidget(m_listWidgets[i], 2, 2 *i);
- m_separators[i] = new OnePixelGreyLine(this);
- grid->addWidget(m_separators[i], 2, 1 + 2 * i);
}
changeStartupProject(m_sessionManager->startupProject());
@@ -589,8 +609,8 @@ MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorActi
this, SLOT(updateActionAndSummary()));
// for icon changes:
- connect(ProjectExplorer::ProfileManager::instance(), SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(profileChanged(ProjectExplorer::Profile*)));
+ connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(kitChanged(ProjectExplorer::Kit*)));
connect(m_listWidgets[TARGET], SIGNAL(changeActiveProjectConfiguration(ProjectExplorer::ProjectConfiguration*)),
this, SLOT(setActiveTarget(ProjectExplorer::ProjectConfiguration*)));
@@ -602,6 +622,236 @@ MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorActi
this, SLOT(setActiveRunConfiguration(ProjectExplorer::ProjectConfiguration*)));
}
+bool MiniProjectTargetSelector::event(QEvent *event)
+{
+ if (event->type() != QEvent::LayoutRequest)
+ return QWidget::event(event);
+ doLayout(true);
+ return true;
+}
+
+class IndexSorter
+{
+public:
+ enum SortOrder { Less = 0, Greater = 1};
+
+ IndexSorter(QVector<int> result, SortOrder order)
+ : m_result(result), m_order(order)
+ { }
+
+ bool operator()(int i, int j)
+ { return (m_result[i] < m_result[j]) ^ bool(m_order); }
+
+private:
+ QVector<int> m_result;
+ SortOrder m_order;
+};
+
+// does some fancy calculations to ensure proper widths for the list widgets
+QVector<int> MiniProjectTargetSelector::listWidgetWidths(int minSize, int maxSize)
+{
+ QVector<int> result;
+ result.resize(LAST);
+ if (m_projectListWidget->isVisibleTo(this))
+ result[PROJECT] = m_projectListWidget->optimalWidth();
+ else
+ result[PROJECT] = -1;
+
+ for (int i = TARGET; i < LAST; ++i) {
+ if (m_listWidgets[i]->isVisibleTo(this))
+ result[i] = m_listWidgets[i]->optimalWidth();
+ else
+ result[i] = -1;
+ }
+
+ int totalWidth = 0;
+ // Adjust to minimum width of title
+ for (int i = PROJECT; i < LAST; ++i) {
+ if (result[i] != -1) {
+ // We want at least 100 pixels per column
+ int width = qMax(m_titleWidgets[i]->sizeHint().width(), 100);
+ if (result[i] < width)
+ result[i] = width;
+ totalWidth += result[i];
+ }
+ }
+
+ if (totalWidth == 0) // All hidden
+ return result;
+
+ bool tooSmall;
+ if (totalWidth < minSize)
+ tooSmall = true;
+ else if (totalWidth > maxSize)
+ tooSmall = false;
+ else
+ return result;
+
+ int widthToDistribute = tooSmall ? (minSize - totalWidth)
+ : (totalWidth - maxSize);
+ QVector<int> indexes;
+ indexes.reserve(LAST);
+ for (int i = PROJECT; i < LAST; ++i)
+ if (result[i] != -1)
+ indexes.append(i);
+
+ IndexSorter indexSorter(result, tooSmall ? IndexSorter::Less : IndexSorter::Greater);
+ qSort(indexes.begin(), indexes.end(), indexSorter);
+
+ int i = 0;
+ int first = result[indexes.first()]; // biggest or smallest
+
+ // we resize the biggest columns until they are the same size as the second biggest
+ // since it looks prettiest if all the columns are the same width
+ while (true) {
+ for (; i < indexes.size(); ++i) {
+ if (result[indexes[i]] != first)
+ break;
+ }
+ int next = tooSmall ? INT_MAX : 0;
+ if (i < indexes.size())
+ next = result[indexes[i]];
+
+ int delta;
+ if (tooSmall)
+ delta = qMin(next - first, widthToDistribute / i);
+ else
+ delta = qMin(first - next, widthToDistribute / i);
+
+ if (delta == 0)
+ return result;
+
+ if (tooSmall) {
+ for (int j = 0; j < i; ++j)
+ result[indexes[j]] += delta;
+ } else {
+ for (int j = 0; j < i; ++j)
+ result[indexes[j]] -= delta;
+ }
+
+ widthToDistribute -= delta * i;
+ if (widthToDistribute == 0)
+ return result;
+
+ first = result[indexes.first()];
+ i = 0; // TODO can we do better?
+ }
+}
+
+void MiniProjectTargetSelector::doLayout(bool keepSize)
+{
+ // An unconfigured project shows empty build/deploy/run sections
+ // if there's a configured project in the seesion
+ // that could be improved
+ static QStatusBar *statusBar = Core::ICore::statusBar();
+ static QWidget *actionBar = Core::ICore::mainWindow()->findChild<QWidget*>(QLatin1String("actionbar"));
+ Q_ASSERT(actionBar);
+
+ // 1. Calculate the summary label height
+ int summaryLabelY = 1;
+ int summaryLabelHeight = 0;
+ int oldSummaryLabelHeight = m_summaryLabel->height();
+ bool onlySummary = false;
+ // Count the number of lines
+ int visibleLineCount = m_projectListWidget->isVisibleTo(this) ? 0 : 1;
+ for (int i = TARGET; i < LAST; ++i)
+ visibleLineCount += m_listWidgets[i]->isVisibleTo(this) ? 0 : 1;
+
+ if (visibleLineCount == LAST) {
+ summaryLabelHeight = visibleLineCount * QFontMetrics(m_summaryLabel->font()).height()
+ + m_summaryLabel->margin() *2;
+ onlySummary = true;
+ } else {
+ if (visibleLineCount < 3) {
+ foreach (Project *p, m_sessionManager->projects()) {
+ if (p->needsConfiguration()) {
+ visibleLineCount = 3;
+ break;
+ }
+ }
+ }
+ if (visibleLineCount)
+ summaryLabelHeight = visibleLineCount * QFontMetrics(m_summaryLabel->font()).height()
+ + m_summaryLabel->margin() *2;
+ }
+
+ if (keepSize && oldSummaryLabelHeight > summaryLabelHeight)
+ summaryLabelHeight = oldSummaryLabelHeight;
+
+ m_summaryLabel->move(0, summaryLabelY);
+
+ // Height to be aligned with side bar button
+ int alignedWithActionHeight = actionBar->height() - statusBar->height();
+ int bottomMargin = 9;
+ int totalHeight = 0;
+
+ if (!onlySummary) {
+ // list widget heigth
+ int maxItemCount = m_projectListWidget->maxCount();
+ for (int i = TARGET; i < LAST; ++i)
+ maxItemCount = qMax(maxItemCount, m_listWidgets[i]->maxCount());
+
+ int titleWidgetsHeight = m_titleWidgets.first()->height();
+ if (keepSize) {
+ totalHeight = height();
+ } else {
+ // Clamp the size of the listwidgets to be
+ // at least as high as the the sidebar button
+ // and at most twice as high
+ totalHeight = summaryLabelHeight + qBound(alignedWithActionHeight,
+ maxItemCount * 30 + bottomMargin + titleWidgetsHeight,
+ alignedWithActionHeight * 2);
+ }
+
+ int titleY = summaryLabelY + summaryLabelHeight;
+ int listY = titleY + titleWidgetsHeight;
+ int listHeight = totalHeight - bottomMargin - listY + 1;
+
+ // list widget widths
+ int minWidth = qMax(m_summaryLabel->sizeHint().width(), 250);
+ if (keepSize) {
+ // Do not make the widget smaller then it was before
+ int oldTotalListWidgetWidth = m_projectListWidget->isVisibleTo(this) ?
+ m_projectListWidget->width() : 0;
+ for (int i = TARGET; i < LAST; ++i)
+ oldTotalListWidgetWidth += m_listWidgets[i]->width();
+ minWidth = qMax(minWidth, oldTotalListWidgetWidth);
+ }
+
+ QVector<int> widths = listWidgetWidths(minWidth, 1000);
+ int x = 0;
+ for (int i = PROJECT; i < LAST; ++i) {
+ int optimalWidth = widths[i];
+ if (i == PROJECT) {
+ m_projectListWidget->resize(optimalWidth, listHeight);
+ m_projectListWidget->move(x, listY);
+ } else {
+ m_listWidgets[i]->resize(optimalWidth, listHeight);
+ m_listWidgets[i]->move(x, listY);
+ }
+ m_titleWidgets[i]->resize(optimalWidth, titleWidgetsHeight);
+ m_titleWidgets[i]->move(x, titleY);
+ x += optimalWidth + 1; //1 extra pixel for the separators or the right border
+ }
+
+ m_summaryLabel->resize(x - 1, summaryLabelHeight);
+ setFixedSize(x, totalHeight);
+ } else {
+ if (keepSize)
+ totalHeight = height();
+ else
+ totalHeight = qMax(summaryLabelHeight + bottomMargin, alignedWithActionHeight);
+ m_summaryLabel->resize(m_summaryLabel->sizeHint().width(), totalHeight - bottomMargin);
+ setFixedSize(m_summaryLabel->width() + 1, totalHeight); //1 extra pixel for the border
+ }
+
+ if (isVisibleTo(parentWidget())) {
+ QPoint moveTo = statusBar->mapToGlobal(QPoint(0,0));
+ moveTo -= QPoint(0, totalHeight);
+ move(moveTo);
+ }
+}
+
void MiniProjectTargetSelector::setActiveTarget(ProjectExplorer::ProjectConfiguration *pc)
{
m_project->setActiveTarget(static_cast<Target *>(pc));
@@ -821,7 +1071,6 @@ void MiniProjectTargetSelector::updateProjectListVisible()
m_titleWidgets[PROJECT]->setVisible(visible);
updateSummary();
- updateSeparatorVisible();
}
void MiniProjectTargetSelector::updateTargetListVisible()
@@ -835,7 +1084,6 @@ void MiniProjectTargetSelector::updateTargetListVisible()
m_listWidgets[TARGET]->setMaxCount(maxCount);
m_titleWidgets[TARGET]->setVisible(visible);
updateSummary();
- updateSeparatorVisible();
}
void MiniProjectTargetSelector::updateBuildListVisible()
@@ -850,7 +1098,6 @@ void MiniProjectTargetSelector::updateBuildListVisible()
m_listWidgets[BUILD]->setMaxCount(maxCount);
m_titleWidgets[BUILD]->setVisible(visible);
updateSummary();
- updateSeparatorVisible();
}
void MiniProjectTargetSelector::updateDeployListVisible()
@@ -865,7 +1112,6 @@ void MiniProjectTargetSelector::updateDeployListVisible()
m_listWidgets[DEPLOY]->setMaxCount(maxCount);
m_titleWidgets[DEPLOY]->setVisible(visible);
updateSummary();
- updateSeparatorVisible();
}
void MiniProjectTargetSelector::updateRunListVisible()
@@ -880,7 +1126,6 @@ void MiniProjectTargetSelector::updateRunListVisible()
m_listWidgets[RUN]->setMaxCount(maxCount);
m_titleWidgets[RUN]->setVisible(visible);
updateSummary();
- updateSeparatorVisible();
}
void MiniProjectTargetSelector::changeStartupProject(ProjectExplorer::Project *project)
@@ -994,9 +1239,9 @@ void MiniProjectTargetSelector::activeTargetChanged(ProjectExplorer::Target *tar
updateActionAndSummary();
}
-void MiniProjectTargetSelector::profileChanged(Profile *profile)
+void MiniProjectTargetSelector::kitChanged(Kit *k)
{
- if (m_target && m_target->profile() == profile)
+ if (m_target && m_target->kit() == k)
updateActionAndSummary();
}
@@ -1039,28 +1284,12 @@ void MiniProjectTargetSelector::activeRunConfigurationChanged(ProjectExplorer::R
updateActionAndSummary();
}
-void MiniProjectTargetSelector::updateSeparatorVisible()
-{
- QVector<bool> visibility;
- visibility.resize(LAST);
- visibility[PROJECT] = m_projectListWidget->isVisibleTo(this);
- for (int i = TARGET; i < LAST; ++i)
- visibility[i] = m_listWidgets[i]->isVisibleTo(this);
- int lastVisible = visibility.lastIndexOf(true);
- if (lastVisible != -1)
- visibility[lastVisible] = false;
-
- for (int i = PROJECT; i < LAST; ++i)
- m_separators[i]->setVisible(visibility[i]);
-}
-
void MiniProjectTargetSelector::setVisible(bool visible)
{
+ QWidget::setVisible(visible);
+ m_projectAction->setChecked(visible);
if (visible) {
- QStatusBar *statusBar = Core::ICore::statusBar();
- QPoint moveTo = statusBar->mapToGlobal(QPoint(0,0));
- moveTo -= QPoint(0, sizeHint().height());
- move(moveTo);
+ doLayout(false);
if (!focusWidget() || !focusWidget()->isVisibleTo(this)) { // Does the second part actually work?
if (m_projectListWidget->isVisibleTo(this))
m_projectListWidget->setFocus();
@@ -1072,9 +1301,6 @@ void MiniProjectTargetSelector::setVisible(bool visible)
}
}
}
-
- QWidget::setVisible(visible);
- m_projectAction->setChecked(visible);
}
void MiniProjectTargetSelector::toggleVisible()
@@ -1125,21 +1351,6 @@ void MiniProjectTargetSelector::keyReleaseEvent(QKeyEvent *ke)
QWidget::keyReleaseEvent(ke);
}
-QSize MiniProjectTargetSelector::sizeHint() const
-{
- static QStatusBar *statusBar = Core::ICore::statusBar();
- static QWidget *actionBar = Core::ICore::mainWindow()->findChild<QWidget*>(QLatin1String("actionbar"));
- Q_ASSERT(actionBar);
-
- // At least the size of the actionbar
- int alignedWithActionHeight
- = actionBar->height() - statusBar->height();
- QSize s = QWidget::sizeHint();
- if (s.height() < alignedWithActionHeight)
- s.setHeight(alignedWithActionHeight);
- return s;
-}
-
void MiniProjectTargetSelector::delayedHide()
{
QDateTime current = QDateTime::currentDateTime();
@@ -1221,36 +1432,13 @@ void MiniProjectTargetSelector::updateActionAndSummary()
void MiniProjectTargetSelector::updateSummary()
{
- // Count the number of lines
- int visibleLineCount = m_projectListWidget->isVisibleTo(this) ? 0 : 1;
- for (int i = TARGET; i < LAST; ++i)
- visibleLineCount += m_listWidgets[i]->isVisibleTo(this) ? 0 : 1;
-
- if (visibleLineCount == LAST) {
- m_summaryLabel->setMinimumHeight(0);
- m_summaryLabel->setMaximumHeight(800);
- } else {
- if (visibleLineCount < 3) {
- foreach (Project *p, m_sessionManager->projects()) {
- if (p->needsConfiguration()) {
- visibleLineCount = 3;
- break;
- }
- }
- }
-
- int height = visibleLineCount * QFontMetrics(m_summaryLabel->font()).height() + m_summaryLabel->margin() *2;
- m_summaryLabel->setMinimumHeight(height);
- m_summaryLabel->setMaximumHeight(height);
- }
-
QString summary;
if (Project *startupProject = m_sessionManager->startupProject()) {
if (!m_projectListWidget->isVisibleTo(this))
summary.append(tr("Project: <b>%1</b><br/>").arg(startupProject->displayName()));
if (Target *activeTarget = m_sessionManager->startupProject()->activeTarget()) {
if (!m_listWidgets[TARGET]->isVisibleTo(this))
- summary.append(tr("Target: <b>%1</b><br/>").arg( activeTarget->displayName()));
+ summary.append(tr("Kit: <b>%1</b><br/>").arg( activeTarget->displayName()));
if (!m_listWidgets[BUILD]->isVisibleTo(this) && activeTarget->activeBuildConfiguration())
summary.append(tr("Build: <b>%1</b><br/>").arg(
activeTarget->activeBuildConfiguration()->displayName()));
@@ -1283,6 +1471,8 @@ void MiniProjectTargetSelector::updateSummary()
void MiniProjectTargetSelector::paintEvent(QPaintEvent *)
{
QPainter painter(this);
+ painter.setBrush(QBrush(QColor(160, 160, 160, 255)));
+ painter.drawRect(rect());
painter.setPen(Utils::StyleHelper::borderColor());
painter.drawLine(rect().topLeft(), rect().topRight());
painter.drawLine(rect().topRight(), rect().bottomRight());
diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.h b/src/plugins/projectexplorer/miniprojecttargetselector.h
index c7cda42574..680f3f0890 100644
--- a/src/plugins/projectexplorer/miniprojecttargetselector.h
+++ b/src/plugins/projectexplorer/miniprojecttargetselector.h
@@ -41,7 +41,7 @@ class QStackedWidget;
QT_END_NAMESPACE
namespace ProjectExplorer {
-class Profile;
+class Kit;
class Project;
class Target;
class BuildConfiguration;
@@ -58,13 +58,18 @@ class ListWidget : public QListWidget
Q_OBJECT
public:
ListWidget(QWidget *parent);
- QSize sizeHint() const;
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
void setMaxCount(int maxCount);
+ int maxCount();
+ int optimalWidth() const;
+ void setOptimalWidth(int width);
+
+ int padding();
private:
int m_maxCount;
+ int m_optimalWidth;
};
class ProjectListWidget : public ListWidget
@@ -115,7 +120,7 @@ public:
void keyPressEvent(QKeyEvent *ke);
void keyReleaseEvent(QKeyEvent *ke);
- QSize sizeHint() const;
+ bool event(QEvent *event);
public slots:
void toggleVisible();
void nextOrShow();
@@ -134,7 +139,7 @@ private slots:
void changeStartupProject(ProjectExplorer::Project *project);
void activeTargetChanged(ProjectExplorer::Target *target);
- void profileChanged(ProjectExplorer::Profile *profile);
+ void kitChanged(ProjectExplorer::Kit *k);
void activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration *bc);
void activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration *dc);
void activeRunConfigurationChanged(ProjectExplorer::RunConfiguration *rc);
@@ -163,10 +168,13 @@ private:
void updateDeployListVisible();
void updateRunListVisible();
void updateSummary();
- void updateSeparatorVisible();
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *);
+ void doLayout(bool keepSize);
+ QVector<int> listWidgetWidths(int minSize, int maxSize);
+ QWidget *createTitleLabel(const QString &text);
+
QAction *m_projectAction;
SessionManager *m_sessionManager;
@@ -174,7 +182,6 @@ private:
ProjectListWidget *m_projectListWidget;
QVector<GenericListWidget *> m_listWidgets;
QVector<QWidget *> m_titleWidgets;
- QVector<QWidget *> m_separators;
QLabel *m_summaryLabel;
Project *m_project;
diff --git a/src/plugins/projectexplorer/profilemanager.cpp b/src/plugins/projectexplorer/profilemanager.cpp
deleted file mode 100644
index e91878a42c..0000000000
--- a/src/plugins/projectexplorer/profilemanager.cpp
+++ /dev/null
@@ -1,477 +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 "profilemanager.h"
-
-#include "profile.h"
-#include "profileconfigwidget.h"
-#include "profileinformation.h"
-#include "profilemanagerconfigwidget.h"
-#include "project.h"
-
-#include <coreplugin/icore.h>
-
-#include <extensionsystem/pluginmanager.h>
-
-#include <utils/persistentsettings.h>
-#include <utils/environment.h>
-
-#include <QCoreApplication>
-#include <QDir>
-#include <QSettings>
-
-#include <QFormLayout>
-#include <QLabel>
-
-static const char PROFILE_DATA_KEY[] = "Profile.";
-static const char PROFILE_COUNT_KEY[] = "Profile.Count";
-static const char PROFILE_FILE_VERSION_KEY[] = "Version";
-static const char PROFILE_DEFAULT_KEY[] = "Profile.Default";
-static const char PROFILE_FILENAME[] = "/qtcreator/profiles.xml";
-
-using Utils::PersistentSettingsWriter;
-using Utils::PersistentSettingsReader;
-
-static Utils::FileName settingsFileName()
-{
- QFileInfo settingsLocation(ExtensionSystem::PluginManager::settings()->fileName());
- return Utils::FileName::fromString(settingsLocation.absolutePath() + QLatin1String(PROFILE_FILENAME));
-}
-
-namespace ProjectExplorer {
-
-ProfileManager *ProfileManager::m_instance = 0;
-
-namespace Internal {
-
-// --------------------------------------------------------------------------
-// ProfileManagerPrivate:
-// --------------------------------------------------------------------------
-
-class ProfileManagerPrivate
-{
-public:
- ProfileManagerPrivate();
- ~ProfileManagerPrivate();
- QList<Task> validateProfile(Profile *p) const;
-
- Profile *m_defaultProfile;
- bool m_initialized;
- QList<ProfileInformation *> m_informationList;
- QList<Profile *> m_profileList;
- Utils::PersistentSettingsWriter *m_writer;
-};
-
-ProfileManagerPrivate::ProfileManagerPrivate()
- : m_defaultProfile(0), m_initialized(false),
- m_writer(new Utils::PersistentSettingsWriter(settingsFileName(), QLatin1String("QtCreatorProfiles")))
-{ }
-
-ProfileManagerPrivate::~ProfileManagerPrivate()
-{
- qDeleteAll(m_informationList);
- qDeleteAll(m_profileList);
- delete m_writer;
-}
-
-QList<Task> ProfileManagerPrivate::validateProfile(Profile *p) const
-{
- Q_ASSERT(p);
- QList<Task> result;
- bool hasError = false;
- foreach (ProfileInformation *pi, m_informationList) {
- QList<Task> tmp = pi->validate(p);
- foreach (const Task &t, tmp)
- if (t.type == Task::Error)
- hasError = true;
- result << tmp;
- }
- p->setValid(!hasError);
- return result;
-}
-
-} // namespace Internal
-
-// --------------------------------------------------------------------------
-// ProfileManager:
-// --------------------------------------------------------------------------
-
-ProfileManager *ProfileManager::instance()
-{
- return m_instance;
-}
-
-ProfileManager::ProfileManager(QObject *parent) :
- QObject(parent),
- d(new Internal::ProfileManagerPrivate())
-{
- Q_ASSERT(!m_instance);
- m_instance = this;
-
- connect(Core::ICore::instance(), SIGNAL(saveSettingsRequested()),
- this, SLOT(saveProfiles()));
-
- connect(this, SIGNAL(profileAdded(ProjectExplorer::Profile*)),
- this, SIGNAL(profilesChanged()));
- connect(this, SIGNAL(profileRemoved(ProjectExplorer::Profile*)),
- this, SIGNAL(profilesChanged()));
- connect(this, SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SIGNAL(profilesChanged()));
-}
-
-void ProfileManager::restoreProfiles()
-{
- QList<Profile *> profilesToRegister;
- QList<Profile *> profilesToCheck;
-
- // read all profiles from SDK
- QFileInfo systemSettingsFile(Core::ICore::settings(QSettings::SystemScope)->fileName());
- ProfileList system = restoreProfiles(Utils::FileName::fromString(systemSettingsFile.absolutePath() + QLatin1String(PROFILE_FILENAME)));
- QList<Profile *> readProfiles = system.profiles;
- // make sure we mark these as autodetected!
- foreach (Profile *p, readProfiles)
- p->setAutoDetected(true);
-
- profilesToRegister = readProfiles; // SDK profiles are always considered to be up-to-date, so no need to
- // recheck them.
-
- // read all profile chains from user file
- ProfileList userProfiles = restoreProfiles(settingsFileName());
- readProfiles = userProfiles.profiles;
-
- foreach (Profile *p, readProfiles) {
- if (p->isAutoDetected())
- profilesToCheck.append(p);
- else
- profilesToRegister.append(p);
- }
- readProfiles.clear();
-
- // Then auto create profiles:
- QList<Profile *> detectedProfiles;
-
- // Find/update autodetected profiles:
- Profile *toStore = 0;
- foreach (Profile *currentDetected, detectedProfiles) {
- toStore = currentDetected;
-
- // Check whether we had this profile stored and prefer the old one with the old id:
- for (int i = 0; i < profilesToCheck.count(); ++i) {
- if (*(profilesToCheck.at(i)) == *currentDetected) {
- toStore = profilesToCheck.at(i);
- profilesToCheck.removeAt(i);
- delete currentDetected;
- break;
- }
- }
- addProfile(toStore);
- }
-
- // Delete all loaded autodetected profiles that were not rediscovered:
- qDeleteAll(profilesToCheck);
-
- // Store manual profiles
- foreach (Profile *p, profilesToRegister)
- addProfile(p);
-
- if (profiles().isEmpty()) {
- Profile *defaultProfile = new Profile; // One profile using default values
- defaultProfile->setDisplayName(tr("Desktop"));
- defaultProfile->setAutoDetected(false);
- defaultProfile->setIconPath(QLatin1String(":///DESKTOP///"));
-
- addProfile(defaultProfile);
- }
-
- Profile *p = find(userProfiles.defaultProfile);
- if (p)
- setDefaultProfile(p);
-}
-
-ProfileManager::~ProfileManager()
-{
- // Clean out profile information to avoid calling them during deregistration:
- delete d;
- m_instance = 0;
-}
-
-void ProfileManager::saveProfiles()
-{
- if (!d->m_initialized) // ignore save requests while we are not initialized.
- return;
-
- d->m_writer->saveValue(QLatin1String(PROFILE_FILE_VERSION_KEY), 1);
-
- int count = 0;
- foreach (Profile *p, profiles()) {
- QVariantMap tmp = p->toMap();
- if (tmp.isEmpty())
- continue;
- d->m_writer->saveValue(QString::fromLatin1(PROFILE_DATA_KEY) + QString::number(count), tmp);
- ++count;
- }
- d->m_writer->saveValue(QLatin1String(PROFILE_COUNT_KEY), count);
- d->m_writer->saveValue(QLatin1String(PROFILE_DEFAULT_KEY),
- d->m_defaultProfile ? QString::fromLatin1(d->m_defaultProfile->id().name()) : QString());
- d->m_writer->save(Core::ICore::mainWindow());
-}
-
-bool greaterPriority(ProfileInformation *a, ProfileInformation *b)
-{
- return a->priority() > b->priority();
-}
-
-void ProfileManager::registerProfileInformation(ProfileInformation *pi)
-{
- QList<ProfileInformation *>::iterator it
- = qLowerBound(d->m_informationList.begin(), d->m_informationList.end(), pi, greaterPriority);
- d->m_informationList.insert(it, pi);
-
- connect(pi, SIGNAL(validationNeeded()), this, SLOT(validateProfiles()));
-
- if (!d->m_initialized)
- return;
-
- foreach (Profile *p, profiles()) {
- if (!p->hasValue(pi->dataId()))
- p->setValue(pi->dataId(), pi->defaultValue(p));
- }
-
- return;
-}
-
-void ProfileManager::deregisterProfileInformation(ProfileInformation *pi)
-{
- Q_ASSERT(d->m_informationList.contains(pi));
- d->m_informationList.removeAll(pi);
- delete pi;
-}
-
-ProfileManager::ProfileList ProfileManager::restoreProfiles(const Utils::FileName &fileName)
-{
- ProfileList result;
-
- PersistentSettingsReader reader;
- if (!reader.load(fileName))
- return result;
- QVariantMap data = reader.restoreValues();
-
- // Check version:
- int version = data.value(QLatin1String(PROFILE_FILE_VERSION_KEY), 0).toInt();
- if (version < 1)
- return result;
-
- const int count = data.value(QLatin1String(PROFILE_COUNT_KEY), 0).toInt();
- for (int i = 0; i < count; ++i) {
- const QString key = QString::fromLatin1(PROFILE_DATA_KEY) + QString::number(i);
- if (!data.contains(key))
- break;
-
- const QVariantMap stMap = data.value(key).toMap();
-
- Profile *p = new Profile;
- if (p->fromMap(stMap)) {
- result.profiles.append(p);
- } else {
- delete p;
- qWarning("Warning: Unable to restore profiles stored in %s at position %d.",
- qPrintable(fileName.toUserOutput()), i);
- }
- }
- const QString defaultId = data.value(QLatin1String(PROFILE_DEFAULT_KEY)).toString();
- if (defaultId.isEmpty())
- return result;
-
- const Core::Id id = Core::Id(defaultId);
- foreach (Profile *i, result.profiles) {
- if (i->id() == id) {
- result.defaultProfile = id;
- break;
- }
- }
- return result;
-}
-
-QList<Profile *> ProfileManager::profiles(const ProfileMatcher *m) const
-{
- if (!d->m_initialized) {
- d->m_initialized = true;
- const_cast<ProfileManager *>(this)->restoreProfiles();
- }
-
- QList<Profile *> result;
- foreach (Profile *p, d->m_profileList) {
- if (!m || m->matches(p))
- result.append(p);
- }
- return result;
-}
-
-Profile *ProfileManager::find(const Core::Id &id) const
-{
- if (!id.isValid())
- return 0;
-
- foreach (Profile *p, profiles()) {
- if (p->id() == id)
- return p;
- }
- return 0;
-}
-
-Profile *ProfileManager::find(const ProfileMatcher *m) const
-{
- QList<Profile *> matched = profiles(m);
- return matched.isEmpty() ? 0 : matched.first();
-}
-
-Profile *ProfileManager::defaultProfile()
-{
- if (!d->m_initialized) {
- d->m_initialized = true;
- restoreProfiles();
- }
- return d->m_defaultProfile;
-}
-
-QList<ProfileInformation *> ProfileManager::profileInformation() const
-{
- return d->m_informationList;
-}
-
-ProfileConfigWidget *ProfileManager::createConfigWidget(Profile *p) const
-{
- if (!p)
- return 0;
-
- Internal::ProfileManagerConfigWidget *result = new Internal::ProfileManagerConfigWidget(p);
- foreach (ProfileInformation *pi, d->m_informationList)
- result->addConfigWidget(pi->createConfigWidget(p));
-
- return result;
-}
-
-void ProfileManager::notifyAboutUpdate(ProjectExplorer::Profile *p)
-{
- if (!p || !profiles().contains(p))
- return;
- d->validateProfile(p);
- emit profileUpdated(p);
-}
-
-bool ProfileManager::registerProfile(ProjectExplorer::Profile *p)
-{
- if (!p)
- return true;
- foreach (Profile *current, profiles()) {
- if (p == current)
- return false;
- }
-
- // make sure we have all the information in our profiles:
- foreach (ProfileInformation *pi, d->m_informationList) {
- if (!p->hasValue(pi->dataId()))
- p->setValue(pi->dataId(), pi->defaultValue(p));
- }
-
- addProfile(p);
- emit profileAdded(p);
- return true;
-}
-
-void ProfileManager::deregisterProfile(Profile *p)
-{
- if (!p || !profiles().contains(p))
- return;
- d->m_profileList.removeOne(p);
- if (d->m_defaultProfile == p) {
- QList<Profile *> stList = profiles();
- Profile *newDefault = 0;
- foreach (Profile *cur, stList) {
- if (cur->isValid()) {
- newDefault = cur;
- break;
- }
- }
- setDefaultProfile(newDefault);
- }
- emit profileRemoved(p);
- delete p;
-}
-
-QList<Task> ProfileManager::validateProfile(Profile *p)
-{
- QList<Task> result = d->validateProfile(p);
- qSort(result);
- return result;
-}
-
-void ProfileManager::setDefaultProfile(Profile *p)
-{
- if (d->m_defaultProfile == p)
- return;
- if (p && !profiles().contains(p))
- return;
- d->m_defaultProfile = p;
- emit defaultProfileChanged();
-}
-
-void ProfileManager::validateProfiles()
-{
- foreach (Profile *p, profiles())
- d->validateProfile(p);
-}
-
-void ProfileManager::addProfile(Profile *p)
-{
- if (!p)
- return;
- p->setDisplayName(p->displayName()); // make name unique
- d->validateProfile(p);
- d->m_profileList.append(p);
- if (!d->m_defaultProfile ||
- (!d->m_defaultProfile->isValid() && p->isValid()))
- setDefaultProfile(p);
-}
-
-
-void ProfileInformation::addToEnvironment(const Profile *p, Utils::Environment &env) const
-{
- Q_UNUSED(p);
- Q_UNUSED(env);
-}
-
-QString ProfileInformation::displayNamePostfix(const Profile *p) const
-{
- Q_UNUSED(p);
- return QString();
-}
-
-} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/profilemanager.h b/src/plugins/projectexplorer/profilemanager.h
deleted file mode 100644
index 244dc9c8c4..0000000000
--- a/src/plugins/projectexplorer/profilemanager.h
+++ /dev/null
@@ -1,171 +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 PROFILEMANAGER_H
-#define PROFILEMANAGER_H
-
-#include "projectexplorer_export.h"
-
-#include "task.h"
-
-#include <coreplugin/id.h>
-#include <utils/fileutils.h>
-
-#include <QObject>
-#include <QPair>
-
-namespace Utils { class Environment; }
-
-namespace ProjectExplorer {
-class Profile;
-class ProfileConfigWidget;
-
-namespace Internal {
-class ProfileManagerPrivate;
-class ProfileModel;
-} // namespace Internal
-
-/**
- * @brief The ProfileInformation class
- *
- * One piece of information stored in the profile.
- *
- * This needs to get registered with the \a ProfileManager.
- */
-class PROJECTEXPLORER_EXPORT ProfileInformation : public QObject
-{
- Q_OBJECT
-
-public:
- typedef QPair<QString, QString> Item;
- typedef QList<Item> ItemList;
-
- virtual Core::Id dataId() const = 0;
-
- virtual unsigned int priority() const = 0; // the higher the closer to the top.
-
- virtual bool visibleIn(Profile *) { return true; }
- virtual QVariant defaultValue(Profile *) const = 0;
-
- virtual QList<Task> validate(Profile *) const = 0;
-
- virtual ItemList toUserOutput(Profile *p) const = 0;
-
- virtual ProfileConfigWidget *createConfigWidget(Profile *) const = 0;
-
- virtual void addToEnvironment(const Profile *p, Utils::Environment &env) const;
-
- virtual QString displayNamePostfix(const Profile *p) const;
-
-signals:
- void validationNeeded();
-};
-
-class PROJECTEXPLORER_EXPORT ProfileMatcher
-{
-public:
- virtual ~ProfileMatcher() { }
- virtual bool matches(const Profile *p) const = 0;
-};
-
-class PROJECTEXPLORER_EXPORT ProfileManager : public QObject
-{
- Q_OBJECT
-
-public:
- static ProfileManager *instance();
- ~ProfileManager();
-
- QList<Profile *> profiles(const ProfileMatcher *m = 0) const;
- Profile *find(const Core::Id &id) const;
- Profile *find(const ProfileMatcher *m) const;
- Profile *defaultProfile();
-
- QList<ProfileInformation *> profileInformation() const;
-
- ProfileConfigWidget *createConfigWidget(Profile *p) const;
-
-public slots:
- bool registerProfile(ProjectExplorer::Profile *p);
- void deregisterProfile(ProjectExplorer::Profile *p);
- QList<Task> validateProfile(ProjectExplorer::Profile *p);
- void setDefaultProfile(ProjectExplorer::Profile *p);
-
- void saveProfiles();
-
- void registerProfileInformation(ProjectExplorer::ProfileInformation *pi);
- void deregisterProfileInformation(ProjectExplorer::ProfileInformation *pi);
-
-signals:
- void profileAdded(ProjectExplorer::Profile *);
- // Profile is still valid when this call happens!
- void profileRemoved(ProjectExplorer::Profile *);
- // Profile was updated.
- void profileUpdated(ProjectExplorer::Profile *);
- // Default profile was changed.
- void defaultProfileChanged();
- // Something changed.
- void profilesChanged();
-
-private slots:
- void validateProfiles();
-
-private:
- explicit ProfileManager(QObject *parent = 0);
-
- // Make sure the this is only called after all
- // ProfileInformation are registered!
- void restoreProfiles();
- class ProfileList
- {
- public:
- ProfileList()
- { }
- Core::Id defaultProfile;
- QList<Profile *> profiles;
- };
- ProfileList restoreProfiles(const Utils::FileName &fileName);
-
- void notifyAboutUpdate(ProjectExplorer::Profile *p);
- void addProfile(Profile *p);
-
- Internal::ProfileManagerPrivate *const d;
-
- static ProfileManager *m_instance;
-
- friend class Internal::ProfileManagerPrivate; // for the restoreToolChains methods
- friend class ProjectExplorerPlugin; // for constructor
- friend class Profile;
- friend class Internal::ProfileModel;
-};
-
-} // namespace ProjectExplorer
-
-#endif // PROFILEMANAGER_H
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp
index c8b29d4789..3bc256d992 100644
--- a/src/plugins/projectexplorer/project.cpp
+++ b/src/plugins/projectexplorer/project.cpp
@@ -45,8 +45,8 @@
#include <coreplugin/icontext.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/buildmanager.h>
-#include <projectexplorer/profile.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kit.h>
+#include <projectexplorer/kitmanager.h>
#include <limits>
#include <utils/qtcassert.h>
@@ -150,7 +150,7 @@ void Project::changeBuildConfigurationEnabled()
void Project::addTarget(Target *t)
{
QTC_ASSERT(t && !d->m_targets.contains(t), return);
- QTC_ASSERT(!target(t->profile()), return);
+ QTC_ASSERT(!target(t->kit()), return);
Q_ASSERT(t->project() == this);
// Check that we don't have a configuration with the same displayName
@@ -234,27 +234,27 @@ Target *Project::target(const Core::Id id) const
return 0;
}
-Target *Project::target(Profile *p) const
+Target *Project::target(Kit *k) const
{
foreach (Target *target, d->m_targets) {
- if (target->profile() == p)
+ if (target->kit() == k)
return target;
}
return 0;
}
-bool Project::supportsProfile(Profile *p) const
+bool Project::supportsKit(Kit *k) const
{
- Q_UNUSED(p);
+ Q_UNUSED(k);
return true;
}
-Target *Project::createTarget(Profile *p)
+Target *Project::createTarget(Kit *k)
{
- if (!p || target(p))
+ if (!k || target(k))
return 0;
- Target *t = new Target(this, p);
+ Target *t = new Target(this, k);
t->createDefaultSetup();
return t;
@@ -269,13 +269,13 @@ Target *Project::restoreTarget(const QVariantMap &data)
return 0;
}
- Profile *p = ProfileManager::instance()->find(id);
- if (!p) {
+ Kit *k = KitManager::instance()->find(id);
+ if (!k) {
qWarning("Warning: No profile '%s' found. Continuing.", qPrintable(id.toString()));
return 0;
}
- Target *t = new Target(this, p);
+ Target *t = new Target(this, k);
if (!t->fromMap(data)) {
delete t;
return 0;
@@ -339,11 +339,11 @@ QString Project::projectDirectory() const
return projectDirectory(document()->fileName());
}
-QString Project::projectDirectory(const QString &proFile)
+QString Project::projectDirectory(const QString &top)
{
- if (proFile.isEmpty())
+ if (top.isEmpty())
return QString();
- QFileInfo info(proFile);
+ QFileInfo info(top);
return info.absoluteDir().path();
}
diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h
index 4769c6dc10..e0814d3ca1 100644
--- a/src/plugins/projectexplorer/project.h
+++ b/src/plugins/projectexplorer/project.h
@@ -50,7 +50,7 @@ class BuildConfigWidget;
class IProjectManager;
class EditorConfiguration;
class ProjectNode;
-class Profile;
+class Kit;
class Target;
class ProjectPrivate;
@@ -89,10 +89,10 @@ public:
Target *activeTarget() const;
void setActiveTarget(Target *target);
Target *target(const Core::Id id) const;
- Target *target(Profile *p) const;
- virtual bool supportsProfile(Profile *p) const;
+ Target *target(Kit *k) const;
+ virtual bool supportsKit(Kit *k) const;
- Target *createTarget(Profile *p);
+ Target *createTarget(Kit *k);
Target *restoreTarget(const QVariantMap &data);
void saveSettings();
@@ -111,9 +111,9 @@ public:
virtual QVariantMap toMap() const;
- // The directory that holds the project file. This includes the absolute path.
+ // The directory that holds the project. This includes the absolute path.
QString projectDirectory() const;
- static QString projectDirectory(const QString &proFile);
+ static QString projectDirectory(const QString &top);
virtual Core::Context projectContext() const;
virtual Core::Context projectLanguage() const;
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index ced3977d80..bfffc7b536 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -36,8 +36,8 @@
#include "gcctoolchainfactories.h"
#include "project.h"
#include "projectexplorersettings.h"
-#include "profilemanager.h"
-#include "profileoptionspage.h"
+#include "kitmanager.h"
+#include "kitoptionspage.h"
#include "target.h"
#include "targetsettingspanel.h"
#include "toolchainmanager.h"
@@ -64,7 +64,7 @@
#include "processstep.h"
#include "projectexplorerconstants.h"
#include "customwizard.h"
-#include "profileinformation.h"
+#include "kitinformation.h"
#include "projectfilewizardextension.h"
#include "projecttreewidget.h"
#include "projectwindow.h"
@@ -244,7 +244,7 @@ struct ProjectExplorerPluginPrivate {
Core::IMode *m_projectsMode;
TaskHub *m_taskHub;
- ProfileManager *m_profileManager;
+ KitManager *m_kitManager;
ToolChainManager *m_toolChainManager;
bool m_shuttingDown;
};
@@ -255,7 +255,7 @@ ProjectExplorerPluginPrivate::ProjectExplorerPluginPrivate() :
m_delayedRunConfiguration(0),
m_runMode(NoRunMode),
m_projectsMode(0),
- m_profileManager(0),
+ m_kitManager(0),
m_toolChainManager(0),
m_shuttingDown(false)
{
@@ -297,7 +297,7 @@ ProjectExplorerPlugin::~ProjectExplorerPlugin()
delete d->m_welcomePage;
removeObject(this);
// Force sequence of deletion:
- delete d->m_profileManager; // remove all the profile informations
+ delete d->m_kitManager; // remove all the profile informations
delete d->m_toolChainManager;
delete d;
@@ -340,10 +340,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
addAutoReleasedObject(new Internal::DesktopDeviceFactory);
- d->m_profileManager = new ProfileManager; // register before ToolChainManager
+ d->m_kitManager = new KitManager; // register before ToolChainManager
d->m_toolChainManager = new ToolChainManager;
addAutoReleasedObject(new Internal::ToolChainOptionsPage);
- addAutoReleasedObject(new ProfileOptionsPage);
+ addAutoReleasedObject(new KitOptionsPage);
d->m_taskHub = new TaskHub;
addAutoReleasedObject(d->m_taskHub);
@@ -869,7 +869,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
d->m_projectSelectorActionMenu = new QAction(this);
d->m_projectSelectorActionMenu->setEnabled(false);
- d->m_projectSelectorActionMenu->setText(tr("Open Build/Run Target Selector..."));
+ d->m_projectSelectorActionMenu->setText(tr("Open Build and Run Kit Selector..."));
connect(d->m_projectSelectorActionMenu, SIGNAL(triggered()), d->m_targetSelector, SLOT(toggleVisible()));
cmd = Core::ActionManager::registerAction(d->m_projectSelectorActionMenu, ProjectExplorer::Constants::SELECTTARGET,
globalcontext);
@@ -1102,12 +1102,12 @@ void ProjectExplorerPlugin::extensionsInitialized()
}
d->m_buildManager->extensionsInitialized();
- // Register ProfileInformation:
+ // Register KitInformation:
// Only do this now to make sure all device factories were properly initialized.
- ProfileManager::instance()->registerProfileInformation(new SysRootProfileInformation);
- ProfileManager::instance()->registerProfileInformation(new DeviceProfileInformation);
- ProfileManager::instance()->registerProfileInformation(new DeviceTypeProfileInformation);
- ProfileManager::instance()->registerProfileInformation(new ToolChainProfileInformation);
+ KitManager::instance()->registerKitInformation(new SysRootKitInformation);
+ KitManager::instance()->registerKitInformation(new DeviceKitInformation);
+ KitManager::instance()->registerKitInformation(new DeviceTypeKitInformation);
+ KitManager::instance()->registerKitInformation(new ToolChainKitInformation);
DeviceManager *dm = DeviceManager::instance();
if (dm->find(Core::Id(Constants::DESKTOP_DEVICE_ID)).isNull())
@@ -2594,7 +2594,7 @@ void ProjectExplorerPlugin::addNewFile()
QList<Core::Id> profileIds;
foreach (Target *target, d->m_currentProject->targets())
profileIds << target->id();
- map.insert(QLatin1String(Constants::PROJECT_PROFILE_IDS), QVariant::fromValue(profileIds));
+ map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), QVariant::fromValue(profileIds));
}
Core::ICore::showNewItemDialog(tr("New File", "Title of dialog"),
Core::IWizard::wizardsOfKind(Core::IWizard::FileWizard)
@@ -2616,7 +2616,7 @@ void ProjectExplorerPlugin::addNewSubproject()
QList<Core::Id> profileIds;
foreach (Target *target, d->m_currentProject->targets())
profileIds << target->id();
- map.insert(QLatin1String(Constants::PROJECT_PROFILE_IDS), QVariant::fromValue(profileIds));
+ map.insert(QLatin1String(Constants::PROJECT_KIT_IDS), QVariant::fromValue(profileIds));
}
Core::ICore::showNewItemDialog(tr("New Subproject", "Title of dialog"),
diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro
index eed5676012..89933f3d3c 100644
--- a/src/plugins/projectexplorer/projectexplorer.pro
+++ b/src/plugins/projectexplorer/projectexplorer.pro
@@ -20,15 +20,15 @@ HEADERS += projectexplorer.h \
gcctoolchain.h \
projectexplorer_export.h \
projectwindow.h \
- profile.h \
- profilechooser.h \
- profileconfigwidget.h \
- profileinformation.h \
- profileinformationconfigwidget.h \
- profilemanager.h \
- profilemanagerconfigwidget.h \
- profilemodel.h \
- profileoptionspage.h \
+ kit.h \
+ kitchooser.h \
+ kitconfigwidget.h \
+ kitinformation.h \
+ kitinformationconfigwidget.h \
+ kitmanager.h \
+ kitmanagerconfigwidget.h \
+ kitmodel.h \
+ kitoptionspage.h \
buildmanager.h \
buildsteplist.h \
compileoutputwindow.h \
@@ -139,14 +139,14 @@ SOURCES += projectexplorer.cpp \
clangparser.cpp \
gcctoolchain.cpp \
projectwindow.cpp \
- profile.cpp \
- profilechooser.cpp \
- profileinformation.cpp \
- profileinformationconfigwidget.cpp \
- profilemanager.cpp \
- profilemanagerconfigwidget.cpp \
- profilemodel.cpp \
- profileoptionspage.cpp \
+ kit.cpp \
+ kitchooser.cpp \
+ kitinformation.cpp \
+ kitinformationconfigwidget.cpp \
+ kitmanager.cpp \
+ kitmanagerconfigwidget.cpp \
+ kitmodel.cpp \
+ kitoptionspage.cpp \
buildmanager.cpp \
buildsteplist.cpp \
compileoutputwindow.cpp \
diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs
index 12734ee58e..9e368cbc93 100644
--- a/src/plugins/projectexplorer/projectexplorer.qbs
+++ b/src/plugins/projectexplorer/projectexplorer.qbs
@@ -107,23 +107,23 @@ QtcPlugin {
"processparameters.h",
"processstep.cpp",
"processstep.h",
- "profile.cpp",
- "profile.h",
- "profilechooser.cpp",
- "profilechooser.h",
- "profileconfigwidget.h",
- "profileinformation.cpp",
- "profileinformation.h",
- "profileinformationconfigwidget.cpp",
- "profileinformationconfigwidget.h",
- "profilemanager.cpp",
- "profilemanager.h",
- "profilemanagerconfigwidget.cpp",
- "profilemanagerconfigwidget.h",
- "profilemodel.cpp",
- "profilemodel.h",
- "profileoptionspage.cpp",
- "profileoptionspage.h",
+ "kit.cpp",
+ "kit.h",
+ "kitchooser.cpp",
+ "kitchooser.h",
+ "kitconfigwidget.h",
+ "kitinformation.cpp",
+ "kitinformation.h",
+ "kitinformationconfigwidget.cpp",
+ "kitinformationconfigwidget.h",
+ "kitmanager.cpp",
+ "kitmanager.h",
+ "kitmanagerconfigwidget.cpp",
+ "kitmanagerconfigwidget.h",
+ "kitmodel.cpp",
+ "kitmodel.h",
+ "kitoptionspage.cpp",
+ "kitoptionspage.h",
"project.cpp",
"project.h",
"projectconfiguration.cpp",
diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h
index ad15fd32fc..087a82010c 100644
--- a/src/plugins/projectexplorer/projectexplorerconstants.h
+++ b/src/plugins/projectexplorer/projectexplorerconstants.h
@@ -180,7 +180,7 @@ const char PROJECTEXPLORER_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("ProjectEx
const char PROJECTEXPLORER_SETTINGS_CATEGORY_ICON[] = ":/core/images/category_buildrun.png";
const char PROJECTEXPLORER_SETTINGS_ID[] = "A.ProjectExplorer.ProjectExplorer";
const char TOOLCHAIN_SETTINGS_PAGE_ID[] = "M.ProjectExplorer.ToolChainOptions";
-const char PROFILE_SETTINGS_PAGE_ID[] = "D.ProjectExplorer.ProfileOptions";
+const char KITS_SETTINGS_PAGE_ID[] = "D.ProjectExplorer.KitsOptions";
// Device settings page
const char DEVICE_SETTINGS_CATEGORY[] = "X.Devices";
@@ -208,7 +208,7 @@ const char IMPORT_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer
// Wizard extra values
const char PREFERED_PROJECT_NODE[] = "ProjectExplorer.PreferedProjectNode";
-const char PROJECT_PROFILE_IDS[] = "ProjectExplorer.Profile.Ids";
+const char PROJECT_KIT_IDS[] = "ProjectExplorer.Profile.Ids";
// Build step lists ids:
const char BUILDSTEPS_CLEAN[] = "ProjectExplorer.BuildSteps.Clean";
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp
index 8e84ccc54c..8a9f23d540 100644
--- a/src/plugins/projectexplorer/projectwindow.cpp
+++ b/src/plugins/projectexplorer/projectwindow.cpp
@@ -32,7 +32,7 @@
#include "doubletabwidget.h"
-#include "profilemanager.h"
+#include "kitmanager.h"
#include "project.h"
#include "projectexplorer.h"
#include "projectexplorerconstants.h"
@@ -261,7 +261,7 @@ ProjectWindow::~ProjectWindow()
void ProjectWindow::extensionsInitialized()
{
- connect(ProfileManager::instance(), SIGNAL(profilesChanged()), this, SLOT(handleProfilesChanges()));
+ connect(KitManager::instance(), SIGNAL(kitsChanged()), this, SLOT(handleKitChanges()));
}
void ProjectWindow::aboutToShutdown()
@@ -288,7 +288,7 @@ void ProjectWindow::projectUpdated(Project *p)
m_tabWidget->setCurrentIndex(index);
}
-void ProjectWindow::handleProfilesChanges()
+void ProjectWindow::handleKitChanges()
{
bool changed = false;
int index = m_tabWidget->currentIndex();
@@ -330,7 +330,7 @@ void ProjectWindow::registerProject(ProjectExplorer::Project *project)
m_hasTarget.insert(project, projectHasTarget);
if (projectHasTarget) // Use the Targets page
- subtabs << QCoreApplication::translate("TargetSettingsPanelFactory", "Targets");
+ subtabs << QCoreApplication::translate("TargetSettingsPanelFactory", "Build & Run");
// Add the project specific pages
QList<IProjectPanelFactory *> factories = ExtensionSystem::PluginManager::getObjects<IProjectPanelFactory>();
diff --git a/src/plugins/projectexplorer/projectwindow.h b/src/plugins/projectexplorer/projectwindow.h
index 6fa3d5d19b..c558590652 100644
--- a/src/plugins/projectexplorer/projectwindow.h
+++ b/src/plugins/projectexplorer/projectwindow.h
@@ -85,7 +85,7 @@ public slots:
void projectUpdated(ProjectExplorer::Project *p);
private slots:
- void handleProfilesChanges();
+ void handleKitChanges();
void showProperties(int index, int subIndex);
void registerProject(ProjectExplorer::Project*);
void deregisterProject(ProjectExplorer::Project*);
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index 87ae827ddf..e7a34e0c0f 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -36,7 +36,7 @@
#include "abi.h"
#include "buildconfiguration.h"
#include "projectexplorerconstants.h"
-#include "profileinformation.h"
+#include "kitinformation.h"
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h>
@@ -357,7 +357,7 @@ ProjectExplorer::Abi RunConfiguration::abi() const
BuildConfiguration *bc = target()->activeBuildConfiguration();
if (!bc)
return Abi::hostAbi();
- ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
+ ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
if (!tc)
return Abi::hostAbi();
return tc->targetAbi();
@@ -558,6 +558,11 @@ Abi RunControl::abi() const
return Abi();
}
+RunConfiguration *RunControl::runConfiguration() const
+{
+ return m_runConfiguration.data();
+}
+
ProcessHandle RunControl::applicationProcessHandle() const
{
return m_applicationProcessHandle;
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index ac6e85c0db..99817ba23f 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -274,6 +274,7 @@ public:
void setApplicationProcessHandle(const ProcessHandle &handle);
Abi abi() const;
+ RunConfiguration *runConfiguration() const;
bool sameRunConfiguration(const RunControl *other) const;
Utils::OutputFormatter *outputFormatter();
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index 79e3ae6fc2..257a647879 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -312,9 +312,10 @@ bool SessionManager::save()
QLatin1String("QtCreatorSession"));
}
+ QVariantMap data;
// save the startup project
if (m_startupProject)
- m_writer->saveValue(QLatin1String("StartupProject"), m_startupProject->document()->fileName());
+ data.insert(QLatin1String("StartupProject"), m_startupProject->document()->fileName());
QStringList projectFiles;
foreach (Project *pro, m_projects)
@@ -326,7 +327,7 @@ bool SessionManager::save()
if (!projectFiles.contains(failed))
projectFiles << failed;
- m_writer->saveValue(QLatin1String("ProjectList"), projectFiles);
+ data.insert(QLatin1String("ProjectList"), projectFiles);
QMap<QString, QVariant> depMap;
QMap<QString, QStringList>::const_iterator i = m_depMap.constBegin();
@@ -339,7 +340,7 @@ bool SessionManager::save()
depMap.insert(key, values);
++i;
}
- m_writer->saveValue(QLatin1String("ProjectDependencies"), QVariant(depMap));
+ data.insert(QLatin1String("ProjectDependencies"), QVariant(depMap));
int editorCount = 0;
QList<Core::IEditor *> editors = ICore::editorManager()->openedEditors();
@@ -348,21 +349,20 @@ bool SessionManager::save()
if (!editor->isTemporary())
++editorCount;
}
- m_writer->saveValue(QLatin1String("OpenEditors"), editorCount);
- m_writer->saveValue(QLatin1String("EditorSettings"),
- ICore::editorManager()->saveState().toBase64());
+ data.insert(QLatin1String("OpenEditors"), editorCount);
+ data.insert(QLatin1String("EditorSettings"), ICore::editorManager()->saveState().toBase64());
QMap<QString, QVariant>::const_iterator it, end;
end = m_values.constEnd();
QStringList keys;
for (it = m_values.constBegin(); it != end; ++it) {
- m_writer->saveValue(QLatin1String("value-") + it.key(), it.value());
+ data.insert(QLatin1String("value-") + it.key(), it.value());
keys << it.key();
}
- m_writer->saveValue(QLatin1String("valueKeys"), keys);
+ data.insert(QLatin1String("valueKeys"), keys);
- bool result = m_writer->save(Core::ICore::mainWindow());
+ bool result = m_writer->save(data, Core::ICore::mainWindow());
if (!result) {
QMessageBox::warning(0, tr("Error while saving session"),
tr("Could not save session to file %1").arg(m_writer->fileName().toUserOutput()));
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index 59c394800a..5c53feb48c 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -37,8 +37,8 @@
#include "projectexplorersettings.h"
#include "projectexplorerconstants.h"
#include "target.h"
-#include "profile.h"
-#include "profilemanager.h"
+#include "kit.h"
+#include "kitmanager.h"
#include <coreplugin/icore.h>
#include <coreplugin/idocument.h>
@@ -362,10 +362,10 @@ public:
QVariantMap update(Project *project, const QVariantMap &map);
private:
- Profile *uniqueProfile(Profile *p);
- void addBuildConfiguration(Profile *p, const QVariantMap &bc, int bcPos, int bcCount);
- void addDeployConfiguration(Profile *p, const QVariantMap &dc, int dcPos, int dcActive);
- void addRunConfigurations(Profile *p,
+ Kit *uniqueKit(Kit *k);
+ void addBuildConfiguration(Kit *k, const QVariantMap &bc, int bcPos, int bcCount);
+ void addDeployConfiguration(Kit *k, const QVariantMap &dc, int dcPos, int dcActive);
+ void addRunConfigurations(Kit *k,
const QMap<int, QVariantMap> &rcs, int activeRc, const QString &projectDir);
void parseQtversionFile();
@@ -384,7 +384,7 @@ private:
QHash<QString, ToolChainExtraData> m_toolChainExtras;
QHash<int, QString> m_qtVersionExtras;
- QHash<Profile *, QVariantMap> m_targets;
+ QHash<Kit *, QVariantMap> m_targets;
};
} // namespace
@@ -937,18 +937,20 @@ bool SettingsAccessor::FileAccessor::writeFile(const SettingsData *settings) con
m_writer = new Utils::PersistentSettingsWriter(settings->m_fileName, QLatin1String("QtCreatorProject"));
}
+ QVariantMap data;
+
for (QVariantMap::const_iterator i = settings->m_map.constBegin();
i != settings->m_map.constEnd();
++i) {
- m_writer->saveValue(i.key(), i.value());
+ data.insert(i.key(), i.value());
}
- m_writer->saveValue(QLatin1String(VERSION_KEY), m_accessor->m_lastVersion + 1);
+ data.insert(QLatin1String(VERSION_KEY), m_accessor->m_lastVersion + 1);
if (m_environmentSpecific)
- m_writer->saveValue(QLatin1String(ENVIRONMENT_ID_KEY),
- ProjectExplorerPlugin::instance()->projectExplorerSettings().environmentId.toString());
- return m_writer->save(Core::ICore::mainWindow());
+ data.insert(QLatin1String(ENVIRONMENT_ID_KEY),
+ ProjectExplorerPlugin::instance()->projectExplorerSettings().environmentId.toString());
+ return m_writer->save(data, Core::ICore::mainWindow());
}
// -------------------------------------------------------------------------
@@ -2222,13 +2224,13 @@ Version11Handler::Version11Handler()
Version11Handler::~Version11Handler()
{
- ProfileManager *pm = ProfileManager::instance();
+ KitManager *pm = KitManager::instance();
if (!pm) // Can happen during teardown!
return;
- QList<Profile *> knownProfiles = pm->profiles();
- foreach (Profile *p, m_targets.keys()) {
- if (!knownProfiles.contains(p))
- delete p;
+ QList<Kit *> knownKits = pm->kits();
+ foreach (Kit *k, m_targets.keys()) {
+ if (!knownKits.contains(k))
+ delete k;
}
m_targets.clear();
}
@@ -2245,9 +2247,9 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
parseToolChainFile();
QVariantMap result;
- ProfileManager *pm = ProfileManager::instance();
- foreach (Profile *p, pm->profiles())
- m_targets.insert(p, QVariantMap());
+ KitManager *pm = KitManager::instance();
+ foreach (Kit *k, pm->kits())
+ m_targets.insert(k, QVariantMap());
QMapIterator<QString, QVariant> globalIt(map);
int activeTarget = map.value(QLatin1String("ProjectExplorer.Project.ActiveTarget"), 0).toInt();
@@ -2314,46 +2316,46 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
const QString oldTargetId = extraTargetData.value(QLatin1String("ProjectExplorer.ProjectConfiguration.Id")).toString();
// Check each BCs/DCs and create profiles as needed
- static Profile rawProfile; // Do not needlessly use Core::Ids
+ static Kit rawKit; // Do not needlessly use Core::Ids
QMapIterator<int, QVariantMap> buildIt(bcs);
while (buildIt.hasNext()) {
buildIt.next();
int bcPos = buildIt.key();
const QVariantMap &bc = buildIt.value();
- Profile *tmpProfile = &rawProfile;
+ Kit *tmpKit = &rawKit;
if (oldTargetId == QLatin1String("Qt4ProjectManager.Target.AndroidDeviceTarget")) {
- tmpProfile->setIconPath(QLatin1String(":/android/images/QtAndroid.png"));
- tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Desktop"));
- tmpProfile->setValue(Core::Id("PE.Profile.Device"), QString());
+ tmpKit->setIconPath(QLatin1String(":/android/images/QtAndroid.png"));
+ tmpKit->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Desktop"));
+ tmpKit->setValue(Core::Id("PE.Profile.Device"), QString());
} else if (oldTargetId == QLatin1String("RemoteLinux.EmbeddedLinuxTarget")) {
- tmpProfile->setIconPath(QLatin1String(":///DESKTOP///"));
- tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("GenericLinuxOsType"));
- tmpProfile->setValue(Core::Id("PE.Profile.Device"), QString());
+ tmpKit->setIconPath(QLatin1String(":///DESKTOP///"));
+ tmpKit->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("GenericLinuxOsType"));
+ tmpKit->setValue(Core::Id("PE.Profile.Device"), QString());
} else if (oldTargetId == QLatin1String("Qt4ProjectManager.Target.HarmattanDeviceTarget")) {
- tmpProfile->setIconPath(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
- tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("HarmattanOsType"));
- tmpProfile->setValue(Core::Id("PE.Profile.Device"), QString());
+ tmpKit->setIconPath(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
+ tmpKit->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("HarmattanOsType"));
+ tmpKit->setValue(Core::Id("PE.Profile.Device"), QString());
} else if (oldTargetId == QLatin1String("Qt4ProjectManager.Target.MaemoDeviceTarget")) {
- tmpProfile->setIconPath(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
- tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Maemo5OsType"));
- tmpProfile->setValue(Core::Id("PE.Profile.Device"), QString());
+ tmpKit->setIconPath(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
+ tmpKit->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Maemo5OsType"));
+ tmpKit->setValue(Core::Id("PE.Profile.Device"), QString());
} else if (oldTargetId == QLatin1String("Qt4ProjectManager.Target.MeegoDeviceTarget")) {
- tmpProfile->setIconPath(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
- tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("MeegoOsType"));
- tmpProfile->setValue(Core::Id("PE.Profile.Device"), QString());
+ tmpKit->setIconPath(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
+ tmpKit->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("MeegoOsType"));
+ tmpKit->setValue(Core::Id("PE.Profile.Device"), QString());
} 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"));
+ tmpKit->setIconPath(QLatin1String(":/projectexplorer/images/SymbianDevice.png"));
+ tmpKit->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Qt4ProjectManager.SymbianDevice"));
+ tmpKit->setValue(Core::Id("PE.Profile.Device"), QString::fromLatin1("Symbian Device"));
} else if (oldTargetId == QLatin1String("Qt4ProjectManager.Target.QtSimulatorTarget")) {
- tmpProfile->setIconPath(QLatin1String(":/projectexplorer/images/Simulator.png"));
- tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Desktop"));
- tmpProfile->setValue(Core::Id("PE.Profile.Device"), QString::fromLatin1("Desktop Device"));
+ tmpKit->setIconPath(QLatin1String(":/projectexplorer/images/Simulator.png"));
+ tmpKit->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Desktop"));
+ tmpKit->setValue(Core::Id("PE.Profile.Device"), QString::fromLatin1("Desktop Device"));
} else {
- tmpProfile->setIconPath(QLatin1String(":///DESKTOP///"));
- tmpProfile->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Desktop"));
- tmpProfile->setValue(Core::Id("PE.Profile.Device"), QString::fromLatin1("Desktop Device"));
+ tmpKit->setIconPath(QLatin1String(":///DESKTOP///"));
+ tmpKit->setValue(Core::Id("PE.Profile.DeviceType"), QString::fromLatin1("Desktop"));
+ tmpKit->setValue(Core::Id("PE.Profile.Device"), QString::fromLatin1("Desktop Device"));
}
// Tool chain
@@ -2363,11 +2365,11 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
const QString origTcId = tcId;
tcId.replace(QLatin1String("Qt4ProjectManager.ToolChain.Maemo:"),
QLatin1String("ProjectExplorer.ToolChain.Gcc:")); // convert Maemo to GCC
- tmpProfile->setValue(Core::Id("PE.Profile.ToolChain"), tcId);
+ tmpKit->setValue(Core::Id("PE.Profile.ToolChain"), tcId);
// QtVersion
int qtVersionId = bc.value(QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId"), -1).toInt();
- tmpProfile->setValue(Core::Id("QtSupport.QtInformation"), qtVersionId);
+ tmpKit->setValue(Core::Id("QtSupport.QtInformation"), qtVersionId);
// Debugger + mkspec
QString debugger;
@@ -2379,11 +2381,11 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
debugger = env.searchInPath(debugger);
mkspec = m_toolChainExtras.value(origTcId).m_mkspec;
}
- tmpProfile->setValue(Core::Id("Debugger.Information"), debugger);
- tmpProfile->setValue(Core::Id("QtPM4.mkSpecInformation"), mkspec);
+ tmpKit->setValue(Core::Id("Debugger.Information"), debugger);
+ tmpKit->setValue(Core::Id("QtPM4.mkSpecInformation"), mkspec);
// SysRoot
- tmpProfile->setValue(Core::Id("PE.Profile.SysRoot"), m_qtVersionExtras.value(qtVersionId));
+ tmpKit->setValue(Core::Id("PE.Profile.SysRoot"), m_qtVersionExtras.value(qtVersionId));
QMapIterator<int, QVariantMap> deployIt(dcs);
while (deployIt.hasNext()) {
@@ -2396,35 +2398,35 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
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);
+ tmpKit->setValue(Core::Id("PE.Profile.Device"), devId);
// Set display name last:
- tmpProfile->setDisplayName(extraTargetData.value(QLatin1String("ProjectExplorer.ProjectConfiguration.DisplayName")).toString());
+ tmpKit->setDisplayName(extraTargetData.value(QLatin1String("ProjectExplorer.ProjectConfiguration.DisplayName")).toString());
- Profile *p = uniqueProfile(tmpProfile);
+ Kit *k = uniqueKit(tmpKit);
- addBuildConfiguration(p, bc, bcPos, activeBc);
- addDeployConfiguration(p, dc, dcPos, activeDc);
- addRunConfigurations(p, rcs, activeRc, project->projectDirectory());
+ addBuildConfiguration(k, bc, bcPos, activeBc);
+ addDeployConfiguration(k, dc, dcPos, activeDc);
+ addRunConfigurations(k, rcs, activeRc, project->projectDirectory());
if (targetPos == activeTarget && bcPos == activeBc && dcPos == activeDc)
- m_targets[p].insert(QLatin1String("Update.IsActive"), true);
+ m_targets[k].insert(QLatin1String("Update.IsActive"), true);
} // dcs
} // bcs
} // read in map data
int newPos = 0;
// Generate new target data:
- foreach (Profile *p, m_targets.keys()) {
- QVariantMap data = m_targets.value(p);
+ foreach (Kit *k, m_targets.keys()) {
+ QVariantMap data = m_targets.value(k);
if (data.isEmpty())
continue;
- pm->registerProfile(p);
+ pm->registerKit(k);
- data.insert(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"), p->id().name());
- data.insert(QLatin1String("ProjectExplorer.Target.Profile"), p->id().name());
- data.insert(QLatin1String("ProjectExplorer.ProjectConfiguration.DisplayName"), p->displayName());
- data.insert(QLatin1String("ProjectExplorer.ProjectConfiguration.DefaultDisplayName"), p->displayName());
+ data.insert(QLatin1String("ProjectExplorer.ProjectConfiguration.Id"), k->id().name());
+ data.insert(QLatin1String("ProjectExplorer.Target.Profile"), k->id().name());
+ data.insert(QLatin1String("ProjectExplorer.ProjectConfiguration.DisplayName"), k->displayName());
+ data.insert(QLatin1String("ProjectExplorer.ProjectConfiguration.DefaultDisplayName"), k->displayName());
result.insert(QString::fromLatin1("ProjectExplorer.Project.Target.") + QString::number(newPos), data);
if (data.value(QLatin1String("Update.IsActive"), false).toBool())
@@ -2436,17 +2438,17 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
return result;
}
-Profile *Version11Handler::uniqueProfile(Profile *p)
+Kit *Version11Handler::uniqueKit(Kit *k)
{
- const QString tc = p->value(Core::Id("PE.Profile.ToolChain")).toString();
- const int qt = p->value(Core::Id("QtSupport.QtInformation")).toInt();
- const QString debugger = p->value(Core::Id("Debugger.Information")).toString();
- const QString mkspec = p->value(Core::Id("QtPM4.mkSpecInformation")).toString();
- const QString deviceType = p->value(Core::Id("PE.Profile.DeviceType")).toString();
- const QString device = p->value(Core::Id("PE.Profile.Device")).toString();
- const QString sysroot = p->value(Core::Id("PE.Profile.SysRoot")).toString();
+ const QString tc = k->value(Core::Id("PE.Profile.ToolChain")).toString();
+ const int qt = k->value(Core::Id("QtSupport.QtInformation")).toInt();
+ const QString debugger = k->value(Core::Id("Debugger.Information")).toString();
+ const QString mkspec = k->value(Core::Id("QtPM4.mkSpecInformation")).toString();
+ const QString deviceType = k->value(Core::Id("PE.Profile.DeviceType")).toString();
+ const QString device = k->value(Core::Id("PE.Profile.Device")).toString();
+ const QString sysroot = k->value(Core::Id("PE.Profile.SysRoot")).toString();
- foreach (Profile *i, m_targets.keys()) {
+ foreach (Kit *i, m_targets.keys()) {
const QString currentTc = i->value(Core::Id("PE.Profile.ToolChain")).toString();
const int currentQt = i->value(Core::Id("QtSupport.QtInformation")).toInt();
const QString currentDebugger = i->value(Core::Id("Debugger.Information")).toString();
@@ -2466,12 +2468,12 @@ Profile *Version11Handler::uniqueProfile(Profile *p)
if (deviceTypeOk && deviceOk && tcOk && qtOk && debuggerOk && mkspecOk && sysrootOk)
return i;
}
- return p->clone(true);
+ return k->clone(true);
}
-void Version11Handler::addBuildConfiguration(Profile *p, const QVariantMap &bc, int bcPos, int bcActive)
+void Version11Handler::addBuildConfiguration(Kit *k, const QVariantMap &bc, int bcPos, int bcActive)
{
- QVariantMap merged = m_targets.value(p);
+ QVariantMap merged = m_targets.value(k);
int internalCount = merged.value(QLatin1String("ProjectExplorer.Target.BuildConfigurationCount"), 0).toInt();
for (int i = 0; i < internalCount; ++i) {
@@ -2487,12 +2489,12 @@ void Version11Handler::addBuildConfiguration(Profile *p, const QVariantMap &bc,
merged.insert(QLatin1String("ProjectExplorer.Target.ActiveBuildConfiguration"), internalCount);
merged.insert(QLatin1String("ProjectExplorer.Target.BuildConfigurationCount"), internalCount + 1);
- m_targets.insert(p, merged);
+ m_targets.insert(k, merged);
}
-void Version11Handler::addDeployConfiguration(Profile *p, const QVariantMap &dc, int dcPos, int dcActive)
+void Version11Handler::addDeployConfiguration(Kit *k, const QVariantMap &dc, int dcPos, int dcActive)
{
- QVariantMap merged = m_targets.value(p);
+ QVariantMap merged = m_targets.value(k);
int internalCount = merged.value(QLatin1String("ProjectExplorer.Target.DeployConfigurationCount"), 0).toInt();
for (int i = 0; i < internalCount; ++i) {
@@ -2508,14 +2510,14 @@ void Version11Handler::addDeployConfiguration(Profile *p, const QVariantMap &dc,
merged.insert(QLatin1String("ProjectExplorer.Target.ActiveDeployConfiguration"), internalCount);
merged.insert(QLatin1String("ProjectExplorer.Target.DeployConfigurationCount"), internalCount + 1);
- m_targets.insert(p, merged);
+ m_targets.insert(k, merged);
}
-void Version11Handler::addRunConfigurations(Profile *p,
- const QMap<int, QVariantMap> &rcs, int activeRc,
- const QString &projectDir)
+void Version11Handler::addRunConfigurations(Kit *k,
+ const QMap<int, QVariantMap> &rcs, int activeRc,
+ const QString &projectDir)
{
- QVariantMap data = m_targets.value(p);
+ QVariantMap data = m_targets.value(k);
data.insert(QLatin1String("ProjectExplorer.Target.RunConfigurationCount"), rcs.count());
QMapIterator<int, QVariantMap> runIt(rcs);
while (runIt.hasNext()) {
@@ -2536,7 +2538,7 @@ void Version11Handler::addRunConfigurations(Profile *p,
}
data.insert(QLatin1String("ProjectExplorer.Target.ActiveRunConfiguration"), activeRc);
- m_targets.insert(p, data);
+ m_targets.insert(k, data);
}
static QString targetRoot(const QString &qmakePath)
diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp
index 880f2f8872..375fdc50c1 100644
--- a/src/plugins/projectexplorer/target.cpp
+++ b/src/plugins/projectexplorer/target.cpp
@@ -32,9 +32,9 @@
#include "buildtargetinfo.h"
#include "deploymentdata.h"
-#include "profile.h"
-#include "profileinformation.h"
-#include "profilemanager.h"
+#include "kit.h"
+#include "kitinformation.h"
+#include "kitmanager.h"
#include "buildconfiguration.h"
#include "deployconfiguration.h"
#include "project.h"
@@ -99,7 +99,7 @@ public:
QPixmap m_readyToUsePixmap;
QPixmap m_disconnectedPixmap;
- Profile *m_profile;
+ Kit *m_kit;
};
TargetPrivate::TargetPrivate() :
@@ -110,7 +110,7 @@ TargetPrivate::TargetPrivate() :
m_connectedPixmap(QLatin1String(":/projectexplorer/images/DeviceConnected.png")),
m_readyToUsePixmap(QLatin1String(":/projectexplorer/images/DeviceReadyToUse.png")),
m_disconnectedPixmap(QLatin1String(":/projectexplorer/images/DeviceDisconnected.png")),
- m_profile(0)
+ m_kit(0)
{
}
@@ -119,22 +119,22 @@ QList<DeployConfigurationFactory *> TargetPrivate::deployFactories() const
return ExtensionSystem::PluginManager::getObjects<DeployConfigurationFactory>();
}
-Target::Target(Project *project, Profile *p) :
+Target::Target(Project *project, Kit *p) :
ProjectConfiguration(project, p->id()),
d(new TargetPrivate)
{
connect(DeviceManager::instance(), SIGNAL(updated()), this, SLOT(updateDeviceState()));
- d->m_profile = p;
+ d->m_kit = p;
- setDisplayName(d->m_profile->displayName());
- setIcon(d->m_profile->icon());
+ setDisplayName(d->m_kit->displayName());
+ setIcon(d->m_kit->icon());
- ProfileManager *pm = ProfileManager::instance();
- connect(pm, SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(handleProfileUpdates(ProjectExplorer::Profile*)));
- connect(pm, SIGNAL(profileRemoved(ProjectExplorer::Profile*)),
- this, SLOT(handleProfileRemoval(ProjectExplorer::Profile*)));
+ KitManager *pm = KitManager::instance();
+ connect(pm, SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(handleKitUpdates(ProjectExplorer::Kit*)));
+ connect(pm, SIGNAL(kitRemoved(ProjectExplorer::Kit*)),
+ this, SLOT(handleKitRemoval(ProjectExplorer::Kit*)));
}
Target::~Target()
@@ -180,22 +180,22 @@ void Target::onBuildDirectoryChanged()
emit buildDirectoryChanged();
}
-void Target::handleProfileUpdates(Profile *p)
+void Target::handleKitUpdates(Kit *p)
{
- if (p != d->m_profile)
+ if (p != d->m_kit)
return;
setDisplayName(p->displayName());
setIcon(p->icon());
updateDefaultDeployConfigurations();
- emit profileChanged();
+ emit kitChanged();
}
-void Target::handleProfileRemoval(Profile *p)
+void Target::handleKitRemoval(Kit *p)
{
- if (p != d->m_profile)
+ if (p != d->m_kit)
return;
- d->m_profile = 0;
+ d->m_kit = 0;
project()->removeTarget(this);
}
@@ -204,9 +204,9 @@ Project *Target::project() const
return static_cast<Project *>(parent());
}
-Profile *Target::profile() const
+Kit *Target::kit() const
{
- return d->m_profile;
+ return d->m_kit;
}
void Target::addBuildConfiguration(BuildConfiguration *configuration)
@@ -494,7 +494,7 @@ void Target::setToolTip(const QString &text)
QVariantMap Target::toMap() const
{
- if (!d->m_profile) // Profile was deleted, target is only around to be copied.
+ if (!d->m_kit) // Kit was deleted, target is only around to be copied.
return QVariantMap();
QVariantMap map(ProjectConfiguration::toMap());
@@ -680,7 +680,7 @@ static QString formatToolTip(const IDevice::DeviceInfo &input)
void Target::updateDeviceState()
{
- IDevice::ConstPtr current = DeviceProfileInformation::device(profile());
+ IDevice::ConstPtr current = DeviceKitInformation::device(kit());
QPixmap overlay;
if (current.isNull()) {
@@ -734,8 +734,8 @@ bool Target::fromMap(const QVariantMap &map)
if (!ProjectConfiguration::fromMap(map))
return false;
- d->m_profile = ProfileManager::instance()->find(id());
- if (!d->m_profile)
+ d->m_kit = KitManager::instance()->find(id());
+ if (!d->m_kit)
return false;
bool ok;
diff --git a/src/plugins/projectexplorer/target.h b/src/plugins/projectexplorer/target.h
index 0f8b03c95a..94babd46fc 100644
--- a/src/plugins/projectexplorer/target.h
+++ b/src/plugins/projectexplorer/target.h
@@ -48,7 +48,7 @@ class DeployConfiguration;
class IBuildConfigurationFactory;
class DeployConfigurationFactory;
class IRunConfigurationFactory;
-class Profile;
+class Kit;
class Project;
class BuildConfigWidget;
@@ -59,13 +59,13 @@ class PROJECTEXPLORER_EXPORT Target : public ProjectConfiguration
Q_OBJECT
public:
- Target(Project *parent, Profile *p);
+ Target(Project *parent, Kit *p);
~Target();
Project *project() const;
- // Profile:
- Profile *profile() const;
+ // Kit:
+ Kit *kit() const;
// Build configuration
void addBuildConfiguration(BuildConfiguration *configuration);
@@ -124,7 +124,7 @@ signals:
void overlayIconChanged();
void toolTipChanged();
- void profileChanged();
+ void kitChanged();
// TODO clean up signal names
// might be better to also have aboutToRemove signals
@@ -175,8 +175,8 @@ private slots:
void changeDeployConfigurationEnabled();
void changeRunConfigurationEnabled();
- void handleProfileUpdates(ProjectExplorer::Profile *p);
- void handleProfileRemoval(ProjectExplorer::Profile *p);
+ void handleKitUpdates(ProjectExplorer::Kit *p);
+ void handleKitRemoval(ProjectExplorer::Kit *p);
private:
TargetPrivate *d;
diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp
index 6c82ee2819..162097f523 100644
--- a/src/plugins/projectexplorer/targetsettingspanel.cpp
+++ b/src/plugins/projectexplorer/targetsettingspanel.cpp
@@ -40,8 +40,8 @@
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/projectexplorer.h>
-#include <projectexplorer/profile.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kit.h>
+#include <projectexplorer/kitmanager.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>
@@ -87,7 +87,7 @@ TargetSettingsPanelWidget::TargetSettingsPanelWidget(Project *project) :
connect(m_project, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
this, SLOT(activeTargetChanged(ProjectExplorer::Target*)));
- connect(ProfileManager::instance(), SIGNAL(profilesChanged()),
+ connect(KitManager::instance(), SIGNAL(kitsChanged()),
this, SLOT(updateTargetAddAndRemoveButtons()));
}
@@ -113,7 +113,7 @@ void TargetSettingsPanelWidget::setupUi()
QVBoxLayout *noTargetLayout = new QVBoxLayout(m_noTargetLabel);
noTargetLayout->setMargin(0);
QLabel *label = new QLabel(m_noTargetLabel);
- label->setText(tr("No target defined."));
+ label->setText(tr("No kit defined."));
{
QFont f = label->font();
f.setPointSizeF(f.pointSizeF() * 1.4);
@@ -157,7 +157,7 @@ void TargetSettingsPanelWidget::currentTargetChanged(int targetIndex, int subInd
if (subIndex < -1 || subIndex >= 2)
return;
- if (targetIndex == -1 || subIndex == -1) { // no more targets!
+ if (targetIndex == -1 || subIndex == -1) { // no more kits!
delete m_panelWidgets[0];
m_panelWidgets[0] = 0;
delete m_panelWidgets[1];
@@ -212,10 +212,10 @@ void TargetSettingsPanelWidget::currentTargetChanged(int targetIndex, int subInd
void TargetSettingsPanelWidget::addTarget(QAction *action)
{
- Profile *p = ProfileManager::instance()->find(action->data().value<Core::Id>());
- QTC_ASSERT(!m_project->target(p), return);
+ Kit *k = KitManager::instance()->find(action->data().value<Core::Id>());
+ QTC_ASSERT(!m_project->target(k), return);
- Target *target = m_project->createTarget(p);
+ Target *target = m_project->createTarget(k);
if (!target)
return;
m_project->addTarget(target);
@@ -228,12 +228,12 @@ void TargetSettingsPanelWidget::removeTarget(int targetIndex)
ProjectExplorer::BuildManager *bm = ProjectExplorerPlugin::instance()->buildManager();
if (bm->isBuilding(t)) {
QMessageBox box;
- QPushButton *closeAnyway = box.addButton(tr("Cancel Build && Remove Target"), QMessageBox::AcceptRole);
+ QPushButton *closeAnyway = box.addButton(tr("Cancel Build && Remove Kit"), QMessageBox::AcceptRole);
QPushButton *cancelClose = box.addButton(tr("Do Not Remove"), QMessageBox::RejectRole);
box.setDefaultButton(cancelClose);
- box.setWindowTitle(tr("Remove Target %1?").arg(t->displayName()));
- box.setText(tr("The target <b>%1</b> is currently being built.").arg(t->displayName()));
- box.setInformativeText(tr("Do you want to cancel the build process and remove the Target anyway?"));
+ box.setWindowTitle(tr("Remove Kit %1?").arg(t->displayName()));
+ box.setText(tr("The kit <b>%1</b> is currently being built.").arg(t->displayName()));
+ box.setInformativeText(tr("Do you want to cancel the build process and remove the Kit anyway?"));
box.exec();
if (box.clickedButton() != closeAnyway)
return;
@@ -242,7 +242,7 @@ void TargetSettingsPanelWidget::removeTarget(int targetIndex)
// We don't show the generic message box on removing the target, if we showed the still building one
int ret = QMessageBox::warning(this, tr("Qt Creator"),
tr("Do you really want to remove the\n"
- "\"%1\" target?").arg(t->displayName()),
+ "\"%1\" kit?").arg(t->displayName()),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No);
if (ret != QMessageBox::Yes)
@@ -301,14 +301,14 @@ void TargetSettingsPanelWidget::updateTargetAddAndRemoveButtons()
m_addMenu->clear();
- foreach (Profile *p, ProfileManager::instance()->profiles()) {
- if (m_project->target(p))
+ foreach (Kit *k, KitManager::instance()->kits()) {
+ if (m_project->target(k))
continue;
- if (!m_project->supportsProfile(p))
+ if (!m_project->supportsKit(k))
continue;
- QAction *action = new QAction(p->displayName(), m_addMenu);
- action->setData(QVariant::fromValue(p->id()));
+ QAction *action = new QAction(k->displayName(), m_addMenu);
+ action->setData(QVariant::fromValue(k->id()));
bool inserted = false;
foreach (QAction *existing, m_addMenu->actions()) {
@@ -339,7 +339,7 @@ void TargetSettingsPanelWidget::renameTarget()
void TargetSettingsPanelWidget::openTargetPreferences()
{
Core::ICore::showOptionsDialog(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY),
- QLatin1String(Constants::PROFILE_SETTINGS_PAGE_ID));
+ QLatin1String(Constants::KITS_SETTINGS_PAGE_ID));
}
int TargetSettingsPanelWidget::currentSubIndex() const
diff --git a/src/plugins/projectexplorer/targetsettingswidget.cpp b/src/plugins/projectexplorer/targetsettingswidget.cpp
index aba7959900..63dd37ca0f 100644
--- a/src/plugins/projectexplorer/targetsettingswidget.cpp
+++ b/src/plugins/projectexplorer/targetsettingswidget.cpp
@@ -54,9 +54,9 @@ TargetSettingsWidget::TargetSettingsWidget(QWidget *parent) :
buttonLayout->setContentsMargins(0, 0, 0, 0);
buttonLayout->setSpacing(4);
buttonWidget->setLayout(buttonLayout);
- m_addButton = new QPushButton(tr("Add"), buttonWidget);
+ m_addButton = new QPushButton(tr("Add Kit"), buttonWidget);
buttonLayout->addWidget(m_addButton);
- m_manageButton = new QPushButton(tr("Manage ..."), buttonWidget);
+ m_manageButton = new QPushButton(tr("Manage Kits..."), buttonWidget);
connect(m_manageButton, SIGNAL(clicked()), this, SIGNAL(manageButtonClicked()));
buttonLayout->addWidget(m_manageButton);
headerLayout->addWidget(buttonWidget, 0, Qt::AlignVCenter);
diff --git a/src/plugins/projectexplorer/toolchainmanager.cpp b/src/plugins/projectexplorer/toolchainmanager.cpp
index b286c9db53..4a2568c966 100644
--- a/src/plugins/projectexplorer/toolchainmanager.cpp
+++ b/src/plugins/projectexplorer/toolchainmanager.cpp
@@ -31,7 +31,7 @@
#include "toolchainmanager.h"
#include "abi.h"
-#include "profileinformation.h"
+#include "kitinformation.h"
#include "toolchain.h"
#include <coreplugin/icore.h>
@@ -209,7 +209,8 @@ ToolChainManager::~ToolChainManager()
void ToolChainManager::saveToolChains()
{
- d->m_writer->saveValue(QLatin1String(TOOLCHAIN_FILE_VERSION_KEY), 1);
+ QVariantMap data;
+ data.insert(QLatin1String(TOOLCHAIN_FILE_VERSION_KEY), 1);
int count = 0;
foreach (ToolChain *tc, d->toolChains()) {
@@ -217,12 +218,12 @@ void ToolChainManager::saveToolChains()
QVariantMap tmp = tc->toMap();
if (tmp.isEmpty())
continue;
- d->m_writer->saveValue(QString::fromLatin1(TOOLCHAIN_DATA_KEY) + QString::number(count), tmp);
+ data.insert(QString::fromLatin1(TOOLCHAIN_DATA_KEY) + QString::number(count), tmp);
++count;
}
}
- d->m_writer->saveValue(QLatin1String(TOOLCHAIN_COUNT_KEY), count);
- d->m_writer->save(Core::ICore::mainWindow());
+ data.insert(QLatin1String(TOOLCHAIN_COUNT_KEY), count);
+ d->m_writer->save(data, Core::ICore::mainWindow());
// Do not save default debuggers! Those are set by the SDK!
}
diff --git a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
index 780b1c1adf..8a2498eea3 100644
--- a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
+++ b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
@@ -51,7 +51,7 @@
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <qmlprojectmanager/qmlprojectrunconfiguration.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <qtsupport/qtversionmanager.h>
#include <utils/crumblepath.h>
@@ -875,8 +875,8 @@ static inline QtSupport::BaseQtVersion *getActiveQtVersion(DesignDocumentControl
if (!target)
return 0;
- controller->connect(target, SIGNAL(profileChanged()), controller, SLOT(activeQtVersionChanged()));
- return QtSupport::QtProfileInformation::qtVersion(target->profile());
+ controller->connect(target, SIGNAL(kitChanged()), controller, SLOT(activeQtVersionChanged()));
+ return QtSupport::QtKitInformation::qtVersion(target->kit());
}
void DesignDocumentController::activeQtVersionChanged()
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 21342fde50..ca25b50b7a 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -69,7 +69,7 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <QApplication>
#include <QHBoxLayout>
@@ -237,7 +237,7 @@ IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp
// Check minimum Qt Version. We cannot really be sure what the Qt version
// at runtime is, but guess that the active build configuraiton has been used.
QtSupport::QtVersionNumber minimumVersion(4, 7, 4);
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(runConfiguration->target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(runConfiguration->target()->kit());
if (version) {
if (version->isValid() && version->qtVersion() < minimumVersion) {
int result = QMessageBox::warning(QApplication::activeWindow(), tr("QML Profiler"),
@@ -287,9 +287,9 @@ bool QmlProfilerTool::canRun(RunConfiguration *runConfiguration, RunMode mode) c
static QString sysroot(RunConfiguration *runConfig)
{
QTC_ASSERT(runConfig, return QString());
- ProjectExplorer::Profile *p = runConfig->target()->profile();
- if (p && ProjectExplorer::SysRootProfileInformation::hasSysRoot(p))
- return ProjectExplorer::SysRootProfileInformation::sysRoot(runConfig->target()->profile()).toString();
+ ProjectExplorer::Kit *k = runConfig->target()->kit();
+ if (k && ProjectExplorer::SysRootKitInformation::hasSysRoot(k))
+ return ProjectExplorer::SysRootKitInformation::sysRoot(runConfig->target()->kit()).toString();
return QString();
}
@@ -324,7 +324,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
sp.debuggee = rc3->remoteExecutableFilePath();
sp.debuggeeArgs = rc3->arguments();
- sp.connParams = ProjectExplorer::DeviceProfileInformation::device(rc3->target()->profile())->sshParameters();
+ sp.connParams = ProjectExplorer::DeviceKitInformation::device(rc3->target()->kit())->sshParameters();
sp.analyzerCmdPrefix = rc3->commandPrefix();
sp.displayName = rc3->displayName();
sp.sysroot = sysroot(rc3);
diff --git a/src/plugins/qmlprofiler/remotelinuxqmlprofilerrunner.cpp b/src/plugins/qmlprofiler/remotelinuxqmlprofilerrunner.cpp
index 9071604230..9c4fc7b48f 100644
--- a/src/plugins/qmlprofiler/remotelinuxqmlprofilerrunner.cpp
+++ b/src/plugins/qmlprofiler/remotelinuxqmlprofilerrunner.cpp
@@ -31,7 +31,7 @@
#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <remotelinux/remotelinuxrunconfiguration.h>
@@ -47,7 +47,7 @@ RemoteLinuxQmlProfilerRunner::RemoteLinuxQmlProfilerRunner(
: AbstractQmlProfilerRunner(parent)
, m_portsGatherer(new DeviceUsedPortsGatherer(this))
, m_runner(new DeviceApplicationRunner(this))
- , m_device(DeviceProfileInformation::device(runConfiguration->target()->profile()))
+ , m_device(DeviceKitInformation::device(runConfiguration->target()->kit()))
, m_remoteExecutable(runConfiguration->remoteExecutableFilePath())
, m_arguments(runConfiguration->arguments())
, m_commandPrefix(runConfiguration->commandPrefix())
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index 031878fe90..d56303634d 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.cpp
+++ b/src/plugins/qmlprojectmanager/qmlproject.cpp
@@ -44,11 +44,11 @@
#include <qtsupport/qmldumptool.h>
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtversionmanager.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <utils/fileutils.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/kitmanager.h>
#include <projectexplorer/target.h>
#include <utils/filesystemwatcher.h>
@@ -157,8 +157,8 @@ void QmlProject::refresh(RefreshOptions options)
pinfo.importPaths = importPaths();
QtSupport::BaseQtVersion *version = 0;
if (activeTarget()) {
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(activeTarget()->profile());
- version = QtSupport::QtProfileInformation::qtVersion(activeTarget()->profile());
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
+ version = QtSupport::QtKitInformation::qtVersion(activeTarget()->kit());
QtSupport::QmlDumpTool::pathAndEnvironment(this, version, tc, false, &pinfo.qmlDumpPath, &pinfo.qmlDumpEnvironment);
}
if (version) {
@@ -269,14 +269,14 @@ ProjectExplorer::IProjectManager *QmlProject::projectManager() const
return m_manager;
}
-bool QmlProject::supportsProfile(ProjectExplorer::Profile *p) const
+bool QmlProject::supportsKit(ProjectExplorer::Kit *p) const
{
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(p);
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(p);
if (deviceType != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)
return false;
// TODO: Limit supported versions?
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(p);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(p);
return version;
}
@@ -300,9 +300,9 @@ bool QmlProject::fromMap(const QVariantMap &map)
if (!Project::fromMap(map))
return false;
-ProjectExplorer::Profile *defaultProfile = ProjectExplorer::ProfileManager::instance()->defaultProfile();
- if (!activeTarget() && defaultProfile)
- addTarget(createTarget(defaultProfile));
+ ProjectExplorer::Kit *defaultKit = ProjectExplorer::KitManager::instance()->defaultKit();
+ if (!activeTarget() && defaultKit)
+ addTarget(createTarget(defaultKit));
refresh(Everything);
// FIXME workaround to guarantee that run/debug actions are enabled if a valid file exists
diff --git a/src/plugins/qmlprojectmanager/qmlproject.h b/src/plugins/qmlprojectmanager/qmlproject.h
index d9577996d3..ee7731c0bc 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.h
+++ b/src/plugins/qmlprojectmanager/qmlproject.h
@@ -65,7 +65,7 @@ public:
Core::IDocument *document() const;
ProjectExplorer::IProjectManager *projectManager() const;
- bool supportsProfile(ProjectExplorer::Profile *p) const;
+ bool supportsKit(ProjectExplorer::Kit *p) const;
QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 61614ed77c..016b58659f 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -39,7 +39,7 @@
#include <projectexplorer/target.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtoutputformatter.h>
#include <qtsupport/qtsupportconstants.h>
@@ -99,7 +99,7 @@ void QmlProjectRunConfiguration::ctor()
connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)),
this, SLOT(changeCurrentFile(Core::IEditor*)));
- connect(target(), SIGNAL(profileChanged()),
+ connect(target(), SIGNAL(kitChanged()),
this, SLOT(updateEnabled()));
if (id() == Constants::QML_SCENE_RC_ID)
@@ -180,7 +180,7 @@ QString QmlProjectRunConfiguration::canonicalCapsPath(const QString &fileName)
QtSupport::BaseQtVersion *QmlProjectRunConfiguration::qtVersion() const
{
- return QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ return QtSupport::QtKitInformation::qtVersion(target()->kit());
}
QWidget *QmlProjectRunConfiguration::createConfigurationWidget()
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp
index eadf0ca31d..d919de81a8 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp
@@ -33,11 +33,11 @@
#include "qmlprojectrunconfiguration.h"
#include "qmlprojectrunconfigurationfactory.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectconfiguration.h>
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/target.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
namespace QmlProjectManager {
namespace Internal {
@@ -58,7 +58,7 @@ QList<Core::Id> QmlProjectRunConfigurationFactory::availableCreationIds(ProjectE
return QList<Core::Id>();
QtSupport::BaseQtVersion *version
- = QtSupport::QtProfileInformation::qtVersion(parent->profile());
+ = QtSupport::QtKitInformation::qtVersion(parent->kit());
// put qmlscene first (so that it is the default) for Qt 5.0.0
QList<Core::Id> list;
@@ -91,7 +91,7 @@ bool QmlProjectRunConfigurationFactory::canCreate(ProjectExplorer::Target *paren
if (id == Constants::QML_SCENE_RC_ID) {
// only support qmlscene if it's Qt5
QtSupport::BaseQtVersion *version
- = QtSupport::QtProfileInformation::qtVersion(parent->profile());
+ = QtSupport::QtKitInformation::qtVersion(parent->kit());
return version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0);
}
return false;
@@ -137,11 +137,11 @@ ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::clone(Proj
bool QmlProjectRunConfigurationFactory::canHandle(ProjectExplorer::Target *parent) const
{
- if (!parent->project()->supportsProfile(parent->profile()))
+ if (!parent->project()->supportsKit(parent->kit()))
return false;
if (!qobject_cast<QmlProject *>(parent->project()))
return false;
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->kit());
return deviceType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
}
diff --git a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
index 68dfb46f03..5aa72661d8 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
@@ -33,7 +33,7 @@
#include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
-#include <projectexplorer/profile.h>
+#include <projectexplorer/kit.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <utils/qtcassert.h>
diff --git a/src/plugins/qnx/blackberryapplicationrunner.cpp b/src/plugins/qnx/blackberryapplicationrunner.cpp
index 969488eb05..e22980f6eb 100644
--- a/src/plugins/qnx/blackberryapplicationrunner.cpp
+++ b/src/plugins/qnx/blackberryapplicationrunner.cpp
@@ -107,7 +107,7 @@ BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool debugMode, BlackBe
m_password = runConfiguration->deployConfiguration()->password();
m_barPackage = runConfiguration->barPackage();
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target->profile());
+ BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target->kit());
m_sshParams = device->sshParameters();
// The BlackBerry device always uses key authentication
m_sshParams.authenticationType = QSsh::SshConnectionParameters::AuthenticationByKey;
diff --git a/src/plugins/qnx/blackberryconnect.cpp b/src/plugins/qnx/blackberryconnect.cpp
index dcc13107ef..fc12d7386e 100644
--- a/src/plugins/qnx/blackberryconnect.cpp
+++ b/src/plugins/qnx/blackberryconnect.cpp
@@ -103,7 +103,7 @@ BlackBerryConnect::BlackBerryConnect(BlackBerryRunConfiguration *runConfig)
m_deviceHost = deployConfig->deviceHost();
m_password = deployConfig->password();
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target->profile());
+ BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target->kit());
m_publicKeyFile = device->sshParameters().privateKeyFile + QLatin1String(".pub");
connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOutput()));
diff --git a/src/plugins/qnx/blackberrycreatepackagestep.cpp b/src/plugins/qnx/blackberrycreatepackagestep.cpp
index 4e1e283763..d0c6385878 100644
--- a/src/plugins/qnx/blackberrycreatepackagestep.cpp
+++ b/src/plugins/qnx/blackberrycreatepackagestep.cpp
@@ -47,7 +47,7 @@
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4nodes.h>
#include <qt4projectmanager/qt4project.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/qtcassert.h>
#include <QTemporaryFile>
@@ -156,7 +156,7 @@ ProjectExplorer::BuildStepConfigWidget *BlackBerryCreatePackageStep::createConfi
QString BlackBerryCreatePackageStep::debugToken() const
{
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target()->profile());
+ BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target()->kit());
return device->debugToken();
}
@@ -170,7 +170,7 @@ void BlackBerryCreatePackageStep::raiseError(const QString &errorMessage)
bool BlackBerryCreatePackageStep::prepareAppDescriptorFile(const QString &appDescriptorPath, QTemporaryFile *preparedFile)
{
- BlackBerryQtVersion *qtVersion = dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtProfileInformation::qtVersion(target()->profile()));
+ BlackBerryQtVersion *qtVersion = dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtKitInformation::qtVersion(target()->kit()));
if (!qtVersion) {
raiseError(tr("Error preparing application descriptor file"));
return false;
diff --git a/src/plugins/qnx/blackberrycreatepackagestepfactory.cpp b/src/plugins/qnx/blackberrycreatepackagestepfactory.cpp
index dce16ae954..d499105686 100644
--- a/src/plugins/qnx/blackberrycreatepackagestepfactory.cpp
+++ b/src/plugins/qnx/blackberrycreatepackagestepfactory.cpp
@@ -38,7 +38,7 @@
#include "blackberrydeviceconfigurationfactory.h"
#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
@@ -60,7 +60,7 @@ QList<Core::Id> BlackBerryCreatePackageStepFactory::availableCreationIds(
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return QList<Core::Id>();
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->target()->kit());
if (deviceType != BlackBerryDeviceConfigurationFactory::deviceType())
return QList<Core::Id>();
diff --git a/src/plugins/qnx/blackberrydeployconfiguration.cpp b/src/plugins/qnx/blackberrydeployconfiguration.cpp
index 1a43cd5c8c..0db9788d6b 100644
--- a/src/plugins/qnx/blackberrydeployconfiguration.cpp
+++ b/src/plugins/qnx/blackberrydeployconfiguration.cpp
@@ -37,7 +37,7 @@
#include "blackberrydeployconfigurationwidget.h"
#include "blackberrydeployinformation.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4nodes.h>
#include <qt4projectmanager/qt4project.h>
@@ -89,19 +89,19 @@ BlackBerryDeployInformation *BlackBerryDeployConfiguration::deploymentInfo() con
QString BlackBerryDeployConfiguration::deviceHost() const
{
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target()->profile());
+ BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target()->kit());
return device->sshParameters().host;
}
QString BlackBerryDeployConfiguration::password() const
{
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target()->profile());
+ BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target()->kit());
return device->sshParameters().password;
}
QString BlackBerryDeployConfiguration::deviceName() const
{
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target()->profile());
+ BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(target()->kit());
return device->displayName();
}
diff --git a/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp b/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp
index 5cd2e3c663..0e09808b7d 100644
--- a/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp
+++ b/src/plugins/qnx/blackberrydeployconfigurationfactory.cpp
@@ -40,7 +40,7 @@
#include "blackberrydeviceconfigurationfactory.h"
#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4project.h>
#include <remotelinux/genericdirectuploadstep.h>
@@ -65,7 +65,7 @@ QList<Core::Id> BlackBerryDeployConfigurationFactory::availableCreationIds(Proje
if (!project)
return result;
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->kit());
if (deviceType != BlackBerryDeviceConfigurationFactory::deviceType())
return result;
diff --git a/src/plugins/qnx/blackberrydeployinformation.cpp b/src/plugins/qnx/blackberrydeployinformation.cpp
index 5e65e4a6df..d254f4c24e 100644
--- a/src/plugins/qnx/blackberrydeployinformation.cpp
+++ b/src/plugins/qnx/blackberrydeployinformation.cpp
@@ -39,7 +39,7 @@
#include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4nodes.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
using namespace Qnx;
using namespace Qnx::Internal;
@@ -163,7 +163,7 @@ void BlackBerryDeployInformation::initModel()
|| !qobject_cast<BlackBerryDeployConfiguration *>(target->activeDeployConfiguration()))
return;
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (!version || !version->isValid()) {
beginResetModel();
m_deployInformation.clear();
diff --git a/src/plugins/qnx/blackberrydeploystepfactory.cpp b/src/plugins/qnx/blackberrydeploystepfactory.cpp
index fe62aa9ed4..73853342ee 100644
--- a/src/plugins/qnx/blackberrydeploystepfactory.cpp
+++ b/src/plugins/qnx/blackberrydeploystepfactory.cpp
@@ -37,7 +37,7 @@
#include "blackberrydeviceconfigurationfactory.h"
#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
@@ -53,7 +53,7 @@ QList<Core::Id> BlackBerryDeployStepFactory::availableCreationIds(ProjectExplore
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return QList<Core::Id>();
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->target()->kit());
if (deviceType != BlackBerryDeviceConfigurationFactory::deviceType())
return QList<Core::Id>();
diff --git a/src/plugins/qnx/blackberrydeviceconfiguration.cpp b/src/plugins/qnx/blackberrydeviceconfiguration.cpp
index 3dd1998b64..cc7d2b7529 100644
--- a/src/plugins/qnx/blackberrydeviceconfiguration.cpp
+++ b/src/plugins/qnx/blackberrydeviceconfiguration.cpp
@@ -36,7 +36,7 @@
#include "qnxconstants.h"
#include "blackberrydeviceconfigurationwidget.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
using namespace Qnx;
using namespace Qnx::Internal;
@@ -93,9 +93,9 @@ IDevice::Ptr BlackBerryDeviceConfiguration::clone() const
return Ptr(new BlackBerryDeviceConfiguration(*this));
}
-BlackBerryDeviceConfiguration::ConstPtr BlackBerryDeviceConfiguration::device(const Profile *p)
+BlackBerryDeviceConfiguration::ConstPtr BlackBerryDeviceConfiguration::device(const Kit *k)
{
- IDevice::ConstPtr dev = DeviceProfileInformation::device(p);
+ IDevice::ConstPtr dev = DeviceKitInformation::device(k);
return dev.dynamicCast<const BlackBerryDeviceConfiguration>();
}
diff --git a/src/plugins/qnx/blackberrydeviceconfiguration.h b/src/plugins/qnx/blackberrydeviceconfiguration.h
index 0636dc3ced..1c872cd6e5 100644
--- a/src/plugins/qnx/blackberrydeviceconfiguration.h
+++ b/src/plugins/qnx/blackberrydeviceconfiguration.h
@@ -37,7 +37,7 @@
#include <remotelinux/linuxdevice.h>
namespace ProjectExplorer {
-class Profile;
+class Kit;
}
namespace Qnx {
@@ -67,7 +67,7 @@ public:
void executeAction(Core::Id actionId, QWidget *parent) const;
ProjectExplorer::IDevice::Ptr clone() const;
- static ConstPtr device(const ProjectExplorer::Profile *p);
+ static ConstPtr device(const ProjectExplorer::Kit *k);
protected:
BlackBerryDeviceConfiguration();
diff --git a/src/plugins/qnx/blackberryrunconfiguration.cpp b/src/plugins/qnx/blackberryrunconfiguration.cpp
index 7393525f3b..fc59eaf91f 100644
--- a/src/plugins/qnx/blackberryrunconfiguration.cpp
+++ b/src/plugins/qnx/blackberryrunconfiguration.cpp
@@ -147,5 +147,5 @@ BlackBerryDeployConfiguration *BlackBerryRunConfiguration::deployConfiguration()
QString BlackBerryRunConfiguration::key() const
{
- return barPackage() + QLatin1Char('_') + BlackBerryDeviceConfiguration::device(target()->profile())->sshParameters().host;
+ return barPackage() + QLatin1Char('_') + BlackBerryDeviceConfiguration::device(target()->kit())->sshParameters().host;
}
diff --git a/src/plugins/qnx/blackberryrunconfigurationfactory.cpp b/src/plugins/qnx/blackberryrunconfigurationfactory.cpp
index 1409bc5f31..d4cb7017ab 100644
--- a/src/plugins/qnx/blackberryrunconfigurationfactory.cpp
+++ b/src/plugins/qnx/blackberryrunconfigurationfactory.cpp
@@ -36,7 +36,7 @@
#include "blackberryrunconfiguration.h"
#include "blackberrydeviceconfigurationfactory.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4project.h>
@@ -157,12 +157,12 @@ ProjectExplorer::RunConfiguration *BlackBerryRunConfigurationFactory::clone(
bool BlackBerryRunConfigurationFactory::canHandle(ProjectExplorer::Target *t) const
{
- if (!t->project()->supportsProfile(t->profile()))
+ if (!t->project()->supportsKit(t->kit()))
return false;
if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(t->project()))
return false;
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(t->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(t->kit());
if (deviceType != BlackBerryDeviceConfigurationFactory::deviceType())
return false;
diff --git a/src/plugins/qnx/blackberryruncontrolfactory.cpp b/src/plugins/qnx/blackberryruncontrolfactory.cpp
index 2e649682f1..af31f90166 100644
--- a/src/plugins/qnx/blackberryruncontrolfactory.cpp
+++ b/src/plugins/qnx/blackberryruncontrolfactory.cpp
@@ -41,13 +41,13 @@
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerrunner.h>
-#include <debugger/debuggerprofileinformation.h>
+#include <debugger/debuggerkitinformation.h>
#include <projectexplorer/deployconfiguration.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
using namespace Qnx;
using namespace Qnx::Internal;
@@ -128,13 +128,13 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
{
Debugger::DebuggerStartParameters params;
ProjectExplorer::Target *target = runConfig->target();
- ProjectExplorer::Profile *profile = target->profile();
+ ProjectExplorer::Kit *k = target->kit();
params.startMode = Debugger::AttachToRemoteServer;
- params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(profile).toString();
- params.sysRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(profile).toString();
+ params.debuggerCommand = Debugger::DebuggerKitInformation::debuggerCommand(k).toString();
+ params.sysRoot = ProjectExplorer::SysRootKitInformation::sysRoot(k).toString();
- if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile))
+ if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k))
params.toolChainAbi = tc->targetAbi();
params.executable = runConfig->localExecutableFilePath();
@@ -143,7 +143,7 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
params.remoteSetupNeeded = true;
if (runConfig->debuggerAspect()->useQmlDebugger()) {
- BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->profile());
+ BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->kit());
if (device) {
params.qmlServerAddress = device->sshParameters().host;
params.qmlServerPort = runConfig->debuggerAspect()->qmlDebugServerPort();
@@ -162,7 +162,7 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
}
BlackBerryQtVersion *qtVersion =
- dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtProfileInformation::qtVersion(profile));
+ dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
if (qtVersion)
params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
diff --git a/src/plugins/qnx/qnxabstractqtversion.cpp b/src/plugins/qnx/qnxabstractqtversion.cpp
index db2f154f04..1747d2fc39 100644
--- a/src/plugins/qnx/qnxabstractqtversion.cpp
+++ b/src/plugins/qnx/qnxabstractqtversion.cpp
@@ -94,7 +94,7 @@ QList<ProjectExplorer::Abi> QnxAbstractQtVersion::detectQtAbis() const
return qtAbisFromLibrary(qtCorePath(versionInfo(), qtVersionString()));
}
-void QnxAbstractQtVersion::addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const
+void QnxAbstractQtVersion::addToEnvironment(const ProjectExplorer::Kit *p, Utils::Environment &env) const
{
QtSupport::BaseQtVersion::addToEnvironment(p, env);
diff --git a/src/plugins/qnx/qnxabstractqtversion.h b/src/plugins/qnx/qnxabstractqtversion.h
index ca9a4de34e..bb1b5b395f 100644
--- a/src/plugins/qnx/qnxabstractqtversion.h
+++ b/src/plugins/qnx/qnxabstractqtversion.h
@@ -64,7 +64,7 @@ public:
QList<ProjectExplorer::Abi> detectQtAbis() const;
- void addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const;
+ void addToEnvironment(const ProjectExplorer::Kit *p, Utils::Environment &env) const;
QtSupport::QtConfigWidget *createConfigurationWidget() const;
diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp
index 4ed72d1ab8..b3e3e952b7 100644
--- a/src/plugins/qnx/qnxdebugsupport.cpp
+++ b/src/plugins/qnx/qnxdebugsupport.cpp
@@ -38,7 +38,7 @@
#include <debugger/debuggerengine.h>
#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <utils/portlist.h>
#include <utils/qtcassert.h>
@@ -54,7 +54,7 @@ QnxDebugSupport::QnxDebugSupport(QnxRunConfiguration *runConfig, Debugger::Debug
, m_executable(QLatin1String(Constants::QNX_DEBUG_EXECUTABLE))
, m_commandPrefix(runConfig->commandPrefix())
, m_arguments(runConfig->arguments())
- , m_device(DeviceProfileInformation::device(runConfig->target()->profile()))
+ , m_device(DeviceKitInformation::device(runConfig->target()->kit()))
, m_engine(engine)
, m_port(-1)
, m_state(Inactive)
diff --git a/src/plugins/qnx/qnxdeployconfigurationfactory.cpp b/src/plugins/qnx/qnxdeployconfigurationfactory.cpp
index 7cb1c6fcdb..9eb04fc008 100644
--- a/src/plugins/qnx/qnxdeployconfigurationfactory.cpp
+++ b/src/plugins/qnx/qnxdeployconfigurationfactory.cpp
@@ -37,7 +37,7 @@
#include "qnxdeployconfiguration.h"
#include "qnxdeviceconfigurationfactory.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <remotelinux/genericdirectuploadstep.h>
@@ -120,7 +120,7 @@ ProjectExplorer::DeployConfiguration *QnxDeployConfigurationFactory::clone(Proje
bool QnxDeployConfigurationFactory::canHandle(ProjectExplorer::Target *t) const
{
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(t->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(t->kit());
if (deviceType != QnxDeviceConfigurationFactory::deviceType())
return false;
diff --git a/src/plugins/qnx/qnxdeploystepfactory.cpp b/src/plugins/qnx/qnxdeploystepfactory.cpp
index 208bfa54a7..22e0389e78 100644
--- a/src/plugins/qnx/qnxdeploystepfactory.cpp
+++ b/src/plugins/qnx/qnxdeploystepfactory.cpp
@@ -36,7 +36,7 @@
#include "qnxdeviceconfigurationfactory.h"
#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <remotelinux/genericdirectuploadstep.h>
@@ -54,7 +54,7 @@ QList<Core::Id> QnxDeployStepFactory::availableCreationIds(ProjectExplorer::Buil
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return QList<Core::Id>();
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->target()->kit());
if (deviceType != QnxDeviceConfigurationFactory::deviceType())
return QList<Core::Id>();
diff --git a/src/plugins/qnx/qnxrunconfigurationfactory.cpp b/src/plugins/qnx/qnxrunconfigurationfactory.cpp
index 810235a830..92560ec1ce 100644
--- a/src/plugins/qnx/qnxrunconfigurationfactory.cpp
+++ b/src/plugins/qnx/qnxrunconfigurationfactory.cpp
@@ -37,7 +37,7 @@
#include "qnxrunconfiguration.h"
#include "qnxdeviceconfigurationfactory.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <qt4projectmanager/qt4project.h>
@@ -149,7 +149,7 @@ ProjectExplorer::RunConfiguration *QnxRunConfigurationFactory::clone(ProjectExpl
bool QnxRunConfigurationFactory::canHandle(ProjectExplorer::Target *t) const
{
- Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(t->profile());
+ Core::Id deviceType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(t->kit());
if (deviceType != QnxDeviceConfigurationFactory::deviceType())
return false;
diff --git a/src/plugins/qnx/qnxruncontrolfactory.cpp b/src/plugins/qnx/qnxruncontrolfactory.cpp
index b9e2693b32..b9803bbb16 100644
--- a/src/plugins/qnx/qnxruncontrolfactory.cpp
+++ b/src/plugins/qnx/qnxruncontrolfactory.cpp
@@ -44,11 +44,11 @@
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerrunner.h>
#include <debugger/debuggerstartparameters.h>
-#include <debugger/debuggerprofileinformation.h>
+#include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerstartparameters.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/portlist.h>
using namespace Debugger;
@@ -60,17 +60,17 @@ DebuggerStartParameters createStartParameters(const QnxRunConfiguration *runConf
{
DebuggerStartParameters params;
Target *target = runConfig->target();
- Profile *profile = target->profile();
+ Kit *k = target->kit();
- const IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
+ const IDevice::ConstPtr device = DeviceKitInformation::device(k);
if (device.isNull())
return params;
params.startMode = AttachToRemoteServer;
- params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
- params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
+ params.debuggerCommand = DebuggerKitInformation::debuggerCommand(k).toString();
+ params.sysRoot = SysRootKitInformation::sysRoot(k).toString();
- if (ToolChain *tc = ToolChainProfileInformation::toolChain(profile))
+ if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
params.toolChainAbi = tc->targetAbi();
params.symbolFileName = runConfig->localExecutableFilePath();
@@ -81,7 +81,7 @@ DebuggerStartParameters createStartParameters(const QnxRunConfiguration *runConf
params.closeMode = DetachAtClose;
QnxQtVersion *qtVersion =
- dynamic_cast<QnxQtVersion *>(QtSupport::QtProfileInformation::qtVersion(profile));
+ dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
if (qtVersion)
params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
@@ -107,7 +107,7 @@ bool QnxRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mo
const QnxRunConfiguration * const rc = qobject_cast<QnxRunConfiguration *>(runConfiguration);
if (mode == DebugRunMode) {
- const QnxDeviceConfiguration::ConstPtr dev = DeviceProfileInformation::device(runConfiguration->target()->profile())
+ const QnxDeviceConfiguration::ConstPtr dev = DeviceKitInformation::device(runConfiguration->target()->kit())
.dynamicCast<const QnxDeviceConfiguration>();
if (dev.isNull())
return false;
diff --git a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp
index 33aa51a227..ec88db3e1a 100644
--- a/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/customwidgetwizard/customwidgetwizarddialog.cpp
@@ -36,24 +36,24 @@
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/profileinformation.h>
-#include <projectexplorer/profilemanager.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <projectexplorer/kitinformation.h>
+#include <projectexplorer/kitmanager.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
namespace {
-class DesktopQtProfileMatcher : public ProjectExplorer::ProfileMatcher
+class DesktopQtKitMatcher : public ProjectExplorer::KitMatcher
{
public:
- bool matches(const ProjectExplorer::Profile *p) const
+ bool matches(const ProjectExplorer::Kit *k) const
{
- ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceProfileInformation::device(p);
+ ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(k);
if (dev.isNull() || dev->id() != ProjectExplorer::Constants::DESKTOP_DEVICE_ID)
return false;
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(p);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
return version && version->type() == QtSupport::Constants::DESKTOPQT;
}
};
@@ -80,7 +80,7 @@ CustomWidgetWizardDialog::CustomWidgetWizardDialog(const QString &templateName,
setIntroDescription(tr("This wizard generates a Qt4 Designer Custom Widget "
"or a Qt4 Designer Custom Widget Collection project."));
- if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS))
+ if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
addTargetSetupPage();
m_widgetPageId = addPage(m_widgetsPage);
m_pluginPageId = addPage(m_pluginPage);
diff --git a/src/plugins/qt4projectmanager/externaleditors.cpp b/src/plugins/qt4projectmanager/externaleditors.cpp
index 41548be426..d3e07f8768 100644
--- a/src/plugins/qt4projectmanager/externaleditors.cpp
+++ b/src/plugins/qt4projectmanager/externaleditors.cpp
@@ -36,7 +36,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/target.h>
#include <projectexplorer/session.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtversionmanager.h>
#include <designer/designerconstants.h>
@@ -141,7 +141,7 @@ bool ExternalQtEditor::getEditorLaunchData(const QString &fileName,
// Get the binary either from the current Qt version of the project or Path
if (const Qt4Project *project = qt4ProjectFor(fileName)) {
if (const ProjectExplorer::Target *target = project->activeTarget()) {
- if (const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(target->profile())) {
+ if (const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target->kit())) {
data->binary = (qtVersion->*commandAccessor)();
data->workingDirectory = project->projectDirectory();
}
diff --git a/src/plugins/qt4projectmanager/librarydetailscontroller.cpp b/src/plugins/qt4projectmanager/librarydetailscontroller.cpp
index 6b4a8584ca..1dfde9d9f9 100644
--- a/src/plugins/qt4projectmanager/librarydetailscontroller.cpp
+++ b/src/plugins/qt4projectmanager/librarydetailscontroller.cpp
@@ -37,7 +37,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <projectexplorer/project.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/buildconfiguration.h>
@@ -87,7 +87,7 @@ LibraryDetailsController::LibraryDetailsController(
const ProjectExplorer::Project *project =
ProjectExplorer::ProjectExplorerPlugin::instance()->session()->projectForFile(proFile);
// if its tool chain is maemo behave the same as we would be on linux
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(project->activeTarget()->profile());
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(project->activeTarget()->kit());
if (tc
&& (tc->targetAbi().osFlavor() == ProjectExplorer::Abi::HarmattanLinuxFlavor
|| tc->targetAbi().osFlavor() == ProjectExplorer::Abi::MaemoLinuxFlavor))
diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp
index 028ab169d6..eb11365323 100644
--- a/src/plugins/qt4projectmanager/makestep.cpp
+++ b/src/plugins/qt4projectmanager/makestep.cpp
@@ -41,11 +41,11 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcprocess.h>
#include <qtsupport/qtparser.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <QDir>
#include <QFileInfo>
@@ -151,7 +151,7 @@ bool MakeStep::init()
return true; // otherwise the tasks will not get reported
}
- ToolChain *tc = ToolChainProfileInformation::toolChain(target()->profile());
+ ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (!tc) {
m_tasks.append(Task(Task::Error, tr("Qt Creator needs a compiler set up to build. Configure a compiler in the target options."),
Utils::FileName(), -1,
@@ -257,7 +257,7 @@ bool MakeStep::init()
pp->setArguments(args);
IOutputParser *parser = 0;
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (version)
parser = version->createOutputParser();
if (parser)
@@ -376,7 +376,7 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()),
this, SLOT(updateDetails()));
- connect(m_makeStep->target(), SIGNAL(profileChanged()), this, SLOT(updateDetails()));
+ connect(m_makeStep->target(), SIGNAL(kitChanged()), this, SLOT(updateDetails()));
}
void MakeStepConfigWidget::activeBuildConfigurationChanged()
@@ -411,14 +411,14 @@ MakeStepConfigWidget::~MakeStepConfigWidget()
void MakeStepConfigWidget::updateDetails()
{
ToolChain *tc
- = ToolChainProfileInformation::toolChain(m_makeStep->target()->profile());
+ = ToolChainKitInformation::toolChain(m_makeStep->target()->kit());
if (tc)
m_ui->makeLabel->setText(tr("Override %1:").arg(tc->makeCommand()));
else
m_ui->makeLabel->setText(tr("Make:"));
if (!tc) {
- setSummaryText(tr("<b>Make:</b> %1").arg(ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget()));
+ setSummaryText(tr("<b>Make:</b> %1").arg(ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget()));
return;
}
Qt4BuildConfiguration *bc = m_makeStep->qt4BuildConfiguration();
diff --git a/src/plugins/qt4projectmanager/qmakeprofileconfigwidget.cpp b/src/plugins/qt4projectmanager/qmakekitconfigwidget.cpp
index 64adc6ef2d..7129465fea 100644
--- a/src/plugins/qt4projectmanager/qmakeprofileconfigwidget.cpp
+++ b/src/plugins/qt4projectmanager/qmakekitconfigwidget.cpp
@@ -28,10 +28,10 @@
**
**************************************************************************/
-#include "qmakeprofileconfigwidget.h"
+#include "qmakekitconfigwidget.h"
#include "qt4projectmanagerconstants.h"
-#include "qmakeprofileinformation.h"
+#include "qmakekitinformation.h"
#include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -42,10 +42,9 @@
namespace Qt4ProjectManager {
namespace Internal {
-QmakeProfileConfigWidget::QmakeProfileConfigWidget(ProjectExplorer::Profile *p,
- QWidget *parent) :
- ProjectExplorer::ProfileConfigWidget(parent),
- m_profile(p),
+QmakeKitConfigWidget::QmakeKitConfigWidget(ProjectExplorer::Kit *k, QWidget *parent) :
+ ProjectExplorer::KitConfigWidget(parent),
+ m_kit(k),
m_lineEdit(new QLineEdit)
{
setToolTip(tr("The mkspec to use when building the project with qmake.<br>"
@@ -56,33 +55,33 @@ QmakeProfileConfigWidget::QmakeProfileConfigWidget(ProjectExplorer::Profile *p,
m_lineEdit->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_lineEdit);
- discard(); // set up everything according to profile
+ discard(); // set up everything according to kit
connect(m_lineEdit, SIGNAL(textEdited(QString)), this, SIGNAL(dirty()));
}
-QString QmakeProfileConfigWidget::displayName() const
+QString QmakeKitConfigWidget::displayName() const
{
return tr("Qt mkspec:");
}
-void QmakeProfileConfigWidget::makeReadOnly()
+void QmakeKitConfigWidget::makeReadOnly()
{
m_lineEdit->setEnabled(false);
}
-void QmakeProfileConfigWidget::apply()
+void QmakeKitConfigWidget::apply()
{
- QmakeProfileInformation::setMkspec(m_profile, Utils::FileName::fromString(m_lineEdit->text()));
+ QmakeKitInformation::setMkspec(m_kit, Utils::FileName::fromString(m_lineEdit->text()));
}
-void QmakeProfileConfigWidget::discard()
+void QmakeKitConfigWidget::discard()
{
- m_lineEdit->setText(QmakeProfileInformation::mkspec(m_profile).toString());
+ m_lineEdit->setText(QmakeKitInformation::mkspec(m_kit).toString());
}
-bool QmakeProfileConfigWidget::isDirty() const
+bool QmakeKitConfigWidget::isDirty() const
{
- return m_lineEdit->text() != QmakeProfileInformation::mkspec(m_profile).toString();
+ return m_lineEdit->text() != QmakeKitInformation::mkspec(m_kit).toString();
}
} // namespace Internal
diff --git a/src/plugins/qt4projectmanager/qmakeprofileconfigwidget.h b/src/plugins/qt4projectmanager/qmakekitconfigwidget.h
index 32c3ad429c..8403d22d93 100644
--- a/src/plugins/qt4projectmanager/qmakeprofileconfigwidget.h
+++ b/src/plugins/qt4projectmanager/qmakekitconfigwidget.h
@@ -28,26 +28,26 @@
**
**************************************************************************/
-#ifndef QT4PM_QMAKEPROFILECONFIGWIDGET_H
-#define QT4PM_QMAKEPROFILECONFIGWIDGET_H
+#ifndef QT4PM_QMAKEKITCONFIGWIDGET_H
+#define QT4PM_QMAKEKITCONFIGWIDGET_H
-#include <projectexplorer/profileconfigwidget.h>
+#include <projectexplorer/kitconfigwidget.h>
QT_FORWARD_DECLARE_CLASS(QLineEdit)
-namespace ProjectExplorer { class Profile; }
+namespace ProjectExplorer { class Kit; }
namespace Qt4ProjectManager {
class BaseQtVersion;
namespace Internal {
-class QmakeProfileConfigWidget : public ProjectExplorer::ProfileConfigWidget
+class QmakeKitConfigWidget : public ProjectExplorer::KitConfigWidget
{
Q_OBJECT
public:
- explicit QmakeProfileConfigWidget(ProjectExplorer::Profile *p, QWidget *parent = 0);
+ explicit QmakeKitConfigWidget(ProjectExplorer::Kit *k, QWidget *parent = 0);
QString displayName() const;
@@ -60,11 +60,11 @@ public:
private:
int findQtVersion(const int id) const;
- ProjectExplorer::Profile *m_profile;
+ ProjectExplorer::Kit *m_kit;
QLineEdit *m_lineEdit;
};
} // namespace Internal
} // namespace Debugger
-#endif // QT4PM_QMAKEPROFILECONFIGWIDGET_H
+#endif // QT4PM_QMAKEKITCONFIGWIDGET_H
diff --git a/src/plugins/qt4projectmanager/qmakeprofileinformation.cpp b/src/plugins/qt4projectmanager/qmakekitinformation.cpp
index 0d1d16a2ab..f0594247ff 100644
--- a/src/plugins/qt4projectmanager/qmakeprofileinformation.cpp
+++ b/src/plugins/qt4projectmanager/qmakekitinformation.cpp
@@ -28,49 +28,49 @@
**
**************************************************************************/
-#include "qmakeprofileinformation.h"
+#include "qmakekitinformation.h"
-#include "qmakeprofileinformation.h"
-#include "qmakeprofileconfigwidget.h"
+#include "qmakekitinformation.h"
+#include "qmakekitconfigwidget.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
namespace Qt4ProjectManager {
namespace Internal {
const char MKSPEC_INFORMATION[] = "QtPM4.mkSpecInformation";
} // namespace Internal
-QmakeProfileInformation::QmakeProfileInformation()
+QmakeKitInformation::QmakeKitInformation()
{
- setObjectName(QLatin1String("QmakeProfileInformation"));
+ setObjectName(QLatin1String("QmakeKitInformation"));
}
-Core::Id QmakeProfileInformation::dataId() const
+Core::Id QmakeKitInformation::dataId() const
{
static Core::Id id = Core::Id(Internal::MKSPEC_INFORMATION);
return id;
}
-unsigned int QmakeProfileInformation::priority() const
+unsigned int QmakeKitInformation::priority() const
{
return 24000;
}
-QVariant QmakeProfileInformation::defaultValue(ProjectExplorer::Profile *p) const
+QVariant QmakeKitInformation::defaultValue(ProjectExplorer::Kit *k) const
{
- Q_UNUSED(p);
+ Q_UNUSED(k);
return QString();
}
-QList<ProjectExplorer::Task> QmakeProfileInformation::validate(ProjectExplorer::Profile *p) const
+QList<ProjectExplorer::Task> QmakeKitInformation::validate(ProjectExplorer::Kit *k) const
{
QList<ProjectExplorer::Task> result;
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(p);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
- Utils::FileName mkspec = QmakeProfileInformation::mkspec(p);
+ Utils::FileName mkspec = QmakeKitInformation::mkspec(k);
if (!version && !mkspec.isEmpty())
result << ProjectExplorer::Task(ProjectExplorer::Task::Warning,
tr("No Qt version set, so mkspec is ignored."),
@@ -84,49 +84,49 @@ QList<ProjectExplorer::Task> QmakeProfileInformation::validate(ProjectExplorer::
return result;
}
-ProjectExplorer::ProfileConfigWidget *
-QmakeProfileInformation::createConfigWidget(ProjectExplorer::Profile *p) const
+ProjectExplorer::KitConfigWidget *
+QmakeKitInformation::createConfigWidget(ProjectExplorer::Kit *k) const
{
- return new Internal::QmakeProfileConfigWidget(p);
+ return new Internal::QmakeKitConfigWidget(k);
}
-ProjectExplorer::ProfileInformation::ItemList QmakeProfileInformation::toUserOutput(ProjectExplorer::Profile *p) const
+ProjectExplorer::KitInformation::ItemList QmakeKitInformation::toUserOutput(ProjectExplorer::Kit *k) const
{
- return ItemList() << qMakePair(tr("mkspec"), mkspec(p).toUserOutput());
+ return ItemList() << qMakePair(tr("mkspec"), mkspec(k).toUserOutput());
}
-Utils::FileName QmakeProfileInformation::mkspec(const ProjectExplorer::Profile *p)
+Utils::FileName QmakeKitInformation::mkspec(const ProjectExplorer::Kit *k)
{
- if (!p)
+ if (!k)
return Utils::FileName();
- return Utils::FileName::fromString(p->value(Core::Id(Internal::MKSPEC_INFORMATION)).toString());
+ return Utils::FileName::fromString(k->value(Core::Id(Internal::MKSPEC_INFORMATION)).toString());
}
-Utils::FileName QmakeProfileInformation::effectiveMkspec(const ProjectExplorer::Profile *p)
+Utils::FileName QmakeKitInformation::effectiveMkspec(const ProjectExplorer::Kit *k)
{
- if (!p)
+ if (!k)
return Utils::FileName();
- Utils::FileName spec = mkspec(p);
+ Utils::FileName spec = mkspec(k);
if (spec.isEmpty())
- return defaultMkspec(p);
+ return defaultMkspec(k);
return spec;
}
-void QmakeProfileInformation::setMkspec(ProjectExplorer::Profile *p, const Utils::FileName &fn)
+void QmakeKitInformation::setMkspec(ProjectExplorer::Kit *k, const Utils::FileName &fn)
{
- if (fn == defaultMkspec(p))
- p->setValue(Core::Id(Internal::MKSPEC_INFORMATION), QString());
+ if (fn == defaultMkspec(k))
+ k->setValue(Core::Id(Internal::MKSPEC_INFORMATION), QString());
else
- p->setValue(Core::Id(Internal::MKSPEC_INFORMATION), fn.toString());
+ k->setValue(Core::Id(Internal::MKSPEC_INFORMATION), fn.toString());
}
-Utils::FileName QmakeProfileInformation::defaultMkspec(const ProjectExplorer::Profile *p)
+Utils::FileName QmakeKitInformation::defaultMkspec(const ProjectExplorer::Kit *k)
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(p);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
if (!version) // No version, so no qmake
return Utils::FileName();
- return version->mkspecFor(ProjectExplorer::ToolChainProfileInformation::toolChain(p));
+ return version->mkspecFor(ProjectExplorer::ToolChainKitInformation::toolChain(k));
}
} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qmakeprofileinformation.h b/src/plugins/qt4projectmanager/qmakekitinformation.h
index 42d1fe3f8d..b73f3b112b 100644
--- a/src/plugins/qt4projectmanager/qmakeprofileinformation.h
+++ b/src/plugins/qt4projectmanager/qmakekitinformation.h
@@ -28,41 +28,41 @@
**
**************************************************************************/
-#ifndef QT4PM_QMAKEPROFILEINFORMATION_H
-#define QT4PM_QMAKEPROFILEINFORMATION_H
+#ifndef QT4PM_QMAKEKITINFORMATION_H
+#define QT4PM_QMAKEKITINFORMATION_H
#include "qt4projectmanager_global.h"
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitmanager.h>
namespace Qt4ProjectManager {
-class QT4PROJECTMANAGER_EXPORT QmakeProfileInformation : public ProjectExplorer::ProfileInformation
+class QT4PROJECTMANAGER_EXPORT QmakeKitInformation : public ProjectExplorer::KitInformation
{
Q_OBJECT
public:
- QmakeProfileInformation();
+ QmakeKitInformation();
Core::Id dataId() const;
unsigned int priority() const; // the higher the closer to the top.
- QVariant defaultValue(ProjectExplorer::Profile *p) const;
+ QVariant defaultValue(ProjectExplorer::Kit *k) const;
- QList<ProjectExplorer::Task> validate(ProjectExplorer::Profile *p) const;
+ QList<ProjectExplorer::Task> validate(ProjectExplorer::Kit *k) const;
- ProjectExplorer::ProfileConfigWidget *createConfigWidget(ProjectExplorer::Profile *p) const;
+ ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
- ItemList toUserOutput(ProjectExplorer::Profile *p) const;
+ ItemList toUserOutput(ProjectExplorer::Kit *k) const;
- static void setMkspec(ProjectExplorer::Profile *p, const Utils::FileName &fn);
- static Utils::FileName mkspec(const ProjectExplorer::Profile *p);
- static Utils::FileName effectiveMkspec(const ProjectExplorer::Profile *p);
- static Utils::FileName defaultMkspec(const ProjectExplorer::Profile *p);
+ static void setMkspec(ProjectExplorer::Kit *k, const Utils::FileName &fn);
+ static Utils::FileName mkspec(const ProjectExplorer::Kit *k);
+ static Utils::FileName effectiveMkspec(const ProjectExplorer::Kit *k);
+ static Utils::FileName defaultMkspec(const ProjectExplorer::Kit *k);
};
} // namespace Qt4ProjectManager
-#endif // QT4PM_QMAKEPROFILEINFORMATION_H
+#endif // QT4PM_QMAKEKITINFORMATION_H
diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index bf199d138a..537afc9739 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -37,13 +37,13 @@
#include "qt4project.h"
#include "qt4projectmanagerconstants.h"
#include "qt4projectmanager.h"
-#include "qmakeprofileinformation.h"
+#include "qmakekitinformation.h"
#include "qt4nodes.h"
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorer.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
@@ -51,7 +51,7 @@
#include <coreplugin/mainwindow.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/messagemanager.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtversionmanager.h>
#include <qtsupport/debugginghelperbuildtask.h>
#include <utils/hostosinfo.h>
@@ -173,7 +173,7 @@ QStringList QMakeStep::deducedArguments()
{
QStringList arguments;
ProjectExplorer::ToolChain *tc
- = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile());
+ = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
ProjectExplorer::Abi targetAbi;
if (tc)
targetAbi = tc->targetAbi();
@@ -199,7 +199,7 @@ QStringList QMakeStep::deducedArguments()
}
}
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (linkQmlDebuggingLibrary() && version) {
if (!version->needsQmlDebuggingLibrary()) {
// This Qt version has the QML debugging services built in, however
@@ -227,7 +227,7 @@ QStringList QMakeStep::deducedArguments()
/// -after OBJECTS_DIR, MOC_DIR, UI_DIR, RCC_DIR
QStringList QMakeStep::deducedArgumentsAfter()
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (version && !version->supportsShadowBuilds()) {
// 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
@@ -246,7 +246,7 @@ QStringList QMakeStep::deducedArgumentsAfter()
bool QMakeStep::init()
{
Qt4BuildConfiguration *qt4bc = qt4BuildConfiguration();
- const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!qtVersion)
return false;
@@ -383,7 +383,7 @@ void QMakeStep::setUserArguments(const QString &arguments)
bool QMakeStep::isQmlDebuggingLibrarySupported(QString *reason) const
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!version) {
if (reason)
*reason = tr("No Qt version.");
@@ -467,7 +467,7 @@ FileName QMakeStep::mkspec()
}
}
- return Qt4ProjectManager::QmakeProfileInformation::effectiveMkspec(target()->profile());
+ return Qt4ProjectManager::QmakeKitInformation::effectiveMkspec(target()->kit());
}
QVariantMap QMakeStep::toMap() const
@@ -530,7 +530,7 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
this, SLOT(linkQmlDebuggingLibraryChanged()));
connect(step->qt4BuildConfiguration(), SIGNAL(qmakeBuildConfigurationChanged()),
this, SLOT(qmakeBuildConfigChanged()));
- connect(step->target(), SIGNAL(profileChanged()), this, SLOT(qtVersionChanged()));
+ connect(step->target(), SIGNAL(kitChanged()), this, SLOT(qtVersionChanged()));
connect(QtSupport::QtVersionManager::instance(), SIGNAL(dumpUpdatedFor(Utils::FileName)),
this, SLOT(qtVersionChanged()));
}
@@ -646,11 +646,11 @@ void QMakeStepConfigWidget::linkQmlDebuggingLibraryChecked(bool checked)
void QMakeStepConfigWidget::buildQmlDebuggingHelper()
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(m_step->target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(m_step->target()->kit());
if (!version)
return;
- ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(m_step->target()->profile());
+ ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(m_step->target()->kit());
QtSupport::DebuggingHelperBuildTask *buildTask =
new QtSupport::DebuggingHelperBuildTask(version, tc,
@@ -667,7 +667,7 @@ void QMakeStepConfigWidget::buildQmlDebuggingHelper()
void QMakeStepConfigWidget::updateSummaryLabel()
{
- QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(m_step->target()->profile());
+ QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(m_step->target()->kit());
if (!qtVersion) {
setSummaryText(tr("<b>qmake:</b> No Qt version set. Cannot run qmake."));
return;
@@ -697,7 +697,7 @@ void QMakeStepConfigWidget::updateQmlDebuggingOption()
void QMakeStepConfigWidget::updateEffectiveQMakeCall()
{
- QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(m_step->target()->profile());
+ QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(m_step->target()->kit());
QString program = tr("<No Qt version>");
if (qtVersion)
program = qtVersion->qmakeCommand().toFileInfo().fileName();
diff --git a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp
index 64b1578540..d21b19838f 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp
@@ -72,7 +72,7 @@ QStringList DesktopQtVersion::warningReason() const
{
QStringList ret = BaseQtVersion::warningReason();
if (qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0) && qmlsceneCommand().isEmpty())
- ret << QCoreApplication::translate("Qt Version", "No qmlscene installed.");
+ ret << QCoreApplication::translate("QtVersion", "No qmlscene installed.");
if (qtVersion() >= QtSupport::QtVersionNumber(4, 7, 0) && qmlviewerCommand().isEmpty())
ret << QCoreApplication::translate("QtVersion", "No qmlviewer installed.");
return ret;
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
index 75f6ca96b0..ea09317c8a 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
@@ -58,7 +58,7 @@
#include <qtsupport/qtsupportconstants.h>
#include <qtsupport/baseqtversion.h>
#include <qtsupport/profilereader.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/hostosinfo.h>
#include <QFormLayout>
@@ -152,7 +152,7 @@ QString Qt4RunConfiguration::disabledReason() const
return QString();
}
-void Qt4RunConfiguration::proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress)
+void Qt4RunConfiguration::kitUpdated(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress)
{
if (m_proFilePath != pro->path()) {
if (!parseInProgress) {
@@ -180,20 +180,20 @@ void Qt4RunConfiguration::ctor()
{
setDefaultDisplayName(defaultDisplayName());
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
m_forcedGuiMode = (version && version->type() == QtSupport::Constants::SIMULATORQT);
connect(target(), SIGNAL(environmentChanged()),
this, SIGNAL(baseEnvironmentChanged()));
- connect(target()->project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
- this, SLOT(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
- connect(target(), SIGNAL(profileChanged()),
- this, SLOT(profileChanged()));
+ connect(target()->project(), SIGNAL(kitUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
+ this, SLOT(kitUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
+ connect(target(), SIGNAL(kitChanged()),
+ this, SLOT(kitChanged()));
}
-void Qt4RunConfiguration::profileChanged()
+void Qt4RunConfiguration::kitChanged()
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
m_forcedGuiMode = (version && version->type() == QtSupport::Constants::SIMULATORQT);
emit runModeChanged(runMode()); // Always emit
}
@@ -620,7 +620,7 @@ Utils::Environment Qt4RunConfiguration::baseEnvironment() const
} // libDirectories
} // node
- QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (qtVersion)
env.prependOrSetLibrarySearchPath(qtVersion->qmakeProperty("QT_INSTALL_LIBS"));
return env;
@@ -676,7 +676,7 @@ QString Qt4RunConfiguration::proFilePath() const
QString Qt4RunConfiguration::dumperLibrary() const
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (version)
return version->gdbDebuggingHelperLibrary();
return QString();
@@ -684,7 +684,7 @@ QString Qt4RunConfiguration::dumperLibrary() const
QStringList Qt4RunConfiguration::dumperLibraryLocations() const
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (version)
return version->debuggingHelperLibraryLocations();
return QStringList();
@@ -808,11 +808,11 @@ QString Qt4RunConfigurationFactory::displayNameForId(const Core::Id id) const
bool Qt4RunConfigurationFactory::canHandle(ProjectExplorer::Target *t) const
{
- if (!t->project()->supportsProfile(t->profile()))
+ if (!t->project()->supportsKit(t->kit()))
return false;
if (!qobject_cast<Qt4Project *>(t->project()))
return false;
- Core::Id devType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(t->profile());
+ Core::Id devType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(t->kit());
return devType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
}
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h
index 07ff8cc0b8..6cbaf2bfcc 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h
@@ -113,8 +113,8 @@ signals:
void effectiveTargetInformationChanged();
private slots:
- void profileChanged();
- void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress);
+ void kitChanged();
+ void kitUpdated(Qt4ProjectManager::Qt4ProFileNode *pro, bool success, bool parseInProgress);
protected:
Qt4RunConfiguration(ProjectExplorer::Target *parent, Qt4RunConfiguration *source);
diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
index cd11e5271b..0db5fd567c 100644
--- a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
@@ -44,11 +44,11 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <qtsupport/qtversionfactory.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtversionmanager.h>
#include <QDebug>
@@ -137,11 +137,11 @@ void Qt4BuildConfiguration::ctor()
this, SLOT(emitBuildDirectoryChanged()));
connect(this, SIGNAL(environmentChanged()),
this, SLOT(emitProFileEvaluateNeeded()));
- connect(target(), SIGNAL(profileChanged()),
- this, SLOT(profileChanged()));
+ connect(target(), SIGNAL(kitChanged()),
+ this, SLOT(kitChanged()));
}
-void Qt4BuildConfiguration::profileChanged()
+void Qt4BuildConfiguration::kitChanged()
{
emitProFileEvaluateNeeded();
emit environmentChanged();
@@ -162,7 +162,7 @@ void Qt4BuildConfiguration::emitBuildDirectoryChanged()
Environment Qt4BuildConfiguration::baseEnvironment() const
{
Environment env = BuildConfiguration::baseEnvironment();
- target()->profile()->addToEnvironment(env);
+ target()->kit()->addToEnvironment(env);
return env;
}
@@ -175,7 +175,7 @@ QString Qt4BuildConfiguration::defaultShadowBuildDirectory() const
{
// todo displayName isn't ideal
return Qt4Project::shadowBuildDirectory(target()->project()->document()->fileName(),
- target()->profile(), displayName());
+ target()->kit(), displayName());
}
/// returns the unexpanded build directory
@@ -196,12 +196,13 @@ QString Qt4BuildConfiguration::rawBuildDirectory() const
/// Returns the build directory.
QString Qt4BuildConfiguration::buildDirectory() const
{
- return QDir::cleanPath(environment().expandVariables(rawBuildDirectory()));
+ QString path = QDir::cleanPath(environment().expandVariables(rawBuildDirectory()));
+ return QDir::cleanPath(QDir(target()->project()->projectDirectory()).absoluteFilePath(path));
}
bool Qt4BuildConfiguration::supportsShadowBuilds()
{
- BaseQtVersion *version = QtProfileInformation::qtVersion(target()->profile());
+ BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit());
return !version || version->supportsShadowBuilds();
}
@@ -254,7 +255,7 @@ QString Qt4BuildConfiguration::shadowBuildDirectory() const
void Qt4BuildConfiguration::setShadowBuildAndDirectory(bool shadowBuild, const QString &buildDirectory)
{
- BaseQtVersion *version = QtProfileInformation::qtVersion(target()->profile());
+ BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit());
QString directoryToSet = buildDirectory;
bool toSet = (shadowBuild && version && version->isValid() && version->supportsShadowBuilds());
if (m_shadowBuild == toSet && m_buildDirectory == directoryToSet)
@@ -270,8 +271,8 @@ void Qt4BuildConfiguration::setShadowBuildAndDirectory(bool shadowBuild, const Q
QString Qt4BuildConfiguration::defaultMakeTarget() const
{
- ToolChain *tc = ToolChainProfileInformation::toolChain(target()->profile());
- BaseQtVersion *version = QtProfileInformation::qtVersion(target()->profile());
+ ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
+ BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit());
if (!tc || !version)
return QString();
@@ -315,9 +316,9 @@ void Qt4BuildConfiguration::emitQMakeBuildConfigurationChanged()
QStringList Qt4BuildConfiguration::configCommandLineArguments() const
{
QStringList result;
- BaseQtVersion *version = QtProfileInformation::qtVersion(target()->profile());
+ BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit());
BaseQtVersion::QmakeBuildConfigs defaultBuildConfiguration =
- version ? version->defaultBuildConfig() : (BaseQtVersion::DebugBuild | BaseQtVersion::BuildAll);
+ version ? version->defaultBuildConfig() : (BaseQtVersion::DebugBuild | BaseQtVersion::BuildAll);
BaseQtVersion::QmakeBuildConfigs userBuildConfiguration = m_qmakeBuildConfiguration;
if ((defaultBuildConfiguration & BaseQtVersion::BuildAll) && !(userBuildConfiguration & BaseQtVersion::BuildAll))
result << QLatin1String("CONFIG-=debug_and_release");
@@ -359,7 +360,7 @@ Qt4BuildConfiguration::MakefileState Qt4BuildConfiguration::compareToImportFrom(
QMakeStep *qs = qmakeStep();
if (QFileInfo(makefile).exists() && qs) {
FileName qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(makefile);
- BaseQtVersion *version = QtProfileInformation::qtVersion(target()->profile());
+ BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit());
if (!version)
return MakefileForWrongProject;
if (version->qmakeCommand() == qmakePath) {
@@ -521,7 +522,7 @@ FileName Qt4BuildConfiguration::extractSpecFromArguments(QString *args,
IOutputParser *Qt4BuildConfiguration::createOutputParser() const
{
- ToolChain *tc = ToolChainProfileInformation::toolChain(target()->profile());
+ ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
return tc ? tc->outputParser() : 0;
}
@@ -570,7 +571,7 @@ void Qt4BuildConfigurationFactory::update()
bool Qt4BuildConfigurationFactory::canHandle(const Target *t) const
{
- if (!t->project()->supportsProfile(t->profile()))
+ if (!t->project()->supportsKit(t->kit()))
return false;
return qobject_cast<Qt4Project *>(t->project());
}
@@ -601,7 +602,7 @@ BuildConfiguration *Qt4BuildConfigurationFactory::create(Target *parent, const C
if (!canCreate(parent, id))
return 0;
- BaseQtVersion *version = QtProfileInformation::qtVersion(parent->profile());
+ BaseQtVersion *version = QtKitInformation::qtVersion(parent->kit());
Q_ASSERT(version);
bool ok = true;
@@ -674,12 +675,12 @@ BuildConfiguration *Qt4BuildConfigurationFactory::restore(Target *parent, const
return 0;
}
-QList<BuildConfigurationInfo> Qt4BuildConfigurationFactory::availableBuildConfigurations(const Profile *p,
+QList<BuildConfigurationInfo> Qt4BuildConfigurationFactory::availableBuildConfigurations(const Kit *p,
const QString &proFilePath)
{
QList<BuildConfigurationInfo> infoList;
- BaseQtVersion *version = QtProfileInformation::qtVersion(p);
+ BaseQtVersion *version = QtKitInformation::qtVersion(p);
if (!version || !version->isValid())
return infoList;
BaseQtVersion::QmakeBuildConfigs config = version->defaultBuildConfig();
diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.h b/src/plugins/qt4projectmanager/qt4buildconfiguration.h
index d461ad7359..595ff3b14e 100644
--- a/src/plugins/qt4projectmanager/qt4buildconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.h
@@ -129,7 +129,7 @@ signals:
void qmakeBuildConfigurationChanged();
private slots:
- void profileChanged();
+ void kitChanged();
void emitBuildDirectoryChanged();
protected:
@@ -170,7 +170,7 @@ public:
bool canRestore(const ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::BuildConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
- static QList<BuildConfigurationInfo> availableBuildConfigurations(const ProjectExplorer::Profile *p, const QString &proFilePath);
+ static QList<BuildConfigurationInfo> availableBuildConfigurations(const ProjectExplorer::Kit *p, const QString &proFilePath);
static QString buildConfigurationDisplayName(const BuildConfigurationInfo &info);
private slots:
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index 0dbc990eb0..e544f8bcfe 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -55,7 +55,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/target.h>
#include <qtsupport/profilereader.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <utils/hostosinfo.h>
@@ -1529,7 +1529,7 @@ void Qt4ProFileNode::emitProFileUpdatedRecursive()
{
foreach (ProjectExplorer::NodesWatcher *watcher, watchers())
if (Internal::Qt4NodesWatcher *qt4Watcher = qobject_cast<Internal::Qt4NodesWatcher*>(watcher))
- emit qt4Watcher->proFileUpdated(this, m_validParse, m_parseInProgress);
+ emit qt4Watcher->kitUpdated(this, m_validParse, m_parseInProgress);
foreach (ProjectNode *subNode, subProjectNodes()) {
if (Qt4ProFileNode *node = qobject_cast<Qt4ProFileNode *>(subNode)) {
@@ -1555,7 +1555,7 @@ void Qt4ProFileNode::setParseInProgress(bool b)
m_parseInProgress = b;
foreach (ProjectExplorer::NodesWatcher *watcher, watchers())
if (Internal::Qt4NodesWatcher *qt4Watcher = qobject_cast<Internal::Qt4NodesWatcher*>(watcher))
- emit qt4Watcher->proFileUpdated(this, m_validParse, m_parseInProgress);
+ emit qt4Watcher->kitUpdated(this, m_validParse, m_parseInProgress);
}
void Qt4ProFileNode::setValidParseRecursive(bool b)
@@ -1908,7 +1908,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
// update TargetInformation
m_qt4targetInformation = targetInformation(m_readerExact);
- m_resolvedMkspecPath = m_project->qmakeGlobals()->qmakespec;
+ m_resolvedMkspecPath = m_readerExact->resolvedMkSpec();
m_subProjectsNotToDeploy = subProjectsNotToDeploy;
setupInstallsList(m_readerExact);
diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h
index 300730eccb..25abd3184c 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.h
+++ b/src/plugins/qt4projectmanager/qt4nodes.h
@@ -257,7 +257,7 @@ signals:
const QHash<Qt4Variable, QStringList> &oldValues,
const QHash<Qt4Variable, QStringList> &newValues);
- void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *projectNode, bool success, bool parseInProgress);
+ void kitUpdated(Qt4ProjectManager::Qt4ProFileNode *projectNode, bool success, bool parseInProgress);
private:
// let them emit signals
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp
index cf343d3781..f94d9d742e 100644
--- a/src/plugins/qt4projectmanager/qt4project.cpp
+++ b/src/plugins/qt4projectmanager/qt4project.cpp
@@ -56,7 +56,7 @@
#include <projectexplorer/headerpath.h>
#include <projectexplorer/target.h>
#include <projectexplorer/buildenvironmentwidget.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>
@@ -64,7 +64,7 @@
#include <qtsupport/qmldumptool.h>
#include <qtsupport/baseqtversion.h>
#include <qtsupport/profilereader.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <qtsupport/qtversionmanager.h>
#include <utils/QtConcurrentTools>
@@ -424,8 +424,8 @@ bool Qt4Project::fromMap(const QVariantMap &map)
updateCodeModels();
// We have the profile nodes now, so we know the runconfigs!
- connect(m_nodesWatcher, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
- this, SIGNAL(proFileUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
+ connect(m_nodesWatcher, SIGNAL(kitUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)),
+ this, SIGNAL(kitUpdated(Qt4ProjectManager::Qt4ProFileNode*,bool,bool)));
// Now we emit update once :)
m_rootProjectNode->emitProFileUpdatedRecursive();
@@ -483,15 +483,15 @@ void Qt4Project::updateCppCodeModel()
{
typedef CPlusPlus::CppModelManagerInterface::ProjectPart ProjectPart;
- Profile *p = 0;
+ Kit *k = 0;
QtSupport::BaseQtVersion *qtVersion = 0;
ToolChain *tc = 0;
if (ProjectExplorer::Target *target = activeTarget())
- p = target->profile();
+ k = target->kit();
else
- p = ProfileManager::instance()->defaultProfile();
- qtVersion = QtSupport::QtProfileInformation::qtVersion(p);
- tc = ToolChainProfileInformation::toolChain(p);
+ k = KitManager::instance()->defaultKit();
+ qtVersion = QtSupport::QtKitInformation::qtVersion(k);
+ tc = ToolChainKitInformation::toolChain(k);
CPlusPlus::CppModelManagerInterface *modelmanager =
CPlusPlus::CppModelManagerInterface::instance();
@@ -529,7 +529,7 @@ void Qt4Project::updateCppCodeModel()
if (tc)
headers = tc->systemHeaderPaths(); // todo pass cxxflags?
if (qtVersion) {
- headers.append(qtVersion->systemHeaderPathes(p));
+ headers.append(qtVersion->systemHeaderPathes(k));
}
foreach (const HeaderPath &headerPath, headers) {
@@ -542,8 +542,10 @@ void Qt4Project::updateCppCodeModel()
if (qtVersion) {
if (!qtVersion->frameworkInstallPath().isEmpty())
part->frameworkPaths.append(qtVersion->frameworkInstallPath());
- part->includePaths.append(qtVersion->mkspecPath().toString());
+
}
+ if (Qt4ProFileNode *node = rootQt4ProjectNode())
+ part->includePaths.append(node->resolvedMkspecPath());
// part->precompiledHeaders
part->precompiledHeaders.append(pro->variableValue(PrecompiledHeaderVar));
@@ -596,8 +598,8 @@ void Qt4Project::updateQmlJSCodeModel()
projectInfo.tryQmlDump = false;
ProjectExplorer::Target *t = activeTarget();
- ProjectExplorer::Profile *p = t ? t->profile() : ProjectExplorer::ProfileManager::instance()->defaultProfile();
- QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(p);
+ ProjectExplorer::Kit *k = t ? t->kit() : ProjectExplorer::KitManager::instance()->defaultKit();
+ QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k);
if (t) {
if (Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(t->activeBuildConfiguration()))
@@ -618,7 +620,7 @@ void Qt4Project::updateQmlJSCodeModel()
if (projectInfo.tryQmlDump) {
QtSupport::QmlDumpTool::pathAndEnvironment(this, qtVersion,
- ToolChainProfileInformation::toolChain(p),
+ ToolChainKitInformation::toolChain(k),
preferDebugDump, &projectInfo.qmlDumpPath,
&projectInfo.qmlDumpEnvironment);
} else {
@@ -708,6 +710,10 @@ void Qt4Project::scheduleAsyncUpdate(Qt4ProFileNode *node)
m_partialEvaluate.append(node);
// and start the timer anew
m_asyncUpdateTimer.start();
+
+ // Cancel running code model update
+ m_codeModelFuture.cancel();
+ m_codeModelCanceled = true;
} else if (m_asyncUpdateState == AsyncUpdateInProgress) {
// A update is in progress
// And this slot only gets called if a file changed on disc
@@ -858,9 +864,9 @@ Qt4Manager *Qt4Project::qt4ProjectManager() const
return m_manager;
}
-bool Qt4Project::supportsProfile(Profile *p) const
+bool Qt4Project::supportsKit(Kit *p) const
{
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(p);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(p);
return version;
}
@@ -933,26 +939,26 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4Pro
m_qmakeGlobals = new ProFileGlobals;
m_qmakeGlobalsRefCnt = 0;
- Profile *p;
+ Kit *k;
Utils::Environment env = Utils::Environment::systemEnvironment();
QStringList qmakeArgs;
if (!bc)
bc = activeTarget() ? static_cast<Qt4BuildConfiguration *>(activeTarget()->activeBuildConfiguration()) : 0;
if (bc) {
- p = bc->target()->profile();
+ k = bc->target()->kit();
env = bc->environment();
if (bc->qmakeStep())
qmakeArgs = bc->qmakeStep()->parserArguments();
else
qmakeArgs = bc->configCommandLineArguments();
} else {
- p = ProfileManager::instance()->defaultProfile();
+ k = KitManager::instance()->defaultKit();
}
- QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(p);
- QString systemRoot = SysRootProfileInformation::hasSysRoot(p)
- ? SysRootProfileInformation::sysRoot(p).toString() : QString();
+ QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k);
+ QString systemRoot = SysRootKitInformation::hasSysRoot(k)
+ ? SysRootKitInformation::sysRoot(k).toString() : QString();
if (qtVersion && qtVersion->isValid()) {
m_qmakeGlobals->qmake_abslocation = QDir::cleanPath(qtVersion->qmakeCommand().toString());
@@ -1041,7 +1047,6 @@ void Qt4Project::collectAllfProFiles(QList<Qt4ProFileNode *> &list, Qt4ProFileNo
}
}
-
void Qt4Project::collectApplicationProFiles(QList<Qt4ProFileNode *> &list, Qt4ProFileNode *node)
{
if (node->projectType() == ApplicationTemplate
@@ -1343,19 +1348,19 @@ bool Qt4Project::needsConfiguration() const
void Qt4Project::configureAsExampleProject(const QStringList &platforms)
{
- QList<Profile *> profiles = ProjectExplorer::ProfileManager::instance()->profiles();
- foreach (Profile *p, profiles) {
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(p);
+ QList<Kit *> kits = ProjectExplorer::KitManager::instance()->kits();
+ foreach (Kit *k, kits) {
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
if (!version)
continue;
if (!platforms.isEmpty() && !platforms.contains(version->platformName()))
continue;
QList<BuildConfigurationInfo> infoList
- = Qt4BuildConfigurationFactory::availableBuildConfigurations(p, document()->fileName());
+ = Qt4BuildConfigurationFactory::availableBuildConfigurations(k, document()->fileName());
if (infoList.isEmpty())
continue;
- addTarget(createTarget(p, infoList));
+ addTarget(createTarget(k, infoList));
}
ProjectExplorer::ProjectExplorerPlugin::instance()->requestProjectModeUpdate(this);
}
@@ -1380,13 +1385,13 @@ QString Qt4Project::disabledReasonForRunConfiguration(const QString &proFilePath
.arg(QFileInfo(proFilePath).fileName());
}
-QString Qt4Project::shadowBuildDirectory(const QString &profilePath, const Profile *p, const QString &suffix)
+QString Qt4Project::shadowBuildDirectory(const QString &profilePath, const Kit *p, const QString &suffix)
{
if (profilePath.isEmpty())
return QString();
QFileInfo info(profilePath);
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(p);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(p);
if (version && !version->supportsShadowBuilds())
return info.absolutePath();
@@ -1395,14 +1400,14 @@ QString Qt4Project::shadowBuildDirectory(const QString &profilePath, const Profi
return base + buildNameFor(p) + QLatin1String("-") + sanitize(suffix);
}
-QString Qt4Project::buildNameFor(const Profile *p)
+QString Qt4Project::buildNameFor(const Kit *p)
{
if (!p)
return QLatin1String("unknown");
return QString::fromLatin1(p->id().name()).mid(31, 6); // part of the UUID, should be pretty unique;-)
}
-Target *Qt4Project::createTarget(Profile *p, const QList<BuildConfigurationInfo> &infoList)
+Target *Qt4Project::createTarget(Kit *p, const QList<BuildConfigurationInfo> &infoList)
{
if (target(p))
return 0;
@@ -1484,9 +1489,9 @@ void Qt4Project::collectLibraryData(const Qt4ProFileNode *node, DeploymentData &
const QString targetPath = node->installsList().targetPath;
if (targetPath.isEmpty())
return;
- const ProjectExplorer::Profile * const profile = activeTarget()->profile();
+ const ProjectExplorer::Kit * const kit = activeTarget()->kit();
const ProjectExplorer::ToolChain * const toolchain
- = ProjectExplorer::ToolChainProfileInformation::toolChain(profile);
+ = ProjectExplorer::ToolChainKitInformation::toolChain(kit);
if (!toolchain)
return;
diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h
index 2c55544ae1..bc472472c4 100644
--- a/src/plugins/qt4projectmanager/qt4project.h
+++ b/src/plugins/qt4projectmanager/qt4project.h
@@ -83,7 +83,7 @@ public:
ProjectExplorer::IProjectManager *projectManager() const;
Qt4Manager *qt4ProjectManager() const;
- bool supportsProfile(ProjectExplorer::Profile *p) const;
+ bool supportsKit(ProjectExplorer::Kit *p) const;
ProjectExplorer::ProjectNode *rootProjectNode() const;
Qt4ProFileNode *rootQt4ProjectNode() const;
@@ -133,17 +133,17 @@ public:
QString disabledReasonForRunConfiguration(const QString &proFilePath);
/// suffix should be unique
- static QString shadowBuildDirectory(const QString &profilePath, const ProjectExplorer::Profile *p,
+ static QString shadowBuildDirectory(const QString &profilePath, const ProjectExplorer::Kit *p,
const QString &suffix);
/// used by the default implementation of shadowBuildDirectory
- static QString buildNameFor(const ProjectExplorer::Profile *p);
+ static QString buildNameFor(const ProjectExplorer::Kit *p);
- ProjectExplorer::Target *createTarget(ProjectExplorer::Profile *p, const QList<BuildConfigurationInfo> &infoList);
+ ProjectExplorer::Target *createTarget(ProjectExplorer::Kit *p, const QList<BuildConfigurationInfo> &infoList);
void emitBuildDirectoryInitialized();
signals:
- void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *node, bool, bool);
+ void kitUpdated(Qt4ProjectManager::Qt4ProFileNode *node, bool, bool);
void buildDirectoryInitialized();
void proFilesEvaluated();
diff --git a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
index 105ec378e2..2aba04b96f 100644
--- a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
@@ -48,7 +48,7 @@
#include <projectexplorer/buildconfiguration.h>
#include <qtsupport/qtversionfactory.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <qtsupport/qtversionmanager.h>
#include <utils/qtcassert.h>
@@ -205,10 +205,10 @@ void Qt4ProjectConfigWidget::updateProblemLabel()
bool incompatibleBuild = false;
bool allGood = false;
- ProjectExplorer::Profile *p = m_buildConfiguration->target()->profile();
+ ProjectExplorer::Kit *p = m_buildConfiguration->target()->kit();
const QString proFileName = m_buildConfiguration->target()->project()->document()->fileName();
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(p);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(p);
if (!version) {
m_ui->problemLabel->setVisible(true);
m_ui->warningLabel->setVisible(true);
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.cpp b/src/plugins/qt4projectmanager/qt4projectmanager.cpp
index f45500f8e3..c428be4e49 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.cpp
@@ -56,7 +56,7 @@
#include <utils/qtcassert.h>
#include <qtsupport/profilereader.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtversionmanager.h>
#include <QCoreApplication>
@@ -200,9 +200,9 @@ void Qt4Manager::updateVariable(const QByteArray &variable)
QString value;
const QtSupport::BaseQtVersion *qtv = 0;
if (ProjectExplorer::Target *t = qt4pro->activeTarget())
- qtv = QtSupport::QtProfileInformation::qtVersion(t->profile());
+ qtv = QtSupport::QtKitInformation::qtVersion(t->kit());
else
- qtv = QtSupport::QtProfileInformation::qtVersion(ProjectExplorer::ProfileManager::instance()->defaultProfile());
+ qtv = QtSupport::QtKitInformation::qtVersion(ProjectExplorer::KitManager::instance()->defaultKit());
if (qtv)
value = qtv->qmakeProperty(variable == kHostBins ? "QT_HOST_BINS" : "QT_INSTALL_BINS");
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.pro b/src/plugins/qt4projectmanager/qt4projectmanager.pro
index f50840f50f..ae1b4ff64d 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.pro
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.pro
@@ -6,8 +6,8 @@ include(../../qtcreatorplugin.pri)
include(qt4projectmanager_dependencies.pri)
HEADERS += \
- qmakeprofileinformation.h \
- qmakeprofileconfigwidget.h \
+ qmakekitinformation.h \
+ qmakekitconfigwidget.h \
qmakerunconfigurationfactory.h \
qt4projectmanagerplugin.h \
qt4projectmanager.h \
@@ -72,8 +72,8 @@ HEADERS += \
unconfiguredprojectpanel.h
SOURCES += \
- qmakeprofileconfigwidget.cpp \
- qmakeprofileinformation.cpp \
+ qmakekitconfigwidget.cpp \
+ qmakekitinformation.cpp \
qmakerunconfigurationfactory.cpp \
qt4projectmanagerplugin.cpp \
qt4projectmanager.cpp \
@@ -139,7 +139,6 @@ FORMS += makestep.ui \
qt4projectconfigwidget.ui \
librarydetailswidget.ui \
wizards/testwizardpage.ui \
- wizards/targetsetuppage.ui \
wizards/html5appwizardsourcespage.ui \
wizards/mobilelibrarywizardoptionpage.ui \
wizards/mobileappwizardgenericoptionspage.ui \
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.qbs b/src/plugins/qt4projectmanager/qt4projectmanager.qbs
index 0d83c6f951..e8421967b5 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.qbs
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.qbs
@@ -62,10 +62,10 @@ QtcPlugin {
"profilekeywords.h",
"qmakeparser.cpp",
"qmakeparser.h",
- "qmakeprofileconfigwidget.cpp",
- "qmakeprofileconfigwidget.h",
- "qmakeprofileinformation.cpp",
- "qmakeprofileinformation.h",
+ "qmakekitconfigwidget.cpp",
+ "qmakekitconfigwidget.h",
+ "qmakekitinformation.cpp",
+ "qmakekitinformation.h",
"qmakerunconfigurationfactory.cpp",
"qmakerunconfigurationfactory.h",
"qmakestep.cpp",
@@ -137,7 +137,6 @@ QtcPlugin {
"qt-desktop/simulatorqtversion.h",
"qt-desktop/simulatorqtversionfactory.cpp",
"qt-desktop/simulatorqtversionfactory.h",
- "wizards/targetsetuppage.ui",
"wizards/testwizardpage.ui",
"wizards/wizards.qrc",
"wizards/abstractmobileapp.cpp",
diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
index 9a11b4838e..c7a49f54a8 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.cpp
@@ -57,7 +57,7 @@
#include "qt-desktop/simulatorqtversionfactory.h"
#include "winceqtversionfactory.h"
#include "unconfiguredprojectpanel.h"
-#include "qmakeprofileinformation.h"
+#include "qmakekitinformation.h"
#include <coreplugin/id.h>
#include <coreplugin/icore.h>
@@ -65,7 +65,7 @@
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/project.h>
#include <projectexplorer/session.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitmanager.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectnodes.h>
@@ -131,7 +131,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
m_proFileEditorFactory = new ProFileEditorFactory(m_qt4ProjectManager, editorHandler);
- ProjectExplorer::ProfileManager::instance()->registerProfileInformation(new QmakeProfileInformation);
+ ProjectExplorer::KitManager::instance()->registerKitInformation(new QmakeKitInformation);
addObject(m_proFileEditorFactory);
diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
index 478566c69f..33c667dcd9 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
+++ b/src/plugins/qt4projectmanager/qt4projectmanagerplugin.h
@@ -42,7 +42,7 @@ namespace ProjectExplorer {
class Node;
class Project;
class ProjectExplorerPlugin;
-class ProfileInformation;
+class KitInformation;
class Target;
}
namespace Utils { class ParameterAction; }
diff --git a/src/plugins/qt4projectmanager/qt4targetsetupwidget.cpp b/src/plugins/qt4projectmanager/qt4targetsetupwidget.cpp
index 5fd071a3f2..1a1d7e782f 100644
--- a/src/plugins/qt4projectmanager/qt4targetsetupwidget.cpp
+++ b/src/plugins/qt4projectmanager/qt4targetsetupwidget.cpp
@@ -35,10 +35,10 @@
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
-#include <projectexplorer/profile.h>
+#include <projectexplorer/kit.h>
#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/profileoptionspage.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <projectexplorer/kitoptionspage.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/detailsbutton.h>
#include <utils/detailswidget.h>
@@ -57,15 +57,15 @@ namespace Qt4ProjectManager {
// Qt4TargetSetupWidget
// -------------------------------------------------------------------------
-Qt4TargetSetupWidget::Qt4TargetSetupWidget(ProjectExplorer::Profile *p,
+Qt4TargetSetupWidget::Qt4TargetSetupWidget(ProjectExplorer::Kit *p,
const QString &proFilePath,
const QList<BuildConfigurationInfo> &infoList) :
- m_profile(p),
+ m_kit(p),
m_haveImported(false),
m_ignoreChange(false),
m_selected(0)
{
- Q_ASSERT(m_profile);
+ Q_ASSERT(m_kit);
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
QVBoxLayout *vboxLayout = new QVBoxLayout();
@@ -75,7 +75,7 @@ Qt4TargetSetupWidget::Qt4TargetSetupWidget(ProjectExplorer::Profile *p,
m_detailsWidget->setUseCheckBox(true);
m_detailsWidget->setChecked(false);
m_detailsWidget->setSummaryFontBold(true);
- m_detailsWidget->setToolTip(m_profile->toHtml());
+ m_detailsWidget->setToolTip(m_kit->toHtml());
vboxLayout->addWidget(m_detailsWidget);
Utils::FadingWidget *panel = new Utils::FadingWidget(m_detailsWidget);
@@ -84,7 +84,7 @@ Qt4TargetSetupWidget::Qt4TargetSetupWidget(ProjectExplorer::Profile *p,
panelLayout->addWidget(m_manageButton);
m_detailsWidget->setToolWidget(panel);
- handleProfileUpdate(m_profile);
+ handleKitUpdate(m_kit);
QWidget *widget = new QWidget;
QVBoxLayout *layout = new QVBoxLayout;
@@ -110,26 +110,26 @@ Qt4TargetSetupWidget::Qt4TargetSetupWidget(ProjectExplorer::Profile *p,
connect(m_detailsWidget, SIGNAL(checked(bool)),
this, SLOT(targetCheckBoxToggled(bool)));
- connect(ProjectExplorer::ProfileManager::instance(), SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(handleProfileUpdate(ProjectExplorer::Profile*)));
+ connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(handleKitUpdate(ProjectExplorer::Kit*)));
- connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageProfile()));
+ connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageKit()));
}
Qt4TargetSetupWidget::~Qt4TargetSetupWidget()
{ }
-ProjectExplorer::Profile *Qt4TargetSetupWidget::profile()
+ProjectExplorer::Kit *Qt4TargetSetupWidget::profile()
{
- return m_profile;
+ return m_kit;
}
-void Qt4TargetSetupWidget::clearProfile()
+void Qt4TargetSetupWidget::clearKit()
{
- m_profile = 0;
+ m_kit = 0;
}
-bool Qt4TargetSetupWidget::isTargetSelected() const
+bool Qt4TargetSetupWidget::isKitSelected() const
{
if (!m_detailsWidget->isChecked())
return false;
@@ -137,7 +137,7 @@ bool Qt4TargetSetupWidget::isTargetSelected() const
return !selectedBuildConfigurationInfoList().isEmpty();
}
-void Qt4TargetSetupWidget::setTargetSelected(bool b)
+void Qt4TargetSetupWidget::setKitSelected(bool b)
{
// Only check target if there are build configurations possible
b &= !selectedBuildConfigurationInfoList().isEmpty();
@@ -178,7 +178,7 @@ void Qt4TargetSetupWidget::addBuildConfigurationInfo(const BuildConfigurationInf
Utils::PathChooser *pathChooser = new Utils::PathChooser();
pathChooser->setExpectedKind(Utils::PathChooser::Directory);
pathChooser->setPath(info.directory);
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(m_profile);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(m_kit);
if (!version)
return;
pathChooser->setReadOnly(!version->supportsShadowBuilds() || importing);
@@ -221,39 +221,39 @@ void Qt4TargetSetupWidget::targetCheckBoxToggled(bool b)
emit selectedToggled();
}
-void Qt4TargetSetupWidget::manageProfile()
+void Qt4TargetSetupWidget::manageKit()
{
- ProjectExplorer::ProfileOptionsPage *page =
- ExtensionSystem::PluginManager::instance()->getObject<ProjectExplorer::ProfileOptionsPage>();
- if (!page || !m_profile)
+ ProjectExplorer::KitOptionsPage *page =
+ ExtensionSystem::PluginManager::instance()->getObject<ProjectExplorer::KitOptionsPage>();
+ if (!page || !m_kit)
return;
- page->showProfile(m_profile);
+ page->showKit(m_kit);
Core::ICore::showOptionsDialog(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY),
- QLatin1String(ProjectExplorer::Constants::PROFILE_SETTINGS_PAGE_ID));
+ QLatin1String(ProjectExplorer::Constants::KITS_SETTINGS_PAGE_ID));
}
void Qt4TargetSetupWidget::setProFilePath(const QString &proFilePath)
{
- if (!m_profile)
+ if (!m_kit)
return;
m_proFilePath = proFilePath;
clear();
QList<BuildConfigurationInfo> infoList
- = Qt4BuildConfigurationFactory::availableBuildConfigurations(m_profile, proFilePath);
+ = Qt4BuildConfigurationFactory::availableBuildConfigurations(m_kit, proFilePath);
foreach (const BuildConfigurationInfo &info, infoList)
addBuildConfigurationInfo(info);
}
-void Qt4TargetSetupWidget::handleProfileUpdate(ProjectExplorer::Profile *p)
+void Qt4TargetSetupWidget::handleKitUpdate(ProjectExplorer::Kit *k)
{
- if (p != m_profile)
+ if (k != m_kit)
return;
- m_detailsWidget->setIcon(p->icon());
- m_detailsWidget->setSummaryText(p->displayName());
+ m_detailsWidget->setIcon(k->icon());
+ m_detailsWidget->setSummaryText(k->displayName());
}
QList<BuildConfigurationInfo> Qt4TargetSetupWidget::selectedBuildConfigurationInfoList() const
@@ -337,7 +337,7 @@ QPair<ProjectExplorer::Task::TaskType, QString> Qt4TargetSetupWidget::findIssues
return qMakePair(ProjectExplorer::Task::Unknown, QString());
QString buildDir = info.directory;
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(m_profile);
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(m_kit);
if (!version)
return qMakePair(ProjectExplorer::Task::Unknown, QString());
diff --git a/src/plugins/qt4projectmanager/qt4targetsetupwidget.h b/src/plugins/qt4projectmanager/qt4targetsetupwidget.h
index c9aec8642f..f4ede62857 100644
--- a/src/plugins/qt4projectmanager/qt4targetsetupwidget.h
+++ b/src/plugins/qt4projectmanager/qt4targetsetupwidget.h
@@ -46,7 +46,7 @@ class QPushButton;
class QSpacerItem;
QT_END_NAMESPACE
-namespace ProjectExplorer { class Profile; }
+namespace ProjectExplorer { class Kit; }
namespace QtSupport {
class BaseQtVersion;
} // namespace QtSupport
@@ -62,16 +62,16 @@ class QT4PROJECTMANAGER_EXPORT Qt4TargetSetupWidget : public QWidget
{
Q_OBJECT
public:
- Qt4TargetSetupWidget(ProjectExplorer::Profile *p,
+ Qt4TargetSetupWidget(ProjectExplorer::Kit *p,
const QString &proFilePath,
const QList<BuildConfigurationInfo> &infoList);
~Qt4TargetSetupWidget();
- ProjectExplorer::Profile *profile();
- void clearProfile();
+ ProjectExplorer::Kit *profile();
+ void clearKit();
- bool isTargetSelected() const;
- void setTargetSelected(bool b);
+ bool isKitSelected() const;
+ void setKitSelected(bool b);
void addBuildConfigurationInfo(const BuildConfigurationInfo &info, bool importing = false);
@@ -83,19 +83,19 @@ signals:
void selectedToggled() const;
private slots:
- void handleProfileUpdate(ProjectExplorer::Profile *p);
+ void handleKitUpdate(ProjectExplorer::Kit *k);
void checkBoxToggled(bool b);
void pathChanged();
void targetCheckBoxToggled(bool b);
- void manageProfile();
+ void manageKit();
private:
void reportIssues(int index);
QPair<ProjectExplorer::Task::TaskType, QString> findIssues(const BuildConfigurationInfo &info);
void clear();
- ProjectExplorer::Profile *m_profile;
+ ProjectExplorer::Kit *m_kit;
QString m_proFilePath;
bool m_haveImported;
Utils::DetailsWidget *m_detailsWidget;
diff --git a/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp b/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
index 1786240f9d..382b8766f3 100644
--- a/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
+++ b/src/plugins/qt4projectmanager/qtuicodemodelsupport.cpp
@@ -35,7 +35,7 @@
#include "qt4projectmanager.h"
#include <projectexplorer/target.h>
#include <qtsupport/baseqtversion.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
using namespace Qt4ProjectManager;
using namespace Internal;
@@ -55,10 +55,10 @@ QString Qt4UiCodeModelSupport::uicCommand() const
{
QtSupport::BaseQtVersion *version;
if (m_project->needsConfiguration()) {
- version = QtSupport::QtProfileInformation::qtVersion(ProjectExplorer::ProfileManager::instance()->defaultProfile());
+ version = QtSupport::QtKitInformation::qtVersion(ProjectExplorer::KitManager::instance()->defaultKit());
} else {
ProjectExplorer::Target *target = m_project->activeTarget();
- version = QtSupport::QtProfileInformation::qtVersion(target->profile());
+ version = QtSupport::QtKitInformation::qtVersion(target->kit());
}
return version ? version->uicCommand() : QString();
}
diff --git a/src/plugins/qt4projectmanager/unconfiguredprojectpanel.cpp b/src/plugins/qt4projectmanager/unconfiguredprojectpanel.cpp
index 6725cd3bce..4711c5e963 100644
--- a/src/plugins/qt4projectmanager/unconfiguredprojectpanel.cpp
+++ b/src/plugins/qt4projectmanager/unconfiguredprojectpanel.cpp
@@ -40,8 +40,8 @@
#include <coreplugin/modemanager.h>
#include <coreplugin/coreconstants.h>
-#include <projectexplorer/profile.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kit.h>
+#include <projectexplorer/kitmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorer.h>
@@ -126,51 +126,48 @@ TargetSetupPageWrapper::TargetSetupPageWrapper(ProjectExplorer::Project *project
connect(m_configureButton, SIGNAL(clicked()),
this, SLOT(done()));
- connect(m_targetSetupPage, SIGNAL(noteTextLinkActivated()),
- this, SLOT(noteTextLinkActivated()));
connect(m_targetSetupPage, SIGNAL(completeChanged()),
this, SLOT(completeChanged()));
- connect(ProjectExplorer::ProfileManager::instance(), SIGNAL(defaultProfileChanged()),
+ connect(ProjectExplorer::KitManager::instance(), SIGNAL(defaultkitChanged()),
this, SLOT(updateNoteText()));
- connect(ProjectExplorer::ProfileManager::instance(), SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(profileUpdated(ProjectExplorer::Profile*)));
+ connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(kitUpdated(ProjectExplorer::Kit*)));
}
-void TargetSetupPageWrapper::profileUpdated(ProjectExplorer::Profile *profile)
+void TargetSetupPageWrapper::kitUpdated(ProjectExplorer::Kit *k)
{
- if (profile == ProjectExplorer::ProfileManager::instance()->defaultProfile())
+ if (k == ProjectExplorer::KitManager::instance()->defaultKit())
updateNoteText();
}
void TargetSetupPageWrapper::updateNoteText()
{
- ProjectExplorer::Profile *p = ProjectExplorer::ProfileManager::instance()->defaultProfile();
-
+ ProjectExplorer::Kit *k = ProjectExplorer::KitManager::instance()->defaultKit();
QString text;
- if (!p)
- text = tr("<p>The project <b>%1</b> is not yet configured.</p>"
- "<p>Qt Creator cannot parse the project, because no target "
- "has been set up. You can set up targets "
- "in the <b><a href=\"edit\">options.</a></b></p>")
+ bool showHint = false;
+ if (!k) {
+ text = tr("The project <b>%1</b> is not yet configured.<br/>"
+ "Qt Creator cannot parse the project, because no kit "
+ "has been set up.")
.arg(m_project->displayName());
- else if (p->isValid())
- text = tr("<p>The project <b>%1</b> is not yet configured.</p>"
- "<p>Qt Creator uses the target <b>%2</b> "
- "to parse the project. You can edit "
- "targets in the <b><a href=\"edit\">options.</a></b></p>")
+ showHint = true;
+ } else if (k->isValid()) {
+ text = tr("The project <b>%1</b> is not yet configured.<br/>"
+ "Qt Creator uses the kit <b>%2</b> to parse the project.")
.arg(m_project->displayName())
- .arg(p->displayName());
- else
- text = tr("<p>The project <b>%1</b> is not yet configured.</p>"
- "<p>Qt Creator uses the <b>invalid</b> target <b>%2</b> "
- "to parse the project. You can edit "
- "targets in the <b><a href=\"edit\">options</a></b></p>")
+ .arg(k->displayName());
+ showHint = false;
+ } else {
+ text = tr("The project <b>%1</b> is not yet configured.<br/>"
+ "Qt Creator uses the <b>invalid</b> kit <b>%2</b> to parse the project.")
.arg(m_project->displayName())
- .arg(p->displayName());
-
+ .arg(k->displayName());
+ showHint = true;
+ }
m_targetSetupPage->setNoteText(text);
+ m_targetSetupPage->showOptionsHint(showHint);
}
void TargetSetupPageWrapper::keyPressEvent(QKeyEvent *event)
@@ -195,12 +192,6 @@ void TargetSetupPageWrapper::done()
Core::ICore::instance()->modeManager()->activateMode(Core::Constants::MODE_EDIT);
}
-void TargetSetupPageWrapper::noteTextLinkActivated()
-{
- Core::ICore::instance()->showOptionsDialog(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY),
- QLatin1String(ProjectExplorer::Constants::PROFILE_SETTINGS_PAGE_ID));
-}
-
void TargetSetupPageWrapper::completeChanged()
{
m_configureButton->setEnabled(m_targetSetupPage->isComplete());
diff --git a/src/plugins/qt4projectmanager/unconfiguredprojectpanel.h b/src/plugins/qt4projectmanager/unconfiguredprojectpanel.h
index 4b2b68d385..464bf80d3c 100644
--- a/src/plugins/qt4projectmanager/unconfiguredprojectpanel.h
+++ b/src/plugins/qt4projectmanager/unconfiguredprojectpanel.h
@@ -37,7 +37,7 @@
QT_FORWARD_DECLARE_CLASS(QPushButton)
-namespace ProjectExplorer { class Profile; }
+namespace ProjectExplorer { class Kit; }
namespace Qt4ProjectManager {
class TargetSetupPage;
@@ -67,8 +67,7 @@ protected:
void keyPressEvent(QKeyEvent *event);
private slots:
void done();
- void noteTextLinkActivated();
- void profileUpdated(ProjectExplorer::Profile *profile);
+ void kitUpdated(ProjectExplorer::Kit *k);
void updateNoteText();
void completeChanged();
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
index 252102136b..a5d2250cc9 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
@@ -39,7 +39,7 @@
#include <qt4projectmanager/qt4projectmanager.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qtsupport/qtsupportconstants.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/customwizard/customwizard.h>
#include <coreplugin/editormanager/editormanager.h>
@@ -64,14 +64,14 @@ AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent,
, m_genericItem(0)
, m_maemoItem(0)
, m_harmattanItem(0)
- , m_profileIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_PROFILE_IDS).value<QList<Core::Id> >())
+ , m_kitIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_KIT_IDS).value<QList<Core::Id> >())
{
- if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS)) {
+ if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS)) {
m_targetsPage = new TargetSetupPage;
- m_targetsPage->setPreferredProfileMatcher(new QtSupport::QtPlatformProfileMatcher(selectedPlatform()));
- m_targetsPage->setRequiredProfileMatcher(new QtSupport::QtVersionProfileMatcher(requiredFeatures(),
- minimumQtVersionNumber,
- maximumQtVersionNumber));
+ m_targetsPage->setPreferredKitMatcher(new QtSupport::QtPlatformKitMatcher(selectedPlatform()));
+ m_targetsPage->setRequiredKitMatcher(new QtSupport::QtVersionKitMatcher(requiredFeatures(),
+ minimumQtVersionNumber,
+ maximumQtVersionNumber));
resize(900, 450);
}
@@ -204,23 +204,23 @@ Utils::WizardProgressItem *AbstractMobileAppWizardDialog::itemOfNextGenericPage(
bool AbstractMobileAppWizardDialog::isQtPlatformSelected(const QString &platform) const
{
- QList<Core::Id> selectedProfileList = selectedProfiles();
+ QList<Core::Id> selectedKitsList = selectedKits();
- QtSupport::QtPlatformProfileMatcher matcher(platform);
- QList<ProjectExplorer::Profile *> allProfileList
- = ProjectExplorer::ProfileManager::instance()->profiles(&matcher);
- foreach (ProjectExplorer::Profile *p, allProfileList) {
- if (selectedProfileList.contains(p->id()))
+ QtSupport::QtPlatformKitMatcher matcher(platform);
+ QList<ProjectExplorer::Kit *> kitsList
+ = ProjectExplorer::KitManager::instance()->kits(&matcher);
+ foreach (ProjectExplorer::Kit *p, kitsList) {
+ if (selectedKitsList.contains(p->id()))
return true;
}
return false;
}
-QList<Core::Id> AbstractMobileAppWizardDialog::selectedProfiles() const
+QList<Core::Id> AbstractMobileAppWizardDialog::selectedKits() const
{
if (m_targetsPage)
- return m_targetsPage->selectedProfiles();
- return m_profileIds;
+ return m_targetsPage->selectedKits();
+ return m_kitIds;
}
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
index 75c7667608..1a5cf5783d 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
@@ -74,7 +74,7 @@ private:
int idOfNextGenericPage() const;
Utils::WizardProgressItem *itemOfNextGenericPage() const;
bool isQtPlatformSelected(const QString &platform) const;
- QList<Core::Id> selectedProfiles() const;
+ QList<Core::Id> selectedKits() const;
Internal::MobileAppWizardGenericOptionsPage *m_genericOptionsPage;
Internal::MobileAppWizardMaemoOptionsPage *m_maemoOptionsPage;
@@ -90,7 +90,7 @@ private:
Utils::WizardProgressItem *m_genericItem;
Utils::WizardProgressItem *m_maemoItem;
Utils::WizardProgressItem *m_harmattanItem;
- QList<Core::Id> m_profileIds;
+ QList<Core::Id> m_kitIds;
friend class AbstractMobileAppWizard;
};
diff --git a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
index 47a0137e68..333cf8ce72 100644
--- a/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/consoleappwizarddialog.cpp
@@ -54,7 +54,7 @@ ConsoleAppWizardDialog::ConsoleAppWizardDialog(const QString &templateName,
"provide a GUI."));
addModulesPage();
- if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS))
+ if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
addTargetSetupPage();
addExtensionPages(parameters.extensionPages());
diff --git a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
index a6d69d7d78..91f70b4dda 100644
--- a/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/emptyprojectwizarddialog.cpp
@@ -46,7 +46,7 @@ EmptyProjectWizardDialog::EmptyProjectWizardDialog(const QString &templateName,
setIntroDescription(tr("This wizard generates an empty Qt4 project. "
"Add files to it later on by using the other wizards."));
- if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS))
+ if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
addTargetSetupPage();
addExtensionPages(parameters.extensionPages());
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
index 3a92ce9ebc..b05c9e7d70 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
@@ -65,7 +65,7 @@ GuiAppWizardDialog::GuiAppWizardDialog(const QString &templateName,
"and includes an empty widget."));
addModulesPage();
- if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS))
+ if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
addTargetSetupPage(isMobile);
m_filesPage->setFormInputCheckable(true);
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
index 15ba5592ad..cd84395ec2 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
@@ -153,7 +153,7 @@ LibraryWizardDialog::LibraryWizardDialog(const QString &templateName,
// Use the intro page instead, set up initially
setIntroDescription(tr("This wizard generates a C++ library project."));
- if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS)) {
+ if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS)) {
m_targetPageId = addTargetSetupPage();
m_mobilePageId = addPage(m_mobilePage);
}
diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
index 9f47c95eaa..0103a61416 100644
--- a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
@@ -41,10 +41,10 @@
#include <cpptools/cpptoolsconstants.h>
-#include <projectexplorer/profile.h>
+#include <projectexplorer/kit.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/task.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <extensionsystem/pluginmanager.h>
@@ -169,7 +169,7 @@ CustomQt4ProjectWizard::CustomQt4ProjectWizard(const Core::BaseFileWizardParamet
{
BaseQt4ProjectWizardDialog *wizard = new BaseQt4ProjectWizardDialog(false, parent, wizardDialogParameters);
- if (!wizardDialogParameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS))
+ if (!wizardDialogParameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
wizard->addTargetSetupPage(false, targetPageId);
initProjectWizardDialog(wizard, wizardDialogParameters.defaultPath(),
@@ -193,7 +193,7 @@ BaseQt4ProjectWizardDialog::BaseQt4ProjectWizardDialog(bool showModulesPage, QWi
ProjectExplorer::BaseProjectWizardDialog(parent, parameters),
m_modulesPage(0),
m_targetSetupPage(0),
- m_profileIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_PROFILE_IDS).value<QList<Core::Id> >())
+ m_profileIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_KIT_IDS).value<QList<Core::Id> >())
{
init(showModulesPage);
}
@@ -205,7 +205,7 @@ BaseQt4ProjectWizardDialog::BaseQt4ProjectWizardDialog(bool showModulesPage,
ProjectExplorer::BaseProjectWizardDialog(introPage, introId, parent, parameters),
m_modulesPage(0),
m_targetSetupPage(0),
- m_profileIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_PROFILE_IDS).value<QList<Core::Id> >())
+ m_profileIds(parameters.extraValues().value(ProjectExplorer::Constants::PROJECT_KIT_IDS).value<QList<Core::Id> >())
{
init(showModulesPage);
}
@@ -247,18 +247,18 @@ int BaseQt4ProjectWizardDialog::addTargetSetupPage(bool mobile, int id)
Core::FeatureSet features = mobile ? Core::FeatureSet(QtSupport::Constants::FEATURE_MOBILE)
: Core::FeatureSet(QtSupport::Constants::FEATURE_DESKTOP);
if (platform.isEmpty())
- m_targetSetupPage->setPreferredProfileMatcher(new QtSupport::QtVersionProfileMatcher(features));
+ m_targetSetupPage->setPreferredKitMatcher(new QtSupport::QtVersionKitMatcher(features));
else
- m_targetSetupPage->setPreferredProfileMatcher(new QtSupport::QtPlatformProfileMatcher(platform));
+ m_targetSetupPage->setPreferredKitMatcher(new QtSupport::QtPlatformKitMatcher(platform));
- m_targetSetupPage->setRequiredProfileMatcher(new QtSupport::QtVersionProfileMatcher(requiredFeatures()));
+ m_targetSetupPage->setRequiredKitMatcher(new QtSupport::QtVersionKitMatcher(requiredFeatures()));
resize(900, 450);
if (id >= 0)
setPage(id, m_targetSetupPage);
else
id = addPage(m_targetSetupPage);
- wizardProgress()->item(id)->setTitle(tr("Targets"));
+ wizardProgress()->item(id)->setTitle(tr("Kits"));
return id;
}
@@ -322,23 +322,23 @@ bool BaseQt4ProjectWizardDialog::setupProject(Qt4Project *project) const
bool BaseQt4ProjectWizardDialog::isQtPlatformSelected(const QString &platform) const
{
- QList<Core::Id> selectedProfileList = selectedProfiles();
+ QList<Core::Id> selectedKitList = selectedKits();
- QtSupport::QtPlatformProfileMatcher matcher(platform);
- QList<ProjectExplorer::Profile *> allProfileList
- = ProjectExplorer::ProfileManager::instance()->profiles(&matcher);
- foreach (ProjectExplorer::Profile *p, allProfileList) {
- if (selectedProfileList.contains(p->id()))
+ QtSupport::QtPlatformKitMatcher matcher(platform);
+ QList<ProjectExplorer::Kit *> kitList
+ = ProjectExplorer::KitManager::instance()->kits(&matcher);
+ foreach (ProjectExplorer::Kit *p, kitList) {
+ if (selectedKitList.contains(p->id()))
return true;
}
return false;
}
-QList<Core::Id> BaseQt4ProjectWizardDialog::selectedProfiles() const
+QList<Core::Id> BaseQt4ProjectWizardDialog::selectedKits() const
{
if (!m_targetSetupPage)
return m_profileIds;
- return m_targetSetupPage->selectedProfiles();
+ return m_targetSetupPage->selectedKits();
}
void BaseQt4ProjectWizardDialog::addExtensionPages(const QList<QWizardPage *> &wizardPageList)
diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.h b/src/plugins/qt4projectmanager/wizards/qtwizard.h
index ce477ac7e9..6b10426271 100644
--- a/src/plugins/qt4projectmanager/wizards/qtwizard.h
+++ b/src/plugins/qt4projectmanager/wizards/qtwizard.h
@@ -39,7 +39,7 @@
#include <QSet>
-namespace ProjectExplorer { class Profile; }
+namespace ProjectExplorer { class Kit; }
namespace Qt4ProjectManager {
@@ -141,7 +141,7 @@ public:
bool writeUserFile(const QString &proFileName) const;
bool setupProject(Qt4Project *project) const;
bool isQtPlatformSelected(const QString &platform) const;
- QList<Core::Id> selectedProfiles() const;
+ QList<Core::Id> selectedKits() const;
void addExtensionPages(const QList<QWizardPage *> &wizardPageList);
diff --git a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp b/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp
index cc4d9e7808..4856a71784 100644
--- a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/subdirsprojectwizard.cpp
@@ -86,7 +86,7 @@ bool SubdirsProjectWizard::postGenerateFiles(const QWizard *w, const Core::Gener
const QString profileName = Core::BaseFileWizard::buildFileName(projectPath, params.fileName, profileSuffix());
QVariantMap map;
map.insert(QLatin1String(ProjectExplorer::Constants::PREFERED_PROJECT_NODE), profileName);
- map.insert(QLatin1String(ProjectExplorer::Constants::PROJECT_PROFILE_IDS), QVariant::fromValue(wizard->selectedProfiles()));
+ map.insert(QLatin1String(ProjectExplorer::Constants::PROJECT_KIT_IDS), QVariant::fromValue(wizard->selectedKits()));
Core::ICore::showNewItemDialog(tr("New Subproject", "Title of dialog"),
Core::IWizard::wizardsOfKind(Core::IWizard::ProjectWizard),
wizard->parameters().projectPath(),
diff --git a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.cpp
index ce2d267e56..e8a97de2c4 100644
--- a/src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/subdirsprojectwizarddialog.cpp
@@ -47,7 +47,7 @@ SubdirsProjectWizardDialog::SubdirsProjectWizardDialog(const QString &templateNa
setIntroDescription(tr("This wizard generates a Qt4 subdirs project. "
"Add subprojects to it later on by using the other wizards."));
- if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS))
+ if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
addTargetSetupPage();
addExtensionPages(parameters.extensionPages());
diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
index ff26061205..2e7eab3879 100644
--- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
+++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
@@ -31,31 +31,117 @@
#include "targetsetuppage.h"
#include "importwidget.h"
-#include "ui_targetsetuppage.h"
#include "buildconfigurationinfo.h"
#include "qt4buildconfiguration.h"
#include "qt4project.h"
#include "qt4projectmanagerconstants.h"
-#include "qmakeprofileinformation.h"
+#include "qmakekitinformation.h"
#include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h>
#include <qtsupport/qtversionfactory.h>
#include <utils/qtcprocess.h>
#include <QLabel>
#include <QMessageBox>
+#include <QVariant>
+#include <QAction>
+#include <QApplication>
+#include <QButtonGroup>
+#include <QHeaderView>
+#include <QLabel>
+#include <QScrollArea>
+#include <QVBoxLayout>
+#include <QWidget>
-using namespace Qt4ProjectManager;
+namespace Qt4ProjectManager {
+namespace Internal {
static const Core::Id QT_IS_TEMPORARY("Qt4PM.TempQt");
-static const Core::Id PROFILE_IS_TEMPORARY("Qt4PM.TempProfile");
+static const Core::Id KIT_IS_TEMPORARY("Qt4PM.TempKit");
static const Core::Id TEMPORARY_OF_PROJECTS("Qt4PM.TempProject");
+class TargetSetupPageUi
+{
+public:
+ QWidget *centralWidget;
+ QWidget *scrollAreaWidget;
+ QScrollArea *scrollArea;
+ QLabel *headerLabel;
+ QLabel *descriptionLabel;
+ QLabel *noValidKitLabel;
+ QLabel *optionHintLabel;
+
+ void setupUi(QWidget *q)
+ {
+ QWidget *setupTargetPage = new QWidget(q);
+
+ headerLabel = new QLabel(setupTargetPage);
+ headerLabel->setWordWrap(true);
+ headerLabel->setVisible(false);
+
+ noValidKitLabel = new QLabel(setupTargetPage);
+ noValidKitLabel->setWordWrap(true);
+ noValidKitLabel->setText(TargetSetupPage::tr("<span style=\" font-weight:600;\">No valid kits found.</span>"));
+
+ descriptionLabel = new QLabel(setupTargetPage);
+ descriptionLabel->setWordWrap(true);
+ descriptionLabel->setVisible(false);
+
+ optionHintLabel = new QLabel(setupTargetPage);
+ optionHintLabel->setWordWrap(true);
+ optionHintLabel->setText(TargetSetupPage::tr(
+ "Please add a kit in the <a href=\"buildandrun\">options</a> "
+ "or via the maintenance tool of the SDK."));
+ optionHintLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
+ optionHintLabel->setVisible(false);
+
+ centralWidget = new QWidget(setupTargetPage);
+ QSizePolicy policy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ policy.setHorizontalStretch(0);
+ policy.setVerticalStretch(0);
+ policy.setHeightForWidth(centralWidget->sizePolicy().hasHeightForWidth());
+ centralWidget->setSizePolicy(policy);
+
+ scrollAreaWidget = new QWidget(setupTargetPage);
+ scrollArea = new QScrollArea(scrollAreaWidget);
+ scrollArea->setWidgetResizable(true);
+
+ QWidget *scrollAreaWidgetContents;
+ scrollAreaWidgetContents = new QWidget();
+ scrollAreaWidgetContents->setGeometry(QRect(0, 0, 230, 81));
+ scrollArea->setWidget(scrollAreaWidgetContents);
+
+ QVBoxLayout *verticalLayout = new QVBoxLayout(scrollAreaWidget);
+ verticalLayout->setSpacing(0);
+ verticalLayout->setContentsMargins(0, 0, 0, 0);
+ verticalLayout->addWidget(scrollArea);
+
+ QVBoxLayout *verticalLayout_2 = new QVBoxLayout(setupTargetPage);
+ verticalLayout_2->addWidget(headerLabel);
+ verticalLayout_2->addWidget(noValidKitLabel);
+ verticalLayout_2->addWidget(descriptionLabel);
+ verticalLayout_2->addWidget(optionHintLabel);
+ verticalLayout_2->addWidget(centralWidget);
+ verticalLayout_2->addWidget(scrollAreaWidget);
+
+ QVBoxLayout *verticalLayout_3 = new QVBoxLayout(q);
+ verticalLayout_3->setContentsMargins(0, 0, 0, -1);
+ verticalLayout_3->addWidget(setupTargetPage);
+
+ QObject::connect(optionHintLabel, SIGNAL(linkActivated(QString)),
+ q, SLOT(openOptions()));
+ }
+};
+
+} // namespace Internal
+
+using namespace Internal;
+
TargetSetupPage::TargetSetupPage(QWidget *parent) :
QWizardPage(parent),
m_requiredMatcher(0),
@@ -64,13 +150,21 @@ TargetSetupPage::TargetSetupPage(QWidget *parent) :
m_importSearch(false),
m_ignoreUpdates(false),
m_firstWidget(0),
- m_ui(new Internal::Ui::TargetSetupPage),
+ m_ui(new TargetSetupPageUi),
m_importWidget(new Internal::ImportWidget(this)),
- m_spacer(new QSpacerItem(0,0, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding))
+ m_spacer(new QSpacerItem(0,0, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding)),
+ m_forceOptionHint(false)
{
setObjectName(QLatin1String("TargetSetupPage"));
+ setWindowTitle(tr("Select Kits for Your Project"));
m_ui->setupUi(this);
+ QSizePolicy policy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ policy.setHorizontalStretch(0);
+ policy.setVerticalStretch(0);
+ policy.setHeightForWidth(sizePolicy().hasHeightForWidth());
+ setSizePolicy(policy);
+
QWidget *centralWidget = new QWidget(this);
m_ui->scrollArea->setWidget(centralWidget);
centralWidget->setLayout(new QVBoxLayout);
@@ -80,18 +174,15 @@ TargetSetupPage::TargetSetupPage(QWidget *parent) :
setUseScrollArea(true);
setImportSearch(false);
- setTitle(tr("Target Setup"));
+ setTitle(tr("Kit Selection"));
- connect(m_ui->descriptionLabel, SIGNAL(linkActivated(QString)),
- this, SIGNAL(noteTextLinkActivated()));
-
- ProjectExplorer::ProfileManager *sm = ProjectExplorer::ProfileManager::instance();
- connect(sm, SIGNAL(profileAdded(ProjectExplorer::Profile*)),
- this, SLOT(handleProfileAddition(ProjectExplorer::Profile*)));
- connect(sm, SIGNAL(profileRemoved(ProjectExplorer::Profile*)),
- this, SLOT(handleProfileRemoval(ProjectExplorer::Profile*)));
- connect(sm, SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(handleProfileUpdate(ProjectExplorer::Profile*)));
+ ProjectExplorer::KitManager *km = ProjectExplorer::KitManager::instance();
+ connect(km, SIGNAL(kitAdded(ProjectExplorer::Kit*)),
+ this, SLOT(handleKitAddition(ProjectExplorer::Kit*)));
+ connect(km, SIGNAL(kitRemoved(ProjectExplorer::Kit*)),
+ this, SLOT(handleKitRemoval(ProjectExplorer::Kit*)));
+ connect(km, SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(handleKitUpdate(ProjectExplorer::Kit*)));
connect(m_importWidget, SIGNAL(importFrom(Utils::FileName)),
this, SLOT(import(Utils::FileName)));
}
@@ -102,15 +193,15 @@ void TargetSetupPage::initializePage()
setupWidgets();
setupImports();
- selectAtLeastOneTarget();
+ selectAtLeastOneKit();
}
-void TargetSetupPage::setRequiredProfileMatcher(ProjectExplorer::ProfileMatcher *matcher)
+void TargetSetupPage::setRequiredKitMatcher(ProjectExplorer::KitMatcher *matcher)
{
m_requiredMatcher = matcher;
}
-QList<Core::Id> TargetSetupPage::selectedProfiles() const
+QList<Core::Id> TargetSetupPage::selectedKits() const
{
QList<Core::Id> result;
QMap<Core::Id, Qt4TargetSetupWidget *>::const_iterator it, end;
@@ -118,13 +209,13 @@ QList<Core::Id> TargetSetupPage::selectedProfiles() const
end = m_widgets.constEnd();
for ( ; it != end; ++it) {
- if (isProfileSelected(it.key()))
+ if (isKitSelected(it.key()))
result << it.key();
}
return result;
}
-void TargetSetupPage::setPreferredProfileMatcher(ProjectExplorer::ProfileMatcher *matcher)
+void TargetSetupPage::setPreferredKitMatcher(ProjectExplorer::KitMatcher *matcher)
{
m_preferredMatcher = matcher;
}
@@ -137,23 +228,23 @@ TargetSetupPage::~TargetSetupPage()
delete m_requiredMatcher;
}
-bool TargetSetupPage::isProfileSelected(Core::Id id) const
+bool TargetSetupPage::isKitSelected(Core::Id id) const
{
Qt4TargetSetupWidget *widget = m_widgets.value(id);
- return widget && widget->isTargetSelected();
+ return widget && widget->isKitSelected();
}
-void TargetSetupPage::setProfileSelected(Core::Id id, bool selected)
+void TargetSetupPage::setKitSelected(Core::Id id, bool selected)
{
Qt4TargetSetupWidget *widget = m_widgets.value(id);
if (widget)
- widget->setTargetSelected(selected);
+ widget->setKitSelected(selected);
}
bool TargetSetupPage::isComplete() const
{
foreach (Qt4TargetSetupWidget *widget, m_widgets.values())
- if (widget->isTargetSelected())
+ if (widget->isKitSelected())
return true;
return false;
}
@@ -167,9 +258,9 @@ void TargetSetupPage::setImportSearch(bool b)
void TargetSetupPage::setupWidgets()
{
// Known profiles:
- foreach (ProjectExplorer::Profile *p, ProjectExplorer::ProfileManager::instance()->profiles(m_requiredMatcher)) {
- cleanProfile(p); // clean up broken profiles added by some development versions of QtC
- addWidget(p);
+ foreach (ProjectExplorer::Kit *k, ProjectExplorer::KitManager::instance()->kits(m_requiredMatcher)) {
+ cleanKit(k); // clean up broken kit added by some development versions of QtC
+ addWidget(k);
}
// Setup import widget:
@@ -185,7 +276,7 @@ void TargetSetupPage::setupWidgets()
void TargetSetupPage::reset()
{
foreach (Qt4TargetSetupWidget *widget, m_widgets.values()) {
- ProjectExplorer::Profile *p = widget->profile();
+ ProjectExplorer::Kit *p = widget->profile();
if (!p)
continue;
removeProject(p, m_proFilePath);
@@ -196,68 +287,68 @@ void TargetSetupPage::reset()
m_firstWidget = 0;
}
-ProjectExplorer::Profile *TargetSetupPage::createTemporaryProfile(QtSupport::BaseQtVersion *version,
- bool temporaryVersion,
- const Utils::FileName &parsedSpec)
+ProjectExplorer::Kit *TargetSetupPage::createTemporaryKit(QtSupport::BaseQtVersion *version,
+ bool temporaryVersion,
+ const Utils::FileName &parsedSpec)
{
- ProjectExplorer::Profile *p = new ProjectExplorer::Profile;
- QtSupport::QtProfileInformation::setQtVersion(p, version);
- ProjectExplorer::ToolChainProfileInformation::setToolChain(p, version->preferredToolChain(parsedSpec));
- QmakeProfileInformation::setMkspec(p, parsedSpec);
+ ProjectExplorer::Kit *k = new ProjectExplorer::Kit;
+ QtSupport::QtKitInformation::setQtVersion(k, version);
+ ProjectExplorer::ToolChainKitInformation::setToolChain(k, version->preferredToolChain(parsedSpec));
+ QmakeKitInformation::setMkspec(k, parsedSpec);
- p->setDisplayName(version->displayName());
- p->setValue(PROFILE_IS_TEMPORARY, true);
- p->setValue(TEMPORARY_OF_PROJECTS, QStringList() << m_proFilePath);
+ k->setDisplayName(version->displayName());
+ k->setValue(KIT_IS_TEMPORARY, true);
+ k->setValue(TEMPORARY_OF_PROJECTS, QStringList() << m_proFilePath);
if (temporaryVersion)
- p->setValue(QT_IS_TEMPORARY, version->uniqueId());
+ k->setValue(QT_IS_TEMPORARY, version->uniqueId());
m_ignoreUpdates = true;
- ProjectExplorer::ProfileManager::instance()->registerProfile(p);
+ ProjectExplorer::KitManager::instance()->registerKit(k);
m_ignoreUpdates = false;
- return p;
+ return k;
}
-void TargetSetupPage::cleanProfile(ProjectExplorer::Profile *p)
+void TargetSetupPage::cleanKit(ProjectExplorer::Kit *k)
{
m_ignoreUpdates = true;
- p->removeKey(PROFILE_IS_TEMPORARY);
- p->removeKey(QT_IS_TEMPORARY);
- p->removeKey(TEMPORARY_OF_PROJECTS);
+ k->removeKey(KIT_IS_TEMPORARY);
+ k->removeKey(QT_IS_TEMPORARY);
+ k->removeKey(TEMPORARY_OF_PROJECTS);
m_ignoreUpdates = false;
}
-void TargetSetupPage::makeQtPersistent(ProjectExplorer::Profile *p)
+void TargetSetupPage::makeQtPersistent(ProjectExplorer::Kit *k)
{
m_ignoreUpdates = true;
- p->removeKey(QT_IS_TEMPORARY);
+ k->removeKey(QT_IS_TEMPORARY);
m_ignoreUpdates = false;
}
-void TargetSetupPage::addProject(ProjectExplorer::Profile *p, const QString &path)
+void TargetSetupPage::addProject(ProjectExplorer::Kit *k, const QString &path)
{
- if (!p->hasValue(PROFILE_IS_TEMPORARY))
+ if (!k->hasValue(KIT_IS_TEMPORARY))
return;
- QStringList profiles = p->value(TEMPORARY_OF_PROJECTS, QStringList()).toStringList();
+ QStringList profiles = k->value(TEMPORARY_OF_PROJECTS, QStringList()).toStringList();
profiles.append(path);
m_ignoreUpdates = true;
- p->setValue(PROFILE_IS_TEMPORARY, profiles);
+ k->setValue(KIT_IS_TEMPORARY, profiles);
m_ignoreUpdates = false;
}
-void TargetSetupPage::removeProject(ProjectExplorer::Profile *p, const QString &path)
+void TargetSetupPage::removeProject(ProjectExplorer::Kit *k, const QString &path)
{
- if (!p->hasValue(PROFILE_IS_TEMPORARY) || path.isEmpty())
+ if (!k->hasValue(KIT_IS_TEMPORARY) || path.isEmpty())
return;
- QStringList projects = p->value(TEMPORARY_OF_PROJECTS, QStringList()).toStringList();
+ QStringList projects = k->value(TEMPORARY_OF_PROJECTS, QStringList()).toStringList();
if (projects.contains(path)) {
projects.removeOne(path);
m_ignoreUpdates = true;
- p->setValue(TEMPORARY_OF_PROJECTS, projects);
+ k->setValue(TEMPORARY_OF_PROJECTS, projects);
if (projects.isEmpty())
- ProjectExplorer::ProfileManager::instance()->deregisterProfile(p);
+ ProjectExplorer::KitManager::instance()->deregisterKit(k);
m_ignoreUpdates = false;
}
}
@@ -265,10 +356,10 @@ void TargetSetupPage::removeProject(ProjectExplorer::Profile *p, const QString &
void TargetSetupPage::setProFilePath(const QString &path)
{
m_proFilePath = path;
- if (!m_proFilePath.isEmpty()) {
- m_ui->descriptionLabel->setText(tr("Qt Creator can set up the following targets for project <b>%1</b>:",
- "%1: Project name").arg(QFileInfo(m_proFilePath).baseName()));
- }
+ if (!m_proFilePath.isEmpty())
+ m_ui->headerLabel->setText(tr("Qt Creator can use the following kits for project <b>%1</b>:",
+ "%1: Project name").arg(QFileInfo(m_proFilePath).baseName()));
+ m_ui->headerLabel->setVisible(!m_proFilePath.isEmpty());
if (m_widgets.isEmpty())
return;
@@ -280,6 +371,13 @@ void TargetSetupPage::setProFilePath(const QString &path)
void TargetSetupPage::setNoteText(const QString &text)
{
m_ui->descriptionLabel->setText(text);
+ m_ui->descriptionLabel->setVisible(!text.isEmpty());
+}
+
+void TargetSetupPage::showOptionsHint(bool show)
+{
+ m_forceOptionHint = show;
+ updateVisibility();
}
void TargetSetupPage::import(const Utils::FileName &path)
@@ -297,10 +395,10 @@ void TargetSetupPage::import(const Utils::FileName &path, const bool silent)
QtSupport::BaseQtVersion *version = 0;
bool temporaryVersion = false;
- ProjectExplorer::Profile *profile = 0;
+ ProjectExplorer::Kit *kit = 0;
QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance();
- ProjectExplorer::ProfileManager *pm = ProjectExplorer::ProfileManager::instance();
+ ProjectExplorer::KitManager *km = ProjectExplorer::KitManager::instance();
bool found = false;
foreach (const QString &file, makefiles) {
@@ -341,27 +439,27 @@ void TargetSetupPage::import(const Utils::FileName &path, const bool silent)
Utils::QtcProcess::addArgs(&specArgument, additionalArguments);
// Find profile:
- foreach (ProjectExplorer::Profile *p, pm->profiles()) {
- QtSupport::BaseQtVersion *profileVersion = QtSupport::QtProfileInformation::qtVersion(p);
- Utils::FileName profileSpec = QmakeProfileInformation::mkspec(p);
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p);
+ foreach (ProjectExplorer::Kit *k, km->kits()) {
+ QtSupport::BaseQtVersion *profileVersion = QtSupport::QtKitInformation::qtVersion(k);
+ Utils::FileName profileSpec = QmakeKitInformation::mkspec(k);
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
if (profileSpec.isEmpty() && profileVersion)
profileSpec = profileVersion->mkspecFor(tc);
if (profileVersion == version
&& profileSpec == parsedSpec)
- profile = p;
+ kit = k;
}
- if (!profile)
- profile = createTemporaryProfile(version, temporaryVersion, parsedSpec);
+ if (!kit)
+ kit = createTemporaryKit(version, temporaryVersion, parsedSpec);
else
- addProject(profile, m_proFilePath);
+ addProject(kit, m_proFilePath);
// Create widget:
- Qt4TargetSetupWidget *widget = m_widgets.value(profile->id(), 0);
+ Qt4TargetSetupWidget *widget = m_widgets.value(kit->id(), 0);
if (!widget)
- addWidget(profile);
- widget = m_widgets.value(profile->id(), 0);
+ addWidget(kit);
+ widget = m_widgets.value(kit->id(), 0);
if (!widget)
continue;
@@ -373,7 +471,7 @@ void TargetSetupPage::import(const Utils::FileName &path, const bool silent)
file);
widget->addBuildConfigurationInfo(info, true);
- widget->setTargetSelected(true);
+ widget->setKitSelected(true);
found = true;
}
@@ -388,13 +486,13 @@ void TargetSetupPage::import(const Utils::FileName &path, const bool silent)
void TargetSetupPage::handleQtUpdate(const QList<int> &add, const QList<int> &rm, const QList<int> &mod)
{
Q_UNUSED(add);
- // Update Profile to no longer claim a Qt version is temporary once it is modified/removed.
- foreach (ProjectExplorer::Profile *p, ProjectExplorer::ProfileManager::instance()->profiles()) {
- if (!p->hasValue(QT_IS_TEMPORARY))
+ // Update kit to no longer claim a Qt version is temporary once it is modified/removed.
+ foreach (ProjectExplorer::Kit *k, ProjectExplorer::KitManager::instance()->kits()) {
+ if (!k->hasValue(QT_IS_TEMPORARY))
continue;
- int qtVersion = p->value(QT_IS_TEMPORARY, -1).toInt();
+ int qtVersion = k->value(QT_IS_TEMPORARY, -1).toInt();
if (rm.contains(qtVersion) || mod.contains(qtVersion))
- makeQtPersistent(p);
+ makeQtPersistent(k);
}
}
@@ -406,8 +504,8 @@ void TargetSetupPage::setupImports()
QString sourceDir = QFileInfo(m_proFilePath).absolutePath();
import(Utils::FileName::fromString(sourceDir), true);
- QList<ProjectExplorer::Profile *> profiles = ProjectExplorer::ProfileManager::instance()->profiles();
- foreach (ProjectExplorer::Profile *p, profiles) {
+ QList<ProjectExplorer::Kit *> kitList = ProjectExplorer::KitManager::instance()->kits();
+ foreach (ProjectExplorer::Kit *p, kitList) {
QFileInfo fi(Qt4Project::shadowBuildDirectory(m_proFilePath, p, QString()));
const QString baseDir = fi.absolutePath();
const QString prefix = fi.baseName();
@@ -419,67 +517,67 @@ void TargetSetupPage::setupImports()
}
}
-void TargetSetupPage::handleProfileAddition(ProjectExplorer::Profile *p)
+void TargetSetupPage::handleKitAddition(ProjectExplorer::Kit *k)
{
if (m_ignoreUpdates)
return;
- Q_ASSERT(!m_widgets.contains(p->id()));
- addWidget(p);
+ Q_ASSERT(!m_widgets.contains(k->id()));
+ addWidget(k);
updateVisibility();
}
-void TargetSetupPage::handleProfileRemoval(ProjectExplorer::Profile *p)
+void TargetSetupPage::handleKitRemoval(ProjectExplorer::Kit *k)
{
if (m_ignoreUpdates)
return;
QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance();
- QtSupport::BaseQtVersion *version = vm->version(p->value(QT_IS_TEMPORARY, -1).toInt());
+ QtSupport::BaseQtVersion *version = vm->version(k->value(QT_IS_TEMPORARY, -1).toInt());
if (version)
vm->removeVersion(version);
- removeWidget(p);
+ removeWidget(k);
updateVisibility();
}
-void TargetSetupPage::handleProfileUpdate(ProjectExplorer::Profile *p)
+void TargetSetupPage::handleKitUpdate(ProjectExplorer::Kit *k)
{
if (m_ignoreUpdates)
return;
- cleanProfile(p);
- Qt4TargetSetupWidget *widget = m_widgets.value(p->id());
+ cleanKit(k);
+ Qt4TargetSetupWidget *widget = m_widgets.value(k->id());
bool acceptable = true;
- if (m_requiredMatcher && !m_requiredMatcher->matches(p))
+ if (m_requiredMatcher && !m_requiredMatcher->matches(k))
acceptable = false;
if (widget && !acceptable)
- removeWidget(p);
+ removeWidget(k);
else if (!widget && acceptable)
- addWidget(p);
+ addWidget(k);
updateVisibility();
}
-void TargetSetupPage::selectAtLeastOneTarget()
+void TargetSetupPage::selectAtLeastOneKit()
{
- bool atLeastOneTargetSelected = false;
+ bool atLeastOneKitSelected = false;
foreach (Qt4TargetSetupWidget *w, m_widgets.values()) {
- if (w->isTargetSelected()) {
- atLeastOneTargetSelected = true;
+ if (w->isKitSelected()) {
+ atLeastOneKitSelected = true;
break;
}
}
- if (!atLeastOneTargetSelected) {
+ if (!atLeastOneKitSelected) {
Qt4TargetSetupWidget *widget = m_firstWidget;
- ProjectExplorer::Profile *defaultProfile = ProjectExplorer::ProfileManager::instance()->defaultProfile();
- if (defaultProfile)
- widget = m_widgets.value(defaultProfile->id(), m_firstWidget);
+ ProjectExplorer::Kit *defaultKit = ProjectExplorer::KitManager::instance()->defaultKit();
+ if (defaultKit)
+ widget = m_widgets.value(defaultKit->id(), m_firstWidget);
if (widget)
- widget->setTargetSelected(true);
+ widget->setKitSelected(true);
m_firstWidget = 0;
}
emit completeChanged(); // Is this necessary?
@@ -491,35 +589,45 @@ void TargetSetupPage::updateVisibility()
m_ui->scrollAreaWidget->setVisible(m_baseLayout == m_ui->scrollArea->widget()->layout());
m_ui->centralWidget->setVisible(m_baseLayout == m_ui->centralWidget->layout());
+ bool hasKits = !m_widgets.isEmpty();
+ m_ui->noValidKitLabel->setVisible(!hasKits);
+ m_ui->optionHintLabel->setVisible(m_forceOptionHint || !hasKits);
+
emit completeChanged();
}
-void TargetSetupPage::removeWidget(ProjectExplorer::Profile *p)
+void TargetSetupPage::openOptions()
{
- Qt4TargetSetupWidget *widget = m_widgets.value(p->id());
+ Core::ICore::instance()->showOptionsDialog(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY),
+ QLatin1String(ProjectExplorer::Constants::KITS_SETTINGS_PAGE_ID));
+}
+
+void TargetSetupPage::removeWidget(ProjectExplorer::Kit *k)
+{
+ Qt4TargetSetupWidget *widget = m_widgets.value(k->id());
if (!widget)
return;
if (widget == m_firstWidget)
m_firstWidget = 0;
widget->deleteLater();
- m_widgets.remove(p->id());
+ m_widgets.remove(k->id());
}
-Qt4TargetSetupWidget *TargetSetupPage::addWidget(ProjectExplorer::Profile *p)
+Qt4TargetSetupWidget *TargetSetupPage::addWidget(ProjectExplorer::Kit *k)
{
- if (m_requiredMatcher && !m_requiredMatcher->matches(p))
+ if (m_requiredMatcher && !m_requiredMatcher->matches(k))
return 0;
- QList<BuildConfigurationInfo> infoList = Qt4BuildConfigurationFactory::availableBuildConfigurations(p, m_proFilePath);
- Qt4TargetSetupWidget *widget = infoList.isEmpty() ? 0 : new Qt4TargetSetupWidget(p, m_proFilePath, infoList);
+ QList<BuildConfigurationInfo> infoList = Qt4BuildConfigurationFactory::availableBuildConfigurations(k, m_proFilePath);
+ Qt4TargetSetupWidget *widget = infoList.isEmpty() ? 0 : new Qt4TargetSetupWidget(k, m_proFilePath, infoList);
if (!widget)
return 0;
m_baseLayout->removeWidget(m_importWidget);
m_baseLayout->removeItem(m_spacer);
- widget->setTargetSelected(m_preferredMatcher && m_preferredMatcher->matches(p));
- m_widgets.insert(p->id(), widget);
+ widget->setKitSelected(m_preferredMatcher && m_preferredMatcher->matches(k));
+ m_widgets.insert(k->id(), widget);
m_baseLayout->addWidget(widget);
m_baseLayout->addWidget(m_importWidget);
@@ -534,33 +642,34 @@ Qt4TargetSetupWidget *TargetSetupPage::addWidget(ProjectExplorer::Profile *p)
return widget;
}
-struct ProfileBuildInfo
+class KitBuildInfo
{
- ProfileBuildInfo(ProjectExplorer::Profile *p, const QList<BuildConfigurationInfo> &il) :
- profile(p), infoList(il)
+public:
+ KitBuildInfo(ProjectExplorer::Kit *k, const QList<BuildConfigurationInfo> &il) :
+ kit(k), infoList(il)
{ }
- ProjectExplorer::Profile *profile;
+ ProjectExplorer::Kit *kit;
QList<BuildConfigurationInfo> infoList;
};
bool TargetSetupPage::setupProject(Qt4ProjectManager::Qt4Project *project)
{
- QList<ProfileBuildInfo> toRegister;
+ QList<KitBuildInfo> toRegister;
foreach (Qt4TargetSetupWidget *widget, m_widgets.values()) {
- if (!widget->isTargetSelected())
+ if (!widget->isKitSelected())
continue;
- ProjectExplorer::Profile *p = widget->profile();
- cleanProfile(p);
- toRegister.append(ProfileBuildInfo(p, widget->selectedBuildConfigurationInfoList()));
- widget->clearProfile();
+ ProjectExplorer::Kit *p = widget->profile();
+ cleanKit(p);
+ toRegister.append(KitBuildInfo(p, widget->selectedBuildConfigurationInfoList()));
+ widget->clearKit();
}
reset();
- // only register targets after we are done cleaning up
- foreach (const ProfileBuildInfo &data, toRegister)
- project->addTarget(project->createTarget(data.profile, data.infoList));
+ // only register kits after we are done cleaning up
+ foreach (const KitBuildInfo &data, toRegister)
+ project->addTarget(project->createTarget(data.kit, data.infoList));
// Select active target
// a) Simulator target
@@ -569,7 +678,7 @@ bool TargetSetupPage::setupProject(Qt4ProjectManager::Qt4Project *project)
ProjectExplorer::Target *activeTarget = 0;
QList<ProjectExplorer::Target *> targets = project->targets();
foreach (ProjectExplorer::Target *t, targets) {
- QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(t->profile());
+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(t->kit());
if (version && version->type() == QLatin1String(QtSupport::Constants::SIMULATORQT))
activeTarget = t;
else if (!activeTarget && version && version->type() == QLatin1String(QtSupport::Constants::DESKTOPQT))
@@ -589,3 +698,5 @@ void TargetSetupPage::setUseScrollArea(bool b)
m_ui->scrollAreaWidget->setVisible(b);
m_ui->centralWidget->setVisible(!b);
}
+
+} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.h b/src/plugins/qt4projectmanager/wizards/targetsetuppage.h
index 08c18b1318..c6206571ce 100644
--- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.h
+++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.h
@@ -35,7 +35,7 @@
#include "../qt4targetsetupwidget.h"
#include <coreplugin/featureprovider.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitmanager.h>
#include <qtsupport/qtversionmanager.h>
#include <QString>
@@ -46,10 +46,7 @@ class Qt4Project;
namespace Internal {
class ImportWidget;
-
-namespace Ui {
-class TargetSetupPage;
-} // namespace Ui
+class TargetSetupPageUi;
} // namespace Internal
/// \internal
@@ -66,8 +63,8 @@ public:
void initializePage();
// Call these before initializePage!
- void setRequiredProfileMatcher(ProjectExplorer::ProfileMatcher *matcher);
- void setPreferredProfileMatcher(ProjectExplorer::ProfileMatcher *matcher);
+ void setRequiredKitMatcher(ProjectExplorer::KitMatcher *matcher);
+ void setPreferredKitMatcher(ProjectExplorer::KitMatcher *matcher);
void setImportSearch(bool b);
/// Sets whether the targetsetupage uses a scrollarea
@@ -77,42 +74,42 @@ public:
bool isComplete() const;
bool setupProject(Qt4ProjectManager::Qt4Project *project);
- bool isProfileSelected(Core::Id id) const;
- void setProfileSelected(Core::Id id, bool selected);
- QList<Core::Id> selectedProfiles() const;
+ bool isKitSelected(Core::Id id) const;
+ void setKitSelected(Core::Id id, bool selected);
+ QList<Core::Id> selectedKits() const;
void setProFilePath(const QString &dir);
/// Overrides the summary text of the targetsetuppage
void setNoteText(const QString &text);
-signals:
- void noteTextLinkActivated();
+ void showOptionsHint(bool show);
private slots:
void import(const Utils::FileName &path);
void handleQtUpdate(const QList<int> &add, const QList<int> &rm, const QList<int> &mod);
- void handleProfileAddition(ProjectExplorer::Profile *p);
- void handleProfileRemoval(ProjectExplorer::Profile *p);
- void handleProfileUpdate(ProjectExplorer::Profile *p);
+ void handleKitAddition(ProjectExplorer::Kit *k);
+ void handleKitRemoval(ProjectExplorer::Kit *k);
+ void handleKitUpdate(ProjectExplorer::Kit *k);
void updateVisibility();
+ void openOptions();
private:
- void selectAtLeastOneTarget();
+ void selectAtLeastOneKit();
void import(const Utils::FileName &path, const bool silent);
- void removeWidget(ProjectExplorer::Profile *p);
- Qt4TargetSetupWidget *addWidget(ProjectExplorer::Profile *p);
+ void removeWidget(ProjectExplorer::Kit *k);
+ Qt4TargetSetupWidget *addWidget(ProjectExplorer::Kit *k);
void setupImports();
void setupWidgets();
void reset();
- ProjectExplorer::Profile *createTemporaryProfile(QtSupport::BaseQtVersion *version, bool temporaryVersion, const Utils::FileName &parsedSpec);
- void cleanProfile(ProjectExplorer::Profile *p);
- void makeQtPersistent(ProjectExplorer::Profile *p);
- void addProject(ProjectExplorer::Profile *p, const QString &path);
- void removeProject(ProjectExplorer::Profile *p, const QString &path);
-
- ProjectExplorer::ProfileMatcher *m_requiredMatcher;
- ProjectExplorer::ProfileMatcher *m_preferredMatcher;
+ ProjectExplorer::Kit *createTemporaryKit(QtSupport::BaseQtVersion *version, bool temporaryVersion, const Utils::FileName &parsedSpec);
+ void cleanKit(ProjectExplorer::Kit *k);
+ void makeQtPersistent(ProjectExplorer::Kit *k);
+ void addProject(ProjectExplorer::Kit *k, const QString &path);
+ void removeProject(ProjectExplorer::Kit *k, const QString &path);
+
+ ProjectExplorer::KitMatcher *m_requiredMatcher;
+ ProjectExplorer::KitMatcher *m_preferredMatcher;
QLayout *m_baseLayout;
bool m_importSearch;
bool m_useScrollArea;
@@ -122,10 +119,12 @@ private:
QMap<Core::Id, Qt4TargetSetupWidget *> m_widgets;
Qt4TargetSetupWidget *m_firstWidget;
- Internal::Ui::TargetSetupPage *m_ui;
+ Internal::TargetSetupPageUi *m_ui;
Internal::ImportWidget *m_importWidget;
QSpacerItem *m_spacer;
+
+ bool m_forceOptionHint;
};
} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.ui b/src/plugins/qt4projectmanager/wizards/targetsetuppage.ui
deleted file mode 100644
index fa36001aee..0000000000
--- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.ui
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Qt4ProjectManager::Internal::TargetSetupPage</class>
- <widget class="QWidget" name="Qt4ProjectManager::Internal::TargetSetupPage">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>256</width>
- <height>297</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle">
- <string>Set up Targets for Your Project</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QWidget" name="setupTargetPage" native="true">
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QLabel" name="descriptionLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Qt Creator can set up the following targets:</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- <property name="textInteractionFlags">
- <set>Qt::LinksAccessibleByMouse</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="noValidProfileLabel">
- <property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;No valid targets found.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Please add a target in &lt;a href=&quot;buildandrun&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Tools &amp;gt; Options &amp;gt; Build &amp;amp; Run&lt;/span&gt;&lt;/a&gt; (&lt;a href=&quot;buildandrun&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Qt Creator &amp;gt; Preferences &amp;gt; Build &amp;amp; Run&lt;/span&gt;&lt;/a&gt; on Mac OS) or via the maintenance tool of the SDK.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QWidget" name="centralWidget" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QWidget" name="scrollAreaWidget" native="true">
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <widget class="QScrollArea" name="scrollArea">
- <property name="widgetResizable">
- <bool>true</bool>
- </property>
- <widget class="QWidget" name="scrollAreaWidgetContents">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>230</width>
- <height>81</height>
- </rect>
- </property>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp
index 91c94f3b35..4b55f561c0 100644
--- a/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/testwizarddialog.cpp
@@ -62,7 +62,7 @@ TestWizardDialog::TestWizardDialog(const QString &templateName,
setWindowIcon(icon);
setWindowTitle(templateName);
setSelectedModules(QLatin1String("core testlib"), true);
- if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_PROFILE_IDS))
+ if (!parameters.extraValues().contains(ProjectExplorer::Constants::PROJECT_KIT_IDS))
addTargetSetupPage();
m_modulesPageId = addModulesPage();
m_testPageId = addPage(m_testPage);
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 37677f2105..7fb86e3f78 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -32,14 +32,14 @@
#include "qmlobservertool.h"
#include "qmldumptool.h"
#include "qmldebugginglibrary.h"
-#include "qtprofileinformation.h"
+#include "qtkitinformation.h"
#include "qtversionmanager.h"
#include "profilereader.h"
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/gnumakeparser.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/toolchainmanager.h>
@@ -243,9 +243,11 @@ QString BaseQtVersion::defaultDisplayName(const QString &versionString, const Fi
location = QCoreApplication::translate("QtVersion", "System");
break;
}
+ location = dirName;
+ // Also skip default checkouts named 'qt'. Parent dir might have descriptive name.
if (dirName.compare(QLatin1String("bin"), Qt::CaseInsensitive)
- && dirName.compare(QLatin1String("qtbase"), Qt::CaseInsensitive)) {
- location = dirName;
+ && dirName.compare(QLatin1String("qtbase"), Qt::CaseInsensitive)
+ && dirName.compare(QLatin1String("qt"), Qt::CaseInsensitive)) {
break;
}
} while (dir.cdUp());
@@ -294,17 +296,17 @@ bool BaseQtVersion::supportsPlatform(const QString &platform) const
return platform == platformName();
}
-QList<ProjectExplorer::Task> BaseQtVersion::validateProfile(const ProjectExplorer::Profile *p)
+QList<ProjectExplorer::Task> BaseQtVersion::validateKit(const ProjectExplorer::Kit *k)
{
QList<ProjectExplorer::Task> result;
- BaseQtVersion *version = QtProfileInformation::qtVersion(p);
+ BaseQtVersion *version = QtKitInformation::qtVersion(k);
Q_ASSERT(version == this);
- ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p);
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
if (!tc)
result << ProjectExplorer::Task(ProjectExplorer::Task::Error,
- ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget(),
+ ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget(),
FileName(), -1,
Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
@@ -980,7 +982,7 @@ QString BaseQtVersion::examplesPath() const
return qmakeProperty("QT_INSTALL_EXAMPLES");
}
-QList<ProjectExplorer::HeaderPath> BaseQtVersion::systemHeaderPathes(const ProjectExplorer::Profile *p) const
+QList<ProjectExplorer::HeaderPath> BaseQtVersion::systemHeaderPathes(const ProjectExplorer::Kit *p) const
{
Q_UNUSED(p);
QList<ProjectExplorer::HeaderPath> result;
@@ -988,7 +990,7 @@ QList<ProjectExplorer::HeaderPath> BaseQtVersion::systemHeaderPathes(const Proje
return result;
}
-void BaseQtVersion::addToEnvironment(const ProjectExplorer::Profile *p, Environment &env) const
+void BaseQtVersion::addToEnvironment(const ProjectExplorer::Kit *p, Environment &env) const
{
Q_UNUSED(p);
env.set(QLatin1String("QTDIR"), QDir::toNativeSeparators(qmakeProperty("QT_HOST_DATA")));
diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h
index 674340c7a1..069d5e9eb9 100644
--- a/src/plugins/qtsupport/baseqtversion.h
+++ b/src/plugins/qtsupport/baseqtversion.h
@@ -49,7 +49,7 @@ class Environment;
namespace ProjectExplorer {
class IOutputParser;
-class Profile;
+class Kit;
class ToolChain;
} // namespace ProjectExplorer
@@ -131,7 +131,7 @@ public:
QHash<QString,QString> versionInfo() const;
static QString qmakeProperty(const QHash<QString,QString> &versionInfo, const QByteArray &name);
QString qmakeProperty(const QByteArray &name) const;
- virtual void addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const;
+ virtual void addToEnvironment(const ProjectExplorer::Kit *p, Utils::Environment &env) const;
virtual Utils::FileName sourcePath() const;
// used by QtUiCodeModelSupport
@@ -153,7 +153,7 @@ public:
bool hasDemos() const;
QString demosPath() const;
- virtual QList<ProjectExplorer::HeaderPath> systemHeaderPathes(const ProjectExplorer::Profile *p) const;
+ virtual QList<ProjectExplorer::HeaderPath> systemHeaderPathes(const ProjectExplorer::Kit *p) const;
virtual QString frameworkInstallPath() const;
// former local functions
@@ -220,7 +220,7 @@ public:
virtual QString platformDisplayName() const;
virtual bool supportsPlatform(const QString &platformName) const;
- virtual QList<ProjectExplorer::Task> validateProfile(const ProjectExplorer::Profile *p);
+ virtual QList<ProjectExplorer::Task> validateKit(const ProjectExplorer::Kit *k);
protected:
BaseQtVersion();
diff --git a/src/plugins/qtsupport/customexecutablerunconfiguration.cpp b/src/plugins/qtsupport/customexecutablerunconfiguration.cpp
index 5a2c207cf3..2de78f45a4 100644
--- a/src/plugins/qtsupport/customexecutablerunconfiguration.cpp
+++ b/src/plugins/qtsupport/customexecutablerunconfiguration.cpp
@@ -410,7 +410,7 @@ CustomExecutableRunConfigurationFactory::clone(ProjectExplorer::Target *parent,
bool CustomExecutableRunConfigurationFactory::canHandle(ProjectExplorer::Target *parent) const
{
- return parent->project()->supportsProfile(parent->profile());
+ return parent->project()->supportsKit(parent->kit());
}
QList<Core::Id> CustomExecutableRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
diff --git a/src/plugins/qtsupport/qtprofileconfigwidget.cpp b/src/plugins/qtsupport/qtkitconfigwidget.cpp
index dc96ce6592..163ef94f2b 100644
--- a/src/plugins/qtsupport/qtprofileconfigwidget.cpp
+++ b/src/plugins/qtsupport/qtkitconfigwidget.cpp
@@ -28,10 +28,10 @@
**
**************************************************************************/
-#include "qtprofileconfigwidget.h"
+#include "qtkitconfigwidget.h"
#include "qtsupportconstants.h"
-#include "qtprofileinformation.h"
+#include "qtkitinformation.h"
#include "qtversionmanager.h"
#include <coreplugin/icore.h>
@@ -46,14 +46,13 @@
namespace QtSupport {
namespace Internal {
-QtProfileConfigWidget::QtProfileConfigWidget(ProjectExplorer::Profile *p,
- QWidget *parent) :
- ProjectExplorer::ProfileConfigWidget(parent),
- m_profile(p),
+QtKitConfigWidget::QtKitConfigWidget(ProjectExplorer::Kit *k, QWidget *parent) :
+ ProjectExplorer::KitConfigWidget(parent),
+ m_kit(k),
m_combo(new QComboBox),
m_manageButton(new QPushButton(this))
{
- setToolTip(tr("The Qt library to use for all projects using this target.<br>"
+ setToolTip(tr("The Qt library to use for all projects using this kit.<br>"
"A Qt version is required for qmake-based projects and optional when using other build systems."));
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
@@ -80,46 +79,46 @@ QtProfileConfigWidget::QtProfileConfigWidget(ProjectExplorer::Profile *p,
connect(mgr, SIGNAL(qtVersionsChanged(QList<int>,QList<int>,QList<int>)),
this, SLOT(versionsChanged(QList<int>,QList<int>,QList<int>)));
- connect(ProjectExplorer::ProfileManager::instance(), SIGNAL(profileUpdated(ProjectExplorer::Profile*)),
- this, SLOT(profileUpdated(ProjectExplorer::Profile*)));
+ connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
+ this, SLOT(kitUpdated(ProjectExplorer::Kit*)));
connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageQtVersions()));
}
-QString QtProfileConfigWidget::displayName() const
+QString QtKitConfigWidget::displayName() const
{
return tr("Qt version:");
}
-void QtProfileConfigWidget::makeReadOnly()
+void QtKitConfigWidget::makeReadOnly()
{
m_combo->setEnabled(false);
}
-void QtProfileConfigWidget::apply()
+void QtKitConfigWidget::apply()
{
int id = m_combo->itemData(m_combo->currentIndex()).toInt();
- QtProfileInformation::setQtVersionId(m_profile, id);
+ QtKitInformation::setQtVersionId(m_kit, id);
}
-void QtProfileConfigWidget::discard()
+void QtKitConfigWidget::discard()
{
- m_combo->setCurrentIndex(findQtVersion(QtProfileInformation::qtVersionId(m_profile)));
+ m_combo->setCurrentIndex(findQtVersion(QtKitInformation::qtVersionId(m_kit)));
}
-bool QtProfileConfigWidget::isDirty() const
+bool QtKitConfigWidget::isDirty() const
{
int id = m_combo->itemData(m_combo->currentIndex()).toInt();
- return id != QtProfileInformation::qtVersionId(m_profile);
+ return id != QtKitInformation::qtVersionId(m_kit);
}
-QWidget *QtProfileConfigWidget::buttonWidget() const
+QWidget *QtKitConfigWidget::buttonWidget() const
{
return m_manageButton;
}
-void QtProfileConfigWidget::versionsChanged(const QList<int> &added, const QList<int> &removed,
- const QList<int> &changed)
+void QtKitConfigWidget::versionsChanged(const QList<int> &added, const QList<int> &removed,
+ const QList<int> &changed)
{
QtVersionManager *mgr = QtVersionManager::instance();
@@ -143,12 +142,12 @@ void QtProfileConfigWidget::versionsChanged(const QList<int> &added, const QList
}
}
-void QtProfileConfigWidget::profileUpdated(ProjectExplorer::Profile *p)
+void QtKitConfigWidget::kitUpdated(ProjectExplorer::Kit *k)
{
- if (p != m_profile)
+ if (k != m_kit)
return;
- int id = QtProfileInformation::qtVersionId(p);
+ int id = QtKitInformation::qtVersionId(k);
for (int i = 0; i < m_combo->count(); ++i) {
if (m_combo->itemData(i).toInt() == id) {
@@ -158,13 +157,13 @@ void QtProfileConfigWidget::profileUpdated(ProjectExplorer::Profile *p)
}
}
-void QtProfileConfigWidget::manageQtVersions()
+void QtKitConfigWidget::manageQtVersions()
{
Core::ICore::showOptionsDialog(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY),
QLatin1String(QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID));
}
-int QtProfileConfigWidget::findQtVersion(const int id) const
+int QtKitConfigWidget::findQtVersion(const int id) const
{
for (int i = 0; i < m_combo->count(); ++i) {
if (id == m_combo->itemData(i).toInt())
diff --git a/src/plugins/qtsupport/qtprofileconfigwidget.h b/src/plugins/qtsupport/qtkitconfigwidget.h
index 2a0becdafe..27b72c1b19 100644
--- a/src/plugins/qtsupport/qtprofileconfigwidget.h
+++ b/src/plugins/qtsupport/qtkitconfigwidget.h
@@ -28,27 +28,27 @@
**
**************************************************************************/
-#ifndef QTSUPPORT_QTPROFILECONFIGWIDGET_H
-#define QTSUPPORT_QTPROFILECONFIGWIDGET_H
+#ifndef QTSUPPORT_QTKITCONFIGWIDGET_H
+#define QTSUPPORT_QTKITCONFIGWIDGET_H
-#include <projectexplorer/profileconfigwidget.h>
+#include <projectexplorer/kitconfigwidget.h>
QT_FORWARD_DECLARE_CLASS(QComboBox)
QT_FORWARD_DECLARE_CLASS(QPushButton)
-namespace ProjectExplorer { class Profile; }
+namespace ProjectExplorer { class Kit; }
namespace QtSupport {
class BaseQtVersion;
namespace Internal {
-class QtProfileConfigWidget : public ProjectExplorer::ProfileConfigWidget
+class QtKitConfigWidget : public ProjectExplorer::KitConfigWidget
{
Q_OBJECT
public:
- explicit QtProfileConfigWidget(ProjectExplorer::Profile *p, QWidget *parent = 0);
+ explicit QtKitConfigWidget(ProjectExplorer::Kit *k, QWidget *parent = 0);
QString displayName() const;
@@ -61,13 +61,13 @@ public:
private slots:
void versionsChanged(const QList<int> &added, const QList<int> &removed, const QList<int> &changed);
- void profileUpdated(ProjectExplorer::Profile *p);
+ void kitUpdated(ProjectExplorer::Kit *k);
void manageQtVersions();
private:
int findQtVersion(const int id) const;
- ProjectExplorer::Profile *m_profile;
+ ProjectExplorer::Kit *m_kit;
QComboBox *m_combo;
QPushButton *m_manageButton;
};
diff --git a/src/plugins/qtsupport/qtprofileinformation.cpp b/src/plugins/qtsupport/qtkitinformation.cpp
index a6d1db6b11..c64c27b33f 100644
--- a/src/plugins/qtsupport/qtprofileinformation.cpp
+++ b/src/plugins/qtsupport/qtkitinformation.cpp
@@ -28,9 +28,9 @@
**
**************************************************************************/
-#include "qtprofileinformation.h"
+#include "qtkitinformation.h"
-#include "qtprofileconfigwidget.h"
+#include "qtkitconfigwidget.h"
#include "qtversionmanager.h"
#include <utils/environment.h>
@@ -40,25 +40,25 @@ namespace Internal {
const char QT_INFORMATION[] = "QtSupport.QtInformation";
} // namespace Internal
-QtProfileInformation::QtProfileInformation()
+QtKitInformation::QtKitInformation()
{
- setObjectName(QLatin1String("QtProfileInformation"));
+ setObjectName(QLatin1String("QtKitInformation"));
connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>,QList<int>,QList<int>)),
this, SIGNAL(validationNeeded()));
}
-Core::Id QtProfileInformation::dataId() const
+Core::Id QtKitInformation::dataId() const
{
static Core::Id id = Core::Id(Internal::QT_INFORMATION);
return id;
}
-unsigned int QtProfileInformation::priority() const
+unsigned int QtKitInformation::priority() const
{
return 26000;
}
-QVariant QtProfileInformation::defaultValue(ProjectExplorer::Profile *p) const
+QVariant QtKitInformation::defaultValue(ProjectExplorer::Kit *p) const
{
Q_UNUSED(p);
QtVersionManager *mgr = QtVersionManager::instance();
@@ -79,7 +79,7 @@ QVariant QtProfileInformation::defaultValue(ProjectExplorer::Profile *p) const
return -1;
}
-QList<ProjectExplorer::Task> QtProfileInformation::validate(ProjectExplorer::Profile *p) const
+QList<ProjectExplorer::Task> QtKitInformation::validate(ProjectExplorer::Kit *p) const
{
int id = qtVersionId(p);
if (id == -1)
@@ -89,36 +89,35 @@ QList<ProjectExplorer::Task> QtProfileInformation::validate(ProjectExplorer::Pro
setQtVersionId(p, -1);
return QList<ProjectExplorer::Task>();
}
- return version->validateProfile(p);
+ return version->validateKit(p);
}
-ProjectExplorer::ProfileConfigWidget *
-QtProfileInformation::createConfigWidget(ProjectExplorer::Profile *p) const
+ProjectExplorer::KitConfigWidget *QtKitInformation::createConfigWidget(ProjectExplorer::Kit *p) const
{
- return new Internal::QtProfileConfigWidget(p);
+ return new Internal::QtKitConfigWidget(p);
}
-QString QtProfileInformation::displayNamePostfix(const ProjectExplorer::Profile *p) const
+QString QtKitInformation::displayNamePostfix(const ProjectExplorer::Kit *p) const
{
BaseQtVersion *version = qtVersion(p);
return version ? version->displayName() : QString();
}
-ProjectExplorer::ProfileInformation::ItemList
-QtProfileInformation::toUserOutput(ProjectExplorer::Profile *p) const
+ProjectExplorer::KitInformation::ItemList
+QtKitInformation::toUserOutput(ProjectExplorer::Kit *p) const
{
BaseQtVersion *version = qtVersion(p);
return ItemList() << qMakePair(tr("Qt version"), version ? version->displayName() : tr("None"));
}
-void QtProfileInformation::addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const
+void QtKitInformation::addToEnvironment(const ProjectExplorer::Kit *p, Utils::Environment &env) const
{
BaseQtVersion *version = qtVersion(p);
if (version)
version->addToEnvironment(p, env);
}
-int QtProfileInformation::qtVersionId(const ProjectExplorer::Profile *p)
+int QtKitInformation::qtVersionId(const ProjectExplorer::Kit *p)
{
if (!p)
return -1;
@@ -129,17 +128,17 @@ int QtProfileInformation::qtVersionId(const ProjectExplorer::Profile *p)
return id;
}
-void QtProfileInformation::setQtVersionId(ProjectExplorer::Profile *p, const int id)
+void QtKitInformation::setQtVersionId(ProjectExplorer::Kit *p, const int id)
{
p->setValue(Core::Id(Internal::QT_INFORMATION), id);
}
-BaseQtVersion *QtProfileInformation::qtVersion(const ProjectExplorer::Profile *p)
+BaseQtVersion *QtKitInformation::qtVersion(const ProjectExplorer::Kit *p)
{
return QtVersionManager::instance()->version(qtVersionId(p));
}
-void QtProfileInformation::setQtVersion(ProjectExplorer::Profile *p, const BaseQtVersion *v)
+void QtKitInformation::setQtVersion(ProjectExplorer::Kit *p, const BaseQtVersion *v)
{
if (!v)
setQtVersionId(p, -1);
@@ -147,29 +146,29 @@ void QtProfileInformation::setQtVersion(ProjectExplorer::Profile *p, const BaseQ
setQtVersionId(p, v->uniqueId());
}
-QtTypeProfileMatcher::QtTypeProfileMatcher(const QString &type) :
+QtTypeKitMatcher::QtTypeKitMatcher(const QString &type) :
m_type(type)
{ }
-bool QtTypeProfileMatcher::matches(const ProjectExplorer::Profile *p) const
+bool QtTypeKitMatcher::matches(const ProjectExplorer::Kit *p) const
{
- BaseQtVersion *version = QtProfileInformation::qtVersion(p);
+ BaseQtVersion *version = QtKitInformation::qtVersion(p);
return version && version->type() == m_type;
}
-QtPlatformProfileMatcher::QtPlatformProfileMatcher(const QString &platform) :
+QtPlatformKitMatcher::QtPlatformKitMatcher(const QString &platform) :
m_platform(platform)
{ }
-bool QtPlatformProfileMatcher::matches(const ProjectExplorer::Profile *p) const
+bool QtPlatformKitMatcher::matches(const ProjectExplorer::Kit *p) const
{
- BaseQtVersion *version = QtProfileInformation::qtVersion(p);
+ BaseQtVersion *version = QtKitInformation::qtVersion(p);
return version && version->platformName() == m_platform;
}
-bool QtVersionProfileMatcher::matches(const ProjectExplorer::Profile *p) const
+bool QtVersionKitMatcher::matches(const ProjectExplorer::Kit *p) const
{
- BaseQtVersion *version = QtProfileInformation::qtVersion(p);
+ BaseQtVersion *version = QtKitInformation::qtVersion(p);
if (!version)
return false;
QtVersionNumber current = version->qtVersion();
diff --git a/src/plugins/qtsupport/qtprofileinformation.h b/src/plugins/qtsupport/qtkitinformation.h
index 9b3c65241e..31da6290b8 100644
--- a/src/plugins/qtsupport/qtprofileinformation.h
+++ b/src/plugins/qtsupport/qtkitinformation.h
@@ -28,78 +28,78 @@
**
**************************************************************************/
-#ifndef QTSUPPORT_QTPROFILEINFORMATION_H
-#define QTSUPPORT_QTPROFILEINFORMATION_H
+#ifndef QTSUPPORT_QTKITINFORMATION_H
+#define QTSUPPORT_QTKITINFORMATION_H
#include "qtsupport_global.h"
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include "baseqtversion.h"
namespace QtSupport {
-class QTSUPPORT_EXPORT QtProfileInformation : public ProjectExplorer::ProfileInformation
+class QTSUPPORT_EXPORT QtKitInformation : public ProjectExplorer::KitInformation
{
Q_OBJECT
public:
- QtProfileInformation();
+ QtKitInformation();
Core::Id dataId() const;
unsigned int priority() const; // the higher the closer to the top.
- QVariant defaultValue(ProjectExplorer::Profile *p) const;
+ QVariant defaultValue(ProjectExplorer::Kit *p) const;
- QList<ProjectExplorer::Task> validate(ProjectExplorer::Profile *p) const;
+ QList<ProjectExplorer::Task> validate(ProjectExplorer::Kit *p) const;
- ProjectExplorer::ProfileConfigWidget *createConfigWidget(ProjectExplorer::Profile *p) const;
+ ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *p) const;
- QString displayNamePostfix(const ProjectExplorer::Profile *p) const;
+ QString displayNamePostfix(const ProjectExplorer::Kit *p) const;
- ItemList toUserOutput(ProjectExplorer::Profile *p) const;
+ ItemList toUserOutput(ProjectExplorer::Kit *p) const;
- void addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const;
+ void addToEnvironment(const ProjectExplorer::Kit *p, Utils::Environment &env) const;
- static int qtVersionId(const ProjectExplorer::Profile *p);
- static void setQtVersionId(ProjectExplorer::Profile *p, const int id);
- static BaseQtVersion *qtVersion(const ProjectExplorer::Profile *p);
- static void setQtVersion(ProjectExplorer::Profile *p, const BaseQtVersion *v);
+ static int qtVersionId(const ProjectExplorer::Kit *p);
+ static void setQtVersionId(ProjectExplorer::Kit *p, const int id);
+ static BaseQtVersion *qtVersion(const ProjectExplorer::Kit *p);
+ static void setQtVersion(ProjectExplorer::Kit *p, const BaseQtVersion *v);
};
-class QTSUPPORT_EXPORT QtTypeProfileMatcher : public ProjectExplorer::ProfileMatcher
+class QTSUPPORT_EXPORT QtTypeKitMatcher : public ProjectExplorer::KitMatcher
{
public:
- QtTypeProfileMatcher(const QString &type);
+ QtTypeKitMatcher(const QString &type);
- bool matches(const ProjectExplorer::Profile *p) const;
+ bool matches(const ProjectExplorer::Kit *p) const;
private:
QString m_type;
};
-class QTSUPPORT_EXPORT QtPlatformProfileMatcher : public ProjectExplorer::ProfileMatcher
+class QTSUPPORT_EXPORT QtPlatformKitMatcher : public ProjectExplorer::KitMatcher
{
public:
- QtPlatformProfileMatcher(const QString &platform);
+ QtPlatformKitMatcher(const QString &platform);
- bool matches(const ProjectExplorer::Profile *p) const;
+ bool matches(const ProjectExplorer::Kit *p) const;
private:
QString m_platform;
};
-class QTSUPPORT_EXPORT QtVersionProfileMatcher : public ProjectExplorer::ProfileMatcher
+class QTSUPPORT_EXPORT QtVersionKitMatcher : public ProjectExplorer::KitMatcher
{
public:
- explicit QtVersionProfileMatcher(const Core::FeatureSet &required = Core::FeatureSet(),
+ explicit QtVersionKitMatcher(const Core::FeatureSet &required = Core::FeatureSet(),
const QtVersionNumber &min = QtVersionNumber(0, 0, 0),
const QtVersionNumber &max = QtVersionNumber(INT_MAX, INT_MAX, INT_MAX)) :
m_min(min), m_max(max), m_features(required)
{ }
- bool matches(const ProjectExplorer::Profile *p) const;
+ bool matches(const ProjectExplorer::Kit *p) const;
private:
QtVersionNumber m_min;
@@ -109,4 +109,4 @@ private:
} // namespace QtSupport
-#endif // QTSUPPORT_QTPROFILEINFORMATION_H
+#endif // QTSUPPORT_QTKITINFORMATION_H
diff --git a/src/plugins/qtsupport/qtsupport.pro b/src/plugins/qtsupport/qtsupport.pro
index e399bbedb8..72b6891269 100644
--- a/src/plugins/qtsupport/qtsupport.pro
+++ b/src/plugins/qtsupport/qtsupport.pro
@@ -18,8 +18,8 @@ include(../../shared/proparser/proparser.pri)
HEADERS += \
qtsupportplugin.h \
qtsupport_global.h \
- qtprofileconfigwidget.h \
- qtprofileinformation.h \
+ qtkitconfigwidget.h \
+ qtkitinformation.h \
qtoutputformatter.h \
qtversionmanager.h \
qtversionfactory.h \
@@ -41,8 +41,8 @@ HEADERS += \
SOURCES += \
qtsupportplugin.cpp \
- qtprofileconfigwidget.cpp \
- qtprofileinformation.cpp \
+ qtkitconfigwidget.cpp \
+ qtkitinformation.cpp \
qtoutputformatter.cpp \
qtversionmanager.cpp \
qtversionfactory.cpp \
diff --git a/src/plugins/qtsupport/qtsupport.qbs b/src/plugins/qtsupport/qtsupport.qbs
index 1635b32e4f..4f9e272cac 100644
--- a/src/plugins/qtsupport/qtsupport.qbs
+++ b/src/plugins/qtsupport/qtsupport.qbs
@@ -71,10 +71,10 @@ QtcPlugin {
"qtoutputformatter.cpp",
"qtoutputformatter.h",
"qtparser.h",
- "qtprofileconfigwidget.cpp",
- "qtprofileconfigwidget.h",
- "qtprofileinformation.cpp",
- "qtprofileinformation.h",
+ "qtkitconfigwidget.cpp",
+ "qtkitconfigwidget.h",
+ "qtkitinformation.cpp",
+ "qtkitinformation.h",
"qtsupport_global.h",
"qtsupportconstants.h",
"qtsupportplugin.cpp",
diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp
index 1a91b2227e..01a71e8922 100644
--- a/src/plugins/qtsupport/qtsupportplugin.cpp
+++ b/src/plugins/qtsupport/qtsupportplugin.cpp
@@ -32,7 +32,7 @@
#include "customexecutablerunconfiguration.h"
#include "qtoptionspage.h"
-#include "qtprofileinformation.h"
+#include "qtkitinformation.h"
#include "qtversionmanager.h"
#include "profilereader.h"
@@ -40,7 +40,7 @@
#include "gettingstartedwelcomepage.h"
#include <extensionsystem/pluginmanager.h>
-#include <projectexplorer/profilemanager.h>
+#include <projectexplorer/kitmanager.h>
#include <QtPlugin>
#include <QMenu>
@@ -83,7 +83,7 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
void QtSupportPlugin::extensionsInitialized()
{
QtVersionManager::instance()->extensionsInitialized();
- ProjectExplorer::ProfileManager::instance()->registerProfileInformation(new QtProfileInformation);
+ ProjectExplorer::KitManager::instance()->registerKitInformation(new QtKitInformation);
}
bool QtSupportPlugin::delayedInitialize()
diff --git a/src/plugins/qtsupport/qtversionmanager.cpp b/src/plugins/qtsupport/qtversionmanager.cpp
index 7d93a1d04b..465607e163 100644
--- a/src/plugins/qtsupport/qtversionmanager.cpp
+++ b/src/plugins/qtsupport/qtversionmanager.cpp
@@ -30,7 +30,7 @@
#include "qtversionmanager.h"
-#include "qtprofileinformation.h"
+#include "qtkitinformation.h"
#include "qtversionfactory.h"
#include "qtsupportconstants.h"
@@ -364,7 +364,9 @@ void QtVersionManager::saveQtVersions()
if (!m_writer)
m_writer = new Utils::PersistentSettingsWriter(settingsFileName(QLatin1String(QTVERSION_FILENAME)),
QLatin1String("QtCreatorQtVersions"));
- m_writer->saveValue(QLatin1String(QTVERSION_FILE_VERSION_KEY), 1);
+
+ QVariantMap data;
+ data.insert(QLatin1String(QTVERSION_FILE_VERSION_KEY), 1);
int count = 0;
foreach (BaseQtVersion *qtv, m_versions) {
@@ -372,11 +374,11 @@ void QtVersionManager::saveQtVersions()
if (tmp.isEmpty())
continue;
tmp.insert(QLatin1String(QTVERSION_TYPE_KEY), qtv->type());
- m_writer->saveValue(QString::fromLatin1(QTVERSION_DATA_KEY) + QString::number(count), tmp);
+ data.insert(QString::fromLatin1(QTVERSION_DATA_KEY) + QString::number(count), tmp);
++count;
}
- m_writer->save(Core::ICore::mainWindow());
+ m_writer->save(data, Core::ICore::mainWindow());
}
void QtVersionManager::findSystemQt()
diff --git a/src/plugins/qtsupport/qtversionmanager.h b/src/plugins/qtsupport/qtversionmanager.h
index a13b5cd8d3..65b5ef3d1b 100644
--- a/src/plugins/qtsupport/qtversionmanager.h
+++ b/src/plugins/qtsupport/qtversionmanager.h
@@ -42,7 +42,7 @@ class FileSystemWatcher;
class PersistentSettingsWriter;
} // namespace Utils
-namespace ProjectExplorer { class ProfileInformation; }
+namespace ProjectExplorer { class KitInformation; }
namespace QtSupport {
namespace Internal {
diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp
index 978ba516cd..4c93b4331c 100644
--- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp
+++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp
@@ -33,7 +33,7 @@
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/deployablefile.h>
#include <projectexplorer/target.h>
-#include <qtsupport/qtprofileinformation.h>
+#include <qtsupport/qtkitinformation.h>
#include <utils/qtcassert.h>
#include <ssh/sshconnection.h>
#include <ssh/sshconnectionmanager.h>
@@ -83,11 +83,11 @@ class AbstractRemoteLinuxDeployServicePrivate
{
public:
AbstractRemoteLinuxDeployServicePrivate()
- : profile(0), connection(0), state(Inactive), stopRequested(false) {}
+ : kit(0), connection(0), state(Inactive), stopRequested(false) {}
IDevice::ConstPtr deviceConfiguration;
QPointer<BuildConfiguration> buildConfiguration;
- Profile *profile;
+ Kit *kit;
SshConnection *connection;
State state;
bool stopRequested;
@@ -113,9 +113,9 @@ const BuildConfiguration *AbstractRemoteLinuxDeployService::buildConfiguration()
return d->buildConfiguration;
}
-const Profile *AbstractRemoteLinuxDeployService::profile() const
+const Kit *AbstractRemoteLinuxDeployService::profile() const
{
- return d->profile;
+ return d->kit;
}
IDevice::ConstPtr AbstractRemoteLinuxDeployService::deviceConfiguration() const
@@ -133,10 +133,10 @@ void AbstractRemoteLinuxDeployService::saveDeploymentTimeStamp(const DeployableF
if (!d->buildConfiguration)
return;
const QtSupport::BaseQtVersion *const qtVersion
- = QtSupport::QtProfileInformation::qtVersion(d->profile);
+ = QtSupport::QtKitInformation::qtVersion(d->kit);
QString systemRoot;
- if (SysRootProfileInformation::hasSysRoot(d->profile))
- systemRoot = SysRootProfileInformation::sysRoot(d->profile).toString();
+ if (SysRootKitInformation::hasSysRoot(d->kit))
+ systemRoot = SysRootKitInformation::sysRoot(d->kit).toString();
if (!qtVersion || !qtVersion->isValid())
return;
d->lastDeployed.insert(DeployParameters(deployableFile,
@@ -150,12 +150,12 @@ bool AbstractRemoteLinuxDeployService::hasChangedSinceLastDeployment(const Deplo
if (!d->buildConfiguration)
return true;
const QtSupport::BaseQtVersion *const qtVersion
- = QtSupport::QtProfileInformation::qtVersion(d->profile);
+ = QtSupport::QtKitInformation::qtVersion(d->kit);
if (!qtVersion || !qtVersion->isValid())
return true;
QString systemRoot;
- if (SysRootProfileInformation::hasSysRoot(d->profile))
- systemRoot = SysRootProfileInformation::sysRoot(d->profile).toString();
+ if (SysRootKitInformation::hasSysRoot(d->kit))
+ systemRoot = SysRootKitInformation::sysRoot(d->kit).toString();
const QDateTime &lastDeployed = d->lastDeployed.value(DeployParameters(deployableFile,
deviceConfiguration()->sshParameters().host, systemRoot));
return !lastDeployed.isValid()
@@ -166,10 +166,10 @@ void AbstractRemoteLinuxDeployService::setBuildConfiguration(BuildConfiguration
{
d->buildConfiguration = bc;
if (bc && bc->target())
- d->profile = bc->target()->profile();
+ d->kit = bc->target()->kit();
else
- d->profile = 0;
- d->deviceConfiguration = DeviceProfileInformation::device(d->profile);
+ d->kit = 0;
+ d->deviceConfiguration = DeviceKitInformation::device(d->kit);
}
void AbstractRemoteLinuxDeployService::start()
diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h
index 0cae51e586..7ca1700db5 100644
--- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h
+++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h
@@ -43,7 +43,7 @@ namespace QSsh { class SshConnection; }
namespace ProjectExplorer {
class BuildConfiguration;
class DeployableFile;
-class Profile;
+class Kit;
}
namespace RemoteLinux {
@@ -75,7 +75,7 @@ signals:
protected:
const ProjectExplorer::BuildConfiguration *buildConfiguration() const;
- const ProjectExplorer::Profile *profile() const;
+ const ProjectExplorer::Kit *profile() const;
ProjectExplorer::IDevice::ConstPtr deviceConfiguration() const;
QSsh::SshConnection *connection() const;
diff --git a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp
index d9b3742ec4..d315766b62 100644
--- a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp
+++ b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp
@@ -35,7 +35,7 @@
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
using namespace ProjectExplorer;
diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp
index 083a636bb3..e87802eb72 100644
--- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp
+++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwizard.cpp
@@ -90,7 +90,9 @@ IDevice::Ptr GenericLinuxDeviceConfigurationWizard::device()
Core::Id(Constants::GenericLinuxOsType), IDevice::Hardware);
device->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100")));
device->setSshParameters(sshParams);
- LinuxDeviceTestDialog dlg(device, new GenericLinuxDeviceTester(this), this);
+ // Might be called after accept.
+ QWidget *parent = isVisible() ? this : static_cast<QWidget *>(0);
+ LinuxDeviceTestDialog dlg(device, new GenericLinuxDeviceTester(this), parent);
dlg.exec();
return device;
}
diff --git a/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp b/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
index d24cffb162..6f2b273b30 100644
--- a/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
+++ b/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
@@ -38,7 +38,7 @@
#include "uploadandinstalltarpackagestep.h"
#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
using namespace ProjectExplorer;
diff --git a/src/plugins/remotelinux/remotelinuxcheckforfreediskspaceservice.cpp b/src/plugins/remotelinux/remotelinuxcheckforfreediskspaceservice.cpp
index 2a5bfe9dd8..d2dac4cc24 100644
--- a/src/plugins/remotelinux/remotelinuxcheckforfreediskspaceservice.cpp
+++ b/src/plugins/remotelinux/remotelinuxcheckforfreediskspaceservice.cpp
@@ -91,6 +91,7 @@ void RemoteLinuxCheckForFreeDiskSpaceService::handleProcessFinished()
QByteArray processOutput = d->processRunner->readAllStandardOutput();
processOutput.chop(1); // newline
quint64 freeSpace = processOutput.toULongLong(&isNumber);
+ quint64 requiredSpaceInMegaBytes = d->requiredSpaceInBytes / (1024 * 1024);
if (!isNumber) {
emit errorMessage(tr("Unexpected output from remote process: '%1'.")
.arg(QString::fromUtf8(processOutput)));
@@ -98,15 +99,15 @@ void RemoteLinuxCheckForFreeDiskSpaceService::handleProcessFinished()
return;
}
- freeSpace *= 1024;
- if (freeSpace < d->requiredSpaceInBytes) {
- emit errorMessage(tr("The remote file system has only %n bytes of free space, "
- "but %1 bytes are required.", 0, freeSpace).arg(d->requiredSpaceInBytes));
+ freeSpace /= 1024; // convert kilobyte to megabyte
+ if (freeSpace < requiredSpaceInMegaBytes) {
+ emit errorMessage(tr("The remote file system has only %n megabytes of free space, "
+ "but %1 megabytes are required.", 0, freeSpace).arg(requiredSpaceInMegaBytes));
stopDeployment();
return;
}
- emit progressMessage(tr("The remote file system has %n bytes of free space, going ahead.",
+ emit progressMessage(tr("The remote file system has %n megabytes of free space, going ahead.",
0, freeSpace));
stopDeployment();
}
diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
index baa5be50af..0927d28e51 100644
--- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
@@ -33,11 +33,11 @@
#include <debugger/debuggerengine.h>
#include <debugger/debuggerstartparameters.h>
-#include <debugger/debuggerprofileinformation.h>
+#include <debugger/debuggerkitinformation.h>
#include <projectexplorer/abi.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
-#include <projectexplorer/profile.h>
+#include <projectexplorer/kit.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
@@ -68,7 +68,7 @@ public:
cppDebugging(runConfig->debuggerAspect()->useCppDebugger()),
state(Inactive),
gdbServerPort(-1), qmlPort(-1),
- device(DeviceProfileInformation::device(runConfig->target()->profile())),
+ device(DeviceKitInformation::device(runConfig->target()->kit())),
remoteFilePath(runConfig->remoteExecutableFilePath()),
arguments(runConfig->arguments()),
commandPrefix(runConfig->commandPrefix())
@@ -99,12 +99,12 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLin
{
DebuggerStartParameters params;
Target *target = runConfig->target();
- Profile *profile = target->profile();
- const IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
+ Kit *k = target->kit();
+ const IDevice::ConstPtr device = DeviceKitInformation::device(k);
- params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
- params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
- if (ToolChain *tc = ToolChainProfileInformation::toolChain(profile))
+ params.sysRoot = SysRootKitInformation::sysRoot(k).toString();
+ params.debuggerCommand = DebuggerKitInformation::debuggerCommand(k).toString();
+ if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
params.toolChainAbi = tc->targetAbi();
if (runConfig->debuggerAspect()->useQmlDebugger()) {
diff --git a/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp b/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp
index 3656bc17ed..6f554323c1 100644
--- a/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp
+++ b/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp
@@ -35,7 +35,7 @@
#include "remotelinuxdeployconfiguration.h"
#include <projectexplorer/abi.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
@@ -59,13 +59,13 @@ RemoteLinuxDeployConfigurationFactory::RemoteLinuxDeployConfigurationFactory(QOb
QList<Core::Id> RemoteLinuxDeployConfigurationFactory::availableCreationIds(Target *parent) const
{
QList<Core::Id> ids;
- if (!parent->project()->supportsProfile(parent->profile()))
+ if (!parent->project()->supportsKit(parent->kit()))
return ids;
ProjectExplorer::ToolChain *tc
- = ProjectExplorer::ToolChainProfileInformation::toolChain(parent->profile());
+ = ProjectExplorer::ToolChainKitInformation::toolChain(parent->kit());
if (!tc || tc->targetAbi().os() != ProjectExplorer::Abi::LinuxOS)
return ids;
- const Core::Id devType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->profile());
+ const Core::Id devType = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(parent->kit());
if (devType == Constants::GenericLinuxOsType)
ids << genericDeployConfigurationId();
return ids;
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp
index 0939261785..44f3be7c30 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp
+++ b/src/plugins/remotelinux/remotelinuxenvironmentreader.cpp
@@ -32,7 +32,7 @@
#include <ssh/sshremoteprocessrunner.h>
#include <projectexplorer/devicesupport/idevice.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/target.h>
@@ -44,16 +44,16 @@ namespace Internal {
RemoteLinuxEnvironmentReader::RemoteLinuxEnvironmentReader(RunConfiguration *config, QObject *parent)
: QObject(parent)
, m_stop(false)
- , m_profile(config->target()->profile())
+ , m_kit(config->target()->kit())
, m_remoteProcessRunner(0)
{
- connect(config->target(), SIGNAL(profileChanged()),
+ connect(config->target(), SIGNAL(kitChanged()),
this, SLOT(handleCurrentDeviceConfigChanged()));
}
void RemoteLinuxEnvironmentReader::start(const QString &environmentSetupCommand)
{
- IDevice::ConstPtr device = DeviceProfileInformation::device(m_profile);
+ IDevice::ConstPtr device = DeviceKitInformation::device(m_kit);
if (!device)
return;
m_stop = false;
diff --git a/src/plugins/remotelinux/remotelinuxenvironmentreader.h b/src/plugins/remotelinux/remotelinuxenvironmentreader.h
index e8f6c0f717..5866969a58 100644
--- a/src/plugins/remotelinux/remotelinuxenvironmentreader.h
+++ b/src/plugins/remotelinux/remotelinuxenvironmentreader.h
@@ -35,7 +35,7 @@
namespace ProjectExplorer {
class RunConfiguration;
-class Profile;
+class Kit;
}
namespace QSsh { class SshRemoteProcessRunner; }
@@ -70,7 +70,7 @@ private:
bool m_stop;
Utils::Environment m_env;
- ProjectExplorer::Profile *m_profile;
+ ProjectExplorer::Kit *m_kit;
QSsh::SshRemoteProcessRunner *m_remoteProcessRunner;
};
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
index eb02382723..4e081ab223 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
@@ -128,7 +128,7 @@ void RemoteLinuxRunConfiguration::init()
connect(target(), SIGNAL(deploymentDataChanged()), SLOT(handleBuildSystemDataUpdated()));
connect(target(), SIGNAL(applicationTargetsChanged()), SLOT(handleBuildSystemDataUpdated()));
- connect(target(), SIGNAL(profileChanged()),
+ connect(target(), SIGNAL(kitChanged()),
this, SLOT(handleBuildSystemDataUpdated())); // Handles device changes, etc.
}
diff --git a/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp b/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp
index bc4ee72bfa..b209c0ef22 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp
@@ -33,7 +33,7 @@
#include "remotelinuxrunconfiguration.h"
#include <projectexplorer/buildtargetinfo.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <utils/qtcassert.h>
@@ -135,9 +135,9 @@ RunConfiguration *RemoteLinuxRunConfigurationFactory::clone(Target *parent,
bool RemoteLinuxRunConfigurationFactory::canHandle(const Target *target) const
{
- if (!target->project()->supportsProfile(target->profile()))
+ if (!target->project()->supportsKit(target->kit()))
return false;
- const Core::Id deviceType = DeviceTypeProfileInformation::deviceTypeId(target->profile());
+ const Core::Id deviceType = DeviceTypeKitInformation::deviceTypeId(target->kit());
return deviceType == RemoteLinux::Constants::GenericLinuxOsType;
}
diff --git a/src/plugins/remotelinux/remotelinuxruncontrol.cpp b/src/plugins/remotelinux/remotelinuxruncontrol.cpp
index 554816cf58..348293e48c 100644
--- a/src/plugins/remotelinux/remotelinuxruncontrol.cpp
+++ b/src/plugins/remotelinux/remotelinuxruncontrol.cpp
@@ -32,7 +32,7 @@
#include "remotelinuxrunconfiguration.h"
#include <projectexplorer/devicesupport/deviceapplicationrunner.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <utils/qtcassert.h>
@@ -59,7 +59,7 @@ RemoteLinuxRunControl::RemoteLinuxRunControl(RunConfiguration *rc)
: RunControl(rc, ProjectExplorer::NormalRunMode), d(new RemoteLinuxRunControlPrivate)
{
d->running = false;
- d->device = DeviceProfileInformation::device(rc->target()->profile());
+ d->device = DeviceKitInformation::device(rc->target()->kit());
const RemoteLinuxRunConfiguration * const lrc = qobject_cast<RemoteLinuxRunConfiguration *>(rc);
d->remoteExecutable = lrc->remoteExecutableFilePath();
d->arguments = lrc->arguments();
diff --git a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
index 449ef7832f..1132bf24e9 100644
--- a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
+++ b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
@@ -37,7 +37,7 @@
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerrunner.h>
#include <debugger/debuggerstartparameters.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <utils/portlist.h>
@@ -72,7 +72,7 @@ bool RemoteLinuxRunControlFactory::canRun(RunConfiguration *runConfiguration, Ru
const RemoteLinuxRunConfiguration * const remoteRunConfig
= qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration);
if (mode == DebugRunMode) {
- IDevice::ConstPtr dev = DeviceProfileInformation::device(runConfiguration->target()->profile());
+ IDevice::ConstPtr dev = DeviceKitInformation::device(runConfiguration->target()->kit());
if (dev.isNull())
return false;
return remoteRunConfig->portsUsedByDebuggers() <= dev->freePorts().count();
diff --git a/src/plugins/remotelinux/typespecificdeviceconfigurationlistmodel.cpp b/src/plugins/remotelinux/typespecificdeviceconfigurationlistmodel.cpp
index 71f8506691..bd095978d2 100644
--- a/src/plugins/remotelinux/typespecificdeviceconfigurationlistmodel.cpp
+++ b/src/plugins/remotelinux/typespecificdeviceconfigurationlistmodel.cpp
@@ -30,7 +30,7 @@
#include "typespecificdeviceconfigurationlistmodel.h"
#include <projectexplorer/devicesupport/devicemanager.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
#include <utils/qtcassert.h>
@@ -44,7 +44,7 @@ TypeSpecificDeviceConfigurationListModel::TypeSpecificDeviceConfigurationListMod
{
const DeviceManager * const devConfs = DeviceManager::instance();
connect(devConfs, SIGNAL(updated()), this, SIGNAL(modelReset()));
- connect(target, SIGNAL(profileChanged()), this, SIGNAL(modelReset()));
+ connect(target, SIGNAL(kitChanged()), this, SIGNAL(modelReset()));
}
int TypeSpecificDeviceConfigurationListModel::rowCount(const QModelIndex &parent) const
@@ -131,7 +131,7 @@ bool TypeSpecificDeviceConfigurationListModel::deviceMatches(IDevice::ConstPtr d
{
if (dev.isNull())
return false;
- Core::Id typeId = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
+ Core::Id typeId = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(target()->kit());
return dev->type() == typeId;
}
diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index dfa4ff2787..539ddd86a6 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -6447,8 +6447,12 @@ int BaseTextEditorWidget::rowCount() const
*/
void BaseTextEditorWidget::transformSelection(Internal::TransformationMethod method)
{
- QTextCursor cursor = textCursor();
+ if (hasBlockSelection()) {
+ transformBlockSelection(method);
+ return;
+ }
+ QTextCursor cursor = textCursor();
int pos = cursor.position();
int anchor = cursor.anchor();
@@ -6474,6 +6478,57 @@ void BaseTextEditorWidget::transformSelection(Internal::TransformationMethod met
setTextCursor(cursor);
}
+void BaseTextEditorWidget::transformBlockSelection(Internal::TransformationMethod method)
+{
+ QTextCursor cursor = textCursor();
+ int minPos = cursor.anchor();
+ int maxPos = cursor.position();
+ if (minPos > maxPos)
+ qSwap(minPos, maxPos);
+ int leftBound = verticalBlockSelectionFirstColumn();
+ int rightBound = verticalBlockSelectionLastColumn();
+ BaseTextBlockSelection::Anchor anchorPosition = d->m_blockSelection.anchor;
+ QString text = cursor.selectedText();
+ QString transformedText = text;
+ QTextBlock currentLine = document()->findBlock(minPos);
+ int lineStart = currentLine.position();
+ do {
+ if (currentLine.contains(lineStart + leftBound)) {
+ int currentBlockWidth = qBound(0, currentLine.text().length() - leftBound,
+ rightBound - leftBound);
+ cursor.setPosition(lineStart + leftBound);
+ cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, currentBlockWidth);
+ transformedText.replace(lineStart + leftBound - minPos, currentBlockWidth,
+ (cursor.selectedText().*method)());
+ }
+ currentLine = currentLine.next();
+ if (!currentLine.isValid())
+ break;
+ lineStart = currentLine.position();
+ } while (lineStart < maxPos);
+
+ if (transformedText == text) {
+ // if the transformation does not do anything to the selection, do no create an undo step
+ return;
+ }
+
+ cursor.setPosition(minPos);
+ cursor.setPosition(maxPos, QTextCursor::KeepAnchor);
+ cursor.insertText(transformedText);
+ // restore former block selection
+ if (anchorPosition <= BaseTextBlockSelection::TopRight)
+ qSwap(minPos, maxPos);
+ cursor.setPosition(minPos);
+ cursor.setPosition(maxPos, QTextCursor::KeepAnchor);
+ d->m_blockSelection.fromSelection(tabSettings(), cursor);
+ d->m_blockSelection.anchor = anchorPosition;
+ d->m_inBlockSelectionMode = true;
+ d->m_blockSelection.firstVisualColumn = leftBound;
+ d->m_blockSelection.lastVisualColumn = rightBound;
+ setTextCursor(d->m_blockSelection.selection(tabSettings()));
+ viewport()->update();
+}
+
void BaseTextEditorWidget::inSnippetMode(bool *active)
{
*active = d->m_snippetOverlay->isVisible();
diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h
index 891d2669d9..44ed266a23 100644
--- a/src/plugins/texteditor/basetexteditor.h
+++ b/src/plugins/texteditor/basetexteditor.h
@@ -576,6 +576,7 @@ private:
void processTooltipRequest(const QTextCursor &c);
void transformSelection(Internal::TransformationMethod method);
+ void transformBlockSelection(Internal::TransformationMethod method);
private slots:
void handleBlockSelection(int diff_row, int diff_col);
diff --git a/src/plugins/texteditor/codestylepool.cpp b/src/plugins/texteditor/codestylepool.cpp
index e2707f4c11..8dfd5a2bcd 100644
--- a/src/plugins/texteditor/codestylepool.cpp
+++ b/src/plugins/texteditor/codestylepool.cpp
@@ -286,9 +286,11 @@ void CodeStylePool::exportCodeStyle(const Utils::FileName &fileName, ICodeStyleP
{
QVariantMap map;
codeStyle->toMap(QString::null, &map);
+
+ QVariantMap tmp;
+ tmp.insert(QLatin1String(displayNameKey), codeStyle->displayName());
+ tmp.insert(QLatin1String(codeStyleDataKey), map);
Utils::PersistentSettingsWriter writer(fileName, QLatin1String(codeStyleDocKey));
- writer.saveValue(QLatin1String(displayNameKey), codeStyle->displayName());
- writer.saveValue(QLatin1String(codeStyleDataKey), map);
- writer.save(0);
+ writer.save(map, 0);
}
diff --git a/src/plugins/valgrind/valgrindtool.cpp b/src/plugins/valgrind/valgrindtool.cpp
index 5645797494..0778f76607 100644
--- a/src/plugins/valgrind/valgrindtool.cpp
+++ b/src/plugins/valgrind/valgrindtool.cpp
@@ -35,7 +35,7 @@
#include <remotelinux/remotelinuxrunconfiguration.h>
#include <projectexplorer/applicationrunconfiguration.h>
-#include <projectexplorer/profileinformation.h>
+#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/target.h>
@@ -75,7 +75,7 @@ Analyzer::AnalyzerStartParameters ValgrindTool::createStartParameters(
qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration)) {
sp.startMode = Analyzer::StartRemote;
sp.debuggee = rc2->remoteExecutableFilePath();
- sp.connParams = ProjectExplorer::DeviceProfileInformation::device(rc2->target()->profile())->sshParameters();
+ sp.connParams = ProjectExplorer::DeviceKitInformation::device(rc2->target()->kit())->sshParameters();
sp.analyzerCmdPrefix = rc2->commandPrefix();
sp.debuggeeArgs = rc2->arguments();
} else {
diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp
index a0fb9ae699..ecc976b831 100644
--- a/src/shared/proparser/profileevaluator.cpp
+++ b/src/shared/proparser/profileevaluator.cpp
@@ -204,6 +204,11 @@ QString ProFileEvaluator::propertyValue(const QString &name) const
return d->m_option->propertyValue(ProKey(name)).toQString();
}
+QString ProFileEvaluator::resolvedMkSpec() const
+{
+ return d->m_qmakespecFull;
+}
+
#ifdef PROEVALUATOR_CUMULATIVE
void ProFileEvaluator::setCumulative(bool on)
{
diff --git a/src/shared/proparser/profileevaluator.h b/src/shared/proparser/profileevaluator.h
index f52ca06513..322295e732 100644
--- a/src/shared/proparser/profileevaluator.h
+++ b/src/shared/proparser/profileevaluator.h
@@ -89,6 +89,8 @@ public:
const ProFile *pro) const;
QString propertyValue(const QString &val) const;
+ QString resolvedMkSpec() const;
+
private:
QString sysrootify(const QString &path, const QString &baseDir) const;
diff --git a/tests/system/objects.map b/tests/system/objects.map
index 028ceba9e1..538e4e00d0 100644
--- a/tests/system/objects.map
+++ b/tests/system/objects.map
@@ -71,8 +71,6 @@
:scrollArea.Edit build configuration:_QComboBox {leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'}
:scrollArea.Edit build configuration:_QLabel {text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'}
:scrollArea.Library not available_QLabel {name='qmlDebuggingWarningText' text?='Library not available*' type='QLabel' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
-:scrollArea.Qt 4 for Desktop - (Qt SDK) debug_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' occurrence='1' text='Debug' type='QCheckBox' unnamed='1' visible='1'}
-:scrollArea.Qt 4 for Desktop - (Qt SDK) release_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' occurrence='1' text='Release' type='QCheckBox' unnamed='1' visible='1'}
:scrollArea.Use Shadow Building_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' text='Shadow build' type='QCheckBox' unnamed='1' visible='1'}
:scrollArea.qmlDebuggingLibraryCheckBox_QCheckBox {name='qmlDebuggingLibraryCheckBox' type='QCheckBox' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:scrollArea_QTableView {type='QTableView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
diff --git a/tests/system/settings/unix/Nokia/qtcreator/devices.xml b/tests/system/settings/unix/Nokia/qtcreator/devices.xml
new file mode 100644
index 0000000000..cf0e155615
--- /dev/null
+++ b/tests/system/settings/unix/Nokia/qtcreator/devices.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorDevices>
+<!-- Written by Qt Creator 2.5.81, 2012-08-31T19:40:12. -->
+<qtcreator>
+ <data>
+ <variable>DeviceManager</variable>
+ <valuemap type="QVariantMap">
+ <valuemap type="QVariantMap" key="DefaultDevices">
+ <value type="QString" key="Desktop">Desktop Device</value>
+ <value type="QString" key="Maemo5OsType">{68a75dff-5ec6-40cb-884f-8f383ed2ebb2}</value>
+ </valuemap>
+ <valuelist type="QVariantList" key="DeviceList">
+ <valuemap type="QVariantMap">
+ <value type="int" key="Authentication">1</value>
+ <value type="QString" key="FreePortsSpec"></value>
+ <value type="QString" key="Host"></value>
+ <value type="QByteArray" key="InternalId">Desktop Device</value>
+ <value type="QString" key="KeyFile"></value>
+ <value type="QString" key="Name">Run locally</value>
+ <value type="int" key="Origin">1</value>
+ <value type="QString" key="OsType">Desktop</value>
+ <value type="QString" key="Password"></value>
+ <value type="int" key="SshPort">0</value>
+ <value type="int" key="Timeout">0</value>
+ <value type="int" key="Type">0</value>
+ <value type="QString" key="Uname"></value>
+ </valuemap>
+ <valuemap type="QVariantMap">
+ <value type="int" key="Authentication">1</value>
+ <value type="QString" key="FreePortsSpec">10000-10100</value>
+ <value type="QString" key="Host">192.168.2.15</value>
+ <value type="QByteArray" key="InternalId">{68a75dff-5ec6-40cb-884f-8f383ed2ebb2}</value>
+ <value type="QString" key="KeyFile"></value>
+ <value type="QString" key="Name">Maemo5/Fremantle Device</value>
+ <value type="int" key="Origin">0</value>
+ <value type="QString" key="OsType">Maemo5OsType</value>
+ <value type="QString" key="Password"></value>
+ <value type="int" key="SshPort">22</value>
+ <value type="int" key="Timeout">10</value>
+ <value type="int" key="Type">0</value>
+ <value type="QString" key="Uname">developer</value>
+ </valuemap>
+ </valuelist>
+ </valuemap>
+ </data>
+</qtcreator>
diff --git a/tests/system/settings/unix/Nokia/qtcreator/profiles.xml b/tests/system/settings/unix/Nokia/qtcreator/profiles.xml
index b3a3a5e562..42482f30ac 100644
--- a/tests/system/settings/unix/Nokia/qtcreator/profiles.xml
+++ b/tests/system/settings/unix/Nokia/qtcreator/profiles.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProfiles>
-<!-- Written by Qt Creator 2.5.81, 2012-08-28T18:44:22. -->
+<!-- Written by Qt Creator 2.5.81, 2012-08-31T19:40:12. -->
<qtcreator>
<data>
<variable>Profile.0</variable>
@@ -39,8 +39,26 @@
</valuemap>
</data>
<data>
+ <variable>Profile.2</variable>
+ <valuemap type="QVariantMap">
+ <value type="bool" key="PE.Profile.AutoDetected">false</value>
+ <valuemap type="QVariantMap" key="PE.Profile.Data">
+ <value type="QString" key="Debugger.Information">/usr/bin/gdb</value>
+ <value type="QString" key="PE.Profile.Device">{68a75dff-5ec6-40cb-884f-8f383ed2ebb2}</value>
+ <value type="QByteArray" key="PE.Profile.DeviceType">Maemo5OsType</value>
+ <value type="QString" key="PE.Profile.SysRoot"></value>
+ <value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Gcc:{32ee0a53-87d9-4f17-b8a5-a7642101e803}</value>
+ <value type="QString" key="QtPM4.mkSpecInformation"></value>
+ <value type="int" key="QtSupport.QtInformation">3</value>
+ </valuemap>
+ <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value>
+ <value type="QString" key="PE.Profile.Id">{f559999e-8f5d-4246-9321-ea9d1c444c85}</value>
+ <value type="QString" key="PE.Profile.Name">Fremantle</value>
+ </valuemap>
+ </data>
+ <data>
<variable>Profile.Count</variable>
- <value type="int">2</value>
+ <value type="int">3</value>
</data>
<data>
<variable>Profile.Default</variable>
diff --git a/tests/system/settings/unix/Nokia/qtcreator/toolchains.xml b/tests/system/settings/unix/Nokia/qtcreator/toolchains.xml
index 3fec8907ff..44307c1699 100644
--- a/tests/system/settings/unix/Nokia/qtcreator/toolchains.xml
+++ b/tests/system/settings/unix/Nokia/qtcreator/toolchains.xml
@@ -16,8 +16,21 @@
</valuemap>
</data>
<data>
+ <variable>ToolChain.1</variable>
+ <valuemap type="QVariantMap">
+ <value type="QString" key="ProjectExplorer.GccToolChain.Path">~/QtSDK/Maemo/4.6.2/targets/fremantle-pr13/bin/g++</value>
+ <valuelist type="QVariantList" key="ProjectExplorer.GccToolChain.SupportedAbis">
+ <value type="QString">arm-linux-generic-elf-32bit</value>
+ </valuelist>
+ <value type="QString" key="ProjectExplorer.GccToolChain.TargetAbi">arm-linux-maemo-elf-32bit</value>
+ <value type="bool" key="ProjectExplorer.ToolChain.Autodetect">false</value>
+ <value type="QString" key="ProjectExplorer.ToolChain.DisplayName">GCC for Fremantle</value>
+ <value type="QString" key="ProjectExplorer.ToolChain.Id">ProjectExplorer.ToolChain.Gcc:{32ee0a53-87d9-4f17-b8a5-a7642101e803}</value>
+ </valuemap>
+ </data>
+ <data>
<variable>ToolChain.Count</variable>
- <value type="int">1</value>
+ <value type="int">2</value>
</data>
<data>
<variable>Version</variable>
diff --git a/tests/system/settings/windows/Nokia/qtcreator/devices.xml b/tests/system/settings/windows/Nokia/qtcreator/devices.xml
new file mode 100644
index 0000000000..ee41924e96
--- /dev/null
+++ b/tests/system/settings/windows/Nokia/qtcreator/devices.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QtCreatorDevices>
+<!-- Written by Qt Creator 2.5.81, 2012-08-31T18:59:59. -->
+<qtcreator>
+ <data>
+ <variable>DeviceManager</variable>
+ <valuemap type="QVariantMap">
+ <valuemap type="QVariantMap" key="DefaultDevices">
+ <value type="QString" key="Desktop">Desktop Device</value>
+ <value type="QString" key="Maemo5OsType">{0d112162-56a5-40cb-a911-e0545489da5c}</value>
+ </valuemap>
+ <valuelist type="QVariantList" key="DeviceList">
+ <valuemap type="QVariantMap">
+ <value type="int" key="Authentication">1</value>
+ <value type="QString" key="FreePortsSpec"></value>
+ <value type="QString" key="Host"></value>
+ <value type="QByteArray" key="InternalId">Desktop Device</value>
+ <value type="QString" key="KeyFile"></value>
+ <value type="QString" key="Name">Run locally</value>
+ <value type="int" key="Origin">1</value>
+ <value type="QString" key="OsType">Desktop</value>
+ <value type="QString" key="Password"></value>
+ <value type="int" key="SshPort">0</value>
+ <value type="int" key="Timeout">0</value>
+ <value type="int" key="Type">0</value>
+ <value type="QString" key="Uname"></value>
+ </valuemap>
+ <valuemap type="QVariantMap">
+ <value type="int" key="Authentication">1</value>
+ <value type="QString" key="FreePortsSpec">10000-10100</value>
+ <value type="QString" key="Host">192.168.2.15</value>
+ <value type="QByteArray" key="InternalId">{0d112162-56a5-40cb-a911-e0545489da5c}</value>
+ <value type="QString" key="KeyFile"></value>
+ <value type="QString" key="Name">Maemo5/Fremantle Device</value>
+ <value type="int" key="Origin">0</value>
+ <value type="QString" key="OsType">Maemo5OsType</value>
+ <value type="QString" key="Password"></value>
+ <value type="int" key="SshPort">22</value>
+ <value type="int" key="Timeout">10</value>
+ <value type="int" key="Type">0</value>
+ <value type="QString" key="Uname">developer</value>
+ </valuemap>
+ </valuelist>
+ </valuemap>
+ </data>
+</qtcreator>
diff --git a/tests/system/settings/windows/Nokia/qtcreator/profiles.xml b/tests/system/settings/windows/Nokia/qtcreator/profiles.xml
index f7fde15dea..7f5f8fdfab 100644
--- a/tests/system/settings/windows/Nokia/qtcreator/profiles.xml
+++ b/tests/system/settings/windows/Nokia/qtcreator/profiles.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProfiles>
-<!-- Written by Qt Creator 2.5.81, 2012-08-28T18:13:09. -->
+<!-- Written by Qt Creator 2.5.81, 2012-08-31T18:59:59. -->
<qtcreator>
<data>
<variable>Profile.0</variable>
@@ -39,8 +39,26 @@
</valuemap>
</data>
<data>
+ <variable>Profile.2</variable>
+ <valuemap type="QVariantMap">
+ <value type="bool" key="PE.Profile.AutoDetected">false</value>
+ <valuemap type="QVariantMap" key="PE.Profile.Data">
+ <value type="QString" key="Debugger.Information">C:/QtSDK/pythongdb/python_2.7based/gdb-arm-none-linux-gnueabi.exe</value>
+ <value type="QString" key="PE.Profile.Device">{0d112162-56a5-40cb-a911-e0545489da5c}</value>
+ <value type="QByteArray" key="PE.Profile.DeviceType">Maemo5OsType</value>
+ <value type="QString" key="PE.Profile.SysRoot"></value>
+ <value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Gcc:{333fff9b-5a71-4289-ac68-af2174cb68df}</value>
+ <value type="QString" key="QtPM4.mkSpecInformation"></value>
+ <value type="int" key="QtSupport.QtInformation">16</value>
+ </valuemap>
+ <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value>
+ <value type="QString" key="PE.Profile.Id">{618722a5-c008-4869-9404-07f755973496}</value>
+ <value type="QString" key="PE.Profile.Name">Fremantle</value>
+ </valuemap>
+ </data>
+ <data>
<variable>Profile.Count</variable>
- <value type="int">2</value>
+ <value type="int">3</value>
</data>
<data>
<variable>Profile.Default</variable>
diff --git a/tests/system/settings/windows/Nokia/qtcreator/toolchains.xml b/tests/system/settings/windows/Nokia/qtcreator/toolchains.xml
index 5350264958..0c6929b7a9 100644
--- a/tests/system/settings/windows/Nokia/qtcreator/toolchains.xml
+++ b/tests/system/settings/windows/Nokia/qtcreator/toolchains.xml
@@ -16,8 +16,21 @@
</valuemap>
</data>
<data>
+ <variable>ToolChain.1</variable>
+ <valuemap type="QVariantMap">
+ <value type="QString" key="ProjectExplorer.GccToolChain.Path">C:/QtSDK/Maemo/4.6.2/targets/fremantle-pr13/bin/g++.exe</value>
+ <valuelist type="QVariantList" key="ProjectExplorer.GccToolChain.SupportedAbis">
+ <value type="QString">arm-linux-generic-elf-32bit</value>
+ </valuelist>
+ <value type="QString" key="ProjectExplorer.GccToolChain.TargetAbi">arm-linux-maemo-elf-32bit</value>
+ <value type="bool" key="ProjectExplorer.ToolChain.Autodetect">false</value>
+ <value type="QString" key="ProjectExplorer.ToolChain.DisplayName">GCC for Fremantle</value>
+ <value type="QString" key="ProjectExplorer.ToolChain.Id">ProjectExplorer.ToolChain.Gcc:{333fff9b-5a71-4289-ac68-af2174cb68df}</value>
+ </valuemap>
+ </data>
+ <data>
<variable>ToolChain.Count</variable>
- <value type="int">1</value>
+ <value type="int">2</value>
</data>
<data>
<variable>Version</variable>
diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py
index 2147455b4a..4696170b94 100644
--- a/tests/system/shared/classes.py
+++ b/tests/system/shared/classes.py
@@ -28,7 +28,7 @@ class QtQuickConstants:
if target==QtQuickConstants.Targets.DESKTOP:
return "Desktop"
elif target==QtQuickConstants.Targets.MAEMO5:
- return "Maemo5"
+ return "Fremantle"
elif target==QtQuickConstants.Targets.SIMULATOR:
return "Qt Simulator"
elif target==QtQuickConstants.Targets.HARMATTAN:
diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py
index 8b83d19c6f..9bce4e7563 100644
--- a/tests/system/shared/project.py
+++ b/tests/system/shared/project.py
@@ -112,8 +112,10 @@ def __createProjectSetNameAndPath__(path, projectName = None, checks = True):
def __selectQtVersionDesktop__(checks, available=None):
__chooseTargets__(QtQuickConstants.Targets.DESKTOP, available)
if checks:
- verifyChecked(":scrollArea.Qt 4 for Desktop - (Qt SDK) debug_QCheckBox")
- verifyChecked(":scrollArea.Qt 4 for Desktop - (Qt SDK) release_QCheckBox")
+ cbObject = ("{type='QCheckBox' text='%s' unnamed='1' visible='1' "
+ "container={type='Utils::DetailsWidget' visible='1' unnamed='1'}}")
+ verifyChecked(cbObject % "Debug")
+ verifyChecked(cbObject % "Release")
clickButton(waitForObject(":Next_QPushButton"))
def __createProjectHandleLastPage__(expectedFiles = None):
@@ -423,6 +425,8 @@ def __getSupportedPlatforms__(text, getAsStrings=False):
result.append(QtQuickConstants.Targets.EMBEDDED_LINUX)
if 'MeeGo/Harmattan' in supports:
result.append(QtQuickConstants.Targets.HARMATTAN)
+ addSimulator = True
+ if 'Maemo/Fremantle' in supports:
result.append(QtQuickConstants.Targets.MAEMO5)
addSimulator = True
if len(result) == 0 or addSimulator:
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py
index 8e11a04d7e..70e45f9f79 100644
--- a/tests/system/shared/utils.py
+++ b/tests/system/shared/utils.py
@@ -286,23 +286,41 @@ def __checkParentAccess__(filePath):
# options dialog and returns a dict holding the targets as keys
# and a list of supported versions as value
def getCorrectlyConfiguredTargets():
+ def __retrieveQtVersionName__(target, version):
+ treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
+ return treeWidget.currentItem().text(0)
+ targetQtVersionNames = {}
result = {}
- for tv in iterateQtVersions():
- for target,version in tv.iteritems():
- # Dialog sometimes differs from targets' names
- if target == "Maemo":
- target = "Maemo5"
- implicitTargets = [target]
- if target == "Desktop" and platform.system() in ("Linux", "Darwin"):
- implicitTargets.append("Embedded Linux")
- for currentTarget in implicitTargets:
- if currentTarget in result:
- oldV = result[currentTarget]
- if version not in oldV:
- oldV.append(version)
- result.update({currentTarget:oldV})
- else:
- result.update({currentTarget:[version]})
+ targetsQtVersions, qtVersionNames = iterateQtVersions(True, __retrieveQtVersionName__)
+ clickTab(waitForObject(":Options.qt_tabwidget_tabbar_QTabBar"), "Targets")
+ treeView = waitForObject(":Targets_QTreeView")
+ model = treeView.model()
+ test.compare(model.rowCount(), 2, "Verifying expected target section count")
+ autoDetected = model.index(0, 0)
+ test.compare(autoDetected.data().toString(), "Auto-detected",
+ "Verifying label for target section")
+ manual = model.index(1, 0)
+ test.compare(manual.data().toString(), "Manual", "Verifying label for target section")
+ for section in [autoDetected, manual]:
+ for index in [section.child(i, 0) for i in range(model.rowCount(section))]:
+ targetName = str(index.data().toString())
+ if (targetName.endswith(" (default)")):
+ targetName = targetName.rstrip(" (default)")
+ item = ".".join([str(section.data().toString()),
+ str(index.data().toString()).replace(".", "\\.")])
+ clickItem(treeView, item, 5, 5, 0, Qt.LeftButton)
+ qtVersionStr = str(waitForObject(":Targets_QtVersion_QComboBox").currentText)
+ targetQtVersionNames[targetName] = qtVersionStr
+ # merge defined target names with their configured Qt versions and devices
+ for target,qtVersion in targetQtVersionNames.iteritems():
+ result[target] = targetsQtVersions[qtVersionNames.index(qtVersion)].items()[0]
+ clickButton(waitForObject(":Options.Cancel_QPushButton"))
+ # adjust device name(s) to match getStringForTarget() - some differ from time to time
+ for targetName in result.keys():
+ targetInfo = result[targetName]
+ if targetInfo[0] == "Maemo":
+ result.update({targetName:
+ (QtQuickConstants.getStringForTarget(QtQuickConstants.Targets.MAEMO5), targetInfo[1])})
test.log("Correctly configured targets: %s" % str(result))
return result
diff --git a/tests/system/suite_APTW/objects.map b/tests/system/suite_APTW/objects.map
index 1eba3dab36..be982b486c 100644
--- a/tests/system/suite_APTW/objects.map
+++ b/tests/system/suite_APTW/objects.map
@@ -21,7 +21,5 @@
:scrollArea.Create Build Configurations:_QLabel_2 {container=':Qt Gui Application.scrollArea_QScrollArea' text='Create build configurations:' type='QLabel' unnamed='1' visible='1'}
:scrollArea.Edit build configuration:_QComboBox {leftWidget=':scrollArea.Edit build configuration:_QLabel' type='QComboBox' unnamed='1' visible='1'}
:scrollArea.Edit build configuration:_QLabel {text='Edit build configuration:' type='QLabel' unnamed='1' visible='1'}
-:scrollArea.Qt 4 for Desktop - (Qt SDK) debug_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' occurence='1' text='Debug' type='QCheckBox' unnamed='1' visible='1'}
-:scrollArea.Qt 4 for Desktop - (Qt SDK) release_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' occurence='1' text='Release' type='QCheckBox' unnamed='1' visible='1'}
:scrollArea.Use Shadow Building_QCheckBox {container=':Qt Gui Application.scrollArea_QScrollArea' text='Shadow build' type='QCheckBox' unnamed='1' visible='1'}
:sourceFileLineEdit_Utils::FileNameValidatingLineEdit {buddy=':Qt Gui Application.Source file:_QLabel' name='sourceFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
diff --git a/tests/system/suite_general/tst_create_proj_wizard/test.py b/tests/system/suite_general/tst_create_proj_wizard/test.py
index e600f3e7d4..85fe151d3f 100644
--- a/tests/system/suite_general/tst_create_proj_wizard/test.py
+++ b/tests/system/suite_general/tst_create_proj_wizard/test.py
@@ -70,23 +70,24 @@ def main():
except LookupError:
pass
waitForObject("{type='QLabel' unnamed='1' visible='1' text='Target Setup'}")
- availableCheckboxes = filter(visibleCheckBoxExists, QtQuickConstants.getAllTargetStrings())
+ availableCheckboxes = filter(visibleCheckBoxExists, targets.keys())
JIRA.performWorkaroundIfStillOpen(6994, JIRA.Bug.CREATOR, template, displayedPlatforms)
# verification whether expected, found and configured match
for t in targets:
if requiredVersion:
- if max(targets[t]) < requiredVersion:
+ if targets[t][1] < requiredVersion:
if t in availableCheckboxes:
test.fail("Target '%s' found as checkbox, but required version (%s) is higher "
- "than configured version(s) (%s)!" % (t, requiredVersion, str(targets[t])))
+ "than configured version (%s)!" % (t, requiredVersion,
+ str(targets[t][1])))
availableCheckboxes.remove(t)
else:
test.passes("Irrelevant target '%s' not found on 'Target setup' page - "
- "required version is '%s', current version(s) are '%s'." %
- (t, requiredVersion, str(targets[t])))
+ "required version is '%s', current version is '%s'." %
+ (t, requiredVersion, str(targets[t][1])))
continue
found = False
- if t in displayedPlatforms:
+ if targets[t][0] in displayedPlatforms:
if t in availableCheckboxes:
test.passes("Found expected target '%s' on 'Target setup' page." % t)
availableCheckboxes.remove(t)
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 ccdcad6ef9..3674a58a46 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,6 +178,7 @@
"MainPage.qml" "5"
"qtquick10" "4"
"main.qml" "5"
+"symbian11" "4"
"main.qml" "5"
"MainPage.qml" "5"
"welcomescreen" "3"
@@ -342,6 +343,7 @@
"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"
@@ -736,6 +738,7 @@
"icon64.png" "5"
"icon80.png" "5"
"manifest.aegis" "5"
+"symbianicon.svg" "5"
"wizards" "4"
"helloworld" "5"
"console.png" "6"
@@ -2211,8 +2214,18 @@
"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"
@@ -3578,6 +3591,7 @@
"abstractgdbprocess.h" "5"
"abstractplaingdbadapter.h" "5"
"attachgdbadapter.h" "5"
+"codagdbadapter.h" "5"
"coregdbadapter.h" "5"
"gdbengine.h" "5"
"gdbmi.h" "5"
@@ -3595,6 +3609,7 @@
"abstractplaingdbadapter.cpp" "5"
"attachgdbadapter.cpp" "5"
"classicgdbengine.cpp" "5"
+"codagdbadapter.cpp" "5"
"coregdbadapter.cpp" "5"
"gdbengine.cpp" "5"
"gdbmi.cpp" "5"
@@ -5890,6 +5905,8 @@
"Other files" "5"
"plugins/qmldesigner" "6"
"QmlDesigner.pluginspec.in" "7"
+"qts60stylethemeio" "4"
+"qts60stylethemeio.pri" "5"
"qtsupport" "4"
"qtsupport.pri" "5"
"qtsupport_dependencies" "4"
@@ -6296,6 +6313,7 @@
"utils_dependencies.pri" "4"
"Headers" "3"
"abstractqmlprofilerrunner.h" "4"
+"codaqmlprofilerrunner.h" "4"
"localqmlprofilerrunner.h" "4"
"qmlprofiler_global.h" "4"
"qmlprofilerattachdialog.h" "4"
@@ -6307,6 +6325,7 @@
"qmlprofilertool.h" "4"
"remotelinuxqmlprofilerrunner.h" "4"
"Sources" "3"
+"codaqmlprofilerrunner.cpp" "4"
"localqmlprofilerrunner.cpp" "4"
"qmlprofilerattachdialog.cpp" "4"
"qmlprofilerdetailsrewriter.cpp" "4"
@@ -6539,17 +6558,81 @@
"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"
@@ -6563,6 +6646,8 @@
"qtsupport.pri" "4"
"qtsupport_dependencies" "3"
"qtsupport_dependencies.pri" "4"
+"symbianutils" "3"
+"symbianutils.pri" "4"
"texteditor" "3"
"texteditor.pri" "4"
"texteditor_dependencies" "3"
@@ -6702,6 +6787,7 @@
"mobileappwizardgenericoptionspage.ui" "5"
"mobileappwizardharmattanoptionspage.ui" "5"
"mobileappwizardmaemooptionspage.ui" "5"
+"mobileappwizardsymbianoptionspage.ui" "5"
"mobilelibrarywizardoptionpage.ui" "5"
"qtquickcomponentsetoptionspage.ui" "5"
"targetsetuppage.ui" "5"
@@ -6897,6 +6983,8 @@
"qtsupport_dependencies.pri" "4"
"remotelinux_dependencies" "3"
"remotelinux_dependencies.pri" "4"
+"symbianutils" "3"
+"symbianutils.pri" "4"
"texteditor" "3"
"texteditor.pri" "4"
"texteditor_dependencies" "3"
@@ -7695,6 +7783,8 @@
"remotelinux.pri" "4"
"remotelinux_dependencies" "3"
"remotelinux_dependencies.pri" "4"
+"symbianutils" "3"
+"symbianutils.pri" "4"
"texteditor" "3"
"texteditor.pri" "4"
"texteditor_dependencies" "3"