forked from qt-creator/qt-creator
Clang: clean up unit handling.
- Use a QSharedPointer instead of an explicitly shared pointer. - Remove the LiveUnitManager. Change-Id: I05bf32c1f77c17f42ee1da39f1353cff580fa6eb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
2251958375
commit
a4b6e35ac4
@@ -61,7 +61,7 @@ void SemanticMarker::setFileName(const QString &fileName)
|
||||
QStringList oldOptions;
|
||||
if (m_unit)
|
||||
oldOptions = m_unit->compilationOptions();
|
||||
m_unit.reset(new Unit(fileName));
|
||||
m_unit = Unit::create(fileName);
|
||||
if (!oldOptions.isEmpty())
|
||||
m_unit->setCompilationOptions(oldOptions);
|
||||
|
||||
@@ -499,7 +499,7 @@ QList<SourceMarker> SemanticMarker::sourceMarkersInRange(unsigned firstLine,
|
||||
return result;
|
||||
}
|
||||
|
||||
Unit SemanticMarker::unit() const
|
||||
Unit::Ptr SemanticMarker::unit() const
|
||||
{
|
||||
return *m_unit;
|
||||
return m_unit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user