forked from qt-creator/qt-creator
Replace set[Plain]Text(QString()) with clear()
...where applicable. Shorter, faster, more semantic. Change-Id: Ifb1cf200f489f62a79e12c761e98a846992744dc Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -525,7 +525,7 @@ bool BaseTextDocument::open(QString *errorString, const QString &fileName, const
|
||||
d->m_document->setModified(false);
|
||||
const int chunks = content.size();
|
||||
if (chunks == 0) {
|
||||
d->m_document->setPlainText(QString());
|
||||
d->m_document->clear();
|
||||
} else if (chunks == 1) {
|
||||
d->m_document->setPlainText(content.at(0));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user