From 99de80e7224f2491fb7518e32f195ad6a912b624 Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 28 Nov 2014 11:19:20 +0100 Subject: replaced all uses of NULL with nullptr fixed a few placed where NULL was used as a number or boolean --- src/syncoverwritedialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/syncoverwritedialog.cpp') diff --git a/src/syncoverwritedialog.cpp b/src/syncoverwritedialog.cpp index 380719d8..adeac9b8 100644 --- a/src/syncoverwritedialog.cpp +++ b/src/syncoverwritedialog.cpp @@ -82,18 +82,18 @@ void SyncOverwriteDialog::readTree(const QString &path, DirectoryEntry *director if (fileInfo.isDir()) { DirectoryEntry *subDir = directoryStructure->findSubDirectory(ToWString(file)); - if (subDir != NULL) { + if (subDir != nullptr) { readTree(fileInfo.absoluteFilePath(), subDir, newItem); } else { qCritical("no directory structure for %s?", file.toUtf8().constData()); delete newItem; - newItem = NULL; + newItem = nullptr; } } else { const FileEntry::Ptr entry = directoryStructure->findFile(ToWString(file)); QComboBox* combo = new QComboBox(ui->syncTree); combo->addItem(tr(""), -1); - if (entry.get() != NULL) { + if (entry.get() != nullptr) { bool ignore; int origin = entry->getOrigin(ignore); addToComboBox(combo, ToQString(m_DirectoryStructure->getOriginByID(origin).getName()), origin); @@ -107,7 +107,7 @@ void SyncOverwriteDialog::readTree(const QString &path, DirectoryEntry *director } ui->syncTree->setItemWidget(newItem, 1, combo); } - if (newItem != NULL) { + if (newItem != nullptr) { subTree->addChild(newItem); } } @@ -137,7 +137,7 @@ void SyncOverwriteDialog::applyTo(QTreeWidgetItem *item, const QString &path, co applyTo(child, filePath, modDirectory); } else { QComboBox *comboBox = qobject_cast(ui->syncTree->itemWidget(child, 1)); - if (comboBox != NULL) { + if (comboBox != nullptr) { int originID = comboBox->itemData(comboBox->currentIndex(), Qt::UserRole).toInt(); if (originID != -1) { FilesOrigin &origin = m_DirectoryStructure->getOriginByID(originID); -- cgit v1.3.1