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


C++ QProcess::waitForStarted方法代码示例

本文整理汇总了C++中QProcess::waitForStarted方法的典型用法代码示例。如果您正苦于以下问题:C++ QProcess::waitForStarted方法的具体用法?C++ QProcess::waitForStarted怎么用?C++ QProcess::waitForStarted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QProcess的用法示例。


在下文中一共展示了QProcess::waitForStarted方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: accept

void KeyCreator::accept()
{
    // Validate data:

    if (editStorePass1->text().length() < 6) {
        emit warning(NULL, tr("Password must be at least 6 characters."));
        editStorePass1->setFocus();
        editStorePass1->selectAll();
        return;
    }

    if (editStorePass1->text() != editStorePass2->text()) {
        emit warning(NULL, tr("Passwords do not match."));
        editStorePass2->setFocus();
        editStorePass2->selectAll();
        return;
    }

    if (editAlias->text().isEmpty()) {
        emit warning(NULL, tr("Enter alias name."));
        editAlias->setFocus();
        editAlias->selectAll();
        return;
    }

    if (editAliasPass1->text() != editAliasPass2->text()) {
        emit warning(NULL, tr("Passwords do not match."));
        editAliasPass2->setFocus();
        editAliasPass2->selectAll();
        return;
    }

    if (editAliasPass1->text().length() < 6) {
        emit warning(NULL, tr("Password must be at least 6 characters."));
        editAliasPass1->setFocus();
        editAliasPass1->selectAll();
        return;
    }

    // Create KeyStore and Alias:

    const QString FILENAME = QFileDialog::getSaveFileName(this, NULL, NULL, "KeyStore (*.keystore)");
    if (FILENAME.isEmpty()) {
        return;
    }
    qDebug() << "Creating KeyStore...";
    const QString ENV_PATH = qgetenv("PATH");
    const QString JAVA_HOME = qgetenv("JAVA_HOME");
    const QString KEYTOOL_CMD =
            QString("keytool -genkeypair -v -keystore \"%1\" -storepass \"%10\""
                    " -alias \"%2\" -keyalg RSA -keysize 2048"
                    " -dname \"CN=%3, OU=%4, O=%5, L=%6, S=%7, C=%8\""
                    " -validity %9 -keypass \"%11\"")
                        .arg(FILENAME)
                        .arg(editAlias->text())
                        .arg(editName->text())
                        .arg(editUnit->text())
                        .arg(editOrgan->text())
                        .arg(editCity->text())
                        .arg(editState->text())
                        .arg(editCountry->text())
                        .arg(editYears->text().toInt() * 365);
    qputenv("PATH", ENV_PATH.toStdString().c_str());
    qputenv("PATH", QString("%1;%2/bin").arg(ENV_PATH, JAVA_HOME).toStdString().c_str());
    qDebug() << qPrintable(KEYTOOL_CMD.arg("*****", "*****"));
    QProcess p;
    p.start(KEYTOOL_CMD.arg(editStorePass1->text(), editAliasPass1->text()));
    qputenv("PATH", ENV_PATH.toStdString().c_str());

    if (p.waitForStarted(-1)) {
        p.waitForFinished(10000);
        if (p.exitCode() != 0) {
            QString error_text = p.readAllStandardError().trimmed();
            if (error_text.isEmpty()) error_text = p.readAllStandardOutput().trimmed();
            qDebug() << qPrintable(QString("Keytool exit code: %1").arg(p.exitCode()));
            qDebug() << error_text;
            emit warning("Keytool", tr("%1: invalid parameters").arg("Keytool"));
            return;
        }
    }
    else {
        const QString ERROR_TEXT = tr("Error starting %1.\n"
                                      "Check your JDK installation and "
                                      "PATH environment variable.").arg("Keytool");
        emit error("Keytool", ERROR_TEXT);
        return;
    }
    qDebug() << "Done.\n";
    emit success("Keytool", tr("KeyStore successfully created/updated!"));
    emit created(FILENAME);
    clear();
    QDialog::accept();
}
开发者ID:vaginessa,项目名称:apk-icon-editor,代码行数:93,代码来源:keymanager.cpp

示例2: mount

bool MountPointInfo::mount(const QString &host, const QString &mount_point, const QString &options, bool force)
{
    is_mounted = true;
    #ifdef Q_OS_UNIX
    DEBUG() << "Mounting" << host << "to" << mount_point << is_mounted;
    if(is_mounted && !force)
    {
        WARN() << "Share" << this->s_host << "is already mounted to" << this->m_mount_point;
        return true;
    }

    this->s_host = host;
    this->m_mount_point = mount_point;

    QDir tmpdir(mount_point);
    if(!tmpdir.exists())
    {
        if(!tmpdir.mkpath(tmpdir.path()))
            WARN() << "Cannot create directory" << tmpdir.path();
    }

    QProcess cmd;
    QStringList params;

    params << "/usr/bin/env";
    params << "mount";
    params << "-t";
    params << "cifs";
    params << "-o";
    //params << QString("username=%1,password=%2").arg("guest").arg("");
    if(options.length() > 0)
        params << options;
    else
        params << "guest";
    params << host;
    params << mount_point;

    cmd.start("sudo", params);

    if (!cmd.waitForStarted())
    {
        ERROR() << "Cannot mount point" << s_host << "to" << mount_point;
        is_mounted = false;
    }

    if(!cmd.waitForFinished())
    {
        ERROR() << "Not finished";
    }
    //DEBUG() << params;
    DEBUG() << cmd.readAllStandardError() << cmd.readAllStandardOutput();

    cmd.close();
    cmd.kill();

    #else
    ONLY_SUPPORTED_ON_UNIX;
    #endif //Q_OS_UNIX

    return is_mounted;
}
开发者ID:mvasilchuk,项目名称:yasem-core,代码行数:61,代码来源:mountpointinfo.cpp

示例3: argumentList

    foreach (const TestConfiguration *testConfiguration, selectedTests) {
        QScopedPointer<TestOutputReader> outputReader;
        switch (testConfiguration->testType()) {
        case TestTypeQt:
            outputReader.reset(new QtTestOutputReader(futureInterface, &testProcess,
                                                      testConfiguration->buildDirectory()));
            break;
        case TestTypeGTest:
            outputReader.reset(new GTestOutputReader(futureInterface, &testProcess,
                                                     testConfiguration->buildDirectory()));
            break;
        }
        if (futureInterface.isCanceled())
            break;

        if (!testConfiguration->project())
            continue;

        QProcessEnvironment environment = testConfiguration->environment().toProcessEnvironment();
        QString commandFilePath = executableFilePath(testConfiguration->targetFile(), environment);
        if (commandFilePath.isEmpty()) {
            futureInterface.reportResult(new FaultyTestResult(Result::MessageFatal,
                QObject::tr("Could not find command \"%1\". (%2)")
                                                   .arg(testConfiguration->targetFile())
                                                   .arg(testConfiguration->displayName())));
            continue;
        }

        if (testConfiguration->testType() == TestTypeQt) {
            QStringList argumentList(QLatin1String("-xml"));
            if (!metricsOption.isEmpty())
                argumentList << metricsOption;
            if (testConfiguration->testCases().count())
                argumentList << testConfiguration->testCases();
            testProcess.setArguments(argumentList);
        } else { // TestTypeGTest
            const QStringList &testSets = testConfiguration->testCases();
            if (testSets.size()) {
                QStringList argumentList;
                argumentList << QLatin1String("--gtest_filter=")
                                + testSets.join(QLatin1Char(':'));
                testProcess.setArguments(argumentList);
            }
        }

        testProcess.setWorkingDirectory(testConfiguration->workingDirectory());
        if (Utils::HostOsInfo::isWindowsHost())
            environment.insert(QLatin1String("QT_LOGGING_TO_CONSOLE"), QLatin1String("1"));
        testProcess.setProcessEnvironment(environment);
        testProcess.setProgram(commandFilePath);
        testProcess.start();

        bool ok = testProcess.waitForStarted();
        QTime executionTimer;
        executionTimer.start();
        bool canceledByTimeout = false;
        if (ok) {
            while (testProcess.state() == QProcess::Running) {
                if (executionTimer.elapsed() >= timeout) {
                    canceledByTimeout = true;
                    break;
                }
                if (futureInterface.isCanceled()) {
                    testProcess.kill();
                    testProcess.waitForFinished();
                    return;
                }
                eventLoop.processEvents();
            }
        }

        if (canceledByTimeout) {
            if (testProcess.state() != QProcess::NotRunning) {
                testProcess.kill();
                testProcess.waitForFinished();
            }
            futureInterface.reportResult(new FaultyTestResult(Result::MessageFatal, QObject::tr(
                    "Test case canceled due to timeout. \nMaybe raise the timeout?")));
        }
    }
开发者ID:liuxysky,项目名称:qt-creator,代码行数:80,代码来源:testrunner.cpp

示例4: mailTo

void Common::mailTo( const QUrl &url )
{
#if defined(Q_OS_WIN32)
	QString file = url.queryItemValue( "attachment" );
	QByteArray filePath = QDir::toNativeSeparators( file ).toLatin1();
	QByteArray fileName = QFileInfo( file ).fileName().toLatin1();
	QByteArray subject = url.queryItemValue( "subject" ).toLatin1();

	MapiFileDesc doc[1];
	doc[0].ulReserved = 0;
	doc[0].flFlags = 0;
	doc[0].nPosition = -1;
	doc[0].lpszPathName = const_cast<char*>(filePath.constData());
	doc[0].lpszFileName = const_cast<char*>(fileName.constData());
	doc[0].lpFileType = NULL;

	// Create message
	MapiMessage message;
	message.ulReserved = 0;
	message.lpszSubject = const_cast<char*>(subject.constData());
	message.lpszNoteText = "";
	message.lpszMessageType = NULL;
	message.lpszDateReceived = NULL;
	message.lpszConversationID = NULL;
	message.flFlags = 0;
	message.lpOriginator = NULL;
	message.nRecipCount = 0;
	message.lpRecips = NULL;
	message.nFileCount = 1;
	message.lpFiles = (lpMapiFileDesc)&doc;

	QLibrary lib("mapi32");
	typedef ULONG (PASCAL *SendMail)(ULONG,ULONG,MapiMessage*,FLAGS,ULONG);
	SendMail mapi = (SendMail)lib.resolve("MAPISendMail");
	if( mapi )
	{
		mapi( NULL, 0, &message, MAPI_LOGON_UI|MAPI_DIALOG, 0 );
		return;
	}
#elif defined(Q_OS_MAC)
	CFURLRef emailUrl = CFURLCreateWithString( kCFAllocatorDefault, CFSTR("mailto:"), 0 );
	CFURLRef appUrl = 0;
	CFStringRef appPath = 0;
	if( LSGetApplicationForURL( emailUrl, kLSRolesAll, NULL, &appUrl ) == noErr )
	{
		appPath = CFURLCopyFileSystemPath( appUrl, kCFURLPOSIXPathStyle );
		CFRelease( appUrl );
	}
	CFRelease( emailUrl );

	if( appPath )
	{
		QProcess p;
		p.start( "/usr/bin/osascript", QStringList() << "-" << url.queryItemValue("attachment") << url.queryItemValue("subject") );
		p.waitForStarted();
		QTextStream s( &p );
		if( CFStringCompare( appPath, CFSTR("/Applications/Mail.app"), 0 ) == kCFCompareEqualTo )
		{
			s << "on run argv" << endl
				<< "set vattachment to (item 1 of argv)" << endl
				<< "set vsubject to (item 2 of argv)" << endl
				<< "tell application \"Mail\"" << endl
				<< "set composeMessage to make new outgoing message at beginning with properties {visible:true}" << endl
				<< "tell composeMessage" << endl
				<< "set subject to vsubject" << endl
				<< "set content to \" \"" << endl
				<< "tell content" << endl
				<< "make new attachment with properties {file name: vattachment} at after the last word of the last paragraph" << endl
				<< "end tell" << endl
				<< "end tell" << endl
				<< "activate" << endl
				<< "end tell" << endl
				<< "end run" << endl;
		}
		else if( CFStringFind( appPath, CFSTR("Entourage"), 0 ).location != kCFNotFound )
		{
			s << "on run argv" << endl
				<< "set vattachment to (item 1 of argv)" << endl
				<< "set vsubject to (item 2 of argv)" << endl
				<< "tell application \"Microsoft Entourage\"" << endl
				<< "set vmessage to make new outgoing message with properties" << endl
				<< "{subject:vsubject, attachments:vattachment}" << endl
				<< "open vmessage" << endl
				<< "activate" << endl
				<< "end tell" << endl
				<< "end run" << endl;
		}
#if 0
		else if(CFStringCompare(appPath, CFSTR("/Applications/Thunderbird.app"), 0) == kCFCompareEqualTo)
		{
			// TODO: Handle Thunderbird here? Impossible?
		}
#endif
		CFRelease( appPath );
		p.closeWriteChannel();
		p.waitForFinished();
		if( p.exitCode() == 0 )
			return;
	}
#elif defined(Q_OS_LINUX)
//.........这里部分代码省略.........
开发者ID:Krabi,项目名称:idkaart_public,代码行数:101,代码来源:Common.cpp

示例5: getOperatingSystem

static QString getOperatingSystem()
{
#if defined (Q_OS_WIN32)
    switch(QSysInfo::windowsVersion())
    {
        case QSysInfo::WV_NT:
            return QString::fromLatin1("Windows NT");
        case QSysInfo::WV_2000:
            return QString::fromLatin1("Windows 2000");
        case QSysInfo::WV_XP:
            return QString::fromLatin1("Windows XP");
        case QSysInfo::WV_2003:
            return QString::fromLatin1("Windows Server 2003");
        case QSysInfo::WV_VISTA:
            return QString::fromLatin1("Windows Vista");
        case QSysInfo::WV_WINDOWS7:
            return QString::fromLatin1("Windows 7");
#if QT_VERSION >= 0x040800
        case QSysInfo::WV_WINDOWS8:
            return QString::fromLatin1("Windows 8");
#endif
#if ((QT_VERSION >= 0x050200) || (QT_VERSION >= 0x040806 && QT_VERSION < 0x050000))
        case QSysInfo::WV_WINDOWS8_1:
            return QString::fromLatin1("Windows 8.1");
#endif
#if QT_VERSION >= 0x040807
        case QSysInfo::WV_WINDOWS10:
            return QString::fromLatin1("Windows 10");
#endif
        default:
            return QString::fromLatin1("Windows");
    }
#elif defined (Q_OS_MAC)
    switch(QSysInfo::MacVersion())
    {
        case QSysInfo::MV_10_3:
            return QString::fromLatin1("Mac OS X 10.3");
        case QSysInfo::MV_10_4:
            return QString::fromLatin1("Mac OS X 10.4");
        case QSysInfo::MV_10_5:
            return QString::fromLatin1("Mac OS X 10.5");
#if QT_VERSION >= 0x040700
        case QSysInfo::MV_10_6:
            return QString::fromLatin1("Mac OS X 10.6");
#endif
#if QT_VERSION >= 0x040800
        case QSysInfo::MV_10_7:
            return QString::fromLatin1("Mac OS X 10.7");
        case QSysInfo::MV_10_8:
            return QString::fromLatin1("Mac OS X 10.8");
        case QSysInfo::MV_10_9:
            return QString::fromLatin1("Mac OS X 10.9");
#endif
        default:
            return QString::fromLatin1("Mac OS X");
    }
#elif defined (Q_OS_LINUX)
    QString exe(QLatin1String("lsb_release"));
    QStringList args;
    args << QLatin1String("-ds");
    QProcess proc;
    proc.setEnvironment(QProcess::systemEnvironment());
    proc.start(exe, args);
    if (proc.waitForStarted() && proc.waitForFinished()) {
        QByteArray info = proc.readAll();
        info.replace('\n',"");
        return QString::fromLatin1((const char*)info);
    }

    return QString::fromLatin1("Linux");
#elif defined (Q_OS_UNIX)
    return QString::fromLatin1("UNIX");
#else
    return QString();
#endif
}
开发者ID:AllenBootung,项目名称:FreeCAD,代码行数:76,代码来源:Splashscreen.cpp

示例6: executeOBabel

bool OBConvert::executeOBabel(const QStringList& args, const QByteArray& input,
                              QByteArray& output)
{
  QString program;
  // If the OBABEL_EXECUTABLE environment variable is set, then
  // use that to find obabel
  QByteArray obabelExec = qgetenv("OBABEL_EXECUTABLE");
  if (!obabelExec.isEmpty()) {
    program = obabelExec;
  } else {
// Otherwise, search in the current directory, and then ../bin
#ifdef _WIN32
    QString executable = "obabel.exe";
#else
    QString executable = "obabel";
#endif
    QString path = QCoreApplication::applicationDirPath();
    if (QFile::exists(path + "/" + executable))
      program = path + "/" + executable;
    else if (QFile::exists(path + "/../bin/" + executable))
      program = path + "/../bin/" + executable;
    else {
      qDebug() << "Error: could not find obabel executable!";
      return false;
    }
  }

  QProcess p;
  p.start(program, args);

  if (!p.waitForStarted()) {
    qDebug() << "Error: The obabel executable at" << program
             << "failed to start.";
    return false;
  }

  // Give it the input!
  p.write(input.data());

  // Close the write channel
  p.closeWriteChannel();

  if (!p.waitForFinished()) {
    qDebug() << "Error: " << program << "failed to finish.";
    output = p.readAll();
    qDebug() << "Output is as follows:\n" << output;
    return false;
  }

  int exitStatus = p.exitStatus();
  output = p.readAll();

  if (exitStatus == QProcess::CrashExit) {
    qDebug() << "Error: obabel crashed!\n";
    qDebug() << "Output is as follows:\n" << output;
    return false;
  }

  if (exitStatus != QProcess::NormalExit) {
    qDebug() << "Error: obabel finished abnormally with exit code "
             << exitStatus;
    qDebug() << "Output is as follows:\n" << output;
    return false;
  }

  // We did it!
  return true;
}
开发者ID:xtalopt,项目名称:XtalOpt,代码行数:68,代码来源:obconvert.cpp

示例7: initAacEncImpl

void InitAacEncTask::initAacEncImpl(const char *const toolName, const char *const fileNames[], const quint32 &toolMinVersion, const quint32 &verDigits, const quint32 &verShift, const char *const verStr, QRegExp &regExpVer, QRegExp &regExpSig)
{
	static const size_t MAX_FILES = 8;
	const QString appPath = QDir(QCoreApplication::applicationDirPath()).canonicalPath();
	
	QFileInfoList fileInfo;
	for(size_t i = 0; fileNames[i] && (fileInfo.count() < MAX_FILES); i++)
	{
		fileInfo.append(QFileInfo(QString("%1/%2").arg(appPath, QString::fromLatin1(fileNames[i]))));
	}
	
	for(QFileInfoList::ConstIterator iter = fileInfo.constBegin(); iter != fileInfo.constEnd(); iter++)
	{
		if(!(iter->exists() && iter->isFile()))
		{
			qDebug("%s encoder binaries not found -> Encoding support will be disabled!\n", toolName);
			return;
		}
		if((iter->suffix().compare("exe", Qt::CaseInsensitive) == 0) && (!MUtils::OS::is_executable_file(iter->canonicalFilePath())))
		{
			qDebug("%s executable is invalid -> %s support will be disabled!\n", MUTILS_UTF8(iter->fileName()), toolName);
			return;
		}
	}

	qDebug("Found %s encoder binary:\n%s\n", toolName, MUTILS_UTF8(fileInfo.first().canonicalFilePath()));

	//Lock the encoder binaries
	QScopedPointer<LockedFile> binaries[MAX_FILES];
	try
	{
		size_t index = 0;
		for(QFileInfoList::ConstIterator iter = fileInfo.constBegin(); iter != fileInfo.constEnd(); iter++)
		{
			binaries[index++].reset(new LockedFile(iter->canonicalFilePath()));
		}
	}
	catch(...)
	{
		qWarning("Failed to get excluive lock to encoder binary -> %s support will be disabled!", toolName);
		return;
	}

	QProcess process;
	MUtils::init_process(process, fileInfo.first().absolutePath());

	process.start(fileInfo.first().canonicalFilePath(), QStringList() << "-help");

	if(!process.waitForStarted())
	{
		qWarning("%s process failed to create!", toolName);
		qWarning("Error message: \"%s\"\n", process.errorString().toLatin1().constData());
		process.kill();
		process.waitForFinished(-1);
		return;
	}

	quint32 toolVersion = 0;
	bool sigFound = regExpSig.isEmpty() ? true : false;

	while(process.state() != QProcess::NotRunning)
	{
		if(!process.waitForReadyRead())
		{
			if(process.state() == QProcess::Running)
			{
				qWarning("%s process time out -> killing!", toolName);
				process.kill();
				process.waitForFinished(-1);
				return;
			}
		}
		while(process.canReadLine())
		{
			QString line = QString::fromUtf8(process.readLine().constData()).simplified();
			if((!sigFound) && regExpSig.lastIndexIn(line) >= 0)
			{
				sigFound = true;
				continue;
			}
			if(sigFound && (regExpVer.lastIndexIn(line) >= 0))
			{
				quint32 tmp[8];
				if(MUtils::regexp_parse_uint32(regExpVer, tmp, qMin(verDigits, 8U)))
				{
					toolVersion = 0;
					for(quint32 i = 0; i < verDigits; i++)
					{
						toolVersion = (toolVersion * verShift) + qBound(0U, tmp[i], (verShift - 1));
					}
				}
			}
		}
	}

	if(toolVersion <= 0)
	{
		qWarning("%s version could not be determined -> Encoding support will be disabled!", toolName);
		return;
	}
//.........这里部分代码省略.........
开发者ID:wyrover,项目名称:LameXP,代码行数:101,代码来源:Thread_Initialization.cpp

示例8: launchProcess

void ProcessLauncher::launchProcess()
{
    QString commandLine;
    if (m_launchOptions.processType == WebProcess) {
        commandLine = QLatin1String("%1 \"%2\" %3");
        QByteArray webProcessPrefix = qgetenv("QT_WEBKIT2_WP_CMD_PREFIX");
        commandLine = commandLine.arg(QLatin1String(webProcessPrefix.constData())).arg(QString(executablePathOfWebProcess()));
#if ENABLE(PLUGIN_PROCESS)
    } else if (m_launchOptions.processType == PluginProcess) {
        commandLine = QLatin1String("%1 \"%2\" %3 %4");
        QByteArray pluginProcessPrefix = qgetenv("QT_WEBKIT2_PP_CMD_PREFIX");
        commandLine = commandLine.arg(QLatin1String(pluginProcessPrefix.constData())).arg(QString(executablePathOfPluginProcess()));
#endif
    } else
        ASSERT_NOT_REACHED();

#if OS(DARWIN)
    // Create the listening port.
    mach_port_t connector;
    mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &connector);

    // Insert a send right so we can send to it.
    mach_port_insert_right(mach_task_self(), connector, connector, MACH_MSG_TYPE_MAKE_SEND);

    // Register port with a service name to the system.
    QString serviceName = QStringLiteral("com.nokia.Qt.WebKit.QtWebProcess-%1-%2");
    serviceName = serviceName.arg(QString().setNum(getpid()), QString().setNum((size_t)this));
    kern_return_t kr = bootstrap_register2(bootstrap_port, const_cast<char*>(serviceName.toUtf8().data()), connector, 0);
    ASSERT_UNUSED(kr, kr == KERN_SUCCESS);

    commandLine = commandLine.arg(serviceName);
#elif OS(WINDOWS)
    CoreIPC::Connection::Identifier connector, clientIdentifier;
    if (!CoreIPC::Connection::createServerAndClientIdentifiers(connector, clientIdentifier)) {
        // FIXME: What should we do here?
        ASSERT_NOT_REACHED();
    }
    commandLine = commandLine.arg(qulonglong(clientIdentifier));
    // Ensure that the child process inherits the client identifier.
    ::SetHandleInformation(clientIdentifier, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
#else
    int sockets[2];
    if (socketpair(AF_UNIX, SOCKET_TYPE, 0, sockets) == -1) {
        qDebug() << "Creation of socket failed with errno:" << errno;
        ASSERT_NOT_REACHED();
        return;
    }

    // Don't expose the ui socket to the web process
    while (fcntl(sockets[1], F_SETFD, FD_CLOEXEC)  == -1) {
        if (errno != EINTR) {
            ASSERT_NOT_REACHED();
            while (close(sockets[0]) == -1 && errno == EINTR) { }
            while (close(sockets[1]) == -1 && errno == EINTR) { }
            return;
        }
    }

    int connector = sockets[1];
    commandLine = commandLine.arg(sockets[0]);
#endif

#if ENABLE(PLUGIN_PROCESS)
    if (m_launchOptions.processType == PluginProcess)
        commandLine = commandLine.arg(QString(m_launchOptions.extraInitializationData.get("plugin-path")));
#endif

    QProcess* webProcessOrSUIDHelper = new QtWebProcess();
    webProcessOrSUIDHelper->setProcessChannelMode(QProcess::ForwardedChannels);

#if ENABLE(SUID_SANDBOX_LINUX)
    if (m_launchOptions.processType == WebProcess) {
        QString sandboxCommandLine = QLatin1String("\"%1\" \"%2\" %3");
        sandboxCommandLine = sandboxCommandLine.arg(QCoreApplication::applicationDirPath() + QLatin1String("/SUIDSandboxHelper"));
        sandboxCommandLine = sandboxCommandLine.arg(executablePathOfWebProcess());
        sandboxCommandLine = sandboxCommandLine.arg(sockets[0]);

        webProcessOrSUIDHelper->start(sandboxCommandLine);
    } else
        webProcessOrSUIDHelper->start(commandLine);
#else
    webProcessOrSUIDHelper->start(commandLine);
#endif

#if OS(UNIX) && !OS(DARWIN)
    // Don't expose the web socket to possible future web processes
    while (fcntl(sockets[0], F_SETFD, FD_CLOEXEC) == -1) {
        if (errno != EINTR) {
            ASSERT_NOT_REACHED();
            delete webProcessOrSUIDHelper;
            return;
        }
    }
#endif

    if (!webProcessOrSUIDHelper->waitForStarted()) {
        qDebug() << "Failed to start" << commandLine;
        ASSERT_NOT_REACHED();
#if OS(DARWIN)
        mach_port_deallocate(mach_task_self(), connector);
//.........这里部分代码省略.........
开发者ID:alfintatorkace,项目名称:osx-10.9-opensource,代码行数:101,代码来源:ProcessLauncherQt.cpp

示例9: main


//.........这里部分代码省略.........
        QString fromDomaine = getenv("DOMAIN");

        MailboxList& from = instance.header().from();
        for (MailboxList::iterator i = from.begin(); i != from.end(); i++) {
            i->mailbox(fromMailbox.toStdString());
            i->domain(fromDomaine.toStdString());
        }

        // Génération du to
        Mailbox mailbox;
        mailbox.label(libelle.toStdString());
        mailbox.mailbox(email.split('@').at(0).toStdString());
        mailbox.domain(email.split('@').at(1).toStdString());
        MailboxList to;
        to.push_back(mailbox);
        instance.header().to(to.str());

        // substitution des marqueurs
        string url = settings.value("modele_url", "http://localhost/%1/%2").toString().arg(id_evenement).arg(id_personne).toStdString();
        string affectations = "";
        string affectations_html = "";
        if (!query_destinataires.value("id_disponibilite").isNull()) { // le destinataire est inscrit à l'évènement et a peut-être des affectations
            int id_disponibilite = query_destinataires.value("id_disponibilite").toInt();
            query_affectations.addBindValue(id_disponibilite);
            if (!query_affectations.exec()) {
                qCritical()
                        << "Erreur d'execution de la requête de lecture des affectations du destinataire :"
                        << query_affectations.lastError();
                cout << "4.3.5 System incorrectly configured" << endl;
                return EX_CONFIG;
            }
            if (query_affectations.size() > 0) { // il a des affectations
                affectations_html = settings.value("modele_affectations_html_prefixe", "<table><tr><th>De</th><th>à</th><th>Poste</th></tr>").toString().toStdString();
                while (query_affectations.next()) {
                    QString debut = query_affectations.value("debut").toDateTime().toString(); // TODO : formater les dates et les heures
                    QString fin = query_affectations.value("fin").toDateTime().toString();
                    QString nom = query_affectations.value("nom").toString();
                    affectations += settings.value("modele_affectations_texte", "%1 → %2 : %3\n").toString().arg(debut, fin, nom).toStdString();
                    affectations_html += settings.value("modele_affectations_html", "<tr><td>%1</td><td>%2</td><td>%3</td></tr>").toString().arg(debut, fin, nom).toStdString(); // TODO : htmlentities()
                }
                affectations_html += settings.value("modele_affectations_html_suffixe", "</table>").toString().toStdString();
            }
        }
        substituer(&instance, url, affectations, affectations_html);

        // envoi du message et marquage des destinataires traités
        QProcess sendmail;
        QStringList arguments;
        arguments << "-f" << QString("%[email protected]%2").arg(fromMailbox).arg(fromDomaine);
        arguments << email;
        stringstream ss; ss << instance;
        QString entree = QString::fromStdString(ss.str());
        entree.replace(QString("\n.\n"), QString("\n..\n"));
        sendmail.start(programme, arguments);
        if (sendmail.waitForStarted()) {
            sendmail.write(entree.toUtf8());
            sendmail.closeWriteChannel();
            if (sendmail.waitForFinished() && sendmail.exitStatus() == QProcess::NormalExit && sendmail.exitCode() == EX_OK) {
                setLotPersonneTraite.bindValue(":reussi", true);
                setLotPersonneTraite.bindValue("erreur", QVariant());
            } else {
                setLotPersonneTraite.bindValue(":reussi", false);
                setLotPersonneTraite.bindValue("erreur", strerror(sendmail.exitCode()));
            }
        } else {
            setLotPersonneTraite.bindValue(":reussi", false);
            setLotPersonneTraite.bindValue(":erreur", sendmail.readAllStandardError());
        }
        setLotPersonneTraite.bindValue(":id_lot", id_lot);
        setLotPersonneTraite.bindValue(":id_personne", id_personne);
        if(!setLotPersonneTraite.exec()) {
            qCritical()
                << "Erreur d'execution de la requête de marquage des envois traités :"
                << setLotPersonneTraite.lastError();
            cout << "4.3.5 System incorrectly configured" << endl;
            return EX_CONFIG;
        }
    }
    // Marquage du lot traité
    QString sender(getenv("SENDER"));
    setLotTraite.bindValue(":id_lot", id_lot);

    stringstream b;
    b << modele;
    string modele_lot = b.str();
    setLotTraite.bindValue(":modele", modele_lot.c_str());
    setLotTraite.bindValue(":expediteur", sender);
    if(!setLotTraite.exec()) {
        qCritical()
            << "Erreur d'execution de la requête de marquage des envois traités :"
            << setLotTraite.lastError();
        cout << "2.1.5 Destination address valid mais le lot n'a pas été marqué 'traité'" << endl;
        return EX_OK;
    }

    // TODO : poster à SENDER la liste des adresses, nom, prenom, ville et identifiant des destinataires en erreur, le nombre d'envois faits (réussis et ratés), un rappel des sujet et date du message original

    cout << "2.1.5 Destination address valid" << endl;
    return EX_OK;
}
开发者ID:sebastiendu,项目名称:laguntzaile,代码行数:101,代码来源:main.cpp

示例10: ctkDICOMApplicationTest1

int ctkDICOMApplicationTest1(int argc, char * argv []) {
  
  QApplication app(argc, argv);
  QTextStream out(stdout);

  if ( argc < 10 )
  {
    out << "ERROR: invalid arguments.  Should be:\n";
    out << " ctkDICOMApplicationTest1 <dcmqrscp> <configfile> <dicomData1> <dcmData2> <storescu> <ctkDICOMQuery> <ctkDICOMRetrieve> <retrieveDirectory>\n";
    return EXIT_FAILURE;
  }

  QString dcmqrscp_exe  (argv[1]);
  QString dcmqrscp_cfg  (argv[2]);
  QString dicomData1  (argv[3]);
  QString dicomData2  (argv[4]);
  QString storescu_exe  (argv[5]);
  QString ctkDICOMQuery_exe  (argv[6]);
  QString ctkDICOMQuery_db_file  (argv[7]);
  QString ctkDICOMRetrieve_exe  (argv[8]);
  QString ctkDICOMRetrieve_directory  (argv[9]);

  //
  // first, start the server process
  //

  QProcess *dcmqrscp = new QProcess(0);
  QStringList dcmqrscp_args;
  dcmqrscp_args << "--config" << dcmqrscp_cfg;
  dcmqrscp_args << "--debug" << "--verbose";
  dcmqrscp_args << "11112";

  try
  {
    out << "starting server" << dcmqrscp_exe << "\n";
    out << "with args " << dcmqrscp_args.join(" ") << "\n";
    dcmqrscp->start(dcmqrscp_exe, dcmqrscp_args);
    dcmqrscp->waitForStarted();
  }
  catch (std::exception e)
  {
    out << "ERROR: could not start server" << e.what();
    return EXIT_FAILURE;
  }


  //
  // now push some dicom data in using storescp
  //

  QProcess *storescu = new QProcess(0);
  QStringList storescu_args;
  storescu_args << "-aec" << "CTK_AE";
  storescu_args << "-aet" << "CTK_AE";
  storescu_args << "localhost" << "11112";
  storescu_args << dicomData1;
  storescu_args << dicomData2;

  try
  {
    out << "running client" << storescu_exe << "\n";
    out << "with args" << storescu_args.join(" ") << "\n";
    storescu->start(storescu_exe, storescu_args);
    storescu->waitForFinished();
    out << "storescu Finished.\n";
    out << "Standard Output:\n";
    out << storescu->readAllStandardOutput();
    out << "Standard Error:\n";
    out << storescu->readAllStandardError();
  }
  catch (std::exception e)
  {
    out << "ERROR: could not start client" << e.what();
    return EXIT_FAILURE;
  }

  //
  // now query the server to see if the data arrived okay
  // - our database file will be updated with metadata from the query
  //

  QProcess *ctkDICOMQuery = new QProcess(0);
  QStringList ctkDICOMQuery_args;
  ctkDICOMQuery_args << ctkDICOMQuery_db_file;
  ctkDICOMQuery_args << "CTK_AE" << "CTK_AE";
  ctkDICOMQuery_args << "localhost" << "11112";

  try
  {
    out << "running client" << ctkDICOMQuery_exe << "\n";
    out << "with args" << ctkDICOMQuery_args.join(" ") << "\n";
    ctkDICOMQuery->start(ctkDICOMQuery_exe, ctkDICOMQuery_args);
    ctkDICOMQuery->waitForFinished();
    out << "ctkDICOMQuery Finished.\n";
    out << "Standard Output:\n";
    out << ctkDICOMQuery->readAllStandardOutput();
    out << "Standard Error:\n";
    out << ctkDICOMQuery->readAllStandardError();
  }
  catch (std::exception e)
//.........这里部分代码省略.........
开发者ID:xplanes,项目名称:CTK,代码行数:101,代码来源:ctkDICOMApplicationTest1.cpp

示例11: executeFFMpegPipe

/** Runs the specified command (should be ffmpeg), and lets
 *  writeFrame pipe data into it 1 frame at a time.
 *
 *  @param[in]  strCmd A string containing the command to execute and
 *              all of its arguments
 *  @param[out] progress A function that takes one float argument
 *              (the percentage of the ffmpeg operation complete) and
 *              may display the output to the user in any way it
 *              sees fit.
 *  @param[in]  writeFrame A function that takes two arguments, a
 *              process (the ffmpeg process) and an integer
 *              (frames processed or -1, see full description).
 *              This function should write a single frame to the
 *              process. The function returns true value if it
 *              actually wrote a frame.
 *
 *  This function operates generally as follows:
 *  1. Spawn process with the command from strCmd
 *  2. Check ffmpeg's output for a progress update.
 *  3. Add frames with writeFrame until it returns false.
 *  4. Repeat from step 2 until all frames have been written.
 *
 *  The idea is that there are two forms of processing occuring
 *  simultaneously, generating frames to send to ffmpeg, and ffmpeg
 *  encoding those frames. Whether these this actually occur
 *  concurrently or one after another appears to depend on the environment.
 *
 *  The writeFrame function deserves a bit of extra details. It does
 *  not only return false when there is an error in generating or
 *  writing a frame, it also does it when it wants to "return control"
 *  to the rest of the executeFFMpegPipe function for the purposes of
 *  reading updates from ffmpeg's output. This should be done every
 *  once in a while if possible, but with some formats (specifically gif),
 *  all frames must be loaded before any processing can continue, so
 *  there is no point returning false for it until all frames have
 *  been written. writeFrame is also responsible for closing the writeChannel
 *  of the process when it has finished writing all frames. This indicates
 *  to executeFFMpegPipe that it no longer needs to call writeFrame.
 *
 *  @return Returns Status::OK if everything went well, and Status::FAIL
 *  and error is detected (usually a non-zero exit code for ffmpeg).
 */
Status MovieExporter::executeFFMpegPipe(QString strCmd, std::function<void(float)> progress, std::function<bool(QProcess&, int)> writeFrame)
{
    qDebug() << strCmd;

    QProcess ffmpeg;
    ffmpeg.setReadChannel(QProcess::StandardOutput);
    // FFmpeg writes to stderr only for some reason, so we just read both channels together
    ffmpeg.setProcessChannelMode(QProcess::MergedChannels);
    ffmpeg.start(strCmd);
    if (ffmpeg.waitForStarted())
    {
        int framesGenerated = 0;
        int lastFrameProcessed = 0;
        const int frameStart = mDesc.startFrame;
        const int frameEnd = mDesc.endFrame;
        while(ffmpeg.state() == QProcess::Running)
        {
            if (mCanceled)
            {
                ffmpeg.terminate();
                return Status::CANCELED;
            }

            // Check FFmpeg progress

            int framesProcessed = -1;
            if(ffmpeg.waitForReadyRead(10))
            {
                QString output(ffmpeg.readAll());
                QStringList sList = output.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
                for (const QString& s : sList)
                {
                    qDebug() << "[ffmpeg]" << s;
                }
                if(output.startsWith("frame="))
                {
                    lastFrameProcessed = framesProcessed = output.mid(6, output.indexOf(' ')).toInt();
                }
            }

            if(!ffmpeg.isWritable())
            {
                continue;
            }

            while(writeFrame(ffmpeg, framesProcessed))
            {
                framesGenerated++;

                const float percentGenerated = framesGenerated / static_cast<float>(frameEnd - frameStart);
                const float percentConverted = lastFrameProcessed / static_cast<float>(frameEnd - frameStart);
                progress((percentGenerated + percentConverted) / 2);
            }
            const float percentGenerated = framesGenerated / static_cast<float>(frameEnd - frameStart);
            const float percentConverted = lastFrameProcessed / static_cast<float>(frameEnd - frameStart);
            progress((percentGenerated + percentConverted) / 2);
        }

//.........这里部分代码省略.........
开发者ID:chchwy,项目名称:pencil2d,代码行数:101,代码来源:movieexporter.cpp

示例12: rebuildNoteHTML

/* Take the ENML note and transform it into HTML that WebKit will
  not complain about */
QByteArray NoteFormatter::rebuildNoteHTML() {

    QLOG_DEBUG() << "Rebuilding Note: " << QString::fromStdString(note.guid) << " : " <<
                    QString::fromStdString(note.title);

    formatError = false;
    readOnly = false;

    // First try to read the document.  If it fails we need to clean it up
    content.append(QString::fromStdString(note.content));
    QDomDocument doc;
    QString emsg;
    bool goodReturn = doc.setContent(content, &emsg);

    if (!goodReturn) {
        QLOG_DEBUG() << "Error with initial document: " << emsg << " running through tidy";
        // Run it through "tidy".  It is a program which will fix any invalid XML
        // and give us the results back through stdout.  In a perfect world this
        // wouldn't be needed, but I've seen times where the ENML is bad for some reason.
        QProcess tidyProcess;
        tidyProcess.start("tidy -xml -raw -q -e", QIODevice::ReadWrite|QIODevice::Unbuffered);
        QLOG_DEBUG() << "Starting tidy " << tidyProcess.waitForStarted();
        QByteArray b;
        b.append(QString::fromStdString(note.content));
        tidyProcess.write(b);
        tidyProcess.closeWriteChannel();
        QLOG_DEBUG() << "Stopping tidy " << tidyProcess.waitForFinished() << " Return Code: " << tidyProcess.state();
        QLOG_DEBUG() << "Tidy Errors:" << tidyProcess.readAllStandardError();
        content = tidyProcess.readAllStandardOutput();

        // If the content is null, then we had a problem.  Just risk going forward without tidy cleanup
        if (content.size() == 0)
            content = b;
        doc.setContent(content);
    }
    QLOG_DEBUG() << doc.toString();
    // Remove all the temporary file names
    tempFiles.clear();
    modifyTags(doc);

    // If we have search criteria, then do the highlighting
    if (enableHighlight)
        doc = addHighlight(doc);

    // Finish up and return the HTML to the user
    QDomElement docElem = doc.documentElement();
    docElem.setTagName("body");
    content = doc.toByteArray(3);
        qint32 index = content.indexOf("<body");
    content.remove(0,index);
    content.prepend("<style type=\"text/css\">.en-crypt-temp { border-collapse:collapse; border-style:solid; border-color:blue; padding:0.0mm 0.0mm 0.0mm 0.0mm; }</style>");
    content.prepend("<style type=\"text/css\">en-hilight { background-color: rgb(255,255,0) }</style>");
    content.prepend("<style> img { height:auto; width:auto; max-height:auto; max-width:100%; }</style>");
    content.prepend("<head><meta http-equiv=\"content-type\" content=\"text-html; charset=utf-8\"></head>");
    content.prepend("<html>");
    content.append("</html>");

    if (!formatError && !readOnly) {
        NotebookTable ntable;
        qint32 notebookLid = ntable.getLid(note.notebookGuid);
        if (ntable.isReadOnly(notebookLid))
            readOnly = true;
    }
    if (note.__isset.active && !note.active)
        readOnly = true;
    return content;
}
开发者ID:,项目名称:,代码行数:69,代码来源:

示例13: if

OsproberEntryList
runOsprober( PartitionCoreModule* core )
{
    QString osproberOutput;
    QProcess osprober;
    osprober.setProgram( "os-prober" );
    osprober.setProcessChannelMode( QProcess::SeparateChannels );
    osprober.start();
    if ( !osprober.waitForStarted() )
    {
        cDebug() << "ERROR: os-prober cannot start.";
    }
    else if ( !osprober.waitForFinished( 60000 ) )
    {
        cDebug() << "ERROR: os-prober timed out.";
    }
    else
    {
        osproberOutput.append(
            QString::fromLocal8Bit(
                osprober.readAllStandardOutput() ).trimmed() );
    }

    QString osProberReport( "Osprober lines, clean:\n" );
    QStringList osproberCleanLines;
    OsproberEntryList osproberEntries;
    const auto lines = osproberOutput.split( '\n' );
    for ( const QString& line : lines )
    {
        if ( !line.simplified().isEmpty() )
        {
            QStringList lineColumns = line.split( ':' );
            QString prettyName;
            if ( !lineColumns.value( 1 ).simplified().isEmpty() )
                prettyName = lineColumns.value( 1 ).simplified();
            else if ( !lineColumns.value( 2 ).simplified().isEmpty() )
                prettyName = lineColumns.value( 2 ).simplified();

            QString path = lineColumns.value( 0 ).simplified();
            if ( !path.startsWith( "/dev/" ) ) //basic sanity check
                continue;

            FstabEntryList fstabEntries = lookForFstabEntries( path );
            QString homePath = findPartitionPathForMountPoint( fstabEntries, "/home" );

            osproberEntries.append( { prettyName,
                                      path,
                                      QString(),
                                      canBeResized( core, path ),
                                      lineColumns,
                                      fstabEntries,
                                      homePath } );
            osproberCleanLines.append( line );
        }
    }
    osProberReport.append( osproberCleanLines.join( '\n' ) );
    cDebug() << osProberReport;

    Calamares::JobQueue::instance()->globalStorage()->insert( "osproberLines", osproberCleanLines );

    return osproberEntries;
}
开发者ID:dgikiller,项目名称:calamares,代码行数:62,代码来源:PartUtils.cpp

示例14: QString

QString
findPartitionPathForMountPoint( const FstabEntryList& fstab,
                                const QString& mountPoint )
{
    if ( fstab.isEmpty() )
        return QString();

    for ( const FstabEntry& entry : fstab )
    {
        if ( entry.mountPoint == mountPoint )
        {
            QProcess readlink;
            QString partPath;

            if ( entry.partitionNode.startsWith( "/dev" ) ) // plain dev node
            {
                partPath = entry.partitionNode;
            }
            else if ( entry.partitionNode.startsWith( "LABEL=" ) )
            {
                partPath = entry.partitionNode.mid( 6 );
                partPath.remove( "\"" );
                partPath.replace( "\\040", "\\ " );
                partPath.prepend( "/dev/disk/by-label/" );
            }
            else if ( entry.partitionNode.startsWith( "UUID=" ) )
            {
                partPath = entry.partitionNode.mid( 5 );
                partPath.remove( "\"" );
                partPath = partPath.toLower();
                partPath.prepend( "/dev/disk/by-uuid/" );
            }
            else if ( entry.partitionNode.startsWith( "PARTLABEL=" ) )
            {
                partPath = entry.partitionNode.mid( 10 );
                partPath.remove( "\"" );
                partPath.replace( "\\040", "\\ " );
                partPath.prepend( "/dev/disk/by-partlabel/" );
            }
            else if ( entry.partitionNode.startsWith( "PARTUUID=" ) )
            {
                partPath = entry.partitionNode.mid( 9 );
                partPath.remove( "\"" );
                partPath = partPath.toLower();
                partPath.prepend( "/dev/disk/by-partuuid/" );
            }

            // At this point we either have /dev/sda1, or /dev/disk/by-something/...

            if ( partPath.startsWith( "/dev/disk/by-" ) ) // we got a fancy node
            {
                readlink.start( "readlink", { "-en", partPath });
                if ( !readlink.waitForStarted( 1000 ) )
                    return QString();
                if ( !readlink.waitForFinished( 1000 ) )
                    return QString();
                if ( readlink.exitCode() != 0 || readlink.exitStatus() != QProcess::NormalExit )
                    return QString();
                partPath = QString::fromLocal8Bit(
                               readlink.readAllStandardOutput() ).trimmed();
            }

            return partPath;
        }
    }

    return QString();
}
开发者ID:dgikiller,项目名称:calamares,代码行数:68,代码来源:PartUtils.cpp

示例15: run

void GitCommand::run()
{
    if (Git::Constants::debug)
        qDebug() << "GitCommand::run" << m_workingDirectory << m_jobs.size();
    QProcess process;
    if (!m_workingDirectory.isEmpty())
        process.setWorkingDirectory(m_workingDirectory);

    process.setEnvironment(m_environment);

    QByteArray stdOut;
    QByteArray stdErr;
    QString error;

    const int count = m_jobs.size();
    int exitCode = -1;
    bool ok = true;
    for (int j = 0; j < count; j++) {
        if (Git::Constants::debug)
            qDebug() << "GitCommand::run" << j << '/' << count << m_jobs.at(j).arguments;

        process.start(m_binaryPath, m_basicArguments + m_jobs.at(j).arguments);
        if(!process.waitForStarted()) {
            ok = false;
            error += QString::fromLatin1("Error: \"%1\" could not be started: %2").arg(m_binaryPath, process.errorString());
            break;
        }

        process.closeWriteChannel();
        const int timeOutSeconds = m_jobs.at(j).timeout;
        if (!Utils::SynchronousProcess::readDataFromProcess(process, timeOutSeconds * 1000,
                                                            &stdOut, &stdErr)) {
            Utils::SynchronousProcess::stopProcess(process);
            ok = false;
            error += msgTimeout(timeOutSeconds);
            break;
        }

        error += QString::fromLocal8Bit(stdErr);
        exitCode = process.exitCode();
        switch (m_reportTerminationMode) {
        case NoReport:
            break;
        case ReportStdout:
            stdOut += msgTermination(exitCode, m_binaryPath, m_jobs.at(j).arguments).toUtf8();
            break;
        case ReportStderr:
            error += msgTermination(exitCode, m_binaryPath, m_jobs.at(j).arguments);
            break;
        }
    }

    // Special hack: Always produce output for diff
    if (ok && stdOut.isEmpty() && m_jobs.front().arguments.at(0) == QLatin1String("diff")) {
        stdOut += "The file does not differ from HEAD";
    } else {
        // @TODO: Remove, see below
        if (ok && m_jobs.front().arguments.at(0) == QLatin1String("status"))
            removeColorCodes(&stdOut);
    }

    if (ok && !stdOut.isEmpty())
        emit outputData(stdOut);

    if (!error.isEmpty())
        emit errorText(error);

    emit finished(ok, exitCode, m_cookie);
    if (ok)
        emit success();
    // As it is used asynchronously, we need to delete ourselves
    this->deleteLater();
}
开发者ID:TheProjecter,项目名称:project-qtcreator,代码行数:73,代码来源:gitcommand.cpp


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