Doc: Describe new C++ quick fixes

Task-number: QTCREATORBUG-30604
Change-Id: I08ee0478660b9166b1a6f2d1451ceab0d0c79789
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Leena Miettinen
2024-06-13 14:09:56 +02:00
parent a8ca4fa0a4
commit 5665c349d1
3 changed files with 25 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -227,6 +227,14 @@
// do stuff here // do stuff here
} }
\endcode \endcode
\row
\li Move Class to a Dedicated Set of Source Files
\li Moves a class to separate header and source files. For more
information, see \l{Move classes to separate files}.
\row
\li Re-order Member Function Definitions According to Declaration Order
\li Re-orders method definitions in a .cpp file to follow the order of
method declarations in the corresponding .h file.
\endtable \endtable
\section1 Class Member \section1 Class Member
@@ -333,7 +341,7 @@
\li Quick Fix \li Quick Fix
\li Description \li Description
\row \row
\li Add Definition in ... \li Add Definition ...
\li Inserts a definition stub for a function declaration either in \li Inserts a definition stub for a function declaration either in
the header file (inside or outside the class) or in the the header file (inside or outside the class) or in the
implementation file. For free functions, inserts the definition implementation file. For free functions, inserts the definition
@@ -401,6 +409,10 @@
When this fix is available, a light bulb icon appears: When this fix is available, a light bulb icon appears:
\inlineimage icons/refactormarker.png \inlineimage icons/refactormarker.png
\row
\li Convert Function Call to Qt Meta-Method Invocation
\li Converts a normal function call into a meta method invocation, if
the function is marked as invokable.
\row \row
\li Move Definition Here \li Move Definition Here
\li Moves an existing function definition to its declaration. \li Moves an existing function definition to its declaration.

View File

@@ -38,7 +38,7 @@
By default, the refactored files are saved automatically. To turn off By default, the refactored files are saved automatically. To turn off
this feature, go to \preferences > \uicontrol Environment > this feature, go to \preferences > \uicontrol Environment >
\uicontrol System and select \uicontrol {Auto-save files after refactoring}. \uicontrol System and clear \uicontrol {Auto-save files after refactoring}.
\if defined(qtcreator) \if defined(qtcreator)
\section1 Create functions \section1 Create functions
@@ -94,6 +94,17 @@
{C++ Quick Fixes} {C++ Quick Fixes}
\endif \endif
\section1 Move classes to separate files
Apply the \uicontrol {Move Class to a Dedicated Set of Source Files} quick
fix to move a class to a separate set of header and implementation files.
\image qtcreator-move-class-to-separate-files.webp {Give names to header and implementation files}
Specify paths and file names for the header and implementation file.
To omit the implementation file, select \uicontrol {Header file only}.
\sa {Rename symbols}, {QML Quick Fixes} \sa {Rename symbols}, {QML Quick Fixes}
*/ */