Commit ee83c8a8 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Use nullptr rather than Q_NULLPTR

Path generated by:

git grep -l 'Q_NULLPTR' | xargs sed -i 's/Q_NULLPTR/nullptr/g'
parent 1951c126
......@@ -156,7 +156,7 @@ void BatchExtract::slotResult(KJob *job)
removeSubjob(job);
if (job->error() != KJob::KilledJobError) {
KMessageBox::error(Q_NULLPTR, job->errorString().isEmpty() ?
KMessageBox::error(nullptr, job->errorString().isEmpty() ?
i18n("There was an error during extraction.") : job->errorString());
}
......@@ -170,7 +170,7 @@ void BatchExtract::slotResult(KJob *job)
if (openDestinationAfterExtraction()) {
QUrl destination(destinationFolder());
destination.setPath(QDir::cleanPath(destination.path()));
KRun::runUrl(destination, QStringLiteral("inode/directory"), Q_NULLPTR, KRun::RunExecutables, QString(), QByteArray());
KRun::runUrl(destination, QStringLiteral("inode/directory"), nullptr, KRun::RunExecutables, QString(), QByteArray());
}
qCDebug(ARK) << "Finished, emitting the result";
......@@ -259,7 +259,7 @@ bool BatchExtract::showExtractDialog()
// Only one archive, we need a LoadJob to get the single-folder and subfolder properties.
// TODO: find a better way (e.g. let the dialog handle everything), otherwise we list
// the archive twice (once here and once in the following BatchExtractJob).
Kerfuffle::LoadJob *loadJob = Q_NULLPTR;
Kerfuffle::LoadJob *loadJob = nullptr;
if (m_inputs.size() == 1) {
loadJob = Kerfuffle::Archive::load(m_inputs.at(0).toLocalFile(), this);
// We need to access the job after result has been emitted, if the user rejects the dialog.
......
......@@ -128,7 +128,7 @@ void MainWindow::dragMoveEvent(QDragMoveEvent * event)
bool MainWindow::loadPart()
{
KPluginFactory *factory = Q_NULLPTR;
KPluginFactory *factory = nullptr;
const auto plugins = KPluginLoader::findPlugins(QString(), [](const KPluginMetaData& metaData) {
return metaData.pluginId() == QStringLiteral("arkpart") &&
......@@ -140,7 +140,7 @@ bool MainWindow::loadPart()
factory = KPluginLoader(plugins.first().fileName()).factory();
}
m_part = factory ? static_cast<KParts::ReadWritePart*>(factory->create<KParts::ReadWritePart>(this)) : Q_NULLPTR;
m_part = factory ? static_cast<KParts::ReadWritePart*>(factory->create<KParts::ReadWritePart>(this)) : nullptr;
if (!m_part) {
KMessageBox::error(this, i18n("Unable to find Ark's KPart component, please check your installation."));
......@@ -171,7 +171,7 @@ void MainWindow::setupActions()
m_openAction = actionCollection()->addAction(KStandardAction::Open, QStringLiteral("ark_file_open"), this, SLOT(openArchive()));
actionCollection()->addAction(KStandardAction::Quit, QStringLiteral("ark_quit"), this, SLOT(quit()));
m_recentFilesAction = KStandardAction::openRecent(this, SLOT(openUrl(QUrl)), Q_NULLPTR);
m_recentFilesAction = KStandardAction::openRecent(this, SLOT(openUrl(QUrl)), nullptr);
actionCollection()->addAction(QStringLiteral("ark_file_open_recent"), m_recentFilesAction);
m_recentFilesAction->setToolBarMode(KRecentFilesAction::MenuMode);
......@@ -288,7 +288,7 @@ void MainWindow::newArchive()
Q_UNUSED(iface);
QPointer<Kerfuffle::CreateDialog> dialog = new Kerfuffle::CreateDialog(
Q_NULLPTR, // parent
nullptr, // parent
i18n("Create New Archive"), // caption
QUrl()); // startDir
......
......@@ -112,7 +112,7 @@ void AddDialogTest::testBasicWidgets()
QFETCH(int, initialCompLevel);
QFETCH(int, changeToCompLevel);
AddDialog *dialog = new AddDialog(Q_NULLPTR, QString(), QUrl(), mime);
AddDialog *dialog = new AddDialog(nullptr, QString(), QUrl(), mime);
dialog->slotOpenOptions();
......@@ -156,7 +156,7 @@ void AddDialogTest::testBasicWidgets()
CompressionOptions opts;
opts.setCompressionLevel(initialCompLevel);
dialog = new AddDialog(Q_NULLPTR, QString(), QUrl(), mime, opts);
dialog = new AddDialog(nullptr, QString(), QUrl(), mime, opts);
dialog->slotOpenOptions();
if (archiveFormat.defaultCompressionLevel() > 0 && supportsCompLevel) {
......
......@@ -98,7 +98,7 @@ void CreateDialogTest::testBasicWidgets_data()
void CreateDialogTest::testBasicWidgets()
{
CreateDialog *dialog = new CreateDialog(Q_NULLPTR, QString(), QUrl());
CreateDialog *dialog = new CreateDialog(nullptr, QString(), QUrl());
auto fileNameLineEdit = dialog->findChild<QLineEdit*>(QStringLiteral("filenameLineEdit"));
auto archiveTypeComboBox = dialog->findChild<QComboBox*>(QStringLiteral("mimeComboBox"));
......@@ -147,7 +147,7 @@ void CreateDialogTest::testEncryption_data()
void CreateDialogTest::testEncryption()
{
CreateDialog *dialog = new CreateDialog(Q_NULLPTR, QString(), QUrl());
CreateDialog *dialog = new CreateDialog(nullptr, QString(), QUrl());
QFETCH(QString, filter);
QFETCH(bool, isEncryptionAvailable);
......@@ -198,7 +198,7 @@ void CreateDialogTest::testHeaderEncryptionTooltip()
QSKIP("zip format not available in CreateDialog, skipping test.", SkipSingle);
}
CreateDialog *dialog = new CreateDialog(Q_NULLPTR, QString(), QUrl());
CreateDialog *dialog = new CreateDialog(nullptr, QString(), QUrl());
auto collapsibleEncryption = dialog->findChild<KCollapsibleGroupBox*>(QStringLiteral("collapsibleEncryption"));
auto encryptHeaderCheckBox = dialog->findChild<QCheckBox*>(QStringLiteral("encryptHeaderCheckBox"));
......
......@@ -75,7 +75,7 @@ private:
QTEST_GUILESS_MAIN(JobsTest)
JobsTest::JobsTest()
: QObject(Q_NULLPTR)
: QObject(nullptr)
, m_eventLoop(this)
{
}
......@@ -96,7 +96,7 @@ JSONArchiveInterface *JobsTest::createArchiveInterface(const QString& filePath)
QVariant().fromValue(KPluginMetaData())});
if (!iface->open()) {
qDebug() << "Could not open" << filePath;
return Q_NULLPTR;
return nullptr;
}
return iface;
......
......@@ -75,7 +75,7 @@ bool JSONArchiveInterface::addFiles(const QVector<Kerfuffle::Archive::Entry*>& f
return false;
}
Kerfuffle::Archive::Entry *e = new Kerfuffle::Archive::Entry(Q_NULLPTR);
Kerfuffle::Archive::Entry *e = new Kerfuffle::Archive::Entry(nullptr);
e->setProperty("fullPath", path);
m_archive[path] = e;
......
......@@ -93,7 +93,7 @@ bool AddToArchive::showAddDialog()
qCDebug(ARK) << "Opening add dialog";
QPointer<Kerfuffle::CreateDialog> dialog = new Kerfuffle::CreateDialog(
Q_NULLPTR, // parent
nullptr, // parent
i18n("Compress to Archive"), // caption
QUrl::fromLocalFile(m_firstPath)); // startDir
......@@ -153,7 +153,7 @@ void AddToArchive::slotStartJob()
if (m_filename.isEmpty()) {
if (m_autoFilenameSuffix.isEmpty()) {
KMessageBox::error(Q_NULLPTR, xi18n("You need to either supply a filename for the archive or a suffix (such as rar, tar.gz) with the <command>--autofilename</command> argument."));
KMessageBox::error(nullptr, xi18n("You need to either supply a filename for the archive or a suffix (such as rar, tar.gz) with the <command>--autofilename</command> argument."));
emitResult();
return;
}
......@@ -213,7 +213,7 @@ void AddToArchive::slotFinished(KJob *job)
qCDebug(ARK) << "AddToArchive job finished";
if (job->error() && !job->errorString().isEmpty()) {
KMessageBox::error(Q_NULLPTR, job->errorString());
KMessageBox::error(nullptr, job->errorString());
}
emitResult();
......
......@@ -61,7 +61,7 @@ Archive *Archive::create(const QString &fileName, const QString &fixedMimeType,
return new Archive(NoPlugin, parent);
}
Archive *archive = Q_NULLPTR;
Archive *archive = nullptr;
foreach (Plugin *plugin, offers) {
archive = create(fileName, plugin, parent);
// Use the first valid plugin, according to the priority sorting.
......@@ -88,7 +88,7 @@ Archive *Archive::create(const QString &fileName, Plugin *plugin, QObject *paren
const QVariantList args = {QVariant(QFileInfo(fileName).absoluteFilePath()),
QVariant().fromValue(plugin->metaData())};
ReadOnlyArchiveInterface *iface = factory->create<ReadOnlyArchiveInterface>(Q_NULLPTR, args);
ReadOnlyArchiveInterface *iface = factory->create<ReadOnlyArchiveInterface>(nullptr, args);
if (!iface) {
qCWarning(ARK) << "Could not create plugin instance" << plugin->metaData().pluginId();
return new Archive(FailedPlugin, parent);
......@@ -150,7 +150,7 @@ LoadJob *Archive::load(const QString &fileName, Plugin *plugin, QObject *parent)
Archive::Archive(ArchiveError errorCode, QObject *parent)
: QObject(parent)
, m_iface(Q_NULLPTR)
, m_iface(nullptr)
, m_error(errorCode)
{
qCDebug(ARK) << "Created archive instance with error";
......@@ -242,7 +242,7 @@ QString Archive::comment() const
CommentJob* Archive::addComment(const QString &comment)
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
qCDebug(ARK) << "Going to add comment:" << comment;
......@@ -254,7 +254,7 @@ CommentJob* Archive::addComment(const QString &comment)
TestJob* Archive::testArchive()
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
qCDebug(ARK) << "Going to test archive";
......@@ -385,7 +385,7 @@ ArchiveError Archive::error() const
DeleteJob* Archive::deleteFiles(QVector<Archive::Entry*> &entries)
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
qCDebug(ARK) << "Going to delete" << entries.size() << "entries";
......@@ -401,7 +401,7 @@ DeleteJob* Archive::deleteFiles(QVector<Archive::Entry*> &entries)
AddJob* Archive::addFiles(const QVector<Archive::Entry*> &files, const Archive::Entry *destination, const CompressionOptions& options)
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
CompressionOptions newOptions = options;
......@@ -420,7 +420,7 @@ AddJob* Archive::addFiles(const QVector<Archive::Entry*> &files, const Archive::
MoveJob* Archive::moveFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions& options)
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
CompressionOptions newOptions = options;
......@@ -438,7 +438,7 @@ MoveJob* Archive::moveFiles(const QVector<Archive::Entry*> &files, Archive::Entr
CopyJob* Archive::copyFiles(const QVector<Archive::Entry*> &files, Archive::Entry *destination, const CompressionOptions &options)
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
CompressionOptions newOptions = options;
......@@ -456,7 +456,7 @@ CopyJob* Archive::copyFiles(const QVector<Archive::Entry*> &files, Archive::Entr
ExtractJob* Archive::extractFiles(const QVector<Archive::Entry*> &files, const QString &destinationDir, const ExtractionOptions &options)
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
ExtractionOptions newOptions = options;
......@@ -471,7 +471,7 @@ ExtractJob* Archive::extractFiles(const QVector<Archive::Entry*> &files, const Q
PreviewJob *Archive::preview(Archive::Entry *entry)
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
PreviewJob *job = new PreviewJob(entry, (encryptionType() != Unencrypted), m_iface);
......@@ -481,7 +481,7 @@ PreviewJob *Archive::preview(Archive::Entry *entry)
OpenJob *Archive::open(Archive::Entry *entry)
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
OpenJob *job = new OpenJob(entry, (encryptionType() != Unencrypted), m_iface);
......@@ -491,7 +491,7 @@ OpenJob *Archive::open(Archive::Entry *entry)
OpenWithJob *Archive::openWith(Archive::Entry *entry)
{
if (!isValid()) {
return Q_NULLPTR;
return nullptr;
}
OpenWithJob *job = new OpenWithJob(entry, (encryptionType() != Unencrypted), m_iface);
......
......@@ -133,37 +133,37 @@ public:
* @param preservePaths Whether the job will preserve paths.
* @param parent The parent for the archive.
*/
static BatchExtractJob *batchExtract(const QString &fileName, const QString &destination, bool autoSubfolder, bool preservePaths, QObject *parent = Q_NULLPTR);
static BatchExtractJob *batchExtract(const QString &fileName, const QString &destination, bool autoSubfolder, bool preservePaths, QObject *parent = nullptr);
/**
* @return Job to create an archive for the given @p entries.
* @param fileName The name of the new archive.
* @param mimeType The mimetype of the new archive.
*/
static CreateJob* create(const QString &fileName, const QString &mimeType, const QVector<Archive::Entry*> &entries, const CompressionOptions& options, QObject *parent = Q_NULLPTR);
static CreateJob* create(const QString &fileName, const QString &mimeType, const QVector<Archive::Entry*> &entries, const CompressionOptions& options, QObject *parent = nullptr);
/**
* @return An empty archive with name @p fileName, mimetype @p mimeType and @p parent as parent.
*/
static Archive *createEmpty(const QString &fileName, const QString &mimeType, QObject *parent = Q_NULLPTR);
static Archive *createEmpty(const QString &fileName, const QString &mimeType, QObject *parent = nullptr);
/**
* @return Job to load the archive @p fileName.
* @param parent The parent of the archive that will be loaded.
*/
static LoadJob* load(const QString &fileName, QObject *parent = Q_NULLPTR);
static LoadJob* load(const QString &fileName, QObject *parent = nullptr);
/**
* @return Job to load the archive @p fileName with mimetype @p mimeType.
* @param parent The parent of the archive that will be loaded.
*/
static LoadJob* load(const QString &fileName, const QString &mimeType, QObject *parent = Q_NULLPTR);
static LoadJob* load(const QString &fileName, const QString &mimeType, QObject *parent = nullptr);
/**
* @return Job to load the archive @p fileName by using @p plugin.
* @param parent The parent of the archive that will be loaded.
*/
static LoadJob* load(const QString &fileName, Plugin *plugin, QObject *parent = Q_NULLPTR);
static LoadJob* load(const QString &fileName, Plugin *plugin, QObject *parent = nullptr);
~Archive();
......@@ -233,7 +233,7 @@ private:
* @param fileName The name of the archive.
* @return A valid archive if the plugin could be loaded, an invalid one otherwise (with the FailedPlugin error set).
*/
static Archive *create(const QString &fileName, Plugin *plugin, QObject *parent = Q_NULLPTR);
static Archive *create(const QString &fileName, Plugin *plugin, QObject *parent = nullptr);
ReadOnlyArchiveInterface *m_iface;
bool m_isReadOnly;
bool m_isSingleFolder;
......
......@@ -149,13 +149,13 @@ Archive::Entry *Archive::Entry::find(const QString &name) const
return entry;
}
}
return Q_NULLPTR;
return nullptr;
}
Archive::Entry *Archive::Entry::findByPath(const QStringList &pieces, int index) const
{
if (index == pieces.count()) {
return Q_NULLPTR;
return nullptr;
}
Entry *next = find(pieces.at(index));
......@@ -165,7 +165,7 @@ Archive::Entry *Archive::Entry::findByPath(const QStringList &pieces, int index)
if (next && next->isDir()) {
return next->findByPath(pieces, index + 1);
}
return Q_NULLPTR;
return nullptr;
}
void Archive::Entry::countChildren(uint &dirs, uint &files) const
......
......@@ -71,7 +71,7 @@ class Archive::Entry : public QObject
public:
explicit Entry(QObject *parent = Q_NULLPTR, const QString &fullPath = {}, const QString &rootNode = {});
explicit Entry(QObject *parent = nullptr, const QString &fullPath = {}, const QString &rootNode = {});
~Entry();
void copyMetaData(const Archive::Entry *sourceEntry);
......
......@@ -214,7 +214,7 @@ QStringList ReadOnlyArchiveInterface::entryPathsFromDestination(QStringList entr
QStringList paths = QStringList();
entries.sort();
QString lastFolder;
const QString destinationPath = (destination == Q_NULLPTR) ? QString() : destination->fullPath();
const QString destinationPath = (destination == nullptr) ? QString() : destination->fullPath();
QString newPath;
int nameLength = 0;
......
......@@ -153,7 +153,7 @@ bool CliInterface::addFiles(const QVector<Archive::Entry*> &files, const Archive
QVector<Archive::Entry*> filesToPass = QVector<Archive::Entry*>();
// If destination path is specified, we have recreate its structure inside the temp directory
// and then place symlinks of targeted files there.
const QString destinationPath = (destination == Q_NULLPTR)
const QString destinationPath = (destination == nullptr)
? QString()
: destination->fullPath();
......@@ -166,11 +166,11 @@ bool CliInterface::addFiles(const QVector<Archive::Entry*> &files, const Archive
QDir qDir;
qDir.mkpath(absoluteDestinationPath);
QObject *preservedParent = Q_NULLPTR;
QObject *preservedParent = nullptr;
foreach (Archive::Entry *file, files) {
// The entries may have parent. We have to save and apply it to our new entry in order to prevent memory
// leaks.
if (preservedParent == Q_NULLPTR) {
if (preservedParent == nullptr) {
preservedParent = file->parent();
}
......@@ -315,7 +315,7 @@ void CliInterface::processFinished(int exitCode, QProcess::ExitStatus exitStatus
readStdout(true);
delete m_process;
m_process = Q_NULLPTR;
m_process = nullptr;
}
// #193908 - #222392
......@@ -365,7 +365,7 @@ void CliInterface::extractProcessFinished(int exitCode, QProcess::ExitStatus exi
readStdout(true);
delete m_process;
m_process = Q_NULLPTR;
m_process = nullptr;
}
// Don't emit finished() if the job was killed quietly.
......@@ -665,7 +665,7 @@ void CliInterface::setNewMovedFiles(const QVector<Archive::Entry*> &entries, con
lastFolder = QString();
}
}
Archive::Entry *newEntry = new Archive::Entry(Q_NULLPTR);
Archive::Entry *newEntry = new Archive::Entry(nullptr);
newEntry->copyMetaData(entry);
newEntry->setFullPath(newPath);
m_newMovedFiles << newEntry;
......@@ -816,7 +816,7 @@ bool CliInterface::setAddedFiles()
if (!QFile::rename(oldPath, newPath)) {
return false;
}
m_tempAddedFiles << new Archive::Entry(Q_NULLPTR, file->name());
m_tempAddedFiles << new Archive::Entry(nullptr, file->name());
}
return true;
}
......
......@@ -138,20 +138,20 @@ protected:
void cleanUp();
CliProperties *m_cliProps = Q_NULLPTR;
CliProperties *m_cliProps = nullptr;
QString m_oldWorkingDir;
QScopedPointer<QTemporaryDir> m_tempWorkingDir;
QScopedPointer<QTemporaryDir> m_tempAddDir;
OperationMode m_subOperation = List;
QVector<Archive::Entry*> m_passedFiles;
QVector<Archive::Entry*> m_tempAddedFiles;
Archive::Entry *m_passedDestination = Q_NULLPTR;
Archive::Entry *m_passedDestination = nullptr;
CompressionOptions m_passedOptions;
#ifdef Q_OS_WIN
KProcess *m_process = Q_NULLPTR;
KProcess *m_process = nullptr;
#else
KPtyProcess *m_process = Q_NULLPTR;
KPtyProcess *m_process = nullptr;
#endif
bool m_abortingOperation = false;
......
......@@ -42,7 +42,7 @@ class KERFUFFLE_EXPORT CompressionOptionsWidget : public QWidget, public Ui::Com
Q_OBJECT
public:
explicit CompressionOptionsWidget(QWidget *parent = Q_NULLPTR,
explicit CompressionOptionsWidget(QWidget *parent = nullptr,
const CompressionOptions &opts = {});
int compressionLevel() const;
QString compressionMethod() const;
......
......@@ -205,7 +205,7 @@ void CreateDialog::accept()
QDialog::accept();
break;
case KNewPasswordWidget::PasswordNotVerified:
KMessageBox::error(Q_NULLPTR, i18n("The chosen password does not match the given verification password."));
KMessageBox::error(nullptr, i18n("The chosen password does not match the given verification password."));
break;
default:
break;
......
......@@ -76,11 +76,11 @@ Job::Job(Archive *archive, ReadOnlyArchiveInterface *interface)
}
Job::Job(Archive *archive)
: Job(archive, Q_NULLPTR)
: Job(archive, nullptr)
{}
Job::Job(ReadOnlyArchiveInterface *interface)
: Job(Q_NULLPTR, interface)
: Job(nullptr, interface)
{}
Job::~Job()
......@@ -249,11 +249,11 @@ LoadJob::LoadJob(Archive *archive, ReadOnlyArchiveInterface *interface)
}
LoadJob::LoadJob(Archive *archive)
: LoadJob(archive, Q_NULLPTR)
: LoadJob(archive, nullptr)
{}
LoadJob::LoadJob(ReadOnlyArchiveInterface *interface)
: LoadJob(Q_NULLPTR, interface)
: LoadJob(nullptr, interface)
{}
void LoadJob::doWork()
......
......@@ -184,7 +184,7 @@ private:
void setupDestination();
Step m_step = Loading;
ExtractJob *m_extractJob = Q_NULLPTR;
ExtractJob *m_extractJob = nullptr;
LoadJob *m_loadJob;
QString m_destination;
bool m_autoSubfolder;
......@@ -220,7 +220,7 @@ protected:
virtual bool doKill() Q_DECL_OVERRIDE;
private:
AddJob *m_addJob = Q_NULLPTR;
AddJob *m_addJob = nullptr;
QVector<Archive::Entry*> m_entries;
CompressionOptions m_options;
};
......
......@@ -74,7 +74,7 @@ class KERFUFFLE_EXPORT Plugin : public QObject
Q_PROPERTY(KPluginMetaData metaData READ metaData MEMBER m_metaData CONSTANT)
public:
explicit Plugin(QObject *parent = Q_NULLPTR, const KPluginMetaData& metaData = KPluginMetaData());
explicit Plugin(QObject *parent = nullptr, const KPluginMetaData& metaData = KPluginMetaData());
int priority() const;
......
......@@ -50,7 +50,7 @@ public:
SortByComment
};
explicit PluginManager(QObject *parent = Q_NULLPTR);
explicit PluginManager(QObject *parent = nullptr);
/**
* @return The list of all installed plugins.
......
......@@ -41,7 +41,7 @@ class KERFUFFLE_EXPORT PluginSettingsPage : public SettingsPage, public Ui::Plug
Q_OBJECT
public:
explicit PluginSettingsPage(QWidget *parent = Q_NULLPTR, const QString &name = QString(), const QString &iconName = QString());
explicit PluginSettingsPage(QWidget *parent = nullptr, const QString &name = QString(), const QString &iconName = QString());
public slots:
void slotSettingsChanged() Q_DECL_OVERRIDE;
......
......@@ -91,7 +91,7 @@ void OverwriteQuery::execute()
QUrl destUrl = QUrl::fromLocalFile(QDir::cleanPath(m_data.value(QStringLiteral("filename")).toString()));
QPointer<KIO::RenameDialog> dialog = new KIO::RenameDialog(
Q_NULLPTR,
nullptr,
i18nc("@title:window", "File Already Exists"),
sourceUrl,
destUrl,
......@@ -213,7 +213,7 @@ void LoadCorruptQuery::execute()
qCDebug(ARK) << "Executing LoadCorrupt prompt";
QApplication::setOverrideCursor(QCursor(Qt::ArrowCursor));
setResponse(KMessageBox::warningYesNo(Q_NULLPTR,
setResponse(KMessageBox::warningYesNo(nullptr,
xi18nc("@info", "The archive you're trying to open is corrupt.<nl/>"
"Some files may be missing or damaged."),
i18nc("@title:window", "Corrupt archive"),
......
......@@ -38,7 +38,7 @@
using namespace Kerfuffle;
// Used to speed up the loading of large archives.
static Archive::Entry *s_previousMatch = Q_NULLPTR;
static Archive::Entry *s_previousMatch = nullptr;
Q_GLOBAL_STATIC(QStringList, s_previousPieces)
ArchiveModel::ArchiveModel(const QString &dbusPathName, QObject *parent)
......@@ -206,8 +206,8 @@ QModelIndex ArchiveModel::index(int row, int column, const QModelIndex &parent)
Q_ASSERT(parentEntry->isDir());
const Archive::Entry *item = parentEntry->entries().value(row, Q_NULLPTR);
if (item != Q_NULLPTR) {
const Archive::Entry *item = parentEntry->entries().value(row, nullptr);
if (item != nullptr) {
return createIndex(row, column, const_cast<Archive::Entry*>(item));
}
}
......@@ -234,7 +234,7 @@ Archive::Entry *ArchiveModel::entryForIndex(const QModelIndex &index)
Q_ASSERT(item);
return item;
}
return Q_NULLPTR;
return nullptr;
}
int ArchiveModel::rowCount(const QModelIndex &parent) const
......@@ -311,7 +311,7 @@ bool ArchiveModel::dropMimeData(const QMimeData *data, Qt::DropAction action, in
paths << url.toLocalFile();
}