Commit 88d3f92d authored by Méven Car's avatar Méven Car Committed by Elvis Angelaccio
Browse files

Apply sugestions

parent f6a465c9
Pipeline #45460 passed with stage
in 6 minutes and 48 seconds
...@@ -155,7 +155,7 @@ void VersionControlObserver::verifyDirectory() ...@@ -155,7 +155,7 @@ void VersionControlObserver::verifyDirectory()
} }
if (m_plugin != nullptr) { if (m_plugin != nullptr) {
if (!rootItem.url().path().startsWith(m_localeRepoRoot) || !QFile::exists(m_localeRepoRoot + '/' + m_plugin->fileName())) { if (!rootItem.url().path().startsWith(m_localRepoRoot) || !QFile::exists(m_localRepoRoot + '/' + m_plugin->fileName())) {
m_plugin = nullptr; m_plugin = nullptr;
// The directory is not versioned. Reset the verification timer to a higher // The directory is not versioned. Reset the verification timer to a higher
...@@ -310,12 +310,12 @@ KVersionControlPlugin* VersionControlObserver::searchPlugin(const QUrl& director ...@@ -310,12 +310,12 @@ KVersionControlPlugin* VersionControlObserver::searchPlugin(const QUrl& director
// first naively check if we are at working copy root // first naively check if we are at working copy root
const QString fileName = directory.path() + '/' + plugin->fileName(); const QString fileName = directory.path() + '/' + plugin->fileName();
if (QFile::exists(fileName)) { if (QFile::exists(fileName)) {
m_localeRepoRoot = directory.path(); m_localRepoRoot = directory.path();
return plugin; return plugin;
} }
auto wcRoot = plugin->localRepositoryRoot(directory.path()); auto root = plugin->localRepositoryRoot(directory.path());
if (!wcRoot.isEmpty()) { if (!root.isEmpty()) {
m_localeRepoRoot = wcRoot; m_localRepoRoot = root;
return plugin; return plugin;
} }
} }
......
...@@ -137,7 +137,7 @@ private: ...@@ -137,7 +137,7 @@ private:
bool m_pendingItemStatesUpdate; bool m_pendingItemStatesUpdate;
bool m_silentUpdate; // if true, no messages will be send during the update bool m_silentUpdate; // if true, no messages will be send during the update
// of version states // of version states
QString m_localeRepoRoot; QString m_localRepoRoot;
DolphinView* m_view; DolphinView* m_view;
KFileItemModel* m_model; KFileItemModel* m_model;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment