diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index 34ea75fc528..adf3cb8b542 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -1992,7 +1992,7 @@ the right hand side to find out what went wrong. Always attach the contents of the pane to debugger-related questions to the \QC mailing list (qt-creator@qt-project.org) or paste them to a - \l{Pasting and Fetching Code Snippets}{code pasting service} before + \l{Paste and fetch code snippets}{code pasting service} before asking questions in the IRC (on the #qt-creator channel at Libera.Chat). \note Error 135 usually means that a dependent DLL cannot be found. diff --git a/doc/qtcreator/src/editors/creator-editors-writing-code.qdoc b/doc/qtcreator/src/editors/creator-editors-writing-code.qdoc index c0ca9294607..a720f795346 100644 --- a/doc/qtcreator/src/editors/creator-editors-writing-code.qdoc +++ b/doc/qtcreator/src/editors/creator-editors-writing-code.qdoc @@ -57,15 +57,6 @@ few people can visualize the color \c {#18793f}. To easily edit these properties, you can use the Qt Quick Toolbars. - \if defined(qtcreator) - \li \l{Pasting and Fetching Code Snippets} - - You can cooperate with others by pasting and fetching - snippets of code from a server. For example, you might ask - colleagues to review a change that you plan to submit to a - version control system. - - \endif \endlist \if defined(qtcreator) diff --git a/doc/qtcreator/src/editors/creator-only/creator-code-pasting.qdoc b/doc/qtcreator/src/editors/creator-only/creator-code-pasting.qdoc index a1dc27193c7..735ca3066c9 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-code-pasting.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-code-pasting.qdoc @@ -1,16 +1,16 @@ -// Copyright (C) 2019 The Qt Company Ltd. +// Copyright (C) 2024 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! - \previouspage qt-quick-toolbars.html \page creator-editor-codepasting.html - \nextpage creator-macros.html + \previouspage creator-how-tos.html - \title Pasting and Fetching Code Snippets + \ingroup creator-how-to-edit - In \QC, you can paste snippets of code to a server or fetch snippets of - code from the server. To paste and fetch snippets of code, \QC uses the - following: + \title Paste and fetch code snippets + + To paste snippets of code to a server or fetch snippets of code from the + server, use one of the following code pasting services: \list \li \uicontrol {Pastebin.Com} @@ -18,59 +18,72 @@ \li \uicontrol {Shared network drives} \endlist - \section1 Specifying Settings for Code Pasting + For example, you might ask colleagues to review a change that you plan to + submit to a version control system. If you use the Git version control + system, create a \e{diff} view by going to \uicontrol Tools > + \uicontrol Git > \uicontrol {Local Repository} > \uicontrol Diff. + Then, upload its contents to the server by going to \uicontrol Tools > + \uicontrol {Code Pasting} > \uicontrol {Paste Snippet}. - To specify settings for the code pasting service: + The reviewers can retrieve the code snippet by selecting \uicontrol Tools > + \uicontrol {Code Pasting} > \uicontrol {Fetch Snippet}. If they have the + project currently opened in \QC, they can apply and test the change by + going to \uicontrol Tools > \uicontrol Git > \uicontrol {Local Repository} + > \uicontrol Patch > \uicontrol {Apply from Editor}. - \list 1 - \li Select \preferences > \uicontrol {Code Pasting}. - \image qtcreator-code-pasting-options.png "Code Pasting preferences" - \li In the \uicontrol {Default protocol} field, select a code pasting - service to use by default. - \li In the \uicontrol Username field, enter your username. - \li In the \uicontrol {Expires after} field, specify the time to keep - the pasted snippet on the server. - \li Select the \uicontrol {Copy-paste URL to clipboard} check box to - copy the URL of the post on the code pasting service to the - clipboard when you paste a post. - \li Select the \uicontrol {Display General Messages after sending a post} - check box to display the URL in \l{View output}{General Messages} - when you paste a post. - \endlist + \section1 Paste snippets - Select \uicontrol Fileshare to specify the path to a shared network drive. - The code snippets are copied to the drive as simple files. You have to - delete obsolete files from the drive manually. - - \section1 Using Code Pasting Services - - To paste a snippet of code onto the server, select \uicontrol Tools > + To paste a snippet of code onto the server, go to \uicontrol Tools > \uicontrol {Code Pasting} > \uicontrol {Paste Snippet} or press \key {Alt+C,Alt+P}. By default, \QC copies the URL of the snippet to the clipboard and displays the URL in \uicontrol {General Messages}. - To paste any content that you copied to the clipboard, select + To paste any content that you copied to the clipboard, go to \uicontrol Tools > \uicontrol {Code Pasting} > \uicontrol {Paste Snippet}. To paste content from the \l{Compare files}{diff editor}, right-click a chunk and select \uicontrol {Send Chunk to CodePaster} in the context menu. - To fetch a snippet of code from the server, select \uicontrol Tools > - \uicontrol {Code Pasting} > \uicontrol {Fetch Snippet} or press - \key {Alt+C,Alt+F}. Select the snippet to fetch from the list. + \section1 Fetch snippets - To fetch the content stored at an URL, select \uicontrol Tools > + To fetch a snippet of code from the server: + + \list 1 + \li Go to \uicontrol Tools > \uicontrol {Code Pasting} > + \uicontrol {Fetch Snippet} or press \key {Alt+C,Alt+F}. + \li Select the snippet to fetch from the list. + \endlist + + To fetch the content stored at a URL, select \uicontrol Tools > \uicontrol {Code Pasting} > \uicontrol {Fetch from URL}. - For example, you might ask colleagues to review a change that you plan to - submit to a version control system. If you use the Git version control - system, you can create a \e{diff} view by selecting \uicontrol Tools > - \uicontrol Git > \uicontrol {Local Repository} > \uicontrol Diff. You can - then upload its contents to the server by selecting \uicontrol Tools > - \uicontrol {Code Pasting} > \uicontrol {Paste Snippet}. The reviewers can - retrieve the code snippet by selecting \uicontrol Tools > - \uicontrol {Code Pasting} > \uicontrol {Fetch Snippet}. If they have the - project currently opened in \QC, they can apply and test the change by - choosing \uicontrol Tools > \uicontrol Git > \uicontrol {Local Repository} - > \uicontrol Patch > \uicontrol {Apply from Editor}. + \section1 Set code pasting preferences + + To set preferences for a code pasting service: + + \list 1 + \li Go to \preferences > \uicontrol {Code Pasting} > \uicontrol General. + \image qtcreator-code-pasting-options.png {Code Pasting preferences} + \li In \uicontrol {Default protocol}, select a code pasting service to + use by default. + \li In \uicontrol Username, enter your username. + \li In \uicontrol {Expires after}, specify the time to keep + the pasted snippet on the server. + \li Select \uicontrol {Copy-paste URL to clipboard} to copy the URL of + the post on the code pasting service to the clipboard when you paste + a post. + \li Select \uicontrol {Display General Messages after sending a post} + to display the URL in \l{View output}{General Messages} + when you paste a post. + \endlist + + \section2 Set a shared network drive for code pasting + + Go to \preferences > \uicontrol {Code Pasting} > \uicontrol Fileshare to + specify the path to a shared network drive. + + The code snippets are copied to the drive as simple files. You have to + delete obsolete files from the drive manually. + + \sa {Git} */ diff --git a/doc/qtcreator/src/editors/creator-only/creator-diff-editor.qdoc b/doc/qtcreator/src/editors/creator-only/creator-diff-editor.qdoc index de83a3e1ab7..330af8d335e 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-diff-editor.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-diff-editor.qdoc @@ -101,7 +101,7 @@ \if defined(qtcreator) \section1 Paste changes for review - To send a chunk of changes to a \l{Pasting and Fetching Code Snippets} + To send a chunk of changes to a \l{Paste and fetch code snippets} {code pasting service}, select \uicontrol {Send Chunk to CodePaster} in the context menu. \endif diff --git a/doc/qtcreator/src/howto/creator-only/creator-how-to-contact-qt.qdoc b/doc/qtcreator/src/howto/creator-only/creator-how-to-contact-qt.qdoc index 93b8844f240..2ca57713777 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-how-to-contact-qt.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-how-to-contact-qt.qdoc @@ -45,5 +45,5 @@ {#qt-creator} channel on Libera.Chat IRC, go to \uicontrol Help > \uicontrol Contact. - \sa {Pasting and Fetching Code Snippets}, {Technical Support} + \sa {Paste and fetch code snippets}, {Technical Support} */ diff --git a/doc/qtcreator/src/qtcreator-toc.qdoc b/doc/qtcreator/src/qtcreator-toc.qdoc index 048d8b2e8fd..343f83c6af2 100644 --- a/doc/qtcreator/src/qtcreator-toc.qdoc +++ b/doc/qtcreator/src/qtcreator-toc.qdoc @@ -32,7 +32,6 @@ \li \l{Semantic Highlighting} \li \l{Checking Code Syntax} \li \l{Using Qt Quick Toolbars} - \li \l{Pasting and Fetching Code Snippets} \endlist \li \l{Configuring the Editor} \endlist