void FileUploadDirectoryTask::onCreateDirFailed(const ApiError &error) { error_ = ApiRequestError; error_string_ = error.toString(); http_error_code_ = error.httpErrorCode(); FileUploadDirectoryTask::onFinished(false); }
void InitVirtualDriveDialog::onCreateDefaultRepoFailure(const ApiError& error) { if (error.type() == ApiError::HTTP_ERROR && error.httpErrorCode() == 404) { fail(tr("Failed to create default library:\n\n" "The server version must be 2.1 or higher to support this.")); } else { fail(tr("Failed to create default library:\n%1").arg(error.toString())); } }
void FileNetworkTask::onGetLinkFailed(const ApiError& error) { error_ = ApiRequestError; error_string_ = error.toString(); if (error.type() == ApiError::HTTP_ERROR) { http_error_code_ = error.httpErrorCode(); } onFinished(false); }
void AccountView::onLogoutDeviceRequestFailed(const ApiError& error) { LogoutDeviceRequest *req = (LogoutDeviceRequest *)QObject::sender(); req->deleteLater(); QString msg; if (error.httpErrorCode() == 404) { msg = tr("Logging out is not supported on your server (version too low)."); } else { msg = tr("Failed to remove information on server: %1").arg(error.toString()); } seafApplet->warningBox(msg, this); }
void ActivitiesTab::refreshFailed(const ApiError& error) { QString text; if (error.type() == ApiError::HTTP_ERROR && error.httpErrorCode() == 404) { text = tr("File Activities are only supported in Seafile Server Professional Edition."); } else { QString link = QString("<a style=\"color:#777\" href=\"#\">%1</a>").arg(tr("retry")); text = tr("Failed to get actvities information. " "Please %1").arg(link); } loading_failed_text_->setText(text); mStack->setCurrentIndex(INDEX_LOADING_FAILED_VIEW); }
void AccountView::onGetRepoTokensFailed(const ApiError& error) { GetRepoTokensRequest *req = (GetRepoTokensRequest *)QObject::sender(); req->deleteLater(); seafApplet->warningBox( tr("Failed to get repo sync information from server: %1").arg(error.toString()), this); }
void DownloadRepoDialog::onDownloadRepoRequestFailed(const ApiError& error) { QString msg = tr("Failed to get repo download information:\n%1").arg(error.toString()); seafApplet->warningBox(msg, this); setAllInputsEnabled(true); }
void CreateRepoDialog::createFailed(const ApiError& error) { mStatusText->setText(""); QString msg = tr("Failed to create library on the server:\n%1").arg(error.toString()); seafApplet->warningBox(msg, this); setAllInputsEnabled(true); }
void EventDetailsDialog::getCommitDetailsFailed(const ApiError& error) { ServerRepo repo = RepoService::instance()->getRepo(event_.repo_id); if (!repo.isValid()) { return; } if (repo.encrypted && error.type() == ApiError::HTTP_ERROR && error.httpErrorCode() == 400) { SetRepoPasswordDialog dialog(repo, this); if (dialog.exec() == QDialog::Accepted) { sendRequest(); } else { reject(); } } }
void LoginDialog::loginFailed(const ApiError& error) { switch (error.type()) { case ApiError::SSL_ERROR: onSslErrors(error.sslReply(), error.sslErrors()); break; case ApiError::NETWORK_ERROR: onNetworkError(error.networkError(), error.networkErrorString()); break; case ApiError::HTTP_ERROR: onHttpError(error.httpErrorCode()); default: // impossible break; } }
void InitVirtualDriveDialog::onDownloadRepoFailure(const ApiError& error) { fail(tr("Failed to download default library:\n%1").arg(error.toString())); }
void AccountManager::serverInfoFailed(const ApiError &error) { qWarning("update server info failed %s\n", error.toString().toUtf8().data()); }
void SeafileExtensionHandler::onLockFileFailed(const ApiError& error) { LockFileRequest *req = qobject_cast<LockFileRequest *>(sender()); QString str = req->lock() ? tr("Failed to lock file") : tr("Failed to unlock file"); seafApplet->warningBox(QString("%1: %2").arg(str, error.toString())); }