本文整理汇总了C++中ApiError::toString方法的典型用法代码示例。如果您正苦于以下问题:C++ ApiError::toString方法的具体用法?C++ ApiError::toString怎么用?C++ ApiError::toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiError
的用法示例。
在下文中一共展示了ApiError::toString方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onCreateDirFailed
void FileUploadDirectoryTask::onCreateDirFailed(const ApiError &error)
{
error_ = ApiRequestError;
error_string_ = error.toString();
http_error_code_ = error.httpErrorCode();
FileUploadDirectoryTask::onFinished(false);
}
示例2: onGetRepoTokensFailed
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);
}
示例3: onDownloadRepoRequestFailed
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);
}
示例4: onCreateDefaultRepoFailure
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()));
}
}
示例5: onGetLinkFailed
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);
}
示例6: createFailed
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);
}
示例7: onLogoutDeviceRequestFailed
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);
}
示例8: onDownloadRepoFailure
void InitVirtualDriveDialog::onDownloadRepoFailure(const ApiError& error)
{
fail(tr("Failed to download default library:\n%1").arg(error.toString()));
}
示例9: serverInfoFailed
void AccountManager::serverInfoFailed(const ApiError &error)
{
qWarning("update server info failed %s\n", error.toString().toUtf8().data());
}
示例10: onLockFileFailed
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()));
}