libs: pass the port number to ksysguardd from KSGRD::SensorShellAgent::start()

why was it not passed? also the process of starting ksysguardd could
fail but true was returned anyway..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-02 16:26:54 +03:00
parent f197d7272c
commit 45a460a671

View file

@ -47,7 +47,7 @@ SensorShellAgent::~SensorShellAgent()
}
bool SensorShellAgent::start( const QString &host, const QString &shell,
const QString &command, int )
const QString &command, int port)
{
mDaemon = new QProcess();
mDaemon->setProcessChannelMode( QProcess::SeparateChannels );
@ -71,12 +71,12 @@ bool SensorShellAgent::start( const QString &host, const QString &shell,
QString program = args.takeAt(0);
mDaemon->start(program, args);
} else {
mArgs = mShell + " " + hostName() + " ksysguardd";
mArgs = mShell + " " + hostName() + " ksysguardd -p" + port;
mDaemon->start(mShell, QStringList() << hostName() << "ksysguardd");
}
return true;
return mDaemon->waitForStarted();
}
void SensorShellAgent::hostInfo( QString &shell, QString &command,