From 51cb37a3da592fefaf960b14a83cc96c99322ac8 Mon Sep 17 00:00:00 2001 From: Tobias Weiss Date: Tue, 17 Oct 2017 15:55:55 +0200 Subject: [PATCH] fixed missing cmd parameter for start session for selected clients button --- src/Lib/client.cpp | 6 +----- src/Lib/lablib.cpp | 1 + src/mainwindow.cpp | 5 ++--- src/mainwindow.ui | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Lib/client.cpp b/src/Lib/client.cpp index 95045b3..bd6d109 100755 --- a/src/Lib/client.cpp +++ b/src/Lib/client.cpp @@ -274,11 +274,7 @@ void lc::Client::StartZLeaf( const QString * argFakeName, QString cmd ) { == messageBoxRunningZLeafFound->button( QMessageBox::Yes ) ) || state != state_t::ZLEAF_RUNNING ) { QStringList arguments; - if ( argFakeName == nullptr && GetSessionPort() == 7000 ) { - arguments << "-i" << settings->pkeyPathUser - << QString{ settings->userNameOnClients + "@" + ip } - << cmd; - } else if ( argFakeName == nullptr ) { + if ( argFakeName == nullptr ) { arguments << "-i" << settings->pkeyPathUser << QString{ settings->userNameOnClients + "@" + ip } << cmd; diff --git a/src/Lib/lablib.cpp b/src/Lib/lablib.cpp index aef9889..78fa67a 100755 --- a/src/Lib/lablib.cpp +++ b/src/Lib/lablib.cpp @@ -182,5 +182,6 @@ QStringList lc::Lablib::getzLeafArgs( int sessionPort, QString zleafVersion ){ << QString::number( sessionPort- 7000 ); } + //Return the crafted QStringList return arguments; } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 83df214..2b992d4 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -638,13 +638,12 @@ void lc::MainWindow::on_PBViewDesktopFullControl_clicked() /* Session tab functions */ - void lc::MainWindow::on_PBStartzLeaf_clicked() { QModelIndexList activated_items = ui->TVClients->selectionModel()->selectedIndexes(); for ( QModelIndexList::ConstIterator it = activated_items.cbegin(); it != activated_items.cend(); ++it ) { if ( ( *it ).data( Qt::DisplayRole ).type() != 0 ) { Client *client = static_cast< Client* >( ( *it ).data( Qt::UserRole ).value< void * >() ); - client->StartZLeaf( nullptr ); + client->StartZLeaf( nullptr, ui->LEzLeafCommandline->text() ); } } } @@ -807,7 +806,7 @@ void lc::MainWindow::on_PBStartSession_clicked() { } } - //Set chosen Port + // Set chosen Port settings->SetChosenZTreePort(ui->SBPort->text().toInt()); // Increment port number int newPort = ui->SBPort->text().toInt() + 1; diff --git a/src/mainwindow.ui b/src/mainwindow.ui index da11085..20bcaf1 100755 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -64,7 +64,7 @@ - 0 + 1 true