summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2019-12-04 09:53:26 +0100
committerDavid Schulz <david.schulz@qt.io>2020-01-08 09:21:25 +0000
commit1ab9dc946410e96e0e211347e9d9127740ab18dd (patch)
tree779341b2d2817194c978ab78d544e2635e054494 /doc
parent15734ac5eb5b7b55916aca7b83a85ed8b6c793c1 (diff)
downloadqt-creator-1ab9dc946410e96e0e211347e9d9127740ab18dd.tar.gz
CppEditor: generate valid code via "Convert to Pointer/Stack Variable"
Adding a "= new <TypeName>" after converting a stack variable without assignment or initializer to pointer. Also remove the assignment when converting from pointer to stack variable as this works better with explicit constructors. Fixes: QTCREATORBUG-23181 Change-Id: I377ec32a1b66cf4b96db14cfcb4b71fb96c80c98 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/src/editors/creator-code-refactoring.qdoc2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/src/editors/creator-code-refactoring.qdoc b/doc/src/editors/creator-code-refactoring.qdoc
index 8120a0543c..f333c92bc4 100644
--- a/doc/src/editors/creator-code-refactoring.qdoc
+++ b/doc/src/editors/creator-code-refactoring.qdoc
@@ -755,7 +755,7 @@
as
\code
- QByteArray foo = "foo";
+ QByteArray foo("foo");
foo.append("bar");
\endcode