Core: Modernize

modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init (partially)

Change-Id: Idf10d7ffb1d98a04edc09a25c35e4e9e3abe87b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2018-07-21 21:11:46 +02:00
parent 86b8164a93
commit f36f04deba
152 changed files with 621 additions and 698 deletions

View File

@@ -436,7 +436,7 @@ void DocumentManager::renamedFile(const QString &from, const QString &to)
void DocumentManager::filePathChanged(const FileName &oldName, const FileName &newName)
{
IDocument *doc = qobject_cast<IDocument *>(sender());
auto doc = qobject_cast<IDocument *>(sender());
QTC_ASSERT(doc, return);
if (doc == d->m_blockedIDocument)
return;
@@ -456,7 +456,7 @@ void DocumentManager::addDocument(IDocument *document, bool addWatcher)
void DocumentManager::documentDestroyed(QObject *obj)
{
IDocument *document = static_cast<IDocument*>(obj);
auto document = static_cast<IDocument*>(obj);
// Check the special unwatched first:
if (!d->m_documentsWithoutWatch.removeOne(document))
removeFileInfo(document);
@@ -487,7 +487,7 @@ bool DocumentManager::removeDocument(IDocument *document)
because the file was saved under different name. */
void DocumentManager::checkForNewFileName()
{
IDocument *document = qobject_cast<IDocument *>(sender());
auto document = qobject_cast<IDocument *>(sender());
// We modified the IDocument
// Trust the other code to also update the m_states map
if (document == d->m_blockedIDocument)
@@ -720,7 +720,7 @@ bool DocumentManager::saveDocument(IDocument *document, const QString &fileName,
return ret;
}
QString DocumentManager::allDocumentFactoryFiltersString(QString *allFilesFilter = 0)
QString DocumentManager::allDocumentFactoryFiltersString(QString *allFilesFilter = nullptr)
{
QSet<QString> uniqueFilters;