diff options
| author | Kevin Funk <[email protected]> | 2017-11-21 10:52:14 +0100 |
|---|---|---|
| committer | Kevin Funk <[email protected]> | 2017-11-21 10:53:12 +0100 |
| commit | a6db5029acc09639fd8c7c20a7676b1ac9f36539 (patch) | |
| tree | 7b44cf022857916c483b5aeb4e418e7f648486a6 /src/views/versioncontrol | |
| parent | 464b13f3828e5cdd03438d0881c3a62c7cda6333 (diff) | |
Modernize: Use nullptr everywhere
Diffstat (limited to 'src/views/versioncontrol')
4 files changed, 12 insertions, 12 deletions
diff --git a/src/views/versioncontrol/kversioncontrolplugin.h b/src/views/versioncontrol/kversioncontrolplugin.h index b9b1f0b5b..a3be381f3 100644 --- a/src/views/versioncontrol/kversioncontrolplugin.h +++ b/src/views/versioncontrol/kversioncontrolplugin.h @@ -144,7 +144,7 @@ public: MissingVersion }; - KVersionControlPlugin(QObject* parent = 0); + KVersionControlPlugin(QObject* parent = nullptr); ~KVersionControlPlugin() override; /** diff --git a/src/views/versioncontrol/updateitemstatesthread.cpp b/src/views/versioncontrol/updateitemstatesthread.cpp index e4413fabf..574402dcd 100644 --- a/src/views/versioncontrol/updateitemstatesthread.cpp +++ b/src/views/versioncontrol/updateitemstatesthread.cpp @@ -25,7 +25,7 @@ UpdateItemStatesThread::UpdateItemStatesThread(KVersionControlPlugin* plugin, const QMap<QString, QVector<VersionControlObserver::ItemState> >& itemStates) : QThread(), - m_globalPluginMutex(0), + m_globalPluginMutex(nullptr), m_plugin(plugin), m_itemStates(itemStates) { diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index c79440882..44dffac45 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -37,10 +37,10 @@ VersionControlObserver::VersionControlObserver(QObject* parent) : m_pendingItemStatesUpdate(false), m_versionedDirectory(false), m_silentUpdate(false), - m_model(0), - m_dirVerificationTimer(0), - m_plugin(0), - m_updateItemStatesThread(0) + m_model(nullptr), + m_dirVerificationTimer(nullptr), + m_plugin(nullptr), + m_updateItemStatesThread(nullptr) { // The verification timer specifies the timeout until the shown directory // is checked whether it is versioned. Per default it is assumed that users @@ -58,7 +58,7 @@ VersionControlObserver::~VersionControlObserver() { if (m_plugin) { m_plugin->disconnect(this); - m_plugin = 0; + m_plugin = nullptr; } } @@ -163,7 +163,7 @@ void VersionControlObserver::verifyDirectory() void VersionControlObserver::slotThreadFinished() { UpdateItemStatesThread* thread = m_updateItemStatesThread; - m_updateItemStatesThread = 0; // The thread deletes itself automatically (see updateItemStates()) + m_updateItemStatesThread = nullptr; // The thread deletes itself automatically (see updateItemStates()) if (!m_plugin || !thread) { return; @@ -266,7 +266,7 @@ KVersionControlPlugin* VersionControlObserver::searchPlugin(const QUrl& director if (!pluginsAvailable) { // A searching for plugins has already been done, but no // plugins are installed - return 0; + return nullptr; } if (plugins.isEmpty()) { @@ -285,13 +285,13 @@ KVersionControlPlugin* VersionControlObserver::searchPlugin(const QUrl& director } if (plugins.isEmpty()) { pluginsAvailable = false; - return 0; + return nullptr; } } // We use the number of upUrl() calls to find the best matching plugin // for the given directory. The smaller value, the better it is (0 is best). - KVersionControlPlugin* bestPlugin = 0; + KVersionControlPlugin* bestPlugin = nullptr; int bestScore = INT_MAX; // Verify whether the current directory contains revision information diff --git a/src/views/versioncontrol/versioncontrolobserver.h b/src/views/versioncontrol/versioncontrolobserver.h index 0b702f5f1..2c2fe2940 100644 --- a/src/views/versioncontrol/versioncontrolobserver.h +++ b/src/views/versioncontrol/versioncontrolobserver.h @@ -50,7 +50,7 @@ class DOLPHIN_EXPORT VersionControlObserver : public QObject Q_OBJECT public: - explicit VersionControlObserver(QObject* parent = 0); + explicit VersionControlObserver(QObject* parent = nullptr); ~VersionControlObserver() override; void setModel(KFileItemModel* model); |
