// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

/*!
    \previouspage creator-version-control.html
    \page creator-configuring-projects.html
    \nextpage creator-project-managing-sessions.html

    \title Configuring Projects

    When you install Qt for a development or target platform, such as Linux,
    \macos, Windows, Android or QNX, \l{https://www.qt.io/download-qt-installer}
    {\QOI} creates \l{Kits}{kits} for the development targets.

    Select the kits to use for a project in the \uicontrol {Configure Projects}
    view when you open the project for the first time. At least one kit must be
    active.

    To maintain the list of active kits for a currently open project, switch to
    the \uicontrol Projects mode by selecting \key Ctrl+5.

    \image {qtcreator-projects-kits.webp} {Sidebar in the Projects mode}

    To specify build, deploy, or run settings for a kit, select the kit and go to
    \uicontrol {Build Settings}, \uicontrol {Deploy Settings}, or
    \uicontrol {Run Settings}.

    \section1 Specifying Build Settings

    \image {qtcreator-settings-build.webp} {Build Settings in the Projects mode}

    Different build configurations allow you to quickly switch between different
    build settings. \QC creates the the build configurations you select when you
    create or open projects.

    \image {qtcreator-configure-project.webp} {Selecting build configurations when opening projects}

    The available configurations depend on the build system used and usually
    include at least the following:

    \list
        \li Debug
        \li Release
        \li Profile
    \endlist

    A \e Debug build has debug symbols that you need for debugging the application
    but that you should leave out from the release version. Generally, you use the
    debug configuration for testing and the \e Release configuration for creating
    the final installation binary package.

    A \e Profile build is an optimized release build with debug information.
    It is best suited for analyzing applications.

    If you selected CMake as the build system for the project, a
    \e {Release with Debug Information} build configuration is also available.
    It is similar to a \e profile configuration, but with
    \l{Debugging Qt Quick projects}{QML debugging and profiling} explicitly turned off.
    You can also use a \e {Minimum Size Release} build configuration to create the
    final installation binary package. It is a release build that makes the size
    of the binary package as small as possible, even if this makes the
    application slower.

    \section1 Specifying Deploy Settings

    Deploy configurations handle the packaging and copying of the necessary files
    to a location you want to run the executable at, such as the file system of a
    device.

    The deploy settings to specify depend on the type of the project and on the
    \l{Kits}{Run device} that you select for the kit.

    \QC automatically creates deploy configurations for each build configuration.
    You can specify deploy steps, such as copying files to devices, separately
    for each build configuration, such as \e {Debug} or \e {Release}.

    \image {qtcreator-settings-deploy.webp} {Deploy Settings in the Projects mode}

    \section1 Specifying Run Settings

    The run settings to specify depend on the type of the project and on the
    \l{Kits}{Run device} that you select for the kit.

    \QC automatically creates run configurations for each build configuration.
    You can specify run settings, such as command line arguments or environments,
    separately for each build configuration, such as \e {Debug} or \e {Release}.

    \image {qtcreator-settings-run-desktop.webp} {Run Settings in the Projects mode}

    To prevent \QC from automatically creating run configurations, go to
    \preferences > \uicontrol {Build & Run} > \uicontrol General, and then clear
    \uicontrol {Create suitable run configurations automatically}.

    To automatically synchronize the run configurations, go to \preferences >
    \uicontrol {Build & Run} > \uicontrol General, and select an option in
    \uicontrol {Keep run configurations in sync}.

    \section1 Overriding Global Preferences

    In \uicontrol {Project Settings}, you can override global preferences for
    the project:

            \list
                \li \l{Specify build and run settings}{Building and Running}
                \li \l{Specify Clang tools settings}{Clang Tools}
                \li \l{Specify clangd settings}{Clangd}
                \li \l{Override CMake settings for a project}{CMake}
                \li \l{Specify code style}{Code Style}
                \li \l{Turn suggestions on or off for a project}{Copilot}
                \li \l{Configure C++ code model}{C++ Code Model}
                \li \l{Set C++ file naming preferences}{C++ File Naming}
                \li \l{Specify dependencies}{Dependencies}
                \li \l{Document code}{Documentation Comments}
                \li \l{Specify editor settings}{Editor}
                \li \l{Link projects with GitLab}{GitLab}
                \li \l{Configure language servers for projects}{Language Server}
                \li \l{Specify the environment for projects}{Project Environment}
                \li \l{Specify settings for quick fixes}{Quick Fixes}
                \li \l{Apply filters before scanning for tests}{Testing}
                \li \l{Exclude files from to-do lists}{To-Do} (experimental)
            \endlist

    If you have multiple projects open in \QC, select the project to configure
    in \uicontrol {Active Project}.

    \sa {Activate kits for a project}, {Configure projects for building},
    {Configure projects for running}, {Open projects},
    {Activate custom output parsers}, {Get and Install Qt}
*/

/*!
    \page creator-how-to-activate-kits.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-projects-configure
    \ingroup creator-how-to-manage-kits

    \title Activate kits for a project

    The \uicontrol {Build & Run} section of the \uicontrol Projects mode sidebar
    lists the kits that are compatible with your project. To activate one or more
    kits, select them.

    \image {qtcreator-projects-kits.webp} {List of kits in the Projects mode sidebar}

    The list displays kits from \preferences >
    \uicontrol Kits. Warning and error icons indicate that the kit configuration
    is not suitable for the project type. To view the warning and error messages,
    move the mouse pointer over the kit name.

    To hide inactive kits from the list, select \uicontrol {Hide Inactive Kits}.
    To show them again, select \uicontrol {Show All Kits}.

    \section1 Manage kits

    To modify kit configuration or to \l{Add kits}{add kits} to the list or to
    remove them from it, select \uicontrol {Manage Kits}.

    Each kit consists of a set of values that define one environment, such as a
    \l{glossary-device}{device}, \l{Add compilers}{compiler},
    \l{Add debuggers}{Debugging}, and \l{Add Qt versions}{Qt version}, as well
    as steps for building, deploying, and running applications.

    To copy the build, deploy, and run steps from another kit, go to
    \uicontrol Projects > \uicontrol {Build & Run}, right-click a kit, and select
    \uicontrol {Copy Steps from Another Kit} in the context menu.

    To deactivate a kit, select \uicontrol {Disable Kit for Project} in the
    context menu.

    \note Deactivating a kit removes all custom build and run settings for the
    kit.

    To import an existing build for the project, select
    \uicontrol {Import Existing Build}.

    \section1 Copy custom settings from vanished targets

    \QC creates a list of \uicontrol {Vanished Targets} to save project-specific
    settings, such as custom build flags or run configuration arguments, that
    would disappear if \QOI removes the corresponding kits when you update your
    Qt installation.

    \image {qtcreator-projects-vanished-targets.webp} {Vanished Targets in Projects}

    Go to one of the following options in the context menu to restore the
    project's settings:

    \list
        \li \uicontrol {Create a New Kit} creates a new kit with the same name
            for the same device type, with the original build, deploy, and run
            steps. Other kit settings are not restored.
        \li \uicontrol {Copy Steps to Another Kit} copies the build, deploy, and
            run steps to another kit.
    \endlist

    To remove vanished targets, go to \uicontrol {Remove Vanished Target} or
    \uicontrol {Remove All Vanished Targets} in the context menu.

    \note Since version 13.0, \QC does not create \e {replacement kits}, but you
    might still see them listed for existing projects. You can copy the build,
    deploy, and run steps from them to other kits.

    \sa {Manage Kits}{How To: Manage Kits}, {Configuring Projects}, {Kits}
*/
