// 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.
// **********************************************************************

/*!
    \page creator-cli.html
    \previouspage creator-reference.html

    \ingroup creator-reference

    \title Command-Line Options

    \brief Options for starting \QC from the command line.

    To specify command-line options, enter the following command in the
    directory that contains the \QC executable or specify the path to
    \QC as a part of the command:

    \badcode
    qtcreator [option] [filename[:line_number[:column_number]]]
    \endcode

    The following table summarizes the available options:

    \table
        \header
            \li Option
            \li Description

        \row
            \li \c -help
            \li Display help on command-line options.

        \row
            \li \c -version
            \li Display \QC version.

        \row
            \li \c -client
            \li Attempt to connect to an already running instance of \QC.

       \row
            \li \c -pid
            \li Attempt to connect to an already running instance of \QC with
                the specified process ID.

        \row
            \li \c -block
            \li Open files in editors in a running \QC instance and block the
                command line until the first editor is closed.

       \row
            \li \c -no-crashcheck
            \li Disable the startup check for a previously crashed \QC instance.

       \row
            \li \c -load \e <plugin-id>
            \li Enable the specified plugin and all plugins that it depends on.
                You can combine \c -load and \c -noload options and specify both
                options multiple times to enable and disable several plugins.
                The actions are executed in the specified order.

       \row
            \li \c {-load all}
            \li Enable all plugins.

        \row
            \li \c -noload \e <plugin-id>
            \li Disable the specified plugin and all plugins that depend on it.

        \row
            \li \c {-noload all}
            \li Disable all plugins.

        \row
            \li \c -profile
            \li Output profiling data about plugin startup and shutdown.

       \row
            \li \c -pluginpath \e <path>
            \li Add a path where \QC looks for plugins. To specify several
                paths, add the \c{-pluginpath} option for each path.

        \row
            \li \c -settingspath \e <path>
            \li Override the default path where user settings are stored.

        \row
            \li \c -installsettingspath \e <path>
            \li Override the default path from where user-independent settings are read
                (for example, those written by the installer).

        \row
            \li \c -temporarycleansettings, \c -tcs
            \li Use clean settings for debug or testing reasons. The settings
                will be deleted when \QC exits.

        \row
            \li \c -language \e <locale>
            \li Set the UI language.

                Use a lowercase, two-letter
                \l {https://www.iso.org/iso-639-language-codes.html}
                {ISO 639 language code}, such as \e de, \e en, or \e fr.

       \row
            \li \c {-test} \e{<plugin>}\c{[,testfunction[:testdata]] ...}
            \li For \QC plugin developers: run the plugin's tests using a
                separate settings path by default.

       \row
            \li \c {-test all}
            \li For \QC plugin developers: run tests from all plugins.

       \row
            \li \c -notest \e <plugin>
            \li For \QC plugin developers: exclude all of the plugin's
                tests from the test run.

       \row
            \li \c -scenario \e <scenarioname>
            \li For \QC plugin developers: run the specified scenario.

        \row
            \li \c -color \e <color>
            \li Core plugin: override the selected UI color.

       \row
            \li \c -presentationMode
            \li Core plugin: display keyboard shortcuts as popups when you
                select them. Mostly useful when presenting \QC to someone else.

        \row
            \li \c {-theme <default | dark>}
            \li Core plugin: apply a dark color theme to \QC, without using
                stylesheets.

        \row
            \li \c -notour
            \li Welcome plugin: skip the UI tour on startup.

        \row
            \li \c -debug \e <pid>
            \li Debugger plugin: attach to the process with the given process
                ID.

        \row
            \li \c {-debug} \e{<executable>}[,\c{kit}=\e{<kit>}]
            \li Debugger plugin: launch and debug the executable with the name
                \c{executable}.
                A \c{kit} can be specified by ID or name to point to non-default
                debuggers and sysroots.

        \row
            \li \c{-debug} [\c{executable},]\c{core}=\e{<corefile>}[,\c{kit}=\e{<kit>}]
            \li Debugger plugin: load the core file named \c{corefile}.
                The parameter \c{executable} specifies the executable that
                produced the core file.
                If this parameter is omitted, \QC will attempt to reconstruct
                it from the core file itself. This will fail for paths with more
                than about 80 characters.
                In such cases the \c{executable} parameter is mandatory.
                A \c{kit} can be specified by ID or name to point to non-default
                debuggers and sysroots.

        \row
            \li \c{-debug} \e{<executable>},\c{server}=\e{<server:port>}[,\c{kit}=\e{<kit>}]
            \li Debugger plugin: attach to a debug server running on the port
                \c{port} on the server \c{server}. The parameter \c{executable}
                specifies a local copy of the executable the remote debug server
                is manipulating.
                A \c{kit} can be specified by ID or name to point to non-default
                debuggers and sysroots.

        \row
            \li \c -wincrashevent \e <event-handle:pid>
            \li Debugger plugin: attach to crashed processes by using the
                specified event handle and process ID.

        \row
            \li \c -git-show \e {<git commit hash>}
            \li Git plugin: show the specified commit hash.

        \row
            \li \c -customwizard-verbose
            \li ProjectExplorer plugin: display additional information when
                loading custom wizards. For more information about custom
                wizards, see \l{Custom Wizards}

        \row
            \li \c -ensure-kit-for-binary \e {<path to binary>}
            \li ProjectExplorer plugin: create a kit with a toolchain
                corresponding to the given binary's architecture.

        \row
            \li \c -lastsession
            \li ProjectExplorer plugin: load the last session when \QC starts.
                Open the projects and files that were open when you last exited
                \QC.

        \row
            \li \e <session>
            \li ProjectExplorer plugin: load the given session when \QC starts.
                Open the projects and files that were open when you last exited
                \QC.

    \endtable

    \section1 Using Custom Styles

    \QC is a \l{QApplication}{Qt application}, and therefore, it accepts the
    command-line options that all Qt applications accept. For example, you can
    use the \c {-style} and \c {-stylesheet} options to apply custom styles and
    \l{Qt Style Sheets}{stylesheets}. The styling is only applied during the
    current session.

    Exercise caution when applying styles, as overriding the existing styling
    may make some items difficult to see. Also, setting a stylesheet may affect
    the \l{Font & Colors}{text editor color scheme} and the
    styling of the integrated \QD.

    You can also switch to a dark theme to customize the appearance of widgets,
    colors, and icons without using stylesheets.

    \sa {Run \QC from the command line}, {Manage sessions}
*/
