diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-08-17 11:35:57 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-08-19 11:12:09 +0200 |
commit | 8a6d767a8f2f98ea4e04847f92cff40d661b806f (patch) | |
tree | 586e5c539adfbb18623246d00dec5e894288c8e1 /src/plugins/cppeditor/cppfunctiondecldeflink.h | |
parent | a07acad516b5fa1ac503493b4ec28d595f6e1ea0 (diff) |
Refactoring changes: Cleanup and improvements.
Previously RefactoringFiles were usually passed around by value.
However, since a RefactoringFile may sometimes own a QTextDocument
(when it was read from a file), that's not great and caused the
file to be reread after every copy.
With this change RefactoringFile becomes noncopyable and is always
owned by a shared pointer.
This change also allowed having const RefactoringFiles which is
useful because they can be safely used from other threads. See
CppRefactoringChanges::fileNoEditor.
Change-Id: I9045921d6d0f6349f9558ff2a3d8317ea172193b
Reviewed-on: http://codereview.qt.nokia.com/3084
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Diffstat (limited to 'src/plugins/cppeditor/cppfunctiondecldeflink.h')
-rw-r--r-- | src/plugins/cppeditor/cppfunctiondecldeflink.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppfunctiondecldeflink.h b/src/plugins/cppeditor/cppfunctiondecldeflink.h index 5de47afb91..a75e71f3ef 100644 --- a/src/plugins/cppeditor/cppfunctiondecldeflink.h +++ b/src/plugins/cppeditor/cppfunctiondecldeflink.h @@ -100,7 +100,7 @@ public: CPlusPlus::DeclarationAST *sourceDeclaration; CPlusPlus::FunctionDeclaratorAST *sourceFunctionDeclarator; - QSharedPointer<CppTools::CppRefactoringFile> targetFile; + CppTools::CppRefactoringFileConstPtr targetFile; CPlusPlus::Function *targetFunction; CPlusPlus::DeclarationAST *targetDeclaration; CPlusPlus::FunctionDeclaratorAST *targetFunctionDeclarator; |