diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2020-11-06 15:55:41 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2020-11-16 14:13:16 +0000 |
commit | 337e7ab1fa5593ecbbcbe8f1f97315e9b575b278 (patch) | |
tree | f1c495ba5735cfeae726cd8ad640215669d9070d /doc | |
parent | 1984ebcf5174e11fb5b128c500d2c10a2e827aca (diff) |
Doc: Describe refactoring actions for creating functions
As these actions open dialogs, describe them in separate
sections to keep the summary more concise.
Task-number: QTCREATORBUG-24529
Change-Id: If0f1f899e69049c15417c4a37ae8bf2ca094bb73
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/qtcreator/images/qtcreator-refactoring-getters-and-setters.png | bin | 0 -> 6238 bytes | |||
-rw-r--r-- | doc/qtcreator/images/qtcreator-refactoring-member-function-implementations.png | bin | 0 -> 11698 bytes | |||
-rw-r--r-- | doc/qtcreator/images/qtcreator-refactoring-virtual-function-dialog.png | bin | 15185 -> 11813 bytes | |||
-rw-r--r-- | doc/qtcreator/src/editors/creator-code-refactoring.qdoc | 58 |
4 files changed, 46 insertions, 12 deletions
diff --git a/doc/qtcreator/images/qtcreator-refactoring-getters-and-setters.png b/doc/qtcreator/images/qtcreator-refactoring-getters-and-setters.png Binary files differnew file mode 100644 index 0000000000..43cff8dd02 --- /dev/null +++ b/doc/qtcreator/images/qtcreator-refactoring-getters-and-setters.png diff --git a/doc/qtcreator/images/qtcreator-refactoring-member-function-implementations.png b/doc/qtcreator/images/qtcreator-refactoring-member-function-implementations.png Binary files differnew file mode 100644 index 0000000000..4592be845c --- /dev/null +++ b/doc/qtcreator/images/qtcreator-refactoring-member-function-implementations.png diff --git a/doc/qtcreator/images/qtcreator-refactoring-virtual-function-dialog.png b/doc/qtcreator/images/qtcreator-refactoring-virtual-function-dialog.png Binary files differindex 6fd776c9cd..8cc3dbe101 100644 --- a/doc/qtcreator/images/qtcreator-refactoring-virtual-function-dialog.png +++ b/doc/qtcreator/images/qtcreator-refactoring-virtual-function-dialog.png diff --git a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc index 2f65b3568f..19f6f53a6e 100644 --- a/doc/qtcreator/src/editors/creator-code-refactoring.qdoc +++ b/doc/qtcreator/src/editors/creator-code-refactoring.qdoc @@ -181,6 +181,47 @@ refactoring actions available in the current cursor position. \if defined(qtcreator) + \section1 Creating Functions + + You can apply refactoring actions to implement member functions, insert + virtual functions of base classes, and greate getter and setter functions. + + \section2 Implementing Member Functions + + You can apply the \uicontrol {Create Implementations for Member Functions} + refactoring action to create implementations for all member functions in + one go. In the \uicontrol {Member Function Implementations} dialog, you can + specify whether the member functions are generated inline or outside the + class. + + \image qtcreator-refactoring-member-function-implementations.png "Implement Member Functions dialog" + + \section2 Inserting Virtual Functions + + You can apply the \uicontrol {Insert Virtual Functions of Base Classes} + refactoring action to insert declarations and the corresponding definitions + inside or outside the class or in an implementation file (if it exists). + + \image qtcreator-refactoring-virtual-function-dialog.png "Insert Virtual Functions dialog" + + Select the functions to insert in the list of available functions. You can + filter the list and hide reimplemented functions from it. + + You can add \e virtual or the \e override equivalent to the function + declaration. + + \section2 Creating Getters and Setters + + You can apply the \uicontrol {Create Getter and Setter Member Functions} + refactoring action to create either both getter and setter member functions + for member variables or only a getter or setter. + + \image qtcreator-refactoring-getters-and-setters.png "Getters and Setters dialog" + \endif + + \section1 Summary of Refactoring Actions + + \if defined(qtcreator) If you use the \l{Parsing C++ Files with the Clang Code Model} {Clang code model} to parse the C++ files, the \l{http://clang.llvm.org/diagnostics.html}{Clang fix-it hints} @@ -722,17 +763,10 @@ \li Function call or class name \row - \li Insert (Pure) Virtual Functions - \li Select an insertion mode: - \list - \li Insert only declarations. - \li Insert declarations and the corresponding definitions inside the class. - \li Insert declarations and the corresponding definitions outside the class. - \li Insert declarations and the corresponding definitions in the implementation file - (only if an implementation file exists). - \endlist - \image qtcreator-refactoring-virtual-function-dialog.png - + \li Insert Virtual Functions of Base Classes + \li Inserts declarations and the corresponding definitions inside or + outside the class or in an implementation file (if it exists). + For more information, see \l{Inserting Virtual Functions}. \li Class or base class name \row \li Optimize for-Loop @@ -824,9 +858,9 @@ \li Converts a Qt 4 QObject::connect() to Qt 5 style. \li QObject::connect() (Qt 4 style) \endtable - \endif \section2 Refactoring QML Code + \endif You can apply the following types of refactoring actions to QML code: |