forked from qt-creator/qt-creator
TextEditor: Modernize
override, auto, nullptr, member initializers. Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
439bc225e1
commit
41dee83bec
@@ -294,7 +294,7 @@ SyntaxHighlighter::SyntaxHighlighter(QTextEdit *parent)
|
||||
*/
|
||||
SyntaxHighlighter::~SyntaxHighlighter()
|
||||
{
|
||||
setDocument(0);
|
||||
setDocument(nullptr);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -641,7 +641,7 @@ QTextBlockUserData *SyntaxHighlighter::currentBlockUserData() const
|
||||
{
|
||||
Q_D(const SyntaxHighlighter);
|
||||
if (!d->currentBlock.isValid())
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
return d->currentBlock.userData();
|
||||
}
|
||||
@@ -679,7 +679,7 @@ void SyntaxHighlighter::setExtraFormats(const QTextBlock &block,
|
||||
Q_D(SyntaxHighlighter);
|
||||
|
||||
const int blockLength = block.length();
|
||||
if (block.layout() == 0 || blockLength == 0)
|
||||
if (block.layout() == nullptr || blockLength == 0)
|
||||
return;
|
||||
|
||||
Utils::sort(formats, byStartOfRange);
|
||||
|
||||
Reference in New Issue
Block a user