forked from qt-creator/qt-creator
CppTools: modernize
Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -43,7 +43,7 @@ namespace CppTools {
|
||||
class CppRefactoringChangesData : public TextEditor::RefactoringChangesData
|
||||
{
|
||||
public:
|
||||
CppRefactoringChangesData(const Snapshot &snapshot)
|
||||
explicit CppRefactoringChangesData(const Snapshot &snapshot)
|
||||
: m_snapshot(snapshot)
|
||||
, m_modelManager(CppModelManager::instance())
|
||||
, m_workingCopy(m_modelManager->workingCopy())
|
||||
@@ -107,7 +107,7 @@ CppRefactoringFilePtr CppRefactoringChanges::file(const QString &fileName) const
|
||||
|
||||
CppRefactoringFileConstPtr CppRefactoringChanges::fileNoEditor(const QString &fileName) const
|
||||
{
|
||||
QTextDocument *document = 0;
|
||||
QTextDocument *document = nullptr;
|
||||
if (data()->m_workingCopy.contains(fileName))
|
||||
document = new QTextDocument(QString::fromUtf8(data()->m_workingCopy.source(fileName)));
|
||||
CppRefactoringFilePtr result(new CppRefactoringFile(document, fileName));
|
||||
|
||||
Reference in New Issue
Block a user