"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/finder-sync/finder-sync-host.cpp" between
seafile-client-7.0.4.tar.gz and seafile-client-7.0.5.tar.gz

About: Seafile (client) for the Seafile cloud storage system.

finder-sync-host.cpp  (seafile-client-7.0.4):finder-sync-host.cpp  (seafile-client-7.0.5)
skipping to change at line 73 skipping to change at line 73
if (prefix.size() < path.size() && path[prefix.size()] != '/') if (prefix.size() < path.size() && path[prefix.size()] != '/')
return false; return false;
return true; return true;
} }
static std::mutex update_mutex_; static std::mutex update_mutex_;
static std::vector<LocalRepo> watch_set_; static std::vector<LocalRepo> watch_set_;
static std::unique_ptr<GetSharedLinkRequest, QtLaterDeleter> get_shared_link_req _; static std::unique_ptr<GetSharedLinkRequest, QtLaterDeleter> get_shared_link_req _;
static std::unique_ptr<LockFileRequest, QtLaterDeleter> lock_file_req_; static std::unique_ptr<LockFileRequest, QtLaterDeleter> lock_file_req_;
static std::unique_ptr<GetFileLockInfoRequest, QtLaterDeleter> get_lock_info_req _; static std::unique_ptr<GetFileLockInfoRequest, QtLaterDeleter> get_lock_info_req _;
static std::unique_ptr<GetUploadLinkRequest, QtLaterDeleter> get_upload_link_req _;
FinderSyncHost::FinderSyncHost() : rpc_client_(new SeafileRpcClient) { FinderSyncHost::FinderSyncHost() : rpc_client_(new SeafileRpcClient) {
rpc_client_->tryConnectDaemon(); rpc_client_->tryConnectDaemon();
connect(seafApplet->daemonManager(), SIGNAL(daemonRestarted()), this, SLOT(o nDaemonRestarted())); connect(seafApplet->daemonManager(), SIGNAL(daemonRestarted()), this, SLOT(o nDaemonRestarted()));
} }
FinderSyncHost::~FinderSyncHost() { FinderSyncHost::~FinderSyncHost() {
get_shared_link_req_.reset(); get_shared_link_req_.reset();
lock_file_req_.reset(); lock_file_req_.reset();
} }
skipping to change at line 360 skipping to change at line 361
} else { } else {
seafApplet->messageBox(tr("Failed to get lock information for file \"%1\ "").arg(file)); seafApplet->messageBox(tr("Failed to get lock information for file \"%1\ "").arg(file));
} }
} }
void FinderSyncHost::onGetFileLockInfoFailed(const ApiError& error) void FinderSyncHost::onGetFileLockInfoFailed(const ApiError& error)
{ {
const QString file = ::getBaseName(get_lock_info_req_->path()); const QString file = ::getBaseName(get_lock_info_req_->path());
seafApplet->messageBox(tr("Failed to get lock information for file \"%1\""). arg(file)); seafApplet->messageBox(tr("Failed to get lock information for file \"%1\""). arg(file));
} }
void FinderSyncHost::doGetUploadLink(const QString &path)
{
QString repo_id;
Account account;
QString path_in_repo;
if (!lookUpFileInformation(path, &repo_id, &account, &path_in_repo)) {
qWarning("[FinderSync] invalid path %s", path.toUtf8().data());
return;
}
// printf ("get upload link for %s\n", toCStr(path));
get_upload_link_req_.reset(new GetUploadLinkRequest(
account, repo_id, QString("/").append(path_in_repo)));
connect(get_upload_link_req_.get(), SIGNAL(success(const QString&)), this,
SLOT(onGetUploadLinkSuccess(const QString &)));
connect(get_upload_link_req_.get(), SIGNAL(failed(const ApiError&)), this,
SLOT(onGetUploadLinkFailed(const ApiError&)));
get_upload_link_req_->send();
}
void FinderSyncHost::onGetUploadLinkSuccess(const QString& upload_link)
{
// printf ("get upload link is %s", toCStr(upload_link));
SharedLinkDialog *dialog = new SharedLinkDialog(upload_link, NULL, false);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
dialog->raise();
dialog->activateWindow();
}
void FinderSyncHost::onGetUploadLinkFailed(const ApiError& error)
{
const QString file = ::getBaseName(get_upload_link_req_->path());
seafApplet->messageBox(tr("Failed to get upload link for file \"%1\"").arg(f
ile));
}
 End of changes. 2 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)