当前位置: 首页>>代码示例>>C++>>正文


C++ ApiError::toString方法代码示例

本文整理汇总了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);
}
开发者ID:XilongPei,项目名称:seafile-client,代码行数:7,代码来源:tasks.cpp

示例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);
}
开发者ID:Geosparc,项目名称:seafile-client,代码行数:7,代码来源:account-view.cpp

示例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);
}
开发者ID:JCCR,项目名称:seafile-client,代码行数:8,代码来源:download-repo-dialog.cpp

示例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()));
    }
}
开发者ID:XilongPei,项目名称:seafile-client,代码行数:9,代码来源:init-vdrive-dialog.cpp

示例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);
}
开发者ID:XilongPei,项目名称:seafile-client,代码行数:9,代码来源:tasks.cpp

示例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);
}
开发者ID:Geosparc,项目名称:seafile-client,代码行数:10,代码来源:create-repo-dialog.cpp

示例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);
}
开发者ID:Geosparc,项目名称:seafile-client,代码行数:12,代码来源:account-view.cpp

示例8: onDownloadRepoFailure

void InitVirtualDriveDialog::onDownloadRepoFailure(const ApiError& error)
{
    fail(tr("Failed to download default library:\n%1").arg(error.toString()));
}
开发者ID:XilongPei,项目名称:seafile-client,代码行数:4,代码来源:init-vdrive-dialog.cpp

示例9: serverInfoFailed

void AccountManager::serverInfoFailed(const ApiError &error)
{
    qWarning("update server info failed %s\n", error.toString().toUtf8().data());
}
开发者ID:shravanAngadi,项目名称:seafile-client,代码行数:4,代码来源:account-mgr.cpp

示例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()));
}
开发者ID:DevCybran,项目名称:seafile-client,代码行数:6,代码来源:ext-handler.cpp


注:本文中的ApiError::toString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。