Exemplo n.º 1
0
// Note this functions is duplicated between AndroidDeployStep and AndroidDeployQtStep
// since it does modify the stored password in AndroidDeployQtStep it's not easily
// extractable. The situation will clean itself up once AndroidDeployStep is no longer
// necessary
QAbstractItemModel *AndroidDeployQtStep::keystoreCertificates()
{
    QString rawCerts;
    QProcess keytoolProc;
    while (!rawCerts.length() || !m_keystorePasswd.length()) {
        QStringList params;
        params << QLatin1String("-list") << QLatin1String("-v") << QLatin1String("-keystore") << m_keystorePath.toUserOutput() << QLatin1String("-storepass");
        if (!m_keystorePasswd.length())
            keystorePassword();
        if (!m_keystorePasswd.length())
            return 0;
        params << m_keystorePasswd;
        Utils::Environment env = Utils::Environment::systemEnvironment();
        env.set(QLatin1String("LANG"), QLatin1String("C"));
        keytoolProc.setProcessEnvironment(env.toProcessEnvironment());
        keytoolProc.start(AndroidConfigurations::instance().keytoolPath().toString(), params);
        if (!keytoolProc.waitForStarted() || !keytoolProc.waitForFinished()) {
            QMessageBox::critical(0, tr("Error"),
                                  tr("Failed to run keytool"));
            return 0;
        }

        if (keytoolProc.exitCode()) {
            QMessageBox::critical(0, tr("Error"),
                                  tr("Invalid password"));
            m_keystorePasswd.clear();
        }
        rawCerts = QString::fromLatin1(keytoolProc.readAllStandardOutput());
    }
    return new CertificatesModel(rawCerts, this);
}
Exemplo n.º 2
0
QProcessEnvironment PuppetCreator::processEnvironment() const
{
    Utils::Environment environment = Utils::Environment::systemEnvironment();
    m_kit->addToEnvironment(environment);
    environment.set("QML_BAD_GUI_RENDER_LOOP", "true");
    environment.set("QML_USE_MOCKUPS", "true");

    return environment.toProcessEnvironment();
}
void GdbServerProviderProcess::setEnvironment(const Utils::Environment &env)
{
    m_process->setProcessEnvironment(env.toProcessEnvironment());
}
void DesktopDeviceProcess::setEnvironment(const Utils::Environment &env)
{
    m_process->setProcessEnvironment(env.toProcessEnvironment());
}