Example #1
0
void CloneTask::translateStateInfo()
{
    if (state == "init") {
        state_str = QObject::tr("initializing...");

    } else if (state == "connect") {
        state_str = QObject::tr("connecting server...");

    } else if (state == "index") {
        state_str = QObject::tr("indexing files...");

    } else if (state == "fetch") {
        state_str = QObject::tr("Downloading...");
        if (block_total != 0) {
            state_str += calcProgress(block_done, block_total);
        }

    } else if (state == "checkout") {
        state_str = QObject::tr("Creating folder...");
        if (checkout_total != 0) {
            state_str += calcProgress(checkout_done, checkout_total);
        }

    } else if (state == "merge") {
        state_str = QObject::tr("Merge file changes...");

    } else if (state == "done") {
        state_str = QObject::tr("Done");

    } else if (state == "canceling") {
        state_str = QObject::tr("Canceling");

    } else if (state == "canceled") {
        state_str = QObject::tr("Canceled");

    } else if (state == "error") {
        if (error_str == "index") {
            error_str = QObject::tr("Failed to index local files.");

        } else if (error_str == "checkout") {
            error_str = QObject::tr("Failed to create local files.");

        } else if (error_str == "merge") {
            error_str = QObject::tr("Failed to merge local file changes.");

        } else if (error_str == "password") {
            error_str = QObject::tr("Incorrect password. Please download again.");
        } else if (error_str == "internal") {
            error_str = QObject::tr("Internal error.");
        }
    }

    if (error_str == "ok") {
        error_str = QString();
    }
}
Example #2
0
    void pluginLoad()
    {
        Environment<>::get().SimulationDescription().setRunSteps(runSteps);
        Environment<>::get().SimulationDescription().setAuthor(author);

        calcProgress();

        output = (getGridController().getGlobalRank() == 0);
    }
Example #3
0
    void pluginLoad()
    {
        calcProgress();

        output = (getGridController().getGlobalRank() == 0);
    }