Pasting and Fetching Code SnippetsIn Qt Creator, you can paste snippets of code to a server or fetch snippets of code from the server. To paste and fetch snippets of code, Qt Creator uses the following:
To configure the server, select Tools > Options... > Code Pasting. To paste a snippet of code onto the server, select Tools > Code Pasting > Paste Snippet... or press Alt+C,Alt+P. To fetch a snippet of code from the server, select Tools > Code Pasting > Fetch Snippet... or press Alt+C,Alt+F. Note: To use Pastebin.Com, configure the domain prefix in Tools > Options... > Code Pasting > Pastebin.com. 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 diff view by selecting Tools > Git > Diff Repository. You can then upload its contents to the server by choosing Tools > Code Pasting > Paste Snippet.... The reviewers can retrieve the code snippet by selecting Tools > Code Pasting > Fetch Snippet.... If they have the project currently opened in Qt Creator, they can apply and test the change by choosing Tools > Git > Apply Patch. [Previous: Searching With the Locator] [Next: Using Text Editing Macros] © 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. X
|