forked from qt-creator/qt-creator
DiffEditor: Modernize
* Use member init
* Use nullptr
* Use range-for
* omit QLatin1{String|Char} where possible
Change-Id: Ib231b747cdd9073b3d4fc6779b8e0afb2b404a31
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
André Hartmann
parent
53a151074a
commit
aae3056b33
@@ -39,10 +39,7 @@ namespace DiffEditor {
|
||||
|
||||
DiffEditorController::DiffEditorController(Core::IDocument *document) :
|
||||
QObject(document),
|
||||
m_document(qobject_cast<Internal::DiffEditorDocument *>(document)),
|
||||
m_isReloading(false),
|
||||
m_diffFileIndex(-1),
|
||||
m_chunkIndex(-1)
|
||||
m_document(qobject_cast<Internal::DiffEditorDocument *>(document))
|
||||
{
|
||||
QTC_ASSERT(m_document, return);
|
||||
m_document->setController(this);
|
||||
@@ -109,7 +106,7 @@ void DiffEditorController::setDescription(const QString &description)
|
||||
void DiffEditorController::branchesReceived(const QString &branches)
|
||||
{
|
||||
QString tmp = m_document->description();
|
||||
tmp.replace(QLatin1String(Constants::EXPAND_BRANCHES), branches);
|
||||
tmp.replace(Constants::EXPAND_BRANCHES, branches);
|
||||
m_document->setDescription(tmp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user