Skip to content

Commit edd3b20

Browse files
committed
set client app params in record host
RecordHost will handle recording on local and remote devices so it need to know the arguments
1 parent 8bb0bf6 commit edd3b20

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

src/recordhost.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ void RecordHost::setHost(const QString& host)
210210
m_clientApplication.clear();
211211
emit clientApplicationChanged(m_clientApplication);
212212

213+
m_clientApplicationArguments.clear();
214+
emit clientApplicationArgumentsChanged(m_clientApplicationArguments);
215+
213216
m_perfCapabilities = {};
214217
emit perfCapabilitiesChanged(m_perfCapabilities);
215218

@@ -299,6 +302,16 @@ void RecordHost::setClientApplication(const QString& clientApplication)
299302
qWarning() << "is not implemented for remote";
300303
}
301304

305+
void RecordHost::setClientApplicationArguments(const QString& arguments)
306+
{
307+
Q_ASSERT(QThread::currentThread() == thread());
308+
309+
if (m_clientApplicationArguments != arguments) {
310+
m_clientApplicationArguments = arguments;
311+
emit clientApplicationArgumentsChanged(m_clientApplicationArguments);
312+
}
313+
}
314+
302315
void RecordHost::setOutputFileName(const QString& filePath)
303316
{
304317
if (isLocal()) {

src/recordhost.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ class RecordHost : public QObject
6060
}
6161
void setClientApplication(const QString& clientApplication);
6262

63+
QString clientApplicationArguments() const
64+
{
65+
return m_clientApplicationArguments;
66+
}
67+
void setClientApplicationArguments(const QString& arguments);
68+
6369
QString outputFileName() const
6470
{
6571
return m_outputFileName;
@@ -104,6 +110,7 @@ class RecordHost : public QObject
104110
void hostChanged();
105111
void currentWorkingDirectoryChanged(const QString& cwd); // Maybe QUrl
106112
void clientApplicationChanged(const QString& clientApplication);
113+
void clientApplicationArgumentsChanged(const QString& arguments);
107114
void perfCapabilitiesChanged(RecordHost::PerfCapabilities perfCapabilities);
108115
void isPerfInstalledChanged(bool isInstalled);
109116
void outputFileNameChanged(const QString& outputFileName);
@@ -117,6 +124,7 @@ class RecordHost : public QObject
117124
QString m_error;
118125
QString m_cwd;
119126
QString m_clientApplication;
127+
QString m_clientApplicationArguments;
120128
QString m_outputFileName;
121129
PerfCapabilities m_perfCapabilities;
122130
JobTracker m_checkPerfCapabilitiesJob;

src/recordpage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ RecordPage::RecordPage(QWidget* parent)
204204
});
205205

206206
connect(ui->applicationParametersBox, &QLineEdit::editingFinished, this, [this] {
207-
ui->multiConfig->saveCurrentConfig(); // TODO: set app params
207+
ui->multiConfig->saveCurrentConfig();
208+
m_recordHost->setClientApplicationArguments(ui->applicationParametersBox->text());
208209
});
209210

210211
auto settings = Settings::instance();

0 commit comments

Comments
 (0)