Skip to content

Commit

Permalink
Bring back command echoing
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 16, 2022
1 parent e686222 commit b5f8f97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
8 changes: 1 addition & 7 deletions src/app/rstats/qgsrstatsconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,11 @@ QgsRStatsConsole::QgsRStatsConsole( QWidget *parent, QgsRStatsRunner *runner )

vl->addWidget( splitter );

#if 0
connect( mInputEdit, &QgsInteractiveRWidget::execCommand, this, [ = ]( const QString & command )
connect( mRunner, &QgsRStatsRunner::commandStarted, this, [ = ]( const QString & command )
{
if ( mRunner->busy() )
return;

mOutput->append( ( mOutput->text().isEmpty() ? QString() : QString( '\n' ) ) + QStringLiteral( "> " ) + command );
mOutput->moveCursorToEnd();
mRunner->execCommand( command );
} );
#endif

connect( mRunner, &QgsRStatsRunner::errorOccurred, this, [ = ]( const QString & error )
{
Expand Down
2 changes: 2 additions & 0 deletions src/app/rstats/qgsrstatsrunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,8 @@ QgsRStatsRunner::~QgsRStatsRunner()

int QgsRStatsRunner::execCommandImpl( const QString &command )
{
emit commandStarted( command );

// todo result handling...
QMetaObject::invokeMethod( mSession.get(), "execCommand", Qt::QueuedConnection,
Q_ARG( QString, command ) );
Expand Down
1 change: 1 addition & 0 deletions src/app/rstats/qgsrstatsrunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class QgsRStatsRunner: public QObject, public QgsCodeInterpreter
void showMessage( const QString &message );
void errorOccurred( const QString &error );
void busyChanged( bool busy );
void commandStarted( const QString &command );
void commandFinished( const QVariant &result );

protected:
Expand Down

0 comments on commit b5f8f97

Please sign in to comment.