]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/versioncontrol/versioncontrolobserver.cpp
Merge remote-tracking branch 'origin/Applications/17.12'
[dolphin.git] / src / views / versioncontrol / versioncontrolobserver.cpp
index c794408825c62cf962d9c97ca72ba34a10a22a1f..44dffac45d8784a43f930538b848a45690eb95ce 100644 (file)
@@ -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