23 #include <QTextStream>
52 #ifdef QGSCONTEXTHELP_REUSE
54 mSocket =
new QTcpSocket(
this );
55 connect(
mProcess, SIGNAL( readyReadStandardOutput() ), SLOT(
readPort() ) );
64 #ifdef QGSCONTEXTHELP_REUSE
77 QgsDebugMsg( QString(
"Help path is %1" ).arg( helpPath ) );
79 QProcess *process =
new QProcess;
80 process->start( helpPath, QStringList( context ) );
83 connect( process, SIGNAL( finished(
int, QProcess::ExitStatus ) ), SLOT(
processExited() ) );
86 connect( qApp, SIGNAL( aboutToQuit() ), process, SLOT( terminate() ) );
93 #ifdef QGSCONTEXTHELP_REUSE
95 QString p =
mProcess->readAllStandardOutput();
96 quint16 port = p.toUShort();
97 mSocket->connectToHost(
"localhost", port );
98 disconnect(
mProcess, SIGNAL( readyReadStandardOutput() ),
this, SLOT(
readPort() ) );
105 #ifdef QGSCONTEXTHELP_REUSE
107 QTextStream os( mSocket );
108 os << context <<
"\n";
109 QgsDebugMsg( QString(
"Sending help process context %1" ).arg( context ) );
123 #ifndef QGSCONTEXTHELP_REUSE