[Pkg-owncloud-commits] [owncloud-client] 68/498: refactoring as requested in pull request
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 79f7ea0965cfe37627eb495f87a748491ea1c8ad
Author: Christian Burger <christian at krikkel.de>
Date: Tue May 5 16:34:01 2015 +0100
refactoring as requested in pull request
---
src/gui/folder.cpp | 6 +++---
src/gui/folder.h | 2 +-
src/gui/folderman.cpp | 2 +-
src/gui/socketapi.cpp | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index eec14d1..fa50a28 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -186,12 +186,12 @@ QString Folder::path() const
return p;
}
-QString Folder::cleanPath(QString path)
+QString Folder::cleanPath()
{
- QString cleanedPath = QDir::cleanPath(path);
+ QString cleanedPath = QDir::cleanPath(_path);
if(cleanedPath.length() == 3 && cleanedPath.endsWith(":/"))
- return cleanedPath.left(2);
+ cleanedPath.remove(2,1);
return cleanedPath;
}
diff --git a/src/gui/folder.h b/src/gui/folder.h
index ee4be55..e2f47a2 100644
--- a/src/gui/folder.h
+++ b/src/gui/folder.h
@@ -74,7 +74,7 @@ public:
/**
* wrapper for QDir::cleanPath("Z:\\"), which returns "Z:\\", but we need "Z:" instead
*/
- static QString cleanPath(QString path);
+ QString cleanPath();
/**
* remote folder path
diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp
index 80ae201..6e39847 100644
--- a/src/gui/folderman.cpp
+++ b/src/gui/folderman.cpp
@@ -736,7 +736,7 @@ Folder *FolderMan::folderForPath(const QString &path)
QString absolutePath = QDir::cleanPath(path)+QLatin1Char('/');
foreach(Folder* folder, this->map().values()) {
- const QString folderPath = Folder::cleanPath(folder->path())+QLatin1Char('/');
+ const QString folderPath = folder->cleanPath()+QLatin1Char('/');
if(absolutePath.startsWith(folderPath)) {
//qDebug() << "found folder: " << folder->path() << " for " << absolutePath;
diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp
index 9a71b2d..1a7f641 100644
--- a/src/gui/socketapi.cpp
+++ b/src/gui/socketapi.cpp
@@ -402,7 +402,7 @@ void SocketApi::command_RETRIEVE_FILE_STATUS(const QString& argument, QLocalSock
DEBUG << "folder offline or not watched:" << argument;
statusString = QLatin1String("NOP");
} else {
- const QString file = QDir::cleanPath(argument).mid(Folder::cleanPath(syncFolder->path()).length()+1);
+ const QString file = QDir::cleanPath(argument).mid(syncFolder->cleanPath().length()+1);
SyncFileStatus fileStatus = this->fileStatus(syncFolder, file, _excludes);
statusString = fileStatus.toSocketAPIString();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list