Changeset View
Changeset View
Standalone View
Standalone View
src/backends/sage/sagesession.cpp
Show First 20 Lines • Show All 342 Lines • ▼ Show 20 Line(s) | |||||
343 | 343 | | |||
344 | void SageSession::runFirstExpression() | 344 | void SageSession::runFirstExpression() | ||
345 | { | 345 | { | ||
346 | if(!m_expressionQueue.isEmpty()&&m_isInitialized) | 346 | if(!m_expressionQueue.isEmpty()&&m_isInitialized) | ||
347 | { | 347 | { | ||
348 | SageExpression* expr=m_expressionQueue.first(); | 348 | SageExpression* expr=m_expressionQueue.first(); | ||
349 | connect(expr, SIGNAL(statusChanged(Cantor::Expression::Status)), this, SLOT(currentExpressionChangedStatus(Cantor::Expression::Status))); | 349 | connect(expr, SIGNAL(statusChanged(Cantor::Expression::Status)), this, SLOT(currentExpressionChangedStatus(Cantor::Expression::Status))); | ||
350 | QString command=expr->command(); | 350 | QString command=expr->command(); | ||
351 | if(command.endsWith(QLatin1Char('?'))) | 351 | if(command.endsWith(QLatin1Char('?')) && !command.endsWith(QLatin1String("??"))) | ||
352 | command=QLatin1String("help(")+command.left(command.size()-1)+QLatin1Char(')'); | 352 | command=QLatin1String("help(")+command.left(command.size()-1)+QLatin1Char(')'); | ||
353 | if(command.startsWith(QLatin1Char('?'))) | 353 | if(command.startsWith(QLatin1Char('?'))) | ||
354 | command=QLatin1String("help(")+command.mid(1)+QLatin1Char(')'); | 354 | command=QLatin1String("help(")+command.mid(1)+QLatin1Char(')'); | ||
355 | 355 | | |||
356 | qDebug()<<"writing "<<command<<" to the process"; | 356 | qDebug()<<"writing "<<command<<" to the process"; | ||
357 | m_process->pty()->write(QString(command+QLatin1String("\n\n")).toUtf8()); | 357 | m_process->pty()->write(QString(command+QLatin1String("\n\n")).toUtf8()); | ||
358 | } | 358 | } | ||
359 | } | 359 | } | ||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |