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
This commit is contained in:
Eike Ziller
2012-09-04 18:04:16 +02:00
300 changed files with 4257 additions and 3427 deletions

View File

@@ -39,7 +39,7 @@
your plugin with. your plugin with.
\list 1 \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" \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. from the project name. You will choose that name later in the wizard.
Continue to the next page. 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. \o Select the \l{glossary-buildandrun-kit}{kit} to build and run your project with.
For a \QC plugin this needs to be the \gui{Desktop} target, 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 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). \QC was built with (in the best case the exact same build).
If you use an incompatible Qt version to build your plugin, you If you use an incompatible Qt version to build your plugin, you

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -37,8 +37,8 @@
to use them from \QC. to use them from \QC.
To run the Valgrind tools on a remote host over SSH, select \gui {Analyze To run the Valgrind tools on a remote host over SSH, select \gui {Analyze
> Valgrind Analyze Memory (Remote)} or \gui {Valgrind Function Profile > Valgrind Analyze Memory (External)} or \gui {Valgrind Function Profile
(Remote)}. (External)}.
To stop the currently running analyzer, select \gui {Analyze To stop the currently running analyzer, select \gui {Analyze
> Stop}. > Stop}.

View File

@@ -252,15 +252,13 @@
\list 1 \list 1
\o Select \gui {Analyze > Valgrind Analyze Memory (Remote)} or \o Select \gui {Analyze > Valgrind Analyze Memory (External)} or
\gui {Valgrind Function Profile (Remote)}. \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 Specify the application to run and analyze, and the \l{glossary-buildandrun-kit}{kit}
to use.
\o In the \gui Target group, specify the application to run and analyze
on the remote host.
\endlist \endlist

View File

@@ -87,7 +87,7 @@
\section1 Attaching to Running Qt Quick Applications \section1 Attaching to Running Qt Quick Applications
To profile Qt Quick applications that are not launched by \QC, select 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 the application in the project build settings. For more information, see
\l{Setting Up QML Debugging}. \l{Setting Up QML Debugging}.

View File

@@ -32,8 +32,10 @@
and analyze applications on them from \QC. and analyze applications on them from \QC.
If you have a tool chain for building applications for Android devices 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 installed on the development PC, you can add it to \QC. You can then add a
the \gui {Android} target to run applications on Android devices. \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 \section1 Requirements

View File

@@ -32,10 +32,10 @@
\title Setting Up Debugger \title Setting Up Debugger
The main debugger settings are associated with the build The main debugger settings are associated with the
\l{glossary-development-target}{target} of your project. To specify the \l{glossary-buildandrun-kit}{kit} you build and run your project with. To specify the
debugger and compiler to use for each build target, select \gui Tools > debugger and compiler to use for each kit, select \gui Tools >
\gui Options > \gui {Build and Run} > \gui Targets. \gui Options > \gui {Build and Run} > \gui Kits.
You need to set up the debugger only if the automatic setup You need to set up the debugger only if the automatic setup
fails, because the native debugger is missing (as is usually the fails, because the native debugger is missing (as is usually the
@@ -45,8 +45,9 @@
want to use a locally installed replacement instead). want to use a locally installed replacement instead).
\note If you need to change the debugger to use for an automatically \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 detected \l{glossary-buildandrun-kit}{kit},
the clone. Make sure to select the cloned target for your project. 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 \note To use the debugging tools for Windows, you must install them
and add the Symbol Server provided by Microsoft to the symbol search and add the Symbol Server provided by Microsoft to the symbol search
@@ -54,7 +55,7 @@
Server in Windows}. Server in Windows}.
\note To use the Free Software Foundation (FSF) version of GDB on \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 This section explains the options you have for debugging C++ code
and provides installation notes for the supported native debuggers. 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 \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, are installed when you install \QC and Qt SDK. On Mac OS X,
use the GDB provided with Xcode. use the GDB provided with Xcode.
For a custom \l{glossary-development-target}{target}, you can You can also build your own Python-enabled GDB. Follow the instructions in
build your own Python-enabled GDB. Follow the instructions in
\l{http://developer.qt.nokia.com/wiki/QtCreatorBuildGdb} \l{http://developer.qt.nokia.com/wiki/QtCreatorBuildGdb}
{Building GDB}. {Building GDB}.
@@ -234,7 +234,7 @@
supports Python from supports Python from
\l{ftp://ftp.qt.nokia.com/misc/gdb/7.2/gdb72_mac_platform.tar.bz2}. \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 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}. \l{Setting up FSF GDB for Mac OS}.
\note The Mac OS X Snow Leopard (10.6) has a bug that might cause the \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 \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 \list 1
@@ -313,13 +314,13 @@
\endcode \endcode
\o In \QC, select \gui {Qt Creator > Preferences > Build & Run > \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 \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/gdb72/bin/fsfgdb, but with an explicit value for
\c $HOME). \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. of the project.
\endlist \endlist

View File

@@ -252,9 +252,9 @@
While this setup might look daunting, it is mostly invisible to While this setup might look daunting, it is mostly invisible to
the user of \QC. To start debugging on a remote target with the the user of \QC. To start debugging on a remote target with the
necessary helper processes running, select the target in necessary helper processes running, select the corresponding
\gui{Projects > Build Settings} \l{glossary-buildandrun-kit}{kit} in
or in the \gui{Debug > Start Debugging} menu. \gui{Projects > Build & Run} or in the \gui{Debug > Start Debugging} menu.
Special use cases, such as attaching to a running process on the Special use cases, such as attaching to a running process on the
target, might still require manual setup. target, might still require manual setup.
@@ -693,8 +693,7 @@
which may contain both release and debug versions of the library. When you run 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 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 by default. To step into Frameworks, select the \gui {Use debug versions of
Frameworks} option in the project run settings for \gui Desktop and Frameworks} option in the project run settings.
\gui {\QS} targets.
\section2 Viewing Threads \section2 Viewing Threads
@@ -792,7 +791,7 @@
To give the user simple access also to these items, \QC employs To give the user simple access also to these items, \QC employs
so-called Debugging Helpers. Debugging Helpers come in two varieties, so-called Debugging Helpers. Debugging Helpers come in two varieties,
compiled, and Python based, depending on the selected 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. By default, Debugging Helpers are automatically and transparently used.
To disable them, select \gui Tools > \gui Options > \gui Debugger > To disable them, select \gui Tools > \gui Options > \gui Debugger >

View File

@@ -89,7 +89,7 @@
\o To debug applications on devices, check that Qt 4.7.4, or later, \o To debug applications on devices, check that Qt 4.7.4, or later,
libraries are installed on the device and 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. before you start debugging.
\endlist \endlist

View File

@@ -549,7 +549,7 @@
\o Open project \o Open project
\o Ctrl+Shift+O \o Ctrl+Shift+O
\row \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 \o Ctrl+T
\row \row
\o Run \o Run

View File

@@ -51,8 +51,8 @@
You can use the mode selector (1) to change to another \QC mode. You can use the mode selector (1) to change to another \QC mode.
You can use the target selector (2) to select the You can use the kit selector (2) to select the
\l{glossary-development-target}{target} for running (3), debugging (4), or \l{glossary-buildandrun-kit}{kit} for running (3), debugging (4), or
building (5) the application. Output from these actions is displayed in the building (5) the application. Output from these actions is displayed in the
output panes (7). output panes (7).

View File

@@ -54,8 +54,8 @@
\image qtcreator-embedded-linux-deployment.png "Deploy to embedded Linux" \image qtcreator-embedded-linux-deployment.png "Deploy to embedded Linux"
When you run the application on the \gui {Embedded Linux} target, \QC When you run the application on the \gui {Embedded Linux} device,
deploys the application as specified by the deploy steps. By default, \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 \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} transfer protocol (SFTP), as specified by the \gui {Upload files via SFTP}
step. step.
@@ -91,7 +91,7 @@
\section1 Creating Debian Installation Packages \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 \QC generates a Debian installation package in the build directory by
default. You can deliver the installation package to users for installation 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 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. \note \QC automates this process for you.
\QC provides templates for a set of files that must be included in Debian \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 packages. When you start using a \l{glossary-buildandrun-kit}{kit} with
project, \QC asks whether packaging files are to be added to the project and \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 to version control. If you plan to edit the packaging files, add them to
version control. version control.

View File

@@ -57,9 +57,10 @@
\section1 Starting the Emulator \section1 Starting the Emulator
The \gui {Start MeeGo Emulator} button is visible if you have a project 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 open in \QC for which you have added a \l{glossary-buildandrun-kit}{kit}
build target. It starts the Maemo or MeeGo Harmattan emulator, depending with Maemo or MeeGo Harmattan device type.
on the selected target. It starts the Maemo or MeeGo Harmattan emulator, depending
on the selected kit.
To start the emulator, click To start the emulator, click
\inlineimage qtcreator-maemo-emulator-button.png "Start MeeGo Emulator button" \inlineimage qtcreator-maemo-emulator-button.png "Start MeeGo Emulator button"

View File

@@ -1,8 +1,9 @@
\section2 Specifying Run Settings for Linux-Based Devices \section2 Specifying Run Settings for Linux-Based Devices
To run an application on a Linux-based device target (embedded Linux, MeeGo To run an application on a Linux-based device (embedded Linux, MeeGo
Harmattan, or Maemo), create and select a device configuration in the run Harmattan, or Maemo), create and select a device configuration in the
settings for the project. \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. You can also pass command line arguments to your application.
\image qtcreator-screenshot-run-settings-maemo.png "Run settings for Linux-based devices" \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. 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 in the build directory by default. You can deliver the
installation package to users for installation installation package to users for installation
on devices that are of the same type and run the same firmware as the on devices that are of the same type and run the same firmware as the

View File

@@ -61,7 +61,8 @@
\list 1 \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}. \o Choose \gui {Build > Publish Project}.

View File

@@ -31,17 +31,17 @@
If you have a tool chain for building applications for embedded Linux 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 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 it to \QC. You can then select a \l{glossary-buildandrun-kit}{kit}
run applications on embedded Linux devices. 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 To be able to run and debug applications on embedded Linux devices, you must
create device configurations and select them in the \QC run create device configurations and select them in the \QC \l{glossary-buildandrun-kit}{kit}
settings.
You use a wizard to create the connections. You can edit the settings later 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 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 either a password or an SSH key. If you do not have an SSH key, you can
@@ -67,8 +67,8 @@
\list 1 \list 1
\o Select \gui {Tools > Options > Linux Devices > Device \o Select \gui {Tools > Options > Linux Devices > Devices > Add
Configurations > Add > Generic Linux Device > Start Wizard}. > Generic Linux Device > Start Wizard}.
\image qtcreator-screenshot-devconf-linux.png "Connection Data wizard" \image qtcreator-screenshot-devconf-linux.png "Connection Data wizard"
@@ -91,9 +91,10 @@
\endlist \endlist
\o Select \gui Tools > \gui Options > \gui {Build & Run} > \gui Targets \o Select \gui Tools > \gui Options > \gui {Build & Run} > \gui Kits
> \gui Add to add a target for building for the device. Select the > \gui Add to add a kit for building for the device. Select the
Qt version, compiler, and device that you added above. Qt version, compiler, and device that you added above, and choose
\gui {Generic Linux Device} for the device type.
\o To specify build settings: \o To specify build settings:
@@ -102,9 +103,9 @@
\o Open a project for an application you want to develop for the \o Open a project for an application you want to develop for the
device. 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 \endlist

View File

@@ -40,7 +40,7 @@
\o \l{Deploying Applications to Linux-Based Devices} \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 as \gui {Embedded Linux}, \gui Harmattan, or \gui{Maemo5}, \QC
copies the application files to the connected device. You copies the application files to the connected device. You
can test and debug the application on the device. can test and debug the application on the device.
@@ -48,14 +48,14 @@
Maemo 5 devices. Maemo 5 devices.
\o \l{Deploying Applications to QNX 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 on your target device, \QC either generates a BAR package in the
build directory and deploys it to the connected device, or copies build directory and deploys it to the connected device, or copies
the application files to the connected device. You can test and the application files to the connected device. You can test and
debug the application on the device. debug the application on the device.
\o \l{Deploying Applications to Android Devices} \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 application files to the device. In addition, you can determine
the Qt libraries to use. the Qt libraries to use.
\endlist \endlist
@@ -68,7 +68,7 @@
When you are ready to publish the application on a publishing When you are ready to publish the application on a publishing
channel, you must make sure that the installation file meets the channel, you must make sure that the installation file meets the
requirements for publishing and installing applications to the requirements for publishing and installing applications to the
target devices. targeted devices.
\endlist \endlist
*/ */

View File

@@ -49,7 +49,7 @@
with the parts of the user interface, go to \l{User Interface}. with the parts of the user interface, go to \l{User Interface}.
\o \bold {\l{Building and Running an Example}} \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 successfully installed as part of the \QSDK installation, open
an example application and run it. If you have not done so an example application and run it. If you have not done so
before, go to \l{Building and Running an Example}. before, go to \l{Building and Running an Example}.

View File

@@ -43,7 +43,8 @@
into binaries. Different build configurations allow you to into binaries. Different build configurations allow you to
quickly build the project for different purposes. quickly build the project for different purposes.
By default, \QC creates \e {debug build} and \e {release build} 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 additional debug symbols that you need for debugging the
application but that you can leave out from the release version. application but that you can leave out from the release version.
Generally, you use the debug configuration for testing and the Generally, you use the debug configuration for testing and the
@@ -79,6 +80,15 @@
copied to a location in the file system of the development PC or copied to a location in the file system of the development PC or
a mobile device. 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 \row
\o Mode \o Mode
\target glossary-mode \target glossary-mode
@@ -102,14 +112,15 @@
\target glossary-project-qt \target glossary-project-qt
\o \QC allows you to have multiple versions of Qt installed on your \o \QC allows you to have multiple versions of Qt installed on your
development PC and use different versions to build your projects development PC and use different versions to build your projects
for different \e targets. for different purposes.
\row \row
\o Run configuration \o Run configuration
\target glossary-run-config \target glossary-run-config
\o Starts the application in the location where it was copied by \o Starts the application in the location where it was copied by
the \e {deploy configuration}. By default, when you run a 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 and runs it there. However, if you have not made any changes to
the project since you last built and deployed it, \QC simply the project since you last built and deployed it, \QC simply
runs it again. runs it again.
@@ -126,23 +137,6 @@
if you need many build configurations for a single set of if you need many build configurations for a single set of
source files. 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 \endtable
*/ */

View File

@@ -107,7 +107,7 @@
\if defined(qcmanual) \if defined(qcmanual)
\o On Windows, you must create projects for Maemo 5 and Harmattan \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. MADDE.
\endif \endif

View File

@@ -32,7 +32,8 @@
\title Connecting Mobile Targets \title Connecting Mobile Targets
You can connect mobile devices to the development PC to build, run, debug, 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 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 set up automatically in \QC. However, \QSDK does not contain a tool chain
for building applications for embedded Linux devices. for building applications for embedded Linux devices.

View File

@@ -87,9 +87,10 @@
and commands used to build the project. and commands used to build the project.
\QC provides support for building, running, and deploying Qt \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 run, and deployment settings allow you to quickly switch between
targets. different setups and targets.
For more information, see \l{Building and Running}. For more information, see \l{Building and Running}.
\o \bold {\l{Debugging and Analyzing}} \o \bold {\l{Debugging and Analyzing}}

View File

@@ -50,22 +50,22 @@
\o Select \gui Projects to configure the project: \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 \list 1
\o Select at least \QS and one of the mobile \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. MeeGo Harmattan, depending on the device you develop for.
\o Select \gui {Configure Project} (2). \o Select \gui {Configure Project} (2).
\endlist \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}. 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 \o Click
\inlineimage qtcreator-run.png \inlineimage qtcreator-run.png

View File

@@ -34,20 +34,24 @@
\image creator_buildingrunning.png \image creator_buildingrunning.png
\QC provides support for building, running, and deploying Qt applications \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 \list
\o \l{Building for Multiple Targets} \o \l{Building for Multiple Targets}
\e {Build configurations} contain everything you need to compile \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} \o \l{Running on Multiple Targets}
\e {Run configurations} start the application in the location \e {Run configurations} start the application in the location
where it was copied by the \e{deploy configuration}. By default, where it was copied by the \e{deploy configuration}. By default,
when you select the \gui Run function, \QC builds the project, 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 if you have not made any changes to the project since you last
built and deployed it, \QC simply runs it again. built and deployed it, \QC simply runs it again.
@@ -60,8 +64,8 @@
\o \l{Connecting Mobile Targets} \o \l{Connecting Mobile Targets}
When you install tool chains for build targets as part of the \QSDK, When you install tool chains for device types as part of the \QSDK,
the build and run settings for mobile device targets are set up the build and run settings for mobile device types are set up
automatically. However, you might need to install and configure some automatically. However, you might need to install and configure some
additional software on the devices to be able to connect to them additional software on the devices to be able to connect to them
from the development PC. from the development PC.
@@ -75,7 +79,7 @@
\o \l{Customizing the Build Process} \o \l{Customizing the Build Process}
By default, running an application also builds it and deploys it to 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. the relationship between the build, run, and deploy configurations.
\o \l{http://doc.qt.nokia.com/qtsimulator/index.html} \o \l{http://doc.qt.nokia.com/qtsimulator/index.html}
@@ -89,7 +93,9 @@
Therefore, applications that run well on \QS also run on Therefore, applications that run well on \QS also run on
any device that hosts the Qt and Qt Mobility libraries. any device that hosts the Qt and Qt Mobility libraries.
The \QS is installed as part of the \QSDK. After it is 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} \o \l{Using Maemo or MeeGo Harmattan Emulator}

View File

@@ -31,12 +31,15 @@
\title Building for Multiple Targets \title Building for Multiple Targets
You can build applications for multiple \l{glossary-development-target} You can build applications for multiple targets, or using different compilers,
{targets}. By default, when you run the application on a target, you debuggers or Qt versions. \l{glossary-buildandrun-kit}{Kits} define the tools,
automatically build it for the target and deploy it to the target first. 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. 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 you can build the project. The build errors and warnings are displayed in
the \gui {Issues} output pane. More detailed information is displayed the \gui {Issues} output pane. More detailed information is displayed
in the \gui {Compile Output} pane. in the \gui {Compile Output} pane.
@@ -45,9 +48,9 @@
\list 1 \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}. \o Choose \gui {Build > Build Project} or press \key {Ctrl+B}.

View File

@@ -33,9 +33,9 @@
Qt is supported on a variety of 32-bit and 64-bit platforms, and can 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 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} a third party compiler. In \QC, a \l{glossary-buildandrun-kit}{kit}
specifies the compiler and other necessary tools for building an specifies the compiler and other necessary tools for building and running an
application for a particular platform. application on a particular platform.
\QC automatically detects the compilers that are registered by your system \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 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 the application binary interface (ABI) version from the list of available
versions. You can also create a custom ABI definition. versions. You can also create a custom ABI definition.
You specify the compiler to use for each target in \gui Tools > You specify the compiler to use for each kit in \gui Tools >
\gui Options > \gui {Build & Run} > \gui Targets. \gui Options > \gui {Build & Run} > \gui Kits.
To add compilers: To add compilers:

View File

@@ -68,9 +68,9 @@
use \QC as a code editor and to fully control the steps and commands used to use \QC as a code editor and to fully control the steps and commands used to
build the project. build the project.
You can install mobile device \l{glossary-development-target}{targets} You can install tools for mobile devices
as part of the \QSDK. The build and run settings for the as part of the \QSDK. The \l{glossary-buildandrun-kit}{kits} and build and run settings for the
installed targets are set up automatically. However, you might need to 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 install and configure some additional software on the devices to be able to
connect to them from the development PC. connect to them from the development PC.
@@ -78,7 +78,7 @@
In the first step, you In the first step, you
select a template for the project. You can filter templates (1) to view only 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 \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 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 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 on the project type and the \l{glossary-buildandrun-kit}{kits} that you select in the
\gui {Target Setup} dialog. Follow the instructions of the wizard. \gui {Kit Selection} dialog. Follow the instructions of the wizard.
For examples of creating different types of projects, see For examples of creating different types of projects, see
\l{Tutorials}. \l{Tutorials}.
@@ -238,8 +238,8 @@
for building and running projects, select \gui{Tools} > \gui{Options} > for building and running projects, select \gui{Tools} > \gui{Options} >
\gui{Build & Run} > \gui{General}. \gui{Build & Run} > \gui{General}.
To specify build and run settings for different target platforms, select To specify build and run settings for different target platforms ,
\gui Projects. select \gui Projects.
\section1 Adding Files to Projects \section1 Adding Files to Projects

View File

@@ -39,19 +39,20 @@
one environment to another. Therefore, we recommend that you click \gui No one environment to another. Therefore, we recommend that you click \gui No
and enter the information again in the \gui {Configure Project} tab. and enter the information again in the \gui {Configure Project} tab.
The \gui {Configure Project} tab displays a list of development environments The \gui {Configure Project} tab displays a list of \l{glossary-buildandrun-kit}{kits}
for target platforms that are installed on the development PC and for building and running projects, that are installed on the development PC and
configured in \gui Tools > \gui Options > \gui {Build & Run} > \gui Targets. configured in \gui Tools > \gui Options > \gui {Build & Run} > \gui Kits.
Select the targets that you want to build the project for. Select the kits that you want to build and run the project with.
\image qtcreator-open-project-targets.png "Configure Project tab" \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 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, 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 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 from a clean slate, and creates new debug and release build configurations
in the specified directory. \QC suggests a name in the specified directory. \QC suggests a name
and location for the directory that you can change. 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 \o Select \gui File > \gui{Open File or Project} and select the project
to open. 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}. project, and click \gui {Configure Project}.
\endlist \endlist

View File

@@ -32,7 +32,7 @@
\title Adding Qt Versions \title Adding Qt Versions
\QC allows you to have multiple versions of Qt installed on your development \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 example, \QSDK contains special Qt versions for developing applications
for mobile devices. for mobile devices.
@@ -42,8 +42,9 @@
\gui {Qt version for} section. To add Qt versions, select \gui {Qt version for} section. To add Qt versions, select
\gui {Tools > Options > Build & Run > Qt Versions}. \gui {Tools > Options > Build & Run > Qt Versions}.
You specify the Qt version to use for each \l{glossary-development-target} You specify the Qt version to use for each \l{glossary-buildandrun-kit}
{target} in \gui Tools > \gui Options > \gui {Build & Run} > \gui Targets. {kit} for building and running your projects
in \gui Tools > \gui Options > \gui {Build & Run} > \gui Kits.
\section2 Setting Up New Qt Versions \section2 Setting Up New Qt Versions

View File

@@ -2,9 +2,9 @@
\list 1 \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. \o Click the \gui Run button.

View File

@@ -7,7 +7,7 @@
\list 1 \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. \o Click the \gui Run button.

View File

@@ -55,11 +55,12 @@
By default, \QC builds projects in a separate directory from the source By default, \QC builds projects in a separate directory from the source
directory, as \l{glossary-shadow-build} {shadow builds}. This keeps the directory, as \l{glossary-shadow-build} {shadow builds}. This keeps the
files generated for each \l{glossary-development-target}{target} separate. files generated for each \l{glossary-buildandrun-kit}{build and run kit} separate.
If you only build for one target, you can deselect the \gui {Shadow build} If you only build and run with a single \l{glossary-buildandrun-kit}{kit},
you can deselect the \gui {Shadow build}
checkbox. checkbox.
Shadow building is not supported for the following target platforms on Shadow building is not supported for the following device types on
Windows: Windows:
\list \list
@@ -192,7 +193,7 @@
\list \list
\o \l{Adding Targets} \o \l{Adding Kits}
\o \l{Adding Qt Versions} \o \l{Adding Qt Versions}
\o \l{Adding Compilers} \o \l{Adding Compilers}

View File

@@ -33,8 +33,7 @@
\omit \omit
When you install the \QSDK, the build and run settings for the development When you install the \QSDK, the build and run settings for the development
targets targets delivered with the \QSDK are set up automatically.
delivered with the \QSDK are set up automatically.
\endomit \endomit
To view and modify the settings for currently open projects, switch to the To view and modify the settings for currently open projects, switch to the
@@ -42,23 +41,23 @@
\image qtcreator-project-targets.png \image qtcreator-project-targets.png
To add build and run targets for the project, select \gui Add. The list To add build and run \l{glossary-buildandrun-kit}{kits} for the project, select \gui Add. The list
displays targets that are configured in \gui Tools > \gui Options > displays kits that are configured in \gui Tools > \gui Options >
\gui {Build & Run} > \gui Targets. To add targets to the list, select \gui {Build & Run} > \gui Kits. To add kits to the list, select
\gui Manage. \gui Manage.
To remove a target, hover the cursor over it (1) and click To remove a kit, hover the cursor over it (1) and click
\inlineimage qtcreator-target-remove.png "Remove Target button" \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. deploy, and run projects.
The project pane consists of the following tabs: The project pane consists of the following tabs:
\list \list
\o \l{Adding Targets}{Targets} \o \l{Adding Kits}{Build & Run}
\list \list
@@ -69,7 +68,7 @@
\endlist \endlist
\note If you have not configured the project for building, the \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. {Configure Projects} tab.
\o \l{Specifying Editor Settings}{Editor Settings} \o \l{Specifying Editor Settings}{Editor Settings}

View File

@@ -4,8 +4,7 @@
detecting memory leaks and profiling function execution. You can configure detecting memory leaks and profiling function execution. You can configure
the tools according to your needs. the tools according to your needs.
You can specify analyzer settings for the desktop and \QS targets. You can specify analyzer settings either globally for all projects or separately for each
You can specify them either globally for all projects or separately for each
project. project.
To specify analyzer settings for the current project: To specify analyzer settings for the current project:

View File

@@ -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 You can specify command line arguments to be passed to the executable
and the working directory to use. The working directory defaults to and the working directory to use. The working directory defaults to

View File

@@ -32,10 +32,10 @@
\title Specifying Run Settings \title Specifying Run Settings
\QC automatically creates run configurations for your project. \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 The settings to specify depend on the type of the project and on the
target for the project. \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 Click \gui Add to add run settings for a project and \gui Remove to remove
the current settings. the current settings.

View File

@@ -29,13 +29,14 @@
\page creator-targets.html \page creator-targets.html
\nextpage creator-project-qmake.html \nextpage creator-project-qmake.html
\title Adding Targets \title Adding Kits
\QC groups platform specific settings as \e targets to make cross-platform \QC groups settings used for building and running projects as kits
development easier. Each target consists of a set of values that define one 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 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 to use, and some metadata, such as an icon and a name for the kit. Once
you have defined targets, you can select them to build and run projects. 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 \QC supports development for the desktop and for the following types of
devices: devices:
@@ -54,18 +55,18 @@
\endlist \endlist
To add targets: To add kits:
\list 1 \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. > \gui Add.
\image qtcreator-targets.png \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. target.
Double-click the icon next to the field to select the image that is 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 image in a supported file format (for example, PNG). The image is
scaled to the size 64x64 pixels. For example, using the compiler 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 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. \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 \QC checks the directories listed in the \c{PATH} environment
variable for the qmake executable. If a qmake executable is found, 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 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. \o In the \gui {Qt mkspec} field, specify build instructions for qmake.
If you leave this field empty, the default value is used. If you leave this field empty, the default value is used.

View File

@@ -169,7 +169,7 @@
\list \list
\o \l{Specifying Build Settings} \o \l{Specifying Build Settings}
\list \list
\o \l{Adding Targets} \o \l{Adding Kits}
\o \l{Adding Qt Versions} \o \l{Adding Qt Versions}
\o \l{Adding Compilers} \o \l{Adding Compilers}
\endlist \endlist

View File

@@ -1,6 +1,6 @@
\section1 Specifying Run Settings for Qt Quick UI Projects \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 \list

View File

@@ -59,13 +59,11 @@
\o In the \gui {Create in} field, enter the path for the project files. \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}. For example, \c {C:\Qt\examples}, and then click \gui{Next}.
\o In the \gui {Application Type} dialog, select \gui {Built-in \o Select \l{glossary-buildandrun-kit}{kits} for running and building your project,
elements only (for all platforms)}, and then click \gui{Next}. and then click \gui{Next}.
\o Select targets, and then click \gui{Next}. \note Kits are listed if they have been specified in \gui Tools >
\gui Options > \gui {Build & Run} > \gui Kits.
\note Targets are listed if they have been specified in \gui Tools >
\gui Options > \gui {Build & Run} > \gui Targets.
\o Select \gui Next in the following dialogs to use the default \o Select \gui Next in the following dialogs to use the default
settings. settings.

View File

@@ -154,15 +154,15 @@
\o Click \gui{Next}. \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}. and then click \gui{Next}.
\note If only one target is specified in \gui Tools > \gui Options > \note If only one kit is specified in \gui Tools > \gui Options >
\gui {Build & Run} > \gui Targets, this dialog is skipped. \gui {Build & Run} > \gui Kits, this dialog is skipped.
The \gui {Mobile Options} dialog opens. The \gui {Mobile Options} dialog opens.
@@ -172,8 +172,8 @@
application behaves when the orientation of the device display application behaves when the orientation of the device display
rotates between portrait and landscape, and then click \gui Next. rotates between portrait and landscape, and then click \gui Next.
\note This dialog opens only if you select \gui Maemo5 \note This dialog opens only if you select a \l{glossary-buildandrun-kit}{kit}
target in the \gui {Target Setup} dialog. On with \gui Maemo5 device type in the \gui {Kit Selection} dialog. On
Harmattan, the Qt Quick Components for MeeGo provide native-looking Harmattan, the Qt Quick Components for MeeGo provide native-looking
rotation. rotation.

View File

@@ -57,15 +57,15 @@
\o In the \gui {Create in} field, enter the path for the project files. \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}. 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}. and click \gui{Next}.
\note If only one target is specified in \gui Tools > \gui Options > \note If only one kit is specified in \gui Tools > \gui Options >
\gui {Build & Run} > \gui Targets, this dialog is \gui {Build & Run} > \gui Kits, this dialog is
skipped. skipped.
The \gui{Class Information} dialog opens. The \gui{Class Information} dialog opens.

View File

@@ -20,10 +20,11 @@ OTHER_FILES += dist/copyright_template.txt \
macx { macx {
APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app" APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
deployqt.commands = $$PWD/scripts/deployqtHelper_mac.sh \"$${APPBUNDLE}\" 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/\" 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.commands = $$PWD/scripts/makedmg.sh $$OUT_PWD/bin qt-creator-mac$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX).dmg
dmg.depends = deployqt dmg.depends = deployqt
QMAKE_EXTRA_TARGETS += dmg QMAKE_EXTRA_TARGETS += codesign dmg
} else { } else {
deployqt.commands = $$PWD/scripts/deployqt.py -i $(INSTALL_ROOT) deployqt.commands = $$PWD/scripts/deployqt.py -i $(INSTALL_ROOT)
deployqt.depends = install deployqt.depends = install

View File

@@ -212,35 +212,6 @@ void FindUsages::reportResult(unsigned tokenIndex)
_references.append(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) bool FindUsages::isLocalScope(Scope *scope)
{ {
if (scope) { if (scope) {

View File

@@ -82,8 +82,6 @@ protected:
bool checkCandidates(const QList<LookupItem> &candidates) const; bool checkCandidates(const QList<LookupItem> &candidates) const;
void checkExpression(unsigned startToken, unsigned endToken, Scope *scope = 0); 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); static bool isLocalScope(Scope *scope);
void statement(StatementAST *ast); void statement(StatementAST *ast);

View File

@@ -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 bool ClassOrNamespace::CompareName::operator()(const Name *name, const Name *other) const
{ {
Q_ASSERT(name != 0); Q_ASSERT(name != 0);
@@ -416,20 +449,51 @@ QList<LookupItem> ClassOrNamespace::lookup_helper(const Name *name, bool searchI
QList<LookupItem> result; QList<LookupItem> result;
if (name) { if (name) {
QSet<ClassOrNamespace *> processed;
if (const QualifiedNameId *q = name->asQualifiedNameId()) { if (const QualifiedNameId *q = name->asQualifiedNameId()) {
if (! q->base()) if (! q->base())
result = globalNamespace()->find(q->name()); result = globalNamespace()->find(q->name());
else if (ClassOrNamespace *binding = lookupType(q->base())) else if (ClassOrNamespace *binding = lookupType(q->base())) {
result = binding->find(q->name()); 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; return result;
} }
QSet<ClassOrNamespace *> processed;
ClassOrNamespace *binding = this; ClassOrNamespace *binding = this;
do { do {
lookup_helper(name, binding, &result, &processed, /*templateId = */ 0); 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()) else if (s->isUsingNamespaceDirective())
continue; continue;
if (Scope *scope = s->asScope()) { if (Scope *scope = s->asScope()) {
if (Class *klass = scope->asClass()) { if (Class *klass = scope->asClass()) {
if (const Identifier *id = klass->identifier()) { if (const Identifier *id = klass->identifier()) {

View File

@@ -252,6 +252,11 @@ private:
QSharedPointer<Control> _control; 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 } // namespace CPlusPlus
#endif // CPLUSPLUS_LOOKUPCONTEXT_H #endif // CPLUSPLUS_LOOKUPCONTEXT_H

View File

@@ -473,27 +473,38 @@ bool ResolveExpression::visit(SimpleNameAST *ast)
if (item.declaration() == 0) if (item.declaration() == 0)
continue; continue;
if (item.type().isAuto()) { if (item.type().isAuto()
&& _blockedIds.find(ast->name->identifier()) == _blockedIds.end()) {
const Declaration *decl = item.declaration()->asDeclaration(); const Declaration *decl = item.declaration()->asDeclaration();
if (!decl) if (!decl)
continue; continue;
Document::Ptr doc = _context.snapshot().document(decl->fileName());
const StringLiteral *initializationString = decl->getInitializer(); const StringLiteral *initializationString = decl->getInitializer();
if (initializationString == 0) if (initializationString == 0)
continue; continue;
QByteArray initializer = QByteArray::fromRawData(initializationString->chars(), initializationString->size()).trimmed(); const QByteArray &initializer =
QByteArray::fromRawData(initializationString->chars(),
initializationString->size()).trimmed();
// Skip lambda-function initializers // Skip lambda-function initializers
if (initializer.length() > 0 && initializer[0] == '[') if (initializer.length() > 0 && initializer[0] == '[')
continue; continue;
TypeOfExpression exprTyper; TypeOfExpression exprTyper;
Document::Ptr doc = _context.snapshot().document(decl->fileName());
exprTyper.init(doc, _context.snapshot(), _context.bindings()); 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()) if (typeItems.empty())
continue; continue;

View File

@@ -36,6 +36,7 @@
#include <ASTVisitor.h> #include <ASTVisitor.h>
#include <FullySpecifiedType.h> #include <FullySpecifiedType.h>
#include <Bind.h> #include <Bind.h>
#include <set>
namespace CPlusPlus { namespace CPlusPlus {
@@ -118,12 +119,20 @@ protected:
// Objective-C expressions // Objective-C expressions
virtual bool visit(ObjCMessageExpressionAST *ast); virtual bool visit(ObjCMessageExpressionAST *ast);
private: private:
struct IdentifierComp
{
bool operator()(const Identifier *a, const Identifier *b) const
{ return strcmp(a->chars(), b->chars()) < 0; }
};
Scope *_scope; Scope *_scope;
LookupContext _context; LookupContext _context;
Bind bind; Bind bind;
QList<LookupItem> _results; QList<LookupItem> _results;
bool _reference; bool _reference;
std::set<const Identifier *, IdentifierComp> _blockedIds; // Replace by a hash impl.
}; };
} // namespace CPlusPlus } // namespace CPlusPlus

View File

@@ -163,23 +163,6 @@ ExpressionAST *TypeOfExpression::expressionAST() const
return extractExpressionAST(m_lookupContext.expressionDocument()); 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, void TypeOfExpression::processEnvironment(Document::Ptr doc, Environment *env,
QSet<QString> *processed) const QSet<QString> *processed) const
{ {
@@ -210,3 +193,24 @@ QByteArray TypeOfExpression::preprocessedExpression(const QByteArray &utf8code)
Preprocessor preproc(0, m_environment.data()); Preprocessor preproc(0, m_environment.data());
return preproc.run("<expression>", utf8code); 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

View File

@@ -122,15 +122,13 @@ public:
Scope *scope() const; Scope *scope() const;
ExpressionAST *expressionAST() const; ExpressionAST *expressionAST() const;
QByteArray preprocessedExpression(const QByteArray &utf8code) const;
private: private:
ExpressionAST *extractExpressionAST(Document::Ptr doc) const;
Document::Ptr documentForExpression(const QByteArray &utf8code) const;
void processEnvironment(Document::Ptr doc, Environment *env, void processEnvironment(Document::Ptr doc, Environment *env,
QSet<QString> *processed) const; QSet<QString> *processed) const;
QByteArray preprocessedExpression(const QByteArray &utf8code) const;
private: private:
Document::Ptr m_thisDocument; Document::Ptr m_thisDocument;
@@ -142,6 +140,9 @@ private:
mutable QSharedPointer<Environment> m_environment; mutable QSharedPointer<Environment> m_environment;
}; };
ExpressionAST CPLUSPLUS_EXPORT *extractExpressionAST(Document::Ptr doc);
Document::Ptr CPLUSPLUS_EXPORT documentForExpression(const QByteArray &utf8code);
} // namespace CPlusPlus } // namespace CPlusPlus
#endif // CPLUSPLUS_TYPEOFEXPRESSION_H #endif // CPLUSPLUS_TYPEOFEXPRESSION_H

View File

@@ -373,20 +373,12 @@ static void writeVariantValue(QXmlStreamWriter &w, const Context &ctx,
} }
PersistentSettingsWriter::PersistentSettingsWriter(const FileName &fileName, const QString &docType) : 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) if (data == m_savedData)
return;
m_mustSave = true;
m_valueMap.insert(variable, value);
}
bool PersistentSettingsWriter::save(QWidget *parent) const
{
if (!m_mustSave)
return true; return true;
QDir tmp; QDir tmp;
@@ -403,8 +395,8 @@ bool PersistentSettingsWriter::save(QWidget *parent) const
arg(QLatin1String(Core::Constants::IDE_VERSION_LONG), arg(QLatin1String(Core::Constants::IDE_VERSION_LONG),
QDateTime::currentDateTime().toString(Qt::ISODate))); QDateTime::currentDateTime().toString(Qt::ISODate)));
w.writeStartElement(ctx.qtCreatorElement); w.writeStartElement(ctx.qtCreatorElement);
const QVariantMap::const_iterator cend = m_valueMap.constEnd(); const QVariantMap::const_iterator cend = data.constEnd();
for (QVariantMap::const_iterator it = m_valueMap.constBegin(); it != cend; ++it) { for (QVariantMap::const_iterator it = data.constBegin(); it != cend; ++it) {
w.writeStartElement(ctx.dataElement); w.writeStartElement(ctx.dataElement);
w.writeTextElement(ctx.variableElement, it.key()); w.writeTextElement(ctx.variableElement, it.key());
writeVariantValue(w, ctx, it.value()); writeVariantValue(w, ctx, it.value());
@@ -416,7 +408,7 @@ bool PersistentSettingsWriter::save(QWidget *parent) const
} }
bool ok = saver.finalize(parent); bool ok = saver.finalize(parent);
if (ok) if (ok)
m_mustSave = false; m_savedData = data;
return ok; return ok;
} }

View File

@@ -60,16 +60,14 @@ class QTCREATOR_UTILS_EXPORT PersistentSettingsWriter
{ {
public: public:
PersistentSettingsWriter(const FileName &fileName, const QString &docType); PersistentSettingsWriter(const FileName &fileName, const QString &docType);
void saveValue(const QString &variable, const QVariant &value); bool save(const QVariantMap &data, QWidget *parent) const;
bool save(QWidget *parent) const;
Utils::FileName fileName() const; Utils::FileName fileName() const;
private: private:
QMap<QString, QVariant> m_valueMap;
const Utils::FileName m_fileName; const Utils::FileName m_fileName;
const QString m_docType; const QString m_docType;
mutable bool m_mustSave; mutable QMap<QString, QVariant> m_savedData;
}; };
} // namespace Utils } // namespace Utils

View File

@@ -66,7 +66,7 @@ QString IAnalyzerTool::defaultActionName(const IAnalyzerTool *tool, StartMode mo
{ {
QString base = tool->displayName(); QString base = tool->displayName();
if (mode == StartRemote) if (mode == StartRemote)
return base + tr(" (Remote)"); return base + tr(" (External)");
return base; return base;
} }

View File

@@ -32,8 +32,8 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/id.h> #include <coreplugin/id.h>
#include <projectexplorer/profilechooser.h> #include <projectexplorer/kitchooser.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <ssh/sshconnection.h> #include <ssh/sshconnection.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
@@ -53,7 +53,7 @@ namespace Internal {
class StartRemoteDialogPrivate class StartRemoteDialogPrivate
{ {
public: public:
ProfileChooser *profileChooser; KitChooser *kitChooser;
QLineEdit *executable; QLineEdit *executable;
QLineEdit *arguments; QLineEdit *arguments;
QLineEdit *workingDirectory; QLineEdit *workingDirectory;
@@ -69,7 +69,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Remote Analysis")); 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->executable = new QLineEdit(this);
d->arguments = new QLineEdit(this); d->arguments = new QLineEdit(this);
d->workingDirectory = new QLineEdit(this); d->workingDirectory = new QLineEdit(this);
@@ -80,7 +80,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
QFormLayout *formLayout = new QFormLayout; QFormLayout *formLayout = new QFormLayout;
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); 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("Executable:"), d->executable);
formLayout->addRow(tr("Arguments:"), d->arguments); formLayout->addRow(tr("Arguments:"), d->arguments);
formLayout->addRow(tr("Working directory:"), d->workingDirectory); formLayout->addRow(tr("Working directory:"), d->workingDirectory);
@@ -91,14 +91,14 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
QSettings *settings = Core::ICore::settings(); QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String("AnalyzerStartRemoteDialog")); settings->beginGroup(QLatin1String("AnalyzerStartRemoteDialog"));
QString profile = settings->value(QLatin1String("profile")).toString(); QString kit = settings->value(QLatin1String("profile")).toString();
d->profileChooser->setCurrentProfileId(Core::Id(profile)); d->kitChooser->setCurrentKitId(Core::Id(kit));
d->executable->setText(settings->value(QLatin1String("executable")).toString()); d->executable->setText(settings->value(QLatin1String("executable")).toString());
d->workingDirectory->setText(settings->value(QLatin1String("workingDirectory")).toString()); d->workingDirectory->setText(settings->value(QLatin1String("workingDirectory")).toString());
d->arguments->setText(settings->value(QLatin1String("arguments")).toString()); d->arguments->setText(settings->value(QLatin1String("arguments")).toString());
settings->endGroup(); 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->executable, SIGNAL(textChanged(QString)), SLOT(validate()));
connect(d->workingDirectory, SIGNAL(textChanged(QString)), SLOT(validate())); connect(d->workingDirectory, SIGNAL(textChanged(QString)), SLOT(validate()));
connect(d->arguments, 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(); QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String("AnalyzerStartRemoteDialog")); 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("executable"), d->executable->text());
settings->setValue(QLatin1String("workingDirectory"), d->workingDirectory->text()); settings->setValue(QLatin1String("workingDirectory"), d->workingDirectory->text());
settings->setValue(QLatin1String("arguments"), d->arguments->text()); settings->setValue(QLatin1String("arguments"), d->arguments->text());
@@ -134,8 +134,8 @@ void StartRemoteDialog::validate()
QSsh::SshConnectionParameters StartRemoteDialog::sshParams() const QSsh::SshConnectionParameters StartRemoteDialog::sshParams() const
{ {
Profile *profile = d->profileChooser->currentProfile(); Kit *kit = d->kitChooser->currentKit();
IDevice::ConstPtr device = DeviceProfileInformation::device(profile); IDevice::ConstPtr device = DeviceKitInformation::device(kit);
return device->sshParameters(); return device->sshParameters();
} }

View File

@@ -32,7 +32,7 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>Target:</string> <string>Kit:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View File

@@ -37,7 +37,7 @@
#include <debugger/debuggerengine.h> #include <debugger/debuggerengine.h>
#include <debugger/debuggerplugin.h> #include <debugger/debuggerplugin.h>
#include <debugger/debuggerprofileinformation.h> #include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerrunner.h> #include <debugger/debuggerrunner.h>
#include <debugger/debuggerstartparameters.h> #include <debugger/debuggerstartparameters.h>
@@ -45,7 +45,7 @@
#include <qt4projectmanager/qt4buildconfiguration.h> #include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4nodes.h> #include <qt4projectmanager/qt4nodes.h>
#include <qt4projectmanager/qt4project.h> #include <qt4projectmanager/qt4project.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <QDir> #include <QDir>
@@ -93,10 +93,10 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
if (runConfig->debuggerAspect()->useCppDebugger()) { if (runConfig->debuggerAspect()->useCppDebugger()) {
params.languages |= CppLanguage; params.languages |= CppLanguage;
Profile *profile = target->profile(); Kit *kit = target->kit();
params.sysRoot = SysRootProfileInformation::sysRoot(profile).toString(); params.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
params.debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString(); params.debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString();
if (ToolChain *tc = ToolChainProfileInformation::toolChain(profile)) if (ToolChain *tc = ToolChainKitInformation::toolChain(kit))
params.toolChainAbi = tc->targetAbi(); params.toolChainAbi = tc->targetAbi();
params.executable = project->rootQt4ProjectNode()->buildDir() + QLatin1String("/app_process"); params.executable = project->rootQt4ProjectNode()->buildDir() + QLatin1String("/app_process");
params.remoteChannel = runConfig->remoteChannel(); params.remoteChannel = runConfig->remoteChannel();
@@ -105,7 +105,7 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
foreach (Qt4ProFileNode *node, nodes) foreach (Qt4ProFileNode *node, nodes)
if (node->projectType() == ApplicationTemplate) if (node->projectType() == ApplicationTemplate)
params.solibSearchPath.append(node->targetInformation().buildDir); 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)); params.solibSearchPath.append(qtSoPaths(version));
} }
if (runConfig->debuggerAspect()->useQmlDebugger()) { if (runConfig->debuggerAspect()->useQmlDebugger()) {

View File

@@ -39,7 +39,7 @@
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qt4projectmanager/qt4project.h> #include <qt4projectmanager/qt4project.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtsupportconstants.h>
using namespace ProjectExplorer; using namespace ProjectExplorer;
@@ -119,15 +119,15 @@ QList<Core::Id> AndroidDeployConfigurationFactory::availableCreationIds(Target *
if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(parent->project())) if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(parent->project()))
return ids; return ids;
if (!parent->project()->supportsProfile(parent->profile())) if (!parent->project()->supportsKit(parent->kit()))
return ids; return ids;
ToolChain *tc = ToolChainProfileInformation::toolChain(parent->profile()); ToolChain *tc = ToolChainKitInformation::toolChain(parent->kit());
if (!tc || tc->targetAbi().osFlavor() != Abi::AndroidLinuxFlavor) if (!tc || tc->targetAbi().osFlavor() != Abi::AndroidLinuxFlavor)
return ids; return ids;
if (QtSupport::QtProfileInformation::qtVersion(parent->profile())->type() != QLatin1String(Constants::ANDROIDQT)) if (QtSupport::QtKitInformation::qtVersion(parent->kit())->type() != QLatin1String(Constants::ANDROIDQT))
return ids; return ids;
ids << Core::Id(ANDROID_DEPLOYCONFIGURATION_ID); ids << Core::Id(ANDROID_DEPLOYCONFIGURATION_ID);

View File

@@ -44,7 +44,7 @@
#include <qt4projectmanager/qt4project.h> #include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4nodes.h> #include <qt4projectmanager/qt4nodes.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <QDir> #include <QDir>
@@ -97,7 +97,7 @@ bool AndroidDeployStep::init()
return false; return false;
} }
QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile()); QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!version) if (!version)
return false; return false;

View File

@@ -37,7 +37,7 @@
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtsupportconstants.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <QCoreApplication> #include <QCoreApplication>

View File

@@ -44,7 +44,7 @@
#include <qt4projectmanager/qt4projectmanagerconstants.h> #include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qt4projectmanager/qt4buildconfiguration.h> #include <qt4projectmanager/qt4buildconfiguration.h>
#include <qtsupport/customexecutablerunconfiguration.h> #include <qtsupport/customexecutablerunconfiguration.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtsupportconstants.h>
#include <QDir> #include <QDir>
@@ -81,7 +81,7 @@ bool AndroidManager::supportsAndroid(ProjectExplorer::Target *target)
{ {
if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(target->project())) if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(target->project()))
return false; 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); 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) 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()); Qt4ProjectManager::Qt4Project *qt4Project = qobject_cast<Qt4ProjectManager::Qt4Project*>(target->project());
if (!qt4Project || !qt4Project->rootProjectNode() || !version) if (!qt4Project || !qt4Project->rootProjectNode() || !version)
return false; return false;
@@ -555,7 +555,7 @@ void AndroidManager::updateTarget(ProjectExplorer::Target *target, const QString
Utils::FileName AndroidManager::localLibsRulesFilePath(ProjectExplorer::Target *target) 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) if (!version)
return Utils::FileName(); return Utils::FileName();
return Utils::FileName::fromString(version->qmakeProperty("QT_INSTALL_LIBS") + QLatin1String("/rules.xml")); 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) 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()) if (!target->activeRunConfiguration())
return QStringList(); return QStringList();

View File

@@ -36,7 +36,7 @@
#include <projectexplorer/buildsteplist.h> #include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtsupportconstants.h>
using namespace ProjectExplorer; using namespace ProjectExplorer;

View File

@@ -34,10 +34,10 @@
#include "androidtoolchain.h" #include "androidtoolchain.h"
#include "androidmanager.h" #include "androidmanager.h"
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qtsupport/qtoutputformatter.h> #include <qtsupport/qtoutputformatter.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -87,7 +87,7 @@ AndroidConfig AndroidRunConfiguration::config() const
const Utils::FileName AndroidRunConfiguration::gdbCmd() const const Utils::FileName AndroidRunConfiguration::gdbCmd() const
{ {
ToolChain *tc = ToolChainProfileInformation::toolChain(target()->profile()); ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (!tc) if (!tc)
return Utils::FileName(); return Utils::FileName();
return AndroidConfigurations::instance().gdbPath(tc->targetAbi().architecture()); return AndroidConfigurations::instance().gdbPath(tc->targetAbi().architecture());
@@ -110,7 +110,7 @@ const QString AndroidRunConfiguration::remoteChannel() const
const QString AndroidRunConfiguration::dumperLib() const const QString AndroidRunConfiguration::dumperLib() const
{ {
QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target()->profile()); QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!version) if (!version)
return QString(); return QString();
return version->gdbDebuggingHelperLibrary(); return version->gdbDebuggingHelperLibrary();

View File

@@ -43,7 +43,7 @@
#include <qt4projectmanager/qt4project.h> #include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4nodes.h> #include <qt4projectmanager/qt4nodes.h>
#include <qtsupport/customexecutablerunconfiguration.h> #include <qtsupport/customexecutablerunconfiguration.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtsupportconstants.h>
@@ -140,7 +140,7 @@ RunConfiguration *AndroidRunConfigurationFactory::clone(Target *parent, RunConfi
bool AndroidRunConfigurationFactory::canHandle(Target *t) const bool AndroidRunConfigurationFactory::canHandle(Target *t) const
{ {
if (!t->project()->supportsProfile(t->profile())) if (!t->project()->supportsKit(t->kit()))
return false; return false;
return AndroidManager::supportsAndroid(t); return AndroidManager::supportsAndroid(t);
} }

View File

@@ -38,7 +38,7 @@
#include <projectexplorer/toolchainmanager.h> #include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <qt4projectmanager/qt4project.h> #include <qt4projectmanager/qt4project.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <qtsupport/qtversionmanager.h> #include <qtsupport/qtversionmanager.h>
#include <utils/environment.h> #include <utils/environment.h>
@@ -95,7 +95,7 @@ void AndroidToolChain::addToEnvironment(Environment &env) const
Qt4Project *qt4pro = qobject_cast<Qt4Project *>(ProjectExplorerPlugin::instance()->currentProject()); Qt4Project *qt4pro = qobject_cast<Qt4Project *>(ProjectExplorerPlugin::instance()->currentProject());
if (!qt4pro || !qt4pro->activeTarget() 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; return;
QString ndkHost; QString ndkHost;

View File

@@ -42,7 +42,7 @@
#include "configurestep.h" #include "configurestep.h"
#include <projectexplorer/buildsteplist.h> #include <projectexplorer/buildsteplist.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchain.h>
@@ -117,7 +117,7 @@ void AutotoolsBuildConfiguration::setBuildDirectory(const QString &buildDirector
IOutputParser *AutotoolsBuildConfiguration::createOutputParser() const IOutputParser *AutotoolsBuildConfiguration::createOutputParser() const
{ {
ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile()); ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
if (tc) if (tc)
return tc->outputParser(); return tc->outputParser();
return 0; return 0;
@@ -214,7 +214,7 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::createDefaultCo
bool AutotoolsBuildConfigurationFactory::canHandle(const Target *t) const bool AutotoolsBuildConfigurationFactory::canHandle(const Target *t) const
{ {
if (!t->project()->supportsProfile(t->profile())) if (!t->project()->supportsKit(t->kit()))
return false; return false;
return t->project()->id() == Constants::AUTOTOOLS_PROJECT_ID; return t->project()->id() == Constants::AUTOTOOLS_PROJECT_ID;
} }

View File

@@ -44,8 +44,8 @@
#include <projectexplorer/abi.h> #include <projectexplorer/abi.h>
#include <projectexplorer/buildenvironmentwidget.h> #include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/profilemanager.h> #include <projectexplorer/kitmanager.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/buildsteplist.h> #include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
@@ -158,9 +158,9 @@ bool AutotoolsProject::fromMap(const QVariantMap &map)
// Load the project tree structure. // Load the project tree structure.
loadProjectTree(); loadProjectTree();
Profile *defaultProfile = ProfileManager::instance()->defaultProfile(); Kit *defaultKit = KitManager::instance()->defaultKit();
if (!activeTarget() && defaultProfile) if (!activeTarget() && defaultKit)
addTarget(createTarget(defaultProfile)); addTarget(createTarget(defaultKit));
return true; return true;
} }
@@ -418,7 +418,7 @@ void AutotoolsProject::updateCppCodeModel()
QByteArray macros; QByteArray macros;
if (activeTarget()) { if (activeTarget()) {
ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(activeTarget()->profile()); ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
if (tc) { if (tc) {
const QList<HeaderPath> allHeaderPaths = tc->systemHeaderPaths(); const QList<HeaderPath> allHeaderPaths = tc->systemHeaderPaths();
foreach (const HeaderPath &headerPath, allHeaderPaths) { foreach (const HeaderPath &headerPath, allHeaderPaths) {

View File

@@ -41,7 +41,7 @@
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchain.h>
#include <projectexplorer/gnumakeparser.h> #include <projectexplorer/gnumakeparser.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcprocess.h> #include <utils/qtcprocess.h>
@@ -174,7 +174,7 @@ bool MakeStep::init()
setIgnoreReturnValue(m_clean); setIgnoreReturnValue(m_clean);
ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(bc->target()->profile()); ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
ProcessParameters *pp = processParameters(); ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander()); pp->setMacroExpander(bc->macroExpander());
@@ -289,7 +289,7 @@ QString MakeStepConfigWidget::summaryText() const
void MakeStepConfigWidget::updateDetails() void MakeStepConfigWidget::updateDetails()
{ {
AutotoolsBuildConfiguration *bc = m_makeStep->autotoolsBuildConfiguration(); 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) { if (tc) {
QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->m_buildTargets); QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->m_buildTargets);
@@ -303,7 +303,7 @@ void MakeStepConfigWidget::updateDetails()
param.setArguments(arguments); param.setArguments(arguments);
m_summaryText = param.summary(displayName()); m_summaryText = param.summary(displayName());
} else { } else {
m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget() + QLatin1String("</b>"); m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
} }
emit updateSummary(); emit updateSummary();

View File

@@ -7,33 +7,35 @@ include(clearcase_dependencies.pri)
DEFINES += QT_NO_CAST_FROM_ASCII DEFINES += QT_NO_CAST_FROM_ASCII
HEADERS += annotationhighlighter.h \ HEADERS += activityselector.h \
clearcaseplugin.h \ annotationhighlighter.h \
clearcasecontrol.h \
settingspage.h \
clearcaseeditor.h \
clearcasesettings.h \
clearcaseconstants.h \
clearcasesubmiteditor.h \
checkoutdialog.h \ checkoutdialog.h \
activityselector.h \ clearcaseconstants.h \
clearcasecontrol.h \
clearcaseeditor.h \
clearcaseplugin.h \
clearcasesettings.h \
clearcasesubmiteditor.h \
clearcasesubmiteditorwidget.h \ clearcasesubmiteditorwidget.h \
clearcasesync.h \
settingspage.h \
versionselector.h versionselector.h
SOURCES += annotationhighlighter.cpp \ SOURCES += activityselector.cpp \
clearcaseplugin.cpp \ annotationhighlighter.cpp \
checkoutdialog.cpp \
clearcasecontrol.cpp \ clearcasecontrol.cpp \
settingspage.cpp \
clearcaseeditor.cpp \ clearcaseeditor.cpp \
clearcaseplugin.cpp \
clearcasesettings.cpp \ clearcasesettings.cpp \
clearcasesubmiteditor.cpp \ clearcasesubmiteditor.cpp \
checkoutdialog.cpp \
activityselector.cpp \
clearcasesubmiteditorwidget.cpp \ clearcasesubmiteditorwidget.cpp \
clearcasesync.cpp \
settingspage.cpp \
versionselector.cpp versionselector.cpp
FORMS += settingspage.ui \ FORMS += checkoutdialog.ui \
checkoutdialog.ui \ settingspage.ui \
undocheckout.ui \ undocheckout.ui \
versionselector.ui versionselector.ui

View File

@@ -33,6 +33,7 @@ QtcPlugin {
"checkoutdialog.cpp", "checkoutdialog.cpp",
"checkoutdialog.h", "checkoutdialog.h",
"checkoutdialog.ui", "checkoutdialog.ui",
"clearcase.qrc",
"clearcaseconstants.h", "clearcaseconstants.h",
"clearcasecontrol.cpp", "clearcasecontrol.cpp",
"clearcasecontrol.h", "clearcasecontrol.h",
@@ -40,13 +41,14 @@ QtcPlugin {
"clearcaseeditor.h", "clearcaseeditor.h",
"clearcaseplugin.cpp", "clearcaseplugin.cpp",
"clearcaseplugin.h", "clearcaseplugin.h",
"clearcase.qrc",
"clearcasesettings.cpp", "clearcasesettings.cpp",
"clearcasesettings.h", "clearcasesettings.h",
"clearcasesubmiteditor.cpp", "clearcasesubmiteditor.cpp",
"clearcasesubmiteditor.h", "clearcasesubmiteditor.h",
"clearcasesubmiteditorwidget.cpp", "clearcasesubmiteditorwidget.cpp",
"clearcasesubmiteditorwidget.h", "clearcasesubmiteditorwidget.h",
"clearcasesync.cpp",
"clearcasesync.h",
"settingspage.cpp", "settingspage.cpp",
"settingspage.h", "settingspage.h",
"settingspage.ui", "settingspage.ui",

View File

@@ -136,6 +136,16 @@ bool ClearCaseControl::vcsAnnotate(const QString &file, int line)
return true; return true;
} }
QString ClearCaseControl::vcsOpenText() const
{
return tr("&Check Out");
}
QString ClearCaseControl::vcsMakeWritableText() const
{
return tr("&Hijack");
}
void ClearCaseControl::emitRepositoryChanged(const QString &s) void ClearCaseControl::emitRepositoryChanged(const QString &s)
{ {
emit repositoryChanged(s); emit repositoryChanged(s);

View File

@@ -70,6 +70,9 @@ public:
bool vcsAnnotate(const QString &file, int line); bool vcsAnnotate(const QString &file, int line);
QString vcsOpenText() const;
QString vcsMakeWritableText() const;
void emitRepositoryChanged(const QString &); void emitRepositoryChanged(const QString &);
void emitFilesChanged(const QStringList &); void emitFilesChanged(const QStringList &);
void emitConfigurationChanged(); void emitConfigurationChanged();

View File

@@ -38,6 +38,7 @@
#include "clearcaseplugin.h" #include "clearcaseplugin.h"
#include "clearcasesubmiteditor.h" #include "clearcasesubmiteditor.h"
#include "clearcasesubmiteditorwidget.h" #include "clearcasesubmiteditorwidget.h"
#include "clearcasesync.h"
#include "settingspage.h" #include "settingspage.h"
#include "versionselector.h" #include "versionselector.h"
#include "ui_undocheckout.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_CHECKIN_ALL[] = "ClearCase.CheckInAll";
static const char CMD_ID_STATUS[] = "ClearCase.Status"; static const char CMD_ID_STATUS[] = "ClearCase.Status";
StatusMap ClearCasePlugin::s_statusMap;
static const VcsBase::VcsBaseEditorParameters editorParameters[] = { static const VcsBase::VcsBaseEditorParameters editorParameters[] = {
{ {
VcsBase::RegularCommandOutput, VcsBase::RegularCommandOutput,
@@ -182,18 +181,20 @@ ClearCasePlugin::ClearCasePlugin() :
m_submitUndoAction(0), m_submitUndoAction(0),
m_submitRedoAction(0), m_submitRedoAction(0),
m_menuAction(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() ClearCasePlugin::~ClearCasePlugin()
{ {
cleanCheckInMessageFile(); cleanCheckInMessageFile();
// wait for sync thread to finish reading activities // wait for sync thread to finish reading activities
activityMutex->lock(); m_activityMutex->lock();
activityMutex->unlock(); m_activityMutex->unlock();
delete activityMutex; delete m_activityMutex;
} }
void ClearCasePlugin::cleanCheckInMessageFile() void ClearCasePlugin::cleanCheckInMessageFile()
@@ -539,7 +540,7 @@ QStringList ClearCasePlugin::ccGetActiveVobs() const
// file must be relative to topLevel, and using '/' path separator // file must be relative to topLevel, and using '/' path separator
FileStatus ClearCasePlugin::vcsStatus(const QString &file) const 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) QString ClearCasePlugin::ccGetFileActivity(const QString &workingDir, const QString &file)
@@ -569,7 +570,7 @@ ClearCaseSubmitEditor *ClearCasePlugin::openClearCaseSubmitEditor(const QString
void ClearCasePlugin::updateStatusActions() void ClearCasePlugin::updateStatusActions()
{ {
bool hasFile = currentState().hasFile(); 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_checkOutAction->setEnabled(hasFile && (fileStatus.status & (FileStatus::CheckedIn | FileStatus::Hijacked)));
m_undoCheckOutAction->setEnabled(hasFile && (fileStatus.status & FileStatus::CheckedOut)); m_undoCheckOutAction->setEnabled(hasFile && (fileStatus.status & FileStatus::CheckedOut));
m_undoHijackAction->setEnabled(hasFile && (fileStatus.status & FileStatus::Hijacked)); m_undoHijackAction->setEnabled(hasFile && (fileStatus.status & FileStatus::Hijacked));
@@ -618,9 +619,9 @@ void ClearCasePlugin::addCurrentFile()
vcsAdd(state.currentFileTopLevel(), state.relativeCurrentFile()); 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)) if (update && (currentState().relativeCurrentFile() == file))
updateStatusActions(); updateStatusActions();
} }
@@ -705,8 +706,13 @@ void ClearCasePlugin::undoHijackCurrent()
const QString fileName = state.relativeCurrentFile(); const QString fileName = state.relativeCurrentFile();
bool keep = false; bool keep = false;
bool askKeep = true;
if (m_settings.extDiffAvailable) {
QString diffres = diffExternal(ccGetFileVersion(state.topLevel(), fileName), fileName); QString diffres = diffExternal(ccGetFileVersion(state.topLevel(), fileName), fileName);
if (diffres.at(0) != QLatin1Char('F')) { // Files are identical if (diffres.at(0) == QLatin1Char('F')) // Files are identical
askKeep = false;
}
if (askKeep) {
Ui::UndoCheckOut unhijackUi; Ui::UndoCheckOut unhijackUi;
QDialog unhijackDlg; QDialog unhijackDlg;
unhijackUi.setupUi(&unhijackDlg); unhijackUi.setupUi(&unhijackDlg);
@@ -742,15 +748,20 @@ void ClearCasePlugin::ccDiffWithPred(const QStringList &files)
if ((m_settings.diffType == GraphicalDiff) && (files.count() == 1)) { if ((m_settings.diffType == GraphicalDiff) && (files.count() == 1)) {
QString file = files.first(); QString file = files.first();
if (s_statusMap[file].status == FileStatus::Hijacked) if (m_statusMap->value(file).status == FileStatus::Hijacked)
diffGraphical(ccGetFileVersion(topLevel, file), file); diffGraphical(ccGetFileVersion(topLevel, file), file);
else else
diffGraphical(file); diffGraphical(file);
return; // done here, diff is opened in a new window 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; QString result;
foreach (const QString &file, files) { 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); result += diffExternal(ccGetFileVersion(topLevel, file), file);
else else
result += diffExternal(file); result += diffExternal(file);
@@ -813,6 +824,11 @@ void ClearCasePlugin::diffActivity()
QTC_ASSERT(state.hasTopLevel(), return); QTC_ASSERT(state.hasTopLevel(), return);
if (ClearCase::Constants::debug) if (ClearCase::Constants::debug)
qDebug() << Q_FUNC_INFO; 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 topLevel = state.topLevel();
QString activity = QInputDialog::getText(0, tr("Enter Activity"), tr("Activity Name"), QLineEdit::Normal, m_activity); QString activity = QInputDialog::getText(0, tr("Enter Activity"), tr("Activity Name"), QLineEdit::Normal, m_activity);
if (activity.isEmpty()) if (activity.isEmpty())
@@ -885,8 +901,8 @@ void ClearCasePlugin::startCheckInAll()
QTC_ASSERT(state.hasTopLevel(), return); QTC_ASSERT(state.hasTopLevel(), return);
QString topLevel = state.topLevel(); QString topLevel = state.topLevel();
QStringList files; QStringList files;
for (StatusMap::ConstIterator iterator = s_statusMap.constBegin(); for (StatusMap::ConstIterator iterator = m_statusMap->constBegin();
iterator != s_statusMap.constEnd(); iterator != m_statusMap->constEnd();
++iterator) ++iterator)
{ {
if (iterator.value().status == FileStatus::CheckedOut) if (iterator.value().status == FileStatus::CheckedOut)
@@ -1025,8 +1041,8 @@ void ClearCasePlugin::viewStatus()
VcsBase::VcsBaseOutputWindow *outputwindow = VcsBase::VcsBaseOutputWindow::instance(); VcsBase::VcsBaseOutputWindow *outputwindow = VcsBase::VcsBaseOutputWindow::instance();
outputwindow->appendCommand(QLatin1String("Indexed files status (C=Checked Out, H=Hijacked, ?=Missing)")); outputwindow->appendCommand(QLatin1String("Indexed files status (C=Checked Out, H=Hijacked, ?=Missing)"));
bool anymod = false; bool anymod = false;
for (StatusMap::ConstIterator it = s_statusMap.constBegin(); for (StatusMap::ConstIterator it = m_statusMap->constBegin();
it != s_statusMap.constEnd(); it != m_statusMap->constEnd();
++it) ++it)
{ {
char cstat = 0; char cstat = 0;
@@ -1147,6 +1163,7 @@ void ClearCasePlugin::describe(const QString &source, const QString &changeNr)
const ClearCaseResponse response = const ClearCaseResponse response =
runCleartool(topLevel, args, m_settings.timeOutMS(), 0, codec); runCleartool(topLevel, args, m_settings.timeOutMS(), 0, codec);
description = response.stdOut; description = response.stdOut;
if (m_settings.extDiffAvailable)
description += diffExternal(id); description += diffExternal(id);
// Re-use an existing view if possible to support // Re-use an existing view if possible to support
@@ -1266,13 +1283,13 @@ bool ClearCasePlugin::vcsOpen(const QString &workingDir, const QString &fileName
const QString title = QString::fromLatin1("Checkout %1").arg(file); const QString title = QString::fromLatin1("Checkout %1").arg(file);
CheckOutDialog coDialog(title); CheckOutDialog coDialog(title);
if (!m_settings.disableIndexer && 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(); 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.")); QMessageBox::information(0, tr("ClearCase Checkout"), tr("File is already checked out."));
return true; return true;
} }
bool isHijacked = (s_statusMap[relFile].status & FileStatus::Hijacked); bool isHijacked = (m_statusMap->value(relFile).status & FileStatus::Hijacked);
if (!isHijacked) if (!isHijacked)
coDialog.hideHijack(); coDialog.hideHijack();
if (coDialog.exec() == QDialog::Accepted) { if (coDialog.exec() == QDialog::Accepted) {
@@ -1574,7 +1591,7 @@ QList<QStringPair> ClearCasePlugin::ccGetActivities() const
void ClearCasePlugin::refreshActivities() void ClearCasePlugin::refreshActivities()
{ {
QMutexLocker locker(activityMutex); QMutexLocker locker(m_activityMutex);
m_activity = ccGetCurrentActivity(); m_activity = ccGetCurrentActivity();
m_activities = ccGetActivities(); m_activities = ccGetActivities();
} }
@@ -1585,7 +1602,7 @@ QList<QStringPair> ClearCasePlugin::activities(int *current) const
QString curActivity; QString curActivity;
const VcsBase::VcsBasePluginState state = currentState(); const VcsBase::VcsBasePluginState state = currentState();
if (state.topLevel() == state.currentProjectTopLevel()) { if (state.topLevel() == state.currentProjectTopLevel()) {
QMutexLocker locker(activityMutex); QMutexLocker locker(m_activityMutex);
activitiesList = m_activities; activitiesList = m_activities;
curActivity = m_activity; curActivity = m_activity;
} else { } else {
@@ -1693,7 +1710,7 @@ void ClearCasePlugin::updateIndex()
if (!project) if (!project)
return; return;
m_checkInAllAction->setEnabled(false); m_checkInAllAction->setEnabled(false);
s_statusMap.clear(); m_statusMap->clear();
QFuture<void> result = QtConcurrent::run(&sync, currentState().topLevel(), QFuture<void> result = QtConcurrent::run(&sync, currentState().topLevel(),
project->files(ProjectExplorer::Project::ExcludeGeneratedFiles)); project->files(ProjectExplorer::Project::ExcludeGeneratedFiles));
if (!m_settings.disableIndexer) if (!m_settings.disableIndexer)
@@ -1847,112 +1864,14 @@ void ClearCasePlugin::closing()
void ClearCasePlugin::sync(QFutureInterface<void> &future, QString topLevel, QStringList files) void ClearCasePlugin::sync(QFutureInterface<void> &future, QString topLevel, QStringList files)
{ {
ClearCasePlugin *plugin = ClearCasePlugin::instance(); ClearCasePlugin *plugin = ClearCasePlugin::instance();
ClearCaseSync ccSync(plugin, plugin->m_statusMap);
ClearCaseSettings settings = plugin->settings(); connect(&ccSync, SIGNAL(updateStreamAndView()), plugin, SLOT(updateStreamAndView()));
QString program = settings.ccBinaryPath; connect(&ccSync, SIGNAL(setStatus(QString, ClearCase::Internal::FileStatus::Status, bool)),
if (program.isEmpty()) plugin, SLOT(setStatus(QString, ClearCase::Internal::FileStatus::Status, bool)));
return; ccSync.run(future, topLevel, files);
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();
} }
} // namespace ClearCase
} // namespace Internal } // namespace Internal
} // namespace ClearCase
Q_EXPORT_PLUGIN(ClearCase::Internal::ClearCasePlugin) Q_EXPORT_PLUGIN(ClearCase::Internal::ClearCasePlugin)

View File

@@ -39,6 +39,8 @@
#include <QFile> #include <QFile>
#include <QPair> #include <QPair>
#include <QStringList> #include <QStringList>
#include <QMetaType>
#include <QSharedPointer>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QAction; class QAction;
@@ -145,11 +147,14 @@ public:
const QString &fileName, const QString &file2 = QString()); const QString &fileName, const QString &file2 = QString());
FileStatus vcsStatus(const QString &file) const; FileStatus vcsStatus(const QString &file) const;
QString currentView() const { return m_view; } QString currentView() const { return m_view; }
void refreshActivities();
public slots: public slots:
void vcsAnnotate(const QString &workingDir, const QString &file, void vcsAnnotate(const QString &workingDir, const QString &file,
const QString &revision = QString(), int lineNumber = -1) const; const QString &revision = QString(), int lineNumber = -1) const;
bool newActivity(); bool newActivity();
void updateStreamAndView();
void setStatus(const QString &file, ClearCase::Internal::FileStatus::Status status, bool update = true);
private slots: private slots:
void checkOutCurrentFile(); void checkOutCurrentFile();
@@ -179,7 +184,6 @@ protected:
void updateActions(VcsBase::VcsBasePlugin::ActionState); void updateActions(VcsBase::VcsBasePlugin::ActionState);
bool submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *submitEditor); bool submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *submitEditor);
QString ccGet(const QString &workingDir, const QString &file, const QString &prefix = QString()); QString ccGet(const QString &workingDir, const QString &file, const QString &prefix = QString());
void refreshActivities();
QList<QStringPair> ccGetActivities() const; QList<QStringPair> ccGetActivities() const;
private: private:
@@ -204,7 +208,6 @@ private:
void cleanCheckInMessageFile(); void cleanCheckInMessageFile();
inline ClearCaseControl *clearCaseControl() const; inline ClearCaseControl *clearCaseControl() const;
QString ccGetFileActivity(const QString &workingDir, const QString &file); 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); QStringList ccGetActivityVersions(const QString &workingDir, const QString &activity);
void updateStatusActions(); void updateStatusActions();
void diffGraphical(const QString &file1, const QString &file2 = QString()); void diffGraphical(const QString &file1, const QString &file2 = QString());
@@ -214,11 +217,9 @@ private:
QString runExtDiff(const QString &workingDir, const QStringList &arguments, QString runExtDiff(const QString &workingDir, const QStringList &arguments,
int timeOut, QTextCodec *outputCodec = 0); int timeOut, QTextCodec *outputCodec = 0);
QString ccGetView(const QString &workingDir, bool *isDynamic = 0) const; QString ccGetView(const QString &workingDir, bool *isDynamic = 0) const;
void updateStreamAndView();
ClearCaseSettings m_settings; ClearCaseSettings m_settings;
static StatusMap s_statusMap;
QString m_checkInMessageFileName; QString m_checkInMessageFileName;
QString m_topLevel; QString m_topLevel;
QString m_stream; QString m_stream;
@@ -249,8 +250,9 @@ private:
QAction *m_submitRedoAction; QAction *m_submitRedoAction;
QAction *m_menuAction; QAction *m_menuAction;
bool m_submitActionTriggered; bool m_submitActionTriggered;
QMutex *activityMutex; QMutex *m_activityMutex;
QList<QStringPair> m_activities; QList<QStringPair> m_activities;
QSharedPointer<StatusMap> m_statusMap;
static ClearCasePlugin *m_clearcasePluginInstance; static ClearCasePlugin *m_clearcasePluginInstance;
}; };
@@ -258,4 +260,6 @@ private:
} // namespace Internal } // namespace Internal
} // namespace ClearCase } // namespace ClearCase
Q_DECLARE_METATYPE(ClearCase::Internal::FileStatus::Status)
#endif // CLEARCASEPLUGIN_H #endif // CLEARCASEPLUGIN_H

View File

@@ -98,6 +98,7 @@ void ClearCaseSettings::fromSettings(QSettings *settings)
promptToCheckIn = settings->value(QLatin1String(promptToCheckInKeyC), false).toBool(); promptToCheckIn = settings->value(QLatin1String(promptToCheckInKeyC), false).toBool();
disableIndexer = settings->value(QLatin1String(disableIndexerKeyC), false).toBool(); disableIndexer = settings->value(QLatin1String(disableIndexerKeyC), false).toBool();
indexOnlyVOBs = settings->value(QLatin1String(indexOnlyVOBsC), QString()).toString(); indexOnlyVOBs = settings->value(QLatin1String(indexOnlyVOBsC), QString()).toString();
extDiffAvailable = !Utils::Environment::systemEnvironment().searchInPath(QLatin1String("diff")).isEmpty();
settings->beginGroup(QLatin1String(totalFilesKeyC)); settings->beginGroup(QLatin1String(totalFilesKeyC));
foreach (const QString &view, settings->childKeys()) foreach (const QString &view, settings->childKeys())
totalFiles[view] = settings->value(view).toInt(); totalFiles[view] = settings->value(view).toInt();

View File

@@ -73,6 +73,7 @@ public:
bool promptToCheckIn; bool promptToCheckIn;
bool disableIndexer; bool disableIndexer;
QString indexOnlyVOBs; QString indexOnlyVOBs;
bool extDiffAvailable;
QHash<QString, int> totalFiles; QHash<QString, int> totalFiles;
}; };

View File

@@ -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

View File

@@ -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

View File

@@ -37,6 +37,7 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <utils/environment.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <QCoreApplication> #include <QCoreApplication>
@@ -71,6 +72,7 @@ ClearCaseSettings SettingsPageWidget::settings() const
rc.disableIndexer = m_ui.disableIndexerCheckBox->isChecked(); rc.disableIndexer = m_ui.disableIndexerCheckBox->isChecked();
rc.diffArgs = m_ui.diffArgsEdit->text(); rc.diffArgs = m_ui.diffArgsEdit->text();
rc.indexOnlyVOBs = m_ui.indexOnlyVOBsEdit->text(); rc.indexOnlyVOBs = m_ui.indexOnlyVOBsEdit->text();
rc.extDiffAvailable = m_ui.externalDiffRadioButton->isEnabled();
return rc; return rc;
} }
@@ -79,16 +81,23 @@ void SettingsPageWidget::setSettings(const ClearCaseSettings &s)
m_ui.commandPathChooser->setPath(s.ccCommand); m_ui.commandPathChooser->setPath(s.ccCommand);
m_ui.timeOutSpinBox->setValue(s.timeOutS); m_ui.timeOutSpinBox->setValue(s.timeOutS);
m_ui.autoCheckOutCheckBox->setChecked(s.autoCheckOut); m_ui.autoCheckOutCheckBox->setChecked(s.autoCheckOut);
switch (s.diffType) { bool extDiffAvailable = !Utils::Environment::systemEnvironment().searchInPath(QLatin1String("diff")).isEmpty();
case GraphicalDiff: if (extDiffAvailable) {
m_ui.graphicalDiffRadioButton->setChecked(true); m_ui.diffWarningLabel->setVisible(false);
m_ui.diffWidget->setEnabled(false); } else {
break; QString diffWarning = tr("In order to use External diff, 'diff' command needs to be accessible.");
case ExternalDiff: #ifdef Q_OS_WIN
m_ui.externalDiffRadioButton->setChecked(true); diffWarning.append(tr(" DiffUtils is available for free download "
m_ui.diffWidget->setEnabled(true); "<a href=\"http://gnuwin32.sourceforge.net/packages/diffutils.htm\">here</a>. "
break; "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.autoAssignActivityCheckBox->setChecked(s.autoAssignActivityName);
m_ui.historyCountSpinBox->setValue(s.historyCount); m_ui.historyCountSpinBox->setValue(s.historyCount);
m_ui.promptCheckBox->setChecked(s.promptToCheckIn); m_ui.promptCheckBox->setChecked(s.promptToCheckIn);

View File

@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>363</width> <width>363</width>
<height>384</height> <height>403</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@@ -39,11 +39,17 @@
<string>Diff</string> <string>Diff</string>
</property> </property>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QRadioButton" name="graphicalDiffRadioButton"> <widget class="QRadioButton" name="graphicalDiffRadioButton">
<property name="text"> <property name="text">
<string>&amp;Graphical (Single file only)</string> <string>&amp;Graphical (Single file only)</string>
</property> </property>
<property name="checked">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
@@ -55,6 +61,9 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QWidget" name="diffWidget" native="true"> <widget class="QWidget" name="diffWidget" native="true">
<property name="enabled">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
@@ -75,6 +84,53 @@
</layout> </layout>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
</item> </item>

View File

@@ -36,12 +36,12 @@
#include <projectexplorer/buildsteplist.h> #include <projectexplorer/buildsteplist.h>
#include <projectexplorer/gnumakeparser.h> #include <projectexplorer/gnumakeparser.h>
#include <projectexplorer/ioutputparser.h> #include <projectexplorer/ioutputparser.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qtsupport/baseqtversion.h> #include <qtsupport/baseqtversion.h>
#include <qtsupport/qtparser.h> #include <qtsupport/qtparser.h>
#include <qtsupport/qtprofileinformation.h> #include <qtsupport/qtkitinformation.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QInputDialog> #include <QInputDialog>
@@ -113,11 +113,11 @@ ProjectExplorer::IOutputParser *CMakeBuildConfiguration::createOutputParser() co
{ {
ProjectExplorer::IOutputParser *parserchain = new ProjectExplorer::GnuMakeParser; ProjectExplorer::IOutputParser *parserchain = new ProjectExplorer::GnuMakeParser;
int versionId = QtSupport::QtProfileInformation::qtVersionId(target()->profile()); int versionId = QtSupport::QtKitInformation::qtVersionId(target()->kit());
if (versionId >= 0) if (versionId >= 0)
parserchain->appendOutputParser(new QtSupport::QtParser); parserchain->appendOutputParser(new QtSupport::QtParser);
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile()); ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
if (tc) if (tc)
parserchain->appendOutputParser(tc->outputParser()); parserchain->appendOutputParser(tc->outputParser());
return parserchain; return parserchain;
@@ -126,7 +126,7 @@ ProjectExplorer::IOutputParser *CMakeBuildConfiguration::createOutputParser() co
Utils::Environment CMakeBuildConfiguration::baseEnvironment() const Utils::Environment CMakeBuildConfiguration::baseEnvironment() const
{ {
Utils::Environment env = BuildConfiguration::baseEnvironment(); Utils::Environment env = BuildConfiguration::baseEnvironment();
target()->profile()->addToEnvironment(env); target()->kit()->addToEnvironment(env);
return env; return env;
} }
@@ -248,7 +248,7 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::restore(ProjectExplorer
bool CMakeBuildConfigurationFactory::canHandle(const ProjectExplorer::Target *t) const bool CMakeBuildConfigurationFactory::canHandle(const ProjectExplorer::Target *t) const
{ {
if (!t->project()->supportsProfile(t->profile())) if (!t->project()->supportsKit(t->kit()))
return false; return false;
return qobject_cast<CMakeProject *>(t->project()); return qobject_cast<CMakeProject *>(t->project());
} }

View File

@@ -34,8 +34,8 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <utils/fancylineedit.h> #include <utils/fancylineedit.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/profilemanager.h> #include <projectexplorer/kitmanager.h>
#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchain.h>
#include <projectexplorer/abi.h> #include <projectexplorer/abi.h>
#include <texteditor/fontsettings.h> #include <texteditor/fontsettings.h>
@@ -405,13 +405,13 @@ void CMakeRunPage::initializePage()
m_generatorComboBox->clear(); m_generatorComboBox->clear();
bool hasCodeBlocksGenerator = m_cmakeWizard->cmakeManager()->hasCodeBlocksMsvcGenerator(); bool hasCodeBlocksGenerator = m_cmakeWizard->cmakeManager()->hasCodeBlocksMsvcGenerator();
QList<ProjectExplorer::Profile *> profileList = QList<ProjectExplorer::Kit *> kitList =
ProjectExplorer::ProfileManager::instance()->profiles(); ProjectExplorer::KitManager::instance()->kits();
foreach (ProjectExplorer::Profile *p, profileList) { foreach (ProjectExplorer::Kit *k, kitList) {
QVariant profileVariant = qVariantFromValue(static_cast<void *>(p)); QVariant kitVariant = qVariantFromValue(static_cast<void *>(k));
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p); ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
if (!tc) if (!tc)
continue; continue;
ProjectExplorer::Abi targetAbi = tc->targetAbi(); ProjectExplorer::Abi targetAbi = tc->targetAbi();
@@ -421,21 +421,21 @@ void CMakeRunPage::initializePage()
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor || targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor) { || targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor) {
if (hasCodeBlocksGenerator && (cachedGenerator.isEmpty() || cachedGenerator == "NMake Makefiles")) 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) { } else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
if (cachedGenerator.isEmpty() || cachedGenerator == "MinGW Makefiles") 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 #else
if (cachedGenerator.isEmpty() || cachedGenerator == "Unix Makefiles") 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 #endif
} }
} else { } else {
// Non windows // Non windows
if (cachedGenerator.isEmpty() || cachedGenerator == "Unix Makefiles") 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(); int index = m_generatorComboBox->currentIndex();
ProjectExplorer::Profile *p = 0; ProjectExplorer::Kit *p = 0;
if (index >= 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) { if (!p) {
m_output->appendPlainText(tr("No generator selected.")); m_output->appendPlainText(tr("No generator selected."));
return; return;
} }
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(p); ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(p);
m_runCMake->setEnabled(false); m_runCMake->setEnabled(false);
m_argumentsLineEdit->setEnabled(false); m_argumentsLineEdit->setEnabled(false);

View File

@@ -45,8 +45,8 @@
#include <projectexplorer/buildenvironmentwidget.h> #include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h> #include <projectexplorer/buildsteplist.h>
#include <projectexplorer/buildmanager.h> #include <projectexplorer/buildmanager.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/profilemanager.h> #include <projectexplorer/kitmanager.h>
#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchain.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <qtsupport/customexecutablerunconfiguration.h> #include <qtsupport/customexecutablerunconfiguration.h>
@@ -286,7 +286,7 @@ bool CMakeProject::parseCMakeLists()
createUiCodeModelSupport(); createUiCodeModelSupport();
ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(activeTarget()->profile()); ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
if (!tc) { if (!tc) {
emit buildTargetsChanged(); emit buildTargetsChanged();
emit fileListChanged(); emit fileListChanged();
@@ -530,9 +530,9 @@ bool CMakeProject::fromMap(const QVariantMap &map)
if (!Project::fromMap(map)) if (!Project::fromMap(map))
return false; return false;
Profile *defaultProfile = ProfileManager::instance()->defaultProfile(); Kit *defaultKit = KitManager::instance()->defaultKit();
if (!activeTarget() && defaultProfile) if (!activeTarget() && defaultKit)
addTarget(createTarget(defaultProfile)); addTarget(createTarget(defaultKit));
// We have a user file, but we could still be missing the cbp file // We have a user file, but we could still be missing the cbp file
// or simply run createXml with the saved settings // or simply run createXml with the saved settings

View File

@@ -496,7 +496,7 @@ QString CMakeRunConfigurationFactory::displayNameForId(const Core::Id id) const
bool CMakeRunConfigurationFactory::canHandle(ProjectExplorer::Target *parent) const bool CMakeRunConfigurationFactory::canHandle(ProjectExplorer::Target *parent) const
{ {
if (!parent->project()->supportsProfile(parent->profile())) if (!parent->project()->supportsKit(parent->kit()))
return false; return false;
return qobject_cast<CMakeProject *>(parent->project()); return qobject_cast<CMakeProject *>(parent->project());
} }

View File

@@ -37,7 +37,7 @@
#include <projectexplorer/buildsteplist.h> #include <projectexplorer/buildsteplist.h>
#include <projectexplorer/deployconfiguration.h> #include <projectexplorer/deployconfiguration.h>
#include <projectexplorer/gnumakeparser.h> #include <projectexplorer/gnumakeparser.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
@@ -137,7 +137,7 @@ bool MakeStep::init()
setIgnoreReturnValue(m_clean); setIgnoreReturnValue(m_clean);
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(target()->profile()); ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
ProcessParameters *pp = processParameters(); ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander()); pp->setMacroExpander(bc->macroExpander());
pp->setEnvironment(bc->environment()); pp->setEnvironment(bc->environment());
@@ -308,7 +308,7 @@ void MakeStepConfigWidget::updateDetails()
return; return;
} }
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(m_makeStep->target()->profile()); ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(m_makeStep->target()->kit());
if (tc) { if (tc) {
QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->buildTargets()); QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->buildTargets());
Utils::QtcProcess::addArgs(&arguments, m_makeStep->additionalArguments()); Utils::QtcProcess::addArgs(&arguments, m_makeStep->additionalArguments());
@@ -321,7 +321,7 @@ void MakeStepConfigWidget::updateDetails()
param.setArguments(arguments); param.setArguments(arguments);
m_summaryText = param.summary(displayName()); m_summaryText = param.summary(displayName());
} else { } else {
m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget() + QLatin1String("</b>"); m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
} }
emit updateSummary(); emit updateSummary();
} }

View File

@@ -102,7 +102,8 @@ SOURCES += mainwindow.cpp \
idocument.cpp \ idocument.cpp \
textdocument.cpp \ textdocument.cpp \
documentmanager.cpp \ documentmanager.cpp \
removefiledialog.cpp removefiledialog.cpp \
iversioncontrol.cpp
HEADERS += mainwindow.h \ HEADERS += mainwindow.h \
editmode.h \ editmode.h \

View File

@@ -152,6 +152,7 @@ QtcPlugin {
"versiondialog.cpp", "versiondialog.cpp",
"versiondialog.h", "versiondialog.h",
"id.cpp", "id.cpp",
"iversioncontrol.cpp",
"iversioncontrol.h", "iversioncontrol.h",
"variablechooser.cpp", "variablechooser.cpp",
"variablemanager.cpp", "variablemanager.cpp",

View File

@@ -825,15 +825,20 @@ DocumentManager::ReadOnlyAction
tr("The file <i>%1</i> is read only.").arg(QDir::toNativeSeparators(fileName)), tr("The file <i>%1</i> is read only.").arg(QDir::toNativeSeparators(fileName)),
QMessageBox::Cancel, parent); QMessageBox::Cancel, parent);
QString makeWritableText;
QPushButton *vcsButton = 0; QPushButton *vcsButton = 0;
if (promptVCS) if (promptVCS) {
vcsButton = msgBox.addButton(tr("Open with VCS (%1)").arg(versionControl->displayName()), QMessageBox::AcceptRole); 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; QPushButton *saveAsButton = 0;
if (displaySaveAsButton) if (displaySaveAsButton)
saveAsButton = msgBox.addButton(tr("Save As..."), QMessageBox::ActionRole); saveAsButton = msgBox.addButton(tr("&Save As..."), QMessageBox::ActionRole);
msgBox.setDefaultButton(vcsButton ? vcsButton : makeWritableButton); msgBox.setDefaultButton(vcsButton ? vcsButton : makeWritableButton);
msgBox.exec(); msgBox.exec();

View File

@@ -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();
}
}

View File

@@ -163,6 +163,16 @@ public:
*/ */
virtual bool vcsAnnotate(const QString &file, int line) = 0; 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: signals:
void repositoryChanged(const QString &repository); void repositoryChanged(const QString &repository);
void filesChanged(const QStringList &files); void filesChanged(const QStringList &files);

View File

@@ -38,8 +38,8 @@ HEADERS += \
debuggerstartparameters.h \ debuggerstartparameters.h \
debuggerstreamops.h \ debuggerstreamops.h \
debuggerstringutils.h \ debuggerstringutils.h \
debuggerprofileconfigwidget.h \ debuggerkitconfigwidget.h \
debuggerprofileinformation.h \ debuggerkitinformation.h \
disassembleragent.h \ disassembleragent.h \
disassemblerlines.h \ disassemblerlines.h \
loadcoredialog.h \ loadcoredialog.h \
@@ -92,8 +92,8 @@ SOURCES += \
debuggerplugin.cpp \ debuggerplugin.cpp \
debuggerrunner.cpp \ debuggerrunner.cpp \
debuggerstreamops.cpp \ debuggerstreamops.cpp \
debuggerprofileconfigwidget.cpp \ debuggerkitconfigwidget.cpp \
debuggerprofileinformation.cpp \ debuggerkitinformation.cpp \
disassembleragent.cpp \ disassembleragent.cpp \
disassemblerlines.cpp \ disassemblerlines.cpp \
loadcoredialog.cpp \ loadcoredialog.cpp \

View File

@@ -33,10 +33,10 @@ QtcPlugin {
files: [ files: [
"debugger.qrc", "debugger.qrc",
"debuggerprofileconfigwidget.cpp", "debuggerkitconfigwidget.cpp",
"debuggerprofileconfigwidget.h", "debuggerkitconfigwidget.h",
"debuggerprofileinformation.cpp", "debuggerkitinformation.cpp",
"debuggerprofileinformation.h", "debuggerkitinformation.h",
"basewindow.cpp", "basewindow.cpp",
"breakhandler.cpp", "breakhandler.cpp",
"breakhandler.h", "breakhandler.h",

View File

@@ -32,15 +32,15 @@
#include "debuggerstartparameters.h" #include "debuggerstartparameters.h"
#include "debuggerconstants.h" #include "debuggerconstants.h"
#include "debuggerprofileinformation.h" #include "debuggerkitinformation.h"
#include "debuggerstringutils.h" #include "debuggerstringutils.h"
#include "cdb/cdbengine.h" #include "cdb/cdbengine.h"
#include "shared/hostutils.h" #include "shared/hostutils.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/abi.h> #include <projectexplorer/abi.h>
#include <projectexplorer/profilechooser.h> #include <projectexplorer/kitchooser.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <utils/historycompleter.h> #include <utils/historycompleter.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -88,7 +88,7 @@ namespace Internal {
class StartApplicationDialogPrivate class StartApplicationDialogPrivate
{ {
public: public:
ProfileChooser *profileChooser; KitChooser *kitChooser;
PathChooser *localExecutablePathChooser; PathChooser *localExecutablePathChooser;
FancyLineEdit *arguments; FancyLineEdit *arguments;
PathChooser *workingDirectory; 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); }
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 localExecutable;
QString processArgs; QString processArgs;
QString workingDirectory; QString workingDirectory;
@@ -150,7 +150,7 @@ bool StartApplicationParameters::equals(const StartApplicationParameters &rhs) c
&& breakAtMain == rhs.breakAtMain && breakAtMain == rhs.breakAtMain
&& runInTerminal == rhs.runInTerminal && runInTerminal == rhs.runInTerminal
&& serverStartScript == rhs.serverStartScript && serverStartScript == rhs.serverStartScript
&& profileId == rhs.profileId && kitId == rhs.kitId
&& debugInfoLocation == rhs.debugInfoLocation; && debugInfoLocation == rhs.debugInfoLocation;
} }
@@ -167,15 +167,15 @@ QString StartApplicationParameters::displayName() const
name += QLatin1String("..."); name += QLatin1String("...");
} }
if (Profile *profile = ProfileManager::instance()->find(profileId)) if (Kit *kit = KitManager::instance()->find(kitId))
name += QString::fromLatin1(" (%1)").arg(profile->displayName()); name += QString::fromLatin1(" (%1)").arg(kit->displayName());
return name; return name;
} }
void StartApplicationParameters::toSettings(QSettings *settings) const void StartApplicationParameters::toSettings(QSettings *settings) const
{ {
settings->setValue(_("LastProfileId"), profileId.toString()); settings->setValue(_("LastProfileId"), kitId.toString());
settings->setValue(_("LastExternalExecutable"), localExecutable); settings->setValue(_("LastExternalExecutable"), localExecutable);
settings->setValue(_("LastExternalExecutableArguments"), processArgs); settings->setValue(_("LastExternalExecutableArguments"), processArgs);
settings->setValue(_("LastExternalWorkingDirectory"), workingDirectory); settings->setValue(_("LastExternalWorkingDirectory"), workingDirectory);
@@ -187,8 +187,8 @@ void StartApplicationParameters::toSettings(QSettings *settings) const
void StartApplicationParameters::fromSettings(const QSettings *settings) void StartApplicationParameters::fromSettings(const QSettings *settings)
{ {
const QString profileIdString = settings->value(_("LastProfileId")).toString(); const QString kitIdString = settings->value(_("LastProfileId")).toString();
profileId = profileIdString.isEmpty() ? Id() : Id(profileIdString); kitId = kitIdString.isEmpty() ? Id() : Id(kitIdString);
localExecutable = settings->value(_("LastExternalExecutable")).toString(); localExecutable = settings->value(_("LastExternalExecutable")).toString();
processArgs = settings->value(_("LastExternalExecutableArguments")).toString(); processArgs = settings->value(_("LastExternalExecutableArguments")).toString();
workingDirectory = settings->value(_("LastExternalWorkingDirectory")).toString(); workingDirectory = settings->value(_("LastExternalWorkingDirectory")).toString();
@@ -225,7 +225,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
d->runInTerminalCheckBox = new QCheckBox(this); 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 = new QCheckBox(this);
d->breakAtMainCheckBox->setText(QString()); d->breakAtMainCheckBox->setText(QString());
@@ -263,7 +263,7 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
QFormLayout *formLayout = new QFormLayout(); QFormLayout *formLayout = new QFormLayout();
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); 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("Local &executable:"), d->localExecutablePathChooser);
formLayout->addRow(tr("Command line &arguments:"), d->arguments); formLayout->addRow(tr("Command line &arguments:"), d->arguments);
formLayout->addRow(tr("&Working directory:"), d->workingDirectory); formLayout->addRow(tr("&Working directory:"), d->workingDirectory);
@@ -319,9 +319,9 @@ void StartApplicationDialog::historyIndexChanged(int index)
setParameters(v.value<StartApplicationParameters>()); setParameters(v.value<StartApplicationParameters>());
} }
Id StartApplicationDialog::profileId() const Id StartApplicationDialog::kitId() const
{ {
return d->profileChooser->currentProfileId(); return d->kitChooser->currentKitId();
} }
void StartApplicationDialog::updateState() void StartApplicationDialog::updateState()
@@ -373,9 +373,9 @@ bool StartApplicationDialog::run(QWidget *parent, QSettings *settings, DebuggerS
settings->endGroup(); settings->endGroup();
} }
Profile *profile = dialog.d->profileChooser->currentProfile(); Kit *kit = dialog.d->kitChooser->currentKit();
QTC_ASSERT(profile, return false); QTC_ASSERT(kit, return false);
fillParameters(sp, profile); fillParameters(sp, kit);
sp->executable = newParameters.localExecutable; sp->executable = newParameters.localExecutable;
sp->displayName = newParameters.displayName(); sp->displayName = newParameters.displayName();
@@ -387,7 +387,7 @@ bool StartApplicationDialog::run(QWidget *parent, QSettings *settings, DebuggerS
sp->serverStartScript = newParameters.serverStartScript; sp->serverStartScript = newParameters.serverStartScript;
sp->debugInfoLocation = newParameters.debugInfoLocation; sp->debugInfoLocation = newParameters.debugInfoLocation;
bool isLocal = DeviceProfileInformation::device(profile)->type() bool isLocal = DeviceKitInformation::device(kit)->type()
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE; == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
sp->startMode = isLocal ? StartExternal : StartRemoteProcess; sp->startMode = isLocal ? StartExternal : StartRemoteProcess;
return true; return true;
@@ -398,7 +398,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const
StartApplicationParameters result; StartApplicationParameters result;
result.localExecutable = d->localExecutablePathChooser->path(); result.localExecutable = d->localExecutablePathChooser->path();
result.serverStartScript = d->serverStartScriptPathChooser->path(); result.serverStartScript = d->serverStartScriptPathChooser->path();
result.profileId = d->profileChooser->currentProfileId(); result.kitId = d->kitChooser->currentKitId();
result.debugInfoLocation = d->debuginfoPathChooser->path(); result.debugInfoLocation = d->debuginfoPathChooser->path();
result.processArgs = d->arguments->text(); result.processArgs = d->arguments->text();
result.workingDirectory = d->workingDirectory->path(); result.workingDirectory = d->workingDirectory->path();
@@ -409,7 +409,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const
void StartApplicationDialog::setParameters(const StartApplicationParameters &p) void StartApplicationDialog::setParameters(const StartApplicationParameters &p)
{ {
d->profileChooser->setCurrentProfileId(p.profileId); d->kitChooser->setCurrentKitId(p.kitId);
d->localExecutablePathChooser->setPath(p.localExecutable); d->localExecutablePathChooser->setPath(p.localExecutable);
d->serverStartScriptPathChooser->setPath(p.serverStartScript); d->serverStartScriptPathChooser->setPath(p.serverStartScript);
d->debuginfoPathChooser->setPath(p.debugInfoLocation); d->debuginfoPathChooser->setPath(p.debugInfoLocation);
@@ -430,7 +430,7 @@ class AttachToQmlPortDialogPrivate
{ {
public: public:
QSpinBox *portSpinBox; QSpinBox *portSpinBox;
ProfileChooser *profileChooser; KitChooser *kitChooser;
}; };
AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent) AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
@@ -440,7 +440,7 @@ AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Debugger")); setWindowTitle(tr("Start Debugger"));
d->profileChooser = new ProfileChooser(this); d->kitChooser = new KitChooser(this);
d->portSpinBox = new QSpinBox(this); d->portSpinBox = new QSpinBox(this);
d->portSpinBox->setMaximum(65535); d->portSpinBox->setMaximum(65535);
@@ -451,7 +451,7 @@ AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
QFormLayout *formLayout = new QFormLayout(); QFormLayout *formLayout = new QFormLayout();
formLayout->addRow(tr("Target:"), d->profileChooser); formLayout->addRow(tr("Kit:"), d->kitChooser);
formLayout->addRow(tr("&Port:"), d->portSpinBox); formLayout->addRow(tr("&Port:"), d->portSpinBox);
QVBoxLayout *verticalLayout = new QVBoxLayout(this); QVBoxLayout *verticalLayout = new QVBoxLayout(this);
@@ -477,14 +477,14 @@ int AttachToQmlPortDialog::port() const
return d->portSpinBox->value(); 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 // --------- StartRemoteCdbDialog

View File

@@ -44,7 +44,7 @@ class QSettings;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Core { class Id; } namespace Core { class Id; }
namespace ProjectExplorer { class Profile; } namespace ProjectExplorer { class Kit; }
namespace Debugger { namespace Debugger {
class DebuggerStartParameters; class DebuggerStartParameters;
@@ -78,7 +78,7 @@ private:
void setParameters(const StartApplicationParameters &p); void setParameters(const StartApplicationParameters &p);
void setHistory(const QList<StartApplicationParameters> &l); void setHistory(const QList<StartApplicationParameters> &l);
void hideStartScript(); void hideStartScript();
Core::Id profileId() const; Core::Id kitId() const;
StartApplicationDialogPrivate *d; StartApplicationDialogPrivate *d;
}; };
@@ -94,8 +94,8 @@ public:
int port() const; int port() const;
void setPort(const int port); void setPort(const int port);
ProjectExplorer::Profile *profile() const; ProjectExplorer::Kit *kit() const;
void setProfileId(const Core::Id &id); void setKitId(const Core::Id &id);
private: private:
AttachToQmlPortDialogPrivate *d; AttachToQmlPortDialogPrivate *d;

View File

@@ -28,12 +28,12 @@
** **
**************************************************************************/ **************************************************************************/
#include "debuggerprofileconfigwidget.h" #include "debuggerkitconfigwidget.h"
#include "debuggerprofileinformation.h" #include "debuggerkitinformation.h"
#include <projectexplorer/abi.h> #include <projectexplorer/abi.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <utils/qtcassert.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 dgbToolsDownloadLink32C[] = "http://www.microsoft.com/whdc/devtools/debugging/installx86.Mspx";
static const char dgbToolsDownloadLink64C[] = "http://www.microsoft.com/whdc/devtools/debugging/install64bit.Mspx"; static const char dgbToolsDownloadLink64C[] = "http://www.microsoft.com/whdc/devtools/debugging/install64bit.Mspx";
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// DebuggerProfileConfigWidget: // DebuggerKitConfigWidget:
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
DebuggerProfileConfigWidget::DebuggerProfileConfigWidget(ProjectExplorer::Profile *p, DebuggerKitConfigWidget::DebuggerKitConfigWidget(ProjectExplorer::Kit *k,
const DebuggerProfileInformation *pi, const DebuggerKitInformation *ki,
QWidget *parent) : QWidget *parent) :
ProjectExplorer::ProfileConfigWidget(parent), ProjectExplorer::KitConfigWidget(parent),
m_profile(p), m_kit(k),
m_info(pi), m_info(ki),
m_chooser(new Utils::PathChooser) 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); QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0); 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 if (tc && tc->targetAbi().os() == ProjectExplorer::Abi::WindowsOS
&& tc->targetAbi().osFlavor() != ProjectExplorer::Abi::WindowsMSysFlavor) { && tc->targetAbi().osFlavor() != ProjectExplorer::Abi::WindowsMSysFlavor) {
QLabel *msvcDebuggerConfigLabel = new QLabel; QLabel *msvcDebuggerConfigLabel = new QLabel;
@@ -104,43 +104,42 @@ DebuggerProfileConfigWidget::DebuggerProfileConfigWidget(ProjectExplorer::Profil
connect(m_chooser, SIGNAL(changed(QString)), this, SIGNAL(dirty())); connect(m_chooser, SIGNAL(changed(QString)), this, SIGNAL(dirty()));
} }
QString DebuggerProfileConfigWidget::displayName() const QString DebuggerKitConfigWidget::displayName() const
{ {
return tr("Debugger:"); return tr("Debugger:");
} }
void DebuggerProfileConfigWidget::makeReadOnly() void DebuggerKitConfigWidget::makeReadOnly()
{ {
m_chooser->setEnabled(false); m_chooser->setEnabled(false);
} }
void DebuggerProfileConfigWidget::apply() void DebuggerKitConfigWidget::apply()
{ {
Utils::FileName fn = m_chooser->fileName(); 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); 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())); m_chooser->setFileName(Utils::FileName::fromString(v.toString()));
} }
} // namespace Internal } // namespace Internal
} // namespace Debugger } // namespace Debugger

View File

@@ -28,32 +28,32 @@
** **
**************************************************************************/ **************************************************************************/
#ifndef DEBUGGER_DEBUGGERPROFILECONFIGWIDGET_H #ifndef DEBUGGER_DEBUGGERKITCONFIGWIDGET_H
#define DEBUGGER_DEBUGGERPROFILECONFIGWIDGET_H #define DEBUGGER_DEBUGGERKITCONFIGWIDGET_H
#include <projectexplorer/profileconfigwidget.h> #include <projectexplorer/kitconfigwidget.h>
#include <QLabel> #include <QLabel>
#include <debuggerprofileinformation.h> #include <debuggerkitinformation.h>
namespace ProjectExplorer { class Profile; } namespace ProjectExplorer { class Kit; }
namespace Utils { class PathChooser; } namespace Utils { class PathChooser; }
namespace Debugger { namespace Debugger {
class DebuggerProfileInformation; class DebuggerKitInformation;
namespace Internal { namespace Internal {
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// DebuggerProfileConfigWidget: // DebuggerKitConfigWidget:
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
class DebuggerProfileConfigWidget : public ProjectExplorer::ProfileConfigWidget class DebuggerKitConfigWidget : public ProjectExplorer::KitConfigWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
DebuggerProfileConfigWidget(ProjectExplorer::Profile *p, DebuggerKitConfigWidget(ProjectExplorer::Kit *p,
const DebuggerProfileInformation *pi, const DebuggerKitInformation *ki,
QWidget *parent = 0); QWidget *parent = 0);
QString displayName() const; QString displayName() const;
@@ -69,12 +69,12 @@ private slots:
void autoDetectDebugger(); void autoDetectDebugger();
private: private:
ProjectExplorer::Profile *m_profile; ProjectExplorer::Kit *m_kit;
const DebuggerProfileInformation *m_info; const DebuggerKitInformation *m_info;
Utils::PathChooser *m_chooser; Utils::PathChooser *m_chooser;
}; };
} // namespace Internal } // namespace Internal
} // namespace Debugger } // namespace Debugger
#endif // DEBUGGER_DEBUGGERPROFILEINFORMATION_H #endif // DEBUGGER_DEBUGGERKITINFORMATION_H

View File

@@ -28,9 +28,9 @@
** **
**************************************************************************/ **************************************************************************/
#include "debuggerprofileinformation.h" #include "debuggerkitinformation.h"
#include "debuggerprofileconfigwidget.h" #include "debuggerkitconfigwidget.h"
#include <projectexplorer/abi.h> #include <projectexplorer/abi.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
@@ -115,30 +115,30 @@ static QPair<QString, QString> autoDetectCdbDebugger()
namespace Debugger { namespace Debugger {
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// DebuggerProfileInformation: // DebuggerKitInformation:
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
static const char DEBUGGER_INFORMATION[] = "Debugger.Information"; 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); static Core::Id id = Core::Id(DEBUGGER_INFORMATION);
return id; return id;
} }
unsigned int DebuggerProfileInformation::priority() const unsigned int DebuggerKitInformation::priority() const
{ {
return 28000; 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(); Abi abi = Abi::hostAbi();
if (tc) if (tc)
abi = tc->targetAbi(); abi = tc->targetAbi();
@@ -166,11 +166,11 @@ QVariant DebuggerProfileInformation::defaultValue(Profile *p) const
return env.searchInPath(debugger); 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); const Core::Id id(Constants::TASK_CATEGORY_BUILDSYSTEM);
QList<Task> result; QList<Task> result;
FileName dbg = debuggerCommand(p); FileName dbg = debuggerCommand(k);
if (dbg.isEmpty()) { if (dbg.isEmpty()) {
result << Task(Task::Warning, tr("No debugger set up."), FileName(), -1, id); result << Task(Task::Warning, tr("No debugger set up."), FileName(), -1, id);
return result; return result;
@@ -182,7 +182,7 @@ QList<Task> DebuggerProfileInformation::validate(Profile *p) const
else if (!fi.isExecutable()) else if (!fi.isExecutable())
result << Task(Task::Error, tr("Debugger not exectutable."), FileName(), -1, id); 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. // We need an absolute path to be able to locate Python on Windows.
const Abi abi = tc->targetAbi(); const Abi abi = tc->targetAbi();
if (abi.os() == Abi::WindowsOS && !fi.isAbsolute()) { if (abi.os() == Abi::WindowsOS && !fi.isAbsolute()) {
@@ -202,25 +202,25 @@ QList<Task> DebuggerProfileInformation::validate(Profile *p) const
return result; 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); QTC_ASSERT(k, return);
p->setValue(Core::Id(DEBUGGER_INFORMATION), command.toString()); k->setValue(Core::Id(DEBUGGER_INFORMATION), command.toString());
} }
} // namespace Debugger } // namespace Debugger

View File

@@ -28,38 +28,38 @@
** **
**************************************************************************/ **************************************************************************/
#ifndef DEBUGGER_DEBUGGERPROFILEINFORMATION_H #ifndef DEBUGGER_DEBUGGERKITINFORMATION_H
#define DEBUGGER_DEBUGGERPROFILEINFORMATION_H #define DEBUGGER_DEBUGGERKITINFORMATION_H
#include "debugger_global.h" #include "debugger_global.h"
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
namespace Debugger { namespace Debugger {
class DEBUGGER_EXPORT DebuggerProfileInformation : public ProjectExplorer::ProfileInformation class DEBUGGER_EXPORT DebuggerKitInformation : public ProjectExplorer::KitInformation
{ {
Q_OBJECT Q_OBJECT
public: public:
DebuggerProfileInformation(); DebuggerKitInformation();
Core::Id dataId() const; Core::Id dataId() const;
unsigned int priority() const; // the higher the closer to the top. 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 Utils::FileName debuggerCommand(const ProjectExplorer::Kit *k);
static void setDebuggerCommand(ProjectExplorer::Profile *p, const Utils::FileName &command); static void setDebuggerCommand(ProjectExplorer::Kit *k, const Utils::FileName &command);
}; };
} // namespace Debugger } // namespace Debugger
#endif // DEBUGGER_DEBUGGERPROFILEINFORMATION_H #endif // DEBUGGER_DEBUGGERKITINFORMATION_H

View File

@@ -41,7 +41,7 @@
#include "debuggerrunner.h" #include "debuggerrunner.h"
#include "debuggerruncontrolfactory.h" #include "debuggerruncontrolfactory.h"
#include "debuggerstringutils.h" #include "debuggerstringutils.h"
#include "debuggerprofileinformation.h" #include "debuggerkitinformation.h"
#include "memoryagent.h" #include "memoryagent.h"
#include "breakpoint.h" #include "breakpoint.h"
#include "breakhandler.h" #include "breakhandler.h"
@@ -101,9 +101,9 @@
#include <projectexplorer/projectexplorersettings.h> #include <projectexplorer/projectexplorersettings.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/session.h> #include <projectexplorer/session.h>
#include <projectexplorer/profilechooser.h> #include <projectexplorer/kitchooser.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/profilemanager.h> #include <projectexplorer/kitmanager.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchainmanager.h> #include <projectexplorer/toolchainmanager.h>
@@ -562,13 +562,13 @@ static inline QString executableForPid(qint64 pid)
return QString(); return QString();
} }
class AbiProfileMatcher : public ProfileMatcher class AbiKitMatcher : public KitMatcher
{ {
public: public:
explicit AbiProfileMatcher(const QList<Abi> &abis) : m_abis(abis) {} explicit AbiKitMatcher(const QList<Abi> &abis) : m_abis(abis) {}
bool matches(const Profile *p) const 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 m_abis.contains(tc->targetAbi());
return false; return false;
} }
@@ -577,13 +577,13 @@ private:
const QList<Abi> m_abis; const QList<Abi> m_abis;
}; };
class CompatibleAbiProfileMatcher : public ProfileMatcher class CompatibleAbiKitMatcher : public KitMatcher
{ {
public: public:
explicit CompatibleAbiProfileMatcher(const QList<Abi> &abis) : m_abis(abis) {} explicit CompatibleAbiKitMatcher(const QList<Abi> &abis) : m_abis(abis) {}
bool matches(const Profile *p) const 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) foreach (const Abi &a, m_abis)
if (a.isCompatibleWith(tc->targetAbi())) if (a.isCompatibleWith(tc->targetAbi()))
return true; return true;
@@ -594,14 +594,14 @@ private:
const QList<Abi> m_abis; const QList<Abi> m_abis;
}; };
class CdbMatcher : ProfileMatcher class CdbMatcher : KitMatcher
{ {
public: public:
CdbMatcher(char wordWidth = 0) : m_wordWidth(wordWidth) {} 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); QTC_ASSERT(tc, return false);
const Abi abi = tc->targetAbi(); const Abi abi = tc->targetAbi();
if (abi.architecture() != Abi::X86Architecture if (abi.architecture() != Abi::X86Architecture
@@ -616,58 +616,63 @@ public:
return true; 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. // On a 64bit OS, prefer a 64bit debugger.
static Profile *findUniversalCdbProfile() static Kit *findUniversalCdbKit()
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
if (Utils::winIs64BitSystem()) { if (Utils::winIs64BitSystem()) {
CdbMatcher matcher64(64); CdbMatcher matcher64(64);
if (Profile *cdb64Profile = ProfileManager::instance()->find(&matcher64)) if (Kit *cdb64Kit = KitManager::instance()->find(&matcher64))
return cdb64Profile; return cdb64Kit;
} }
#endif #endif
CdbMatcher matcher; CdbMatcher matcher;
return ProfileManager::instance()->find(&matcher); return KitManager::instance()->find(&matcher);
} }
private: private:
const char m_wordWidth; const char m_wordWidth;
}; };
void fillParameters(DebuggerStartParameters *sp, const Profile *profile /* = 0 */) void fillParameters(DebuggerStartParameters *sp, const Kit *kit /* = 0 */)
{ {
if (!profile) { if (!kit) {
// This code can only be reached when starting via the command // This code can only be reached when starting via the command line
// (-debug pid or executable) without specifying a profile. // (-debug pid or executable) or attaching from runconfiguration
// Try to find a profile via ABI. // 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() if (sp->executable.isEmpty()
&& (sp->startMode == AttachExternal || sp->startMode == AttachCrashedExternal)) { && (sp->startMode == AttachExternal || sp->startMode == AttachCrashedExternal)) {
sp->executable = executableForPid(sp->attachPID); sp->executable = executableForPid(sp->attachPID);
} }
if (!sp->executable.isEmpty()) { if (!sp->executable.isEmpty())
const QList<Abi> abis = Abi::abisOfBinary(Utils::FileName::fromString(sp->executable)); abis = Abi::abisOfBinary(Utils::FileName::fromString(sp->executable));
}
if (!abis.isEmpty()) { if (!abis.isEmpty()) {
AbiProfileMatcher matcher(abis); AbiKitMatcher matcher(abis);
profile = ProfileManager::instance()->find(&matcher); kit = KitManager::instance()->find(&matcher);
if (!profile) { if (!kit) {
CompatibleAbiProfileMatcher matcher(abis); CompatibleAbiKitMatcher matcher(abis);
profile = ProfileManager::instance()->find(&matcher); kit = KitManager::instance()->find(&matcher);
} }
} }
} if (!kit)
if (!profile) kit = KitManager::instance()->defaultKit();
profile = ProfileManager::instance()->defaultProfile();
} }
sp->sysRoot = SysRootProfileInformation::sysRoot(profile).toString(); sp->sysRoot = SysRootKitInformation::sysRoot(kit).toString();
sp->debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString(); sp->debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString();
ToolChain *tc = ToolChainProfileInformation::toolChain(profile); ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (tc) if (tc)
sp->toolChainAbi = tc->targetAbi(); sp->toolChainAbi = tc->targetAbi();
IDevice::ConstPtr device = DeviceProfileInformation::device(profile); IDevice::ConstPtr device = DeviceKitInformation::device(kit);
if (device) { if (device) {
sp->connParams = device->sshParameters(); sp->connParams = device->sshParameters();
sp->remoteChannel = sp->connParams.host + QLatin1Char(':') + QString::number(sp->connParams.port); 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; const QString &option = *it;
// '-debug <pid>' // '-debug <pid>'
// '-debug <exe>[,server=<server:port>][,core=<core>][,profile=<profile>]' // '-debug <exe>[,server=<server:port>][,core=<core>][,kit=<kit>]'
if (*it == _("-debug")) { if (*it == _("-debug")) {
++it; ++it;
if (it == cend) { if (it == cend) {
*errorMessage = msgParameterMissing(*it); *errorMessage = msgParameterMissing(*it);
return false; return false;
} }
Profile *profile = 0; Kit *kit = 0;
DebuggerStartParameters sp; DebuggerStartParameters sp;
qulonglong pid = it->toULongLong(); qulonglong pid = it->toULongLong();
if (pid) { if (pid) {
@@ -1429,12 +1434,12 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
sp.displayName = tr("Core file \"%1\"").arg(sp.coreFile); sp.displayName = tr("Core file \"%1\"").arg(sp.coreFile);
sp.startMessage = tr("Attaching to core file %1.").arg(sp.coreFile); sp.startMessage = tr("Attaching to core file %1.").arg(sp.coreFile);
} }
else if (key == QLatin1String("profile")) { else if (key == QLatin1String("kit")) {
profile = ProfileManager::instance()->find(Id(val)); kit = KitManager::instance()->find(Id(val));
} }
} }
} }
fillParameters(&sp, profile); fillParameters(&sp, kit);
if (sp.startMode == StartExternal) { if (sp.startMode == StartExternal) {
sp.displayName = tr("Executable file \"%1\"").arg(sp.executable); sp.displayName = tr("Executable file \"%1\"").arg(sp.executable);
sp.startMessage = tr("Debugging 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; return false;
} }
DebuggerStartParameters sp; DebuggerStartParameters sp;
fillParameters(&sp, CdbMatcher::findUniversalCdbProfile()); fillParameters(&sp, CdbMatcher::findUniversalCdbKit());
sp.startMode = AttachCrashedExternal; sp.startMode = AttachCrashedExternal;
sp.crashParameter = it->section(QLatin1Char(':'), 0, 0); sp.crashParameter = it->section(QLatin1Char(':'), 0, 0);
sp.attachPID = it->section(QLatin1Char(':'), 1, 1).toULongLong(); sp.attachPID = it->section(QLatin1Char(':'), 1, 1).toULongLong();
@@ -1575,7 +1580,7 @@ void DebuggerPluginPrivate::attachCore()
{ {
AttachCoreDialog dlg(mainWindow()); AttachCoreDialog dlg(mainWindow());
dlg.setProfileId(Id(configValue(_("LastExternalProfile")).toString())); dlg.setKitId(Id(configValue(_("LastExternalProfile")).toString()));
dlg.setLocalExecutableFile(configValue(_("LastExternalExecutableFile")).toString()); dlg.setLocalExecutableFile(configValue(_("LastExternalExecutableFile")).toString());
dlg.setLocalCoreFile(configValue(_("LastLocalCoreFile")).toString()); dlg.setLocalCoreFile(configValue(_("LastLocalCoreFile")).toString());
dlg.setRemoteCoreFile(configValue(_("LastRemoteCoreFile")).toString()); dlg.setRemoteCoreFile(configValue(_("LastRemoteCoreFile")).toString());
@@ -1587,12 +1592,12 @@ void DebuggerPluginPrivate::attachCore()
setConfigValue(_("LastExternalExecutableFile"), dlg.localExecutableFile()); setConfigValue(_("LastExternalExecutableFile"), dlg.localExecutableFile());
setConfigValue(_("LastLocalCoreFile"), dlg.localCoreFile()); setConfigValue(_("LastLocalCoreFile"), dlg.localCoreFile());
setConfigValue(_("LastRemoteCoreFile"), dlg.remoteCoreFile()); setConfigValue(_("LastRemoteCoreFile"), dlg.remoteCoreFile());
setConfigValue(_("LastExternalProfile"), dlg.profile()->id().toString()); setConfigValue(_("LastExternalProfile"), dlg.kit()->id().toString());
setConfigValue(_("LastExternalStartScript"), dlg.overrideStartScript()); setConfigValue(_("LastExternalStartScript"), dlg.overrideStartScript());
DebuggerStartParameters sp; DebuggerStartParameters sp;
QString display = dlg.isLocal() ? dlg.localCoreFile() : dlg.remoteCoreFile(); QString display = dlg.isLocal() ? dlg.localCoreFile() : dlg.remoteCoreFile();
fillParameters(&sp, dlg.profile()); fillParameters(&sp, dlg.kit());
sp.masterEngineType = GdbEngineType; sp.masterEngineType = GdbEngineType;
sp.executable = dlg.localExecutableFile(); sp.executable = dlg.localExecutableFile();
sp.coreFile = dlg.localCoreFile(); sp.coreFile = dlg.localCoreFile();
@@ -1607,9 +1612,9 @@ void DebuggerPluginPrivate::startRemoteCdbSession()
{ {
const QString connectionKey = _("CdbRemoteConnection"); const QString connectionKey = _("CdbRemoteConnection");
DebuggerStartParameters sp; DebuggerStartParameters sp;
Profile *profile = CdbMatcher::findUniversalCdbProfile(); Kit *kit = CdbMatcher::findUniversalCdbKit();
QTC_ASSERT(profile, return); QTC_ASSERT(kit, return);
fillParameters(&sp, profile); fillParameters(&sp, kit);
sp.startMode = AttachToRemoteServer; sp.startMode = AttachToRemoteServer;
sp.closeMode = KillAtClose; sp.closeMode = KillAtClose;
StartRemoteCdbDialog dlg(mainWindow()); StartRemoteCdbDialog dlg(mainWindow());
@@ -1656,10 +1661,10 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
} }
dlg->setAttribute(Qt::WA_DeleteOnClose); dlg->setAttribute(Qt::WA_DeleteOnClose);
ProfileChooser *profileChooser = dlg->profileChooser(); KitChooser *kitChooser = dlg->kitChooser();
Profile *profile = profileChooser->currentProfile(); Kit *kit = kitChooser->currentKit();
QTC_ASSERT(profile, return); QTC_ASSERT(kit, return);
IDevice::ConstPtr device = DeviceProfileInformation::device(profile); IDevice::ConstPtr device = DeviceKitInformation::device(kit);
QTC_ASSERT(device, return); QTC_ASSERT(device, return);
DeviceProcess process = dlg->currentProcess(); DeviceProcess process = dlg->currentProcess();
if (process.pid == 0) { if (process.pid == 0) {
@@ -1679,7 +1684,7 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
if (device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { if (device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
DebuggerStartParameters sp; DebuggerStartParameters sp;
fillParameters(&sp, profile); fillParameters(&sp, kit);
sp.attachPID = process.pid; sp.attachPID = process.pid;
sp.displayName = tr("Process %1").arg(process.pid); sp.displayName = tr("Process %1").arg(process.pid);
sp.executable = process.exe; sp.executable = process.exe;
@@ -1695,12 +1700,16 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
void DebuggerPluginPrivate::attachExternalApplication(ProjectExplorer::RunControl *rc) void DebuggerPluginPrivate::attachExternalApplication(ProjectExplorer::RunControl *rc)
{ {
DebuggerStartParameters sp; DebuggerStartParameters sp;
fillParameters(&sp);
sp.attachPID = rc->applicationProcessHandle().pid(); sp.attachPID = rc->applicationProcessHandle().pid();
sp.displayName = tr("Process %1").arg(sp.attachPID); sp.displayName = tr("Process %1").arg(sp.attachPID);
sp.startMode = AttachExternal; sp.startMode = AttachExternal;
sp.closeMode = DetachAtClose; sp.closeMode = DetachAtClose;
sp.toolChainAbi = rc->abi(); 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); DebuggerRunControlFactory::createAndScheduleRun(sp);
} }
@@ -1715,19 +1724,19 @@ void DebuggerPluginPrivate::attachToQmlPort()
else else
dlg.setPort(sp.qmlServerPort); dlg.setPort(sp.qmlServerPort);
const QVariant profileId = configValue(_("LastProfile")); const QVariant kitId = configValue(_("LastProfile"));
if (profileId.isValid()) if (kitId.isValid())
dlg.setProfileId(Id(profileId.toString())); dlg.setKitId(Id(kitId.toString()));
if (dlg.exec() != QDialog::Accepted) if (dlg.exec() != QDialog::Accepted)
return; return;
Profile *profile = dlg.profile(); Kit *kit = dlg.kit();
QTC_ASSERT(profile, return); QTC_ASSERT(kit, return);
setConfigValue(_("LastQmlServerPort"), dlg.port()); 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.qmlServerAddress = sp.connParams.host;
sp.qmlServerPort = dlg.port(); sp.qmlServerPort = dlg.port();
sp.startMode = AttachToRemoteProcess; 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_GENERAL);
mstart->addSeparator(globalcontext, Constants::G_SPECIAL); mstart->addSeparator(globalcontext, Constants::G_SPECIAL);
ProfileManager::instance()->registerProfileInformation(new DebuggerProfileInformation); KitManager::instance()->registerKitInformation(new DebuggerKitInformation);
return theDebuggerCore->initialize(arguments, errorMessage); return theDebuggerCore->initialize(arguments, errorMessage);
} }
@@ -3455,12 +3464,12 @@ static Target *activeTarget()
return project->activeTarget(); return project->activeTarget();
} }
static Profile *currentProfile() static Kit *currentKit()
{ {
Target *t = activeTarget(); Target *t = activeTarget();
if (!t || !t->isEnabled()) if (!t || !t->isEnabled())
return 0; return 0;
return activeTarget()->profile(); return activeTarget()->kit();
} }
static LocalApplicationRunConfiguration *activeLocalRunConfiguration() static LocalApplicationRunConfiguration *activeLocalRunConfiguration()
@@ -3508,7 +3517,7 @@ void DebuggerPluginPrivate::testPythonDumpers1()
void DebuggerPluginPrivate::testPythonDumpers2() void DebuggerPluginPrivate::testPythonDumpers2()
{ {
DebuggerStartParameters sp; DebuggerStartParameters sp;
fillParameters(&sp, currentProfile()); fillParameters(&sp, currentKit());
sp.executable = activeLocalRunConfiguration()->executable(); sp.executable = activeLocalRunConfiguration()->executable();
testRunProject(sp, TestCallBack(this, "testPythonDumpers3")); testRunProject(sp, TestCallBack(this, "testPythonDumpers3"));
} }
@@ -3540,7 +3549,7 @@ void DebuggerPluginPrivate::testStateMachine1()
void DebuggerPluginPrivate::testStateMachine2() void DebuggerPluginPrivate::testStateMachine2()
{ {
DebuggerStartParameters sp; DebuggerStartParameters sp;
fillParameters(&sp, currentProfile()); fillParameters(&sp, currentKit());
sp.executable = activeLocalRunConfiguration()->executable(); sp.executable = activeLocalRunConfiguration()->executable();
sp.testCase = TestNoBoundsOfCurrentFunction; sp.testCase = TestNoBoundsOfCurrentFunction;
testRunProject(sp, TestCallBack(this, "testStateMachine3")); testRunProject(sp, TestCallBack(this, "testStateMachine3"));

Some files were not shown because too many files have changed in this diff Show More