本文整理汇总了C++中readyReadStandardError函数的典型用法代码示例。如果您正苦于以下问题:C++ readyReadStandardError函数的具体用法?C++ readyReadStandardError怎么用?C++ readyReadStandardError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了readyReadStandardError函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QThread
PrologThread::PrologThread(qintptr socketId, QString prologPath, QObject *parent) :
QThread(parent), _socketId(socketId), _prologPath(prologPath), _cmdSize(0)
{
// We initialize client's prolog environemt
_process = new QProcess;
QObject::connect(this, SIGNAL(started()), this, SLOT(startProcess()));
QObject::connect(_process, SIGNAL(readyReadStandardOutput()), this, SLOT(readStdOut()));
QObject::connect(_process, SIGNAL(readyReadStandardError()), this, SLOT(readErrOut()));
QObject::connect(_process, SIGNAL(started()), this, SLOT(processStarted()));
QObject::connect(_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
_process->setProcessChannelMode(QProcess::MergedChannels);
_process->setProgram(_prologPath);
_process->setProcessEnvironment(QProcessEnvironment::systemEnvironment());
_process->setWorkingDirectory(QDir::homePath());
}
开发者ID:feda12,项目名称:prolog-suite-server,代码行数:15,代码来源:prologthread.cpp
示例2: m_cmd
ScriptResolver::ScriptResolver(const QString& exe) :
Tomahawk::Resolver()
, m_cmd( exe )
, m_num_restarts( 0 )
, m_msgsize( 0 )
, m_ready( false )
, m_stopped( false )
{
qDebug() << Q_FUNC_INFO << exe;
connect( &m_proc, SIGNAL(readyReadStandardError()), SLOT(readStderr()) );
connect( &m_proc, SIGNAL(readyReadStandardOutput()), SLOT(readStdout()) );
connect( &m_proc, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(cmdExited(int,QProcess::ExitStatus)) );
m_proc.start( m_cmd );
}
开发者ID:hatstand,项目名称:tomahawk,代码行数:15,代码来源:scriptresolver.cpp
示例3: QTextEdit
QTerminal::QTerminal(QWidget *parent, Qt::WindowFlags f) : QTextEdit(parent) {
setWindowFlags(f);
cmdStr = "";
shell = new QProcess();
shell->setProcessChannelMode(QProcess::MergedChannels);
QObject::connect(shell, SIGNAL(readyReadStandardOutput()), this, SLOT(readStandardOut()));
QObject::connect(shell, SIGNAL(readyReadStandardError()), this, SLOT(readStandardErr()));
shell->start("cmd.exe", QStringList() << "", QIODevice::ReadWrite);
//this->insertPlainText("TERMINAL VERY ALPHA QUALITY ON WIN32!\r\n");
// This var protects against mouse interference with the cursor
curCursorLoc = this->textCursor();
inputCharCount = 0;
histLocation = -1;
tempCmd = "";
}
开发者ID:spthaolt,项目名称:qscite,代码行数:15,代码来源:qterminal.cpp
示例4: QProcess
//----------------------------------------------------
void MainWindow::startUsbService()
{
mServiceStartError = false;
ui->btnBootstrapUSB->setEnabled(false);
ui->btnBootstrapUSB->setText("Starting...");
qApp->processEvents();
if (!mADBProcess)
{
mADBProcess = new QProcess(this);
connect(mADBProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(onADBProcessFinishes()));
connect(mADBProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(onADBProcessReadyRead()));
connect(mADBProcess, SIGNAL(readyReadStandardError()), this, SLOT(onADBErrorReadyRead()));
}
开发者ID:estan,项目名称:bbqscreen_client,代码行数:16,代码来源:mainwindow.cpp
示例5: QProcess
UpdateProcess::UpdateProcess(QObject *parent)
: QProcess(parent)
{
_currentCommand = NoCommand;
_socksPort = 0;
connect(this, SIGNAL(readyReadStandardError()),
this, SLOT(readStandardError()));
connect(this, SIGNAL(readyReadStandardOutput()),
this, SLOT(readStandardOutput()));
connect(this, SIGNAL(finished(int, QProcess::ExitStatus)),
this, SLOT(onFinished(int, QProcess::ExitStatus)));
setEnvironment(systemEnvironment());
}
开发者ID:Bodyfarm,项目名称:vidalia,代码行数:15,代码来源:UpdateProcess.cpp
示例6: QProcess
//----------------------------------------------------
QProcess* MainWindow::runAdb(const QStringList& params)
{
QProcess* process = new QProcess(this);
connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(onADBProcessReadyRead()));
connect(process, SIGNAL(readyReadStandardError()), this, SLOT(onADBErrorReadyRead()));
#ifndef PLAT_APPLE
process->start(ADB_PATH, params);
#else
process->start(QDir(QCoreApplication::applicationDirPath()).absolutePath() + "/" + ADB_PATH, params);
#endif
return process;
}
开发者ID:NickVanderPyle,项目名称:bbqscreen_client,代码行数:16,代码来源:mainwindow.cpp
示例7: _app
ProcessHandler::ProcessHandler(AppInstance* app,
const QString& projectPath,
Natron::OutputEffectInstance* writer)
: _app(app)
,_process(new QProcess)
,_writer(writer)
,_ipcServer(0)
,_bgProcessOutputSocket(0)
,_bgProcessInputSocket(0)
,_earlyCancel(false)
,_processLog()
{
///setup the server used to listen the output of the background process
_ipcServer = new QLocalServer();
QObject::connect(_ipcServer,SIGNAL(newConnection()),this,SLOT(onNewConnectionPending()));
QString serverName;
int randomNumber = std::rand();
{
QTemporaryFile tmpf(NATRON_APPLICATION_NAME "_OUTPUT_PIPE_" + QString::number(randomNumber));
tmpf.open();
serverName = tmpf.fileName();
}
_ipcServer->listen(serverName);
QStringList processArgs;
processArgs << projectPath << "-b" << "-w" << writer->getName().c_str();
processArgs << "--IPCpipe" << (_ipcServer->fullServerName());
///connect the useful slots of the process
QObject::connect(_process,SIGNAL(readyReadStandardOutput()),this,SLOT(onStandardOutputBytesWritten()));
QObject::connect(_process,SIGNAL(readyReadStandardError()),this,SLOT(onStandardErrorBytesWritten()));
QObject::connect(_process,SIGNAL(error(QProcess::ProcessError)),this,SLOT(onProcessError(QProcess::ProcessError)));
QObject::connect(_process,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(onProcessEnd(int,QProcess::ExitStatus)));
///start the process
_processLog.push_back("Starting background rendering: " + QCoreApplication::applicationFilePath());
_processLog.push_back(" ");
for (int i = 0; i < processArgs.size(); ++i) {
_processLog.push_back(processArgs[i] + " ");
}
_process->start(QCoreApplication::applicationFilePath(),processArgs);
}
开发者ID:blackearth2014,项目名称:Natron,代码行数:48,代码来源:ProcessHandler.cpp
示例8: getID
void KVirtual::startVde( const QString & vswitch )
{
uint id = getID();
KVirtualProcess * process = new KVirtualProcess( id, KVirtualProcess::SWITCH );
QStringList args;
QDir dir( vswitch );
QString buffer;
if ( dir.exists() )
{
m_view->addError( "Virtual switch is already exists but is not handled by me" );
return;
}
args << "-F" << "-sock" << vswitch;
process->setProgram( Settings::vde_switch_exe(), args );
process->setOutputChannelMode( KProcess::SeparateChannels );
process->setDataDir( vswitch );
connect( process,
SIGNAL( readyReadStandardOutput( uint ) ),
SLOT( readData( uint ) )
);
connect( process,
SIGNAL( readyReadStandardError( uint ) ),
SLOT( readError( uint ) )
);
connect( process,
SIGNAL( finished( uint, int, QProcess::ExitStatus ) ),
SLOT( closeProcess( uint, int, QProcess::ExitStatus ) )
);
connect( process,
SIGNAL( started( uint ) ),
SLOT( readStarted( uint ) )
);
m_view->addOutput( process->program().join( " " ) );
process->start();
m_processes[id] = process;
if ( process->error() == QProcess::FailedToStart || process->state() == QProcess::NotRunning )
{
buffer.setNum( id );
buffer.prepend( "Process" );
buffer.append( " failed to start" );
m_view->addError( buffer );
}
}
开发者ID:didier13150,项目名称:kvirtual,代码行数:48,代码来源:kvirtual.cpp
示例9: m_liteApp
GdbDebugger::GdbDebugger(LiteApi::IApplication *app, QObject *parent) :
LiteApi::IDebugger(parent),
m_liteApp(app),
m_envManager(0)
{
m_process = new QProcess(this);
m_asyncModel = new QStandardItemModel(this);
m_asyncItem = new QStandardItem;
m_asyncModel->appendRow(m_asyncItem);
/*
m_asyncModel->setHeaderData(0,Qt::Horizontal,"Reason");
m_asyncModel->setHeaderData(1,Qt::Horizontal,"Address");
m_asyncModel->setHeaderData(2,Qt::Horizontal,"Function");
m_asyncModel->setHeaderData(3,Qt::Horizontal,"File");
m_asyncModel->setHeaderData(4,Qt::Horizontal,"Line");
m_asyncModel->setHeaderData(5,Qt::Horizontal,"Thread ID");
m_asyncModel->setHeaderData(6,Qt::Horizontal,"Stoped Threads");
*/
m_varsModel = new QStandardItemModel(0,3,this);
m_varsModel->setHeaderData(0,Qt::Horizontal,"Name");
m_varsModel->setHeaderData(1,Qt::Horizontal,"Value");
m_varsModel->setHeaderData(2,Qt::Horizontal,"Type");
m_watchModel = new QStandardItemModel(0,3,this);
m_watchModel->setHeaderData(0,Qt::Horizontal,"Name");
m_watchModel->setHeaderData(1,Qt::Horizontal,"Value");
m_watchModel->setHeaderData(2,Qt::Horizontal,"Type");
m_framesModel = new QStandardItemModel(0,5,this);
m_framesModel->setHeaderData(0,Qt::Horizontal,"Level");
m_framesModel->setHeaderData(1,Qt::Horizontal,"Address");
m_framesModel->setHeaderData(2,Qt::Horizontal,"Function");
m_framesModel->setHeaderData(3,Qt::Horizontal,"File");
m_framesModel->setHeaderData(4,Qt::Horizontal,"Line");
m_libraryModel = new QStandardItemModel(0,2,this);
m_libraryModel->setHeaderData(0,Qt::Horizontal,"Id");
m_libraryModel->setHeaderData(1,Qt::Horizontal,"Thread Groups");
m_gdbinit = false;
m_gdbexit = false;
connect(app,SIGNAL(loaded()),this,SLOT(appLoaded()));
connect(m_process,SIGNAL(started()),this,SIGNAL(debugStarted()));
connect(m_process,SIGNAL(finished(int)),this,SLOT(finished(int)));
connect(m_process,SIGNAL(readyReadStandardError()),this,SLOT(readStdError()));
connect(m_process,SIGNAL(readyReadStandardOutput()),this,SLOT(readStdOutput()));
}
开发者ID:bezigon,项目名称:liteide,代码行数:48,代码来源:gdbdebugger.cpp
示例10: connect
bool FloppyAction::startProcess()
{
DEBUGSETUP;
connect(theProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
this, SLOT(processDone(int, QProcess::ExitStatus)));
connect(theProcess, SIGNAL(readyReadStandardOutput()),
this, SLOT(readStdOut()));
connect(theProcess, SIGNAL(readyReadStandardError()),
this, SLOT(readStdErr()));
theProcess->setEnv( QStringLiteral( "LC_ALL" ), QStringLiteral( "C" ) ); // We need the untranslated output of the tool
theProcess->setOutputChannelMode(KProcess::SeparateChannels);
theProcess->start();
return (theProcess->exitStatus() == QProcess::NormalExit);
}
开发者ID:KDE,项目名称:kfloppy,代码行数:16,代码来源:format.cpp
示例11: QProcess
void DebugView::runDebugger( QString const& newWorkingDirectory,
QString const& newTarget,
QString const& newArguments )
{
m_workingDirectory = newWorkingDirectory;
m_target = newTarget;
m_arguments = newArguments;
if( m_state == none )
{
m_outBuffer.clear();
m_errBuffer.clear();
m_errorList.clear();
//create a process to control GDB
m_debugProcess = new QProcess( this );
m_debugProcess->setWorkingDirectory( m_workingDirectory );
//use the shell to find gdb for us, rather than launching gdb directly
const char* shell = getenv( "SHELL" );
if( shell == NULL )
{
shell = "/bin/sh";
}
//prepare the m_arguments to pass to shell
QStringList args;
args.append( "-c" );
args.append( "gdb" );
connect( m_debugProcess, SIGNAL( error(QProcess::ProcessError) ),
this, SLOT( slotError() ) );
connect( m_debugProcess, SIGNAL( readyReadStandardError() ),
this, SLOT( slotReadDebugStdErr() ) );
connect( m_debugProcess, SIGNAL( readyReadStandardOutput() ),
this, SLOT( slotReadDebugStdOut() ) );
connect( m_debugProcess, SIGNAL( finished(int,QProcess::ExitStatus) ),
this, SLOT( slotDebugFinished(int,QProcess::ExitStatus) ) );
m_debugProcess->start( shell, args );
m_nextCommands << "set pagination off";
m_state = ready;
}
开发者ID:rtaycher,项目名称:kate,代码行数:47,代码来源:debugview.cpp
示例12: QProcess
void MainWindow::bash(QString command)
{
QProcess *p = new QProcess( this );
if (p)
{
p->setEnvironment( QProcess::systemEnvironment() );
p->setProcessChannelMode( QProcess::MergedChannels );
p->start( command );
p->waitForStarted();
connect( p, SIGNAL(readyReadStandardOutput()), this, SLOT(ReadOut()) );
connect( p, SIGNAL(readyReadStandardError()), this, SLOT(ReadErr()) );
}
}
开发者ID:audacioustux,项目名称:lamp-control-qt,代码行数:17,代码来源:mainwindow.cpp
示例13: connect
int MainWindow::startRun()
{
ui->lbInfo->setText(gainstart);
p = new QProcess;
connect(p, SIGNAL(readyReadStandardOutput()), this, SLOT(redFromStdOut()));
connect(p, SIGNAL(readyReadStandardError()), this, SLOT(redFromStdErr()));
connect(p, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError(QProcess::ProcessError)));
connect(p, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished(int,QProcess::ExitStatus)));
p->start(filename);
bStart = p->waitForStarted();
//bFinish = p->waitForFinished(-1);
if(bStart)
return 1;
else
return -1;
// return 1;
}
开发者ID:buaazp,项目名称:GoAgentUI,代码行数:17,代码来源:mainwindow.cpp
示例14: QProcess
void MainWindow::on_downloadbutton_clicked()
{
QProcess *download = new QProcess();
if (download)
{
QString url;
url = ui->urlbox->text();
// qDebug()<<home;
qDebug()<<url;
download->start("wget", QStringList() << url << "-P" << "/home/arun/Downloads/arun");
qDebug()<<download;
download->waitForStarted();
connect( download, SIGNAL(readyReadStandardOutput()), this, SLOT(on_textBrowser_sourceChanged()) );
connect( download, SIGNAL(readyReadStandardError()), this, SLOT(ReadErr()) );
}
}
开发者ID:arunpyasi,项目名称:arun-download-manager,代码行数:17,代码来源:mainwindow.cpp
示例15: QProcess
void ROSImportWizardPage::slotGenerateCodeBlocksProjectFile()
{
// Generate CodeBlocks Project File
m_runCmake = new QProcess();
connect(m_runCmake, SIGNAL(readyReadStandardOutput()),this, SLOT(slotUpdateStdText()));
connect(m_runCmake, SIGNAL(readyReadStandardError()),this, SLOT(slotUpdateStdError()));
m_hasValidCodeBlocksProjectFile = false;
if (ROSUtils::sourceWorkspace(m_runCmake, m_wsDir, d->m_ui.distributionComboBox->currentText()))
{
if (ROSUtils::generateCodeBlocksProjectFile(m_runCmake, m_srcDir, m_bldDir))
{
m_hasValidCodeBlocksProjectFile = true;
}
}
validChangedHelper();
slotActivated();
}
开发者ID:130s,项目名称:ros_qtc_plugins,代码行数:17,代码来源:ros_project_wizard.cpp
示例16: disconnect
// ------------------------------------------------------------------------
bool OctaveWindow::startOctave()
{
if(octProcess.state()==QProcess::Running)
return true;
QString Program;
QStringList Arguments;
QString OctavePath = QDir::toNativeSeparators(QucsSettings.OctaveExecutable);
// Override Octave path by enviroment variable if it is set
if (QucsSettings.QucsOctave.isEmpty()) Program = OctavePath;
else Program = QucsSettings.QucsOctave;
Arguments << "--no-history" << "-i" << "-f" << "-p"
<< QDir::toNativeSeparators(QucsSettings.OctaveDir); // m-files location
disconnect(&octProcess, 0, 0, 0);
connect(&octProcess, SIGNAL(readyReadStandardError()), SLOT(slotDisplayErr()));
connect(&octProcess, SIGNAL(readyReadStandardOutput()), SLOT(slotDisplayMsg()));
connect(&octProcess, SIGNAL(finished(int)), SLOT(slotOctaveEnded(int)));
#ifdef __MINGW32__
QString sep(";"); // path separator
#else
QString sep(":");
#endif
// append process PATH, othewise Octave does not find gnuplot
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("PATH", env.value("PATH") + sep + QucsSettings.BinDir );
octProcess.setProcessEnvironment(env);
output->clear();
qDebug() << "Command :" << Program << Arguments.join(" ");
octProcess.start(Program, Arguments);
octProcess.waitForStarted();
if(octProcess.state()!=QProcess::Running) {
output->setText(tr("ERROR: Failed to execute \"%1\"").arg(Program));
return false;
}
adjustDirectory();
return true;
}
开发者ID:Qucs,项目名称:qucs,代码行数:46,代码来源:octave_window.cpp
示例17: QDialog
/*
Uploader handles uploading a binary image to a board. It fires up a QProcess
and runs the uploader with flags determined by settings in Preferences.
*/
Uploader::Uploader(MainWindow *mainWindow) : QDialog( 0 )
{
this->mainWindow = mainWindow;
setupUi(this);
connect(this, SIGNAL(finished(int)), this, SLOT(onDialogClosed()));
connect(&uploader, SIGNAL(readyReadStandardOutput()), this, SLOT(filterOutput()));
connect(&uploader, SIGNAL(readyReadStandardError()), this, SLOT(filterError()));
connect(&uploader, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(uploadFinished(int, QProcess::ExitStatus)));
connect(&uploader, SIGNAL(error(QProcess::ProcessError)), this, SLOT(onError(QProcess::ProcessError)));
connect(browseButton, SIGNAL(clicked()), this, SLOT(onBrowseButton()));
connect(uploadButton, SIGNAL(clicked()), this, SLOT(onUploadButton()));
QSettings settings;
QString lastFilePath = settings.value("last_firmware_upload", QDir::homePath()).toString();
browseEdit->setText(lastFilePath);
progressBar->reset();
resize(gridLayout->sizeHint());
}
开发者ID:sanjog47,项目名称:makecontroller,代码行数:22,代码来源:Uploader.cpp
示例18: QTextEdit
LogTextEdit::LogTextEdit(QWidget *parent)
: QTextEdit(parent), notifier_(OutputReader::instance())
{
// set flags
setReadOnly(true);
setLineWrapMode(QTextEdit::NoWrap);
if (!notifier_.redirect())
{
setHtml("ERROR: Could not start output redirection");
notifier_.cancelRedirect();
return;
}
// setup slots
connect(¬ifier_, SIGNAL(readyReadStandardError()), this, SLOT(standardErrorReady()));
connect(¬ifier_, SIGNAL(readyReadStandardOutput()), this, SLOT(standardOutputReady()));
}
开发者ID:Matroska-Org,项目名称:dvdmenuxtractor,代码行数:18,代码来源:logtextedit.cpp
示例19: connect
void PluginKateTextFilter::runFilter(KTextEditor::View *kv, const QString &filter)
{
m_strFilterOutput.clear();
m_stderrOutput.clear();
if (!m_pFilterProcess)
{
m_pFilterProcess = new KProcess;
connect (m_pFilterProcess, SIGNAL(readyReadStandardOutput()),
this, SLOT(slotFilterReceivedStdout()));
connect (m_pFilterProcess, SIGNAL(readyReadStandardError()),
this, SLOT(slotFilterReceivedStderr()));
connect (m_pFilterProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
this, SLOT(slotFilterProcessExited(int,QProcess::ExitStatus)));
}
开发者ID:benpope82,项目名称:kate,代码行数:18,代码来源:plugin_katetextfilter.cpp
示例20: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
this->statusBar()->setSizeGripEnabled(true);
program = "C:/ffmpeg/bin/ffprobe.exe";
programFFMPEG = "C:/ffmpeg/bin/ffmpeg.exe";
valid = false;
stopped = false;
infoProcess = new QProcess(this);
converssion = new QProcess(this);
duration = 0;
connect(infoProcess, SIGNAL(started()), this, SLOT(processStarted()));
connect(infoProcess,SIGNAL(readyReadStandardOutput()),this,SLOT(extractInformation()));
connect(converssion, SIGNAL(finished(int)), this, SLOT(encodingFinished()));
connect(converssion,SIGNAL(readyReadStandardError()),this,SLOT(readOutput()));
}
开发者ID:simon-baehler,项目名称:IHM-labo01,代码行数:18,代码来源:mainwindow.cpp
注:本文中的readyReadStandardError函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论