[Pkg-owncloud-commits] [owncloud-client] 88/164: DiscoveryJob: Fix progress display.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sun Mar 22 11:56:57 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 f913cd97ee1cffe6de12654e39197a16941a148f
Author: Klaas Freitag <freitag at owncloud.com>
Date: Tue Mar 3 16:00:45 2015 +0100
DiscoveryJob: Fix progress display.
This fixes #2909
---
src/libsync/discoveryphase.cpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp
index 9060a2b..39947ae 100644
--- a/src/libsync/discoveryphase.cpp
+++ b/src/libsync/discoveryphase.cpp
@@ -74,8 +74,12 @@ void DiscoveryJob::update_job_update_callback (bool local,
updateJob->_lastUpdateProgressCallbackCall.restart();
}
- QString path(QUrl::fromPercentEncoding(QByteArray(dirUrl)).section('/', -1));
- emit updateJob->folderDiscovered(local, path);
+ QByteArray pPath(dirUrl);
+ int indx = pPath.lastIndexOf('/');
+ if(indx>-1) {
+ const QString path = QUrl::fromPercentEncoding( pPath.mid(indx+1));
+ emit updateJob->folderDiscovered(local, path);
+ }
}
}
@@ -332,8 +336,9 @@ void DiscoveryMainThread::doOpendirSlot(QString subPath, DiscoveryDirectoryResul
while (fullPath.endsWith('/')) {
fullPath.chop(1);
}
- qDebug() << Q_FUNC_INFO << _pathPrefix << subPath << fullPath;
+ // emit _discoveryJob->folderDiscovered(false, subPath);
+ _discoveryJob->update_job_update_callback (false, subPath.toUtf8(), _discoveryJob);
// Result gets written in there
_currentDiscoveryDirectoryResult = r;
@@ -428,7 +433,7 @@ csync_vio_handle_t* DiscoveryJob::remote_vio_opendir_hook (const char *url,
directoryResult->code = EIO;
discoveryJob->_vioMutex.lock();
- QString qurl = QString::fromUtf8(url);
+ const QString qurl = QString::fromUtf8(url);
emit discoveryJob->doOpendirSignal(qurl, directoryResult);
discoveryJob->_vioWaitCondition.wait(&discoveryJob->_vioMutex, ULONG_MAX); // FIXME timeout?
discoveryJob->_vioMutex.unlock();
--
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